diff --git a/application/index/controller/Index.php b/application/index/controller/Index.php index b6426174..98becc33 100644 --- a/application/index/controller/Index.php +++ b/application/index/controller/Index.php @@ -33,7 +33,7 @@ class Index extends Base // 实例化管理员数据模型 $admin = new \app\admin\model\Admin; // 获取管理员信息 - $userinfo = $admin + $list->userinfo = $admin ->where('username',session('username')) ->field('username,id') ->find(); @@ -43,8 +43,6 @@ class Index extends Base // 模版赋值 $this->assign('list',$list); - $this->assign('userinfo',$userinfo); - // 渲染输出 return $this->fetch(); @@ -52,6 +50,7 @@ class Index extends Base public function welcome() { + //实例化数据模型 $sysbasemod = new sysbasemod(); diff --git a/application/index/view/index/index.html b/application/index/view/index/index.html index d1881134..51ea05b0 100644 --- a/application/index/view/index/index.html +++ b/application/index/view/index/index.html @@ -1,220 +1,328 @@ - - + + - - - - - - - - - - - - -{css href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/css/H-ui.min.css" /} -{css href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/css/H-ui.admin.css" /} -{css href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.css" /} -{css href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/default/skin.css" id="skin" /} -{css rel="stylesheet" type="text/css" href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/css/style.css" /} - -{$list.title} - - + + 后台登录-X-admin2.1 + + + + + + + + + + + + + - -{load href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/css/style.css" /} - - -
- -
-
- - -
-
-
- -
- -
- -{js href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/jquery/1.9.1/jquery.min.js"} -{js href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/layer/2.4/layer.js"} -{js href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/js/H-ui.min.js"} -{js href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/js/H-ui.admin.js"} - - - -{js href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/jquery.contextmenu/jquery.contextmenu.r2.js"} - + +
+ +
+ +
+ + + +
+ + + +
+
+ +
+
+ + + +
+
+ +
+
+
关闭当前
+
关闭其它
+
关闭全部
+
+
+
+
+ +
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/application/index/view/index/welcome.html b/application/index/view/index/welcome.html index 3906f252..37bdf0d4 100644 --- a/application/index/view/index/welcome.html +++ b/application/index/view/index/welcome.html @@ -1,95 +1,166 @@ - - - - - - - - - -{css href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/css/H-ui.min.css" /} -{css href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/css/H-ui.admin.css" /} -{css href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.css" /} -{css href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/default/skin.css" id="skin" /} -{css rel="stylesheet" type="text/css" href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/css/style.css" /} - -我的桌面 - - -
-

欢迎使用{$list.title} v{$list.version}!

-

登录次数:{$list.denglu.denglucishu}

-

上次登录IP:{$list.denglu.lastip} 上次登录时间:{$list.denglu.lasttime}

-

如果需要帮助,请单击左上角“成绩统计”

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
服务器信息
ThinkPhp版本号{$Think.version}
服务器IP地址{$list.server.SERVER_ADDR}
服务器域名{$list.server.HTTP_REFERER}
服务器端口 {$list.server.SERVER_PORT}
服务器版本{$list.server.SERVER_SOFTWARE}
系统所在文件夹 {$list.env.ROOT_PATH}
服务器脚本超时时间 3600秒
缓存超时时间 3天
服务器的语言种类 {$list.yuyan}
服务器IE版本 IE 11.0
-
- - -{js href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/jquery/1.9.1/jquery.min.js"} -{js href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/js/H-ui.min.js"} - - - -{js href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/jquery.contextmenu/jquery.contextmenu.r2.js"} - + + + + + 欢迎页面-X-admin2.1 + + + + + + + +
+
欢迎管理员: + test!当前时间:2018-04-25 20:50:53 在tab打开 +
+
+ 数据统计 + +
+
+ 系统通知 +
+ + + + + + + + + +
+ 新版x-admin 2.0上线了 +
+ 交流qq群:(519492808) +
+
+
+
+ 系统信息 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
xxx版本1.0.180420
服务器地址x.xuebingsi.com
操作系统WINNT
运行环境Apache/2.4.23 (Win32) OpenSSL/1.0.2j mod_fcgid/2.3.9
PHP版本5.6.27
PHP运行方式cgi-fcgi
MYSQL版本5.5.53
ThinkPHP5.0.18
上传附件限制2M
执行时间限制30s
剩余空间86015.2M
+
+
+
+ 开发团队 +
+ + + + + + + + + + +
版权所有xuebingsi(xuebingsi) + 访问官网
开发者马志斌(113664000@qq.com)
+
+
+
感谢layui,百度Echarts,jquery,本系统由x-admin提供技术支持。
+
+ + \ No newline at end of file diff --git a/application/login/controller/Index.php b/application/login/controller/Index.php index 281d3fb0..c247d452 100644 --- a/application/login/controller/Index.php +++ b/application/login/controller/Index.php @@ -16,6 +16,11 @@ class Index extends Controller // 显示登录界面 public function index() { + // 清除cookie + cookie(null, 'think_'); + // 清除session(当前作用域) + session(null); + // 渲染输出 return $this->fetch(); } diff --git a/config/template.php b/config/template.php index 6db89766..5d0ba322 100644 --- a/config/template.php +++ b/config/template.php @@ -35,5 +35,6 @@ return [ // 全局替换 'tpl_replace_string' => [ '__UPLOAD__'=>'/uploads', + '__STATIC__'=>'../static', ] ]; diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/404.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/404.html deleted file mode 100644 index a2778ddc..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/404.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - -404页面 - - -
-

- 404 -

-

不好意思,您访问的页面不存在~

-

您可以: - < 返回上一页 - | - 去首页 > -

-
- - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/H-ui前端框架官方网站.URL b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/H-ui前端框架官方网站.URL deleted file mode 100644 index 20838562..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/H-ui前端框架官方网站.URL +++ /dev/null @@ -1,2 +0,0 @@ -[InternetShortcut] -URL=http://www.h-ui.net/ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/LICENSE.md b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/LICENSE.md deleted file mode 100644 index fdec9f96..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/LICENSE.md +++ /dev/null @@ -1,20 +0,0 @@ -# The MIT License (MIT) - -Copyright (c) 2013-2017 H-ui.admin Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/README.md b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/README.md deleted file mode 100644 index 6c3267c7..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# 关于该项目 - -***H-ui.admin***是用*H-ui*前端框架开发的轻量级网站后台模版采用源生 html 语言,完全免费,简单灵活,兼容性好让您快速搭建中小型网站后台 - -# 关于作者 diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/_blank.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/_blank.html deleted file mode 100644 index 1ec4f31d..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/_blank.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - -空白页 - - -
- 这是一个空白页 -
- - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/_footer.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/_footer.html deleted file mode 100644 index 8f032114..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/_footer.html +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/_header.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/_header.html deleted file mode 100644 index cd990892..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/_header.html +++ /dev/null @@ -1,41 +0,0 @@ - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/_menu.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/_menu.html deleted file mode 100644 index 175cff4b..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/_menu.html +++ /dev/null @@ -1,90 +0,0 @@ - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/_meta.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/_meta.html deleted file mode 100644 index 9d44caa1..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/_meta.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/admin-add.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/admin-add.html deleted file mode 100644 index 2774121d..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/admin-add.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - - - - - - - - -添加管理员 - 管理员管理 - H-ui.admin v3.1 - - - - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
- - -
-
- - -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -

0/100

-
-
-
-
- -
-
-
-
- - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/admin-list.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/admin-list.html deleted file mode 100644 index ac4eb733..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/admin-list.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - - - - - - - - - - - -管理员列表 - - - -
-
日期范围: - - - - - - -
-
批量删除 添加管理员 共有数据:54 条
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
员工列表
ID登录名手机邮箱角色加入时间是否已启用操作
1admin13000000000admin@mail.com超级管理员2014-6-11 11:11:42已启用
2zhangsan13000000000admin@mail.com栏目编辑2014-6-11 11:11:42已停用
-
- - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/admin-password-edit.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/admin-password-edit.html deleted file mode 100644 index 854ebffe..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/admin-password-edit.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - -修改密码 - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
修改密码
旧密码: -
新密码: -
再次输入新密码: -
- -
-
-
- - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/admin-permission.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/admin-permission.html deleted file mode 100644 index f67c90fb..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/admin-permission.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - -权限管理 - - - -
-
-
- - -
-
-
批量删除 添加权限节点 共有数据:54 条
- - - - - - - - - - - - - - - - - - - - - - -
权限节点
ID权限名称字段名操作
1栏目添加
-
- - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/admin-role-add.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/admin-role-add.html deleted file mode 100644 index 42d50b59..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/admin-role-add.html +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -新建网站角色 - 管理员管理 - H-ui.admin v3.1 - - - - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
-
- -
-
-
-
- -
-
- - - - - - -
-
-
-
- -
-
- - - - - - -
-
-
-
-
-
- -
-
-
-
- -
-
- - - - - -
-
-
-
-
-
-
-
- -
-
-
-
- - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/admin-role.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/admin-role.html deleted file mode 100644 index ffb2db50..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/admin-role.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - - - - - - -角色管理 - - - -
-
批量删除 添加角色 共有数据:54 条
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
角色管理
ID角色名用户列表描述操作
1超级管理员admin拥有至高无上的权利
2总编张三具有添加、审核、发布、删除内容的权限
3栏目主辑李四,王五只对所在栏目具有添加、审核、发布、删除内容的权限
4栏目编辑赵六,钱七只对所在栏目具有添加、删除草稿等权利。
-
- - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/article-add.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/article-add.html deleted file mode 100644 index a0b2aed1..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/article-add.html +++ /dev/null @@ -1,336 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -新增文章 - 资讯管理 - H-ui.admin v3.1 - - - - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -

0/200

-
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
- - -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
- - -
- -
-
-
- -
-
-
-
选择图片
- -
-
-
-
- -
- -
-
-
-
- - - -
-
-
-
- - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/article-class-edit.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/article-class-edit.html deleted file mode 100644 index 95010635..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/article-class-edit.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - -分类编辑 - - -
-
- 上级栏目: - - 排序: - 分类名: -
-
-
- - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/article-class.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/article-class.html deleted file mode 100644 index 736eb087..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/article-class.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - -分类管理 - - - -
-
- 上级栏目: - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ID排序分类名称操作
11一级分类
22  ├ 二级分类
33  ├ 二级分类
-
-
- - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/article-list.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/article-list.html deleted file mode 100644 index 4b495703..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/article-list.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - - - - - - - - -资讯列表 - - - -
-
- - - - 日期范围: - - - - - - -
-
批量删除 添加资讯 共有数据:54 条
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ID标题分类来源更新时间浏览次数发布状态操作
10001资讯标题行业动态H-ui2014-6-11 11:11:4221212已发布
10002资讯标题行业动态H-ui2014-6-11 11:11:4221212草稿审核
-
-
- - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/change-password.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/change-password.html deleted file mode 100644 index c62c2d45..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/change-password.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -修改密码 - 会员管理 - H-ui.admin v3.1 - - - - -
-
-
- -
张三
-
-
- -
- -
-
-
- -
- -
-
-
-
- -
-
-
-
- - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/charts-1.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/charts-1.html deleted file mode 100644 index 073187bf..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/charts-1.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - -折线图 - - - -
-
特别声明:Highcharts 是一个用纯 JavaScript编写的一个图表库,仅免费提供给个人学习、个人网站,如果在商业项目中使用,请去Highcharts官网网站购买商业授权。或者您也可以选择其他免费的第三方图表插件,例如百度echarts。H-ui.admin不承担任何版权问题。
-
-
- - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/charts-2.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/charts-2.html deleted file mode 100644 index 2de6110d..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/charts-2.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - - - - - - - - - - -时间轴折线图 - - - -
-
特别声明:Highcharts 是一个用纯 JavaScript编写的一个图表库,仅免费提供给个人学习、个人网站,如果在商业项目中使用,请去Highcharts官网网站购买商业授权。或者您也可以选择其他免费的第三方图表插件,例如百度echarts。H-ui.admin不承担任何版权问题。
-
-
- - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/charts-3.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/charts-3.html deleted file mode 100644 index 8dc2fb96..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/charts-3.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - -区域图 - - - -
-
特别声明:Highcharts 是一个用纯 JavaScript编写的一个图表库,仅免费提供给个人学习、个人网站,如果在商业项目中使用,请去Highcharts官网网站购买商业授权。或者您也可以选择其他免费的第三方图表插件,例如百度echarts。H-ui.admin不承担任何版权问题。
-
-
- - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/charts-4.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/charts-4.html deleted file mode 100644 index 27938a94..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/charts-4.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - - - - - - -柱状图统计 - - - -
-
特别声明:Highcharts 是一个用纯 JavaScript编写的一个图表库,仅免费提供给个人学习、个人网站,如果在商业项目中使用,请去Highcharts官网网站购买商业授权。或者您也可以选择其他免费的第三方图表插件,例如百度echarts。H-ui.admin不承担任何版权问题。
-
-
- - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/charts-5.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/charts-5.html deleted file mode 100644 index 417611ad..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/charts-5.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - -饼状图 - - - -
-
特别声明:Highcharts 是一个用纯 JavaScript编写的一个图表库,仅免费提供给个人学习、个人网站,如果在商业项目中使用,请去Highcharts官网网站购买商业授权。或者您也可以选择其他免费的第三方图表插件,例如百度echarts。H-ui.admin不承担任何版权问题。
-
-
- - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/charts-6.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/charts-6.html deleted file mode 100644 index 032ff6f0..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/charts-6.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - -3D柱状图 - - - -
-
特别声明:Highcharts 是一个用纯 JavaScript编写的一个图表库,仅免费提供给个人学习、个人网站,如果在商业项目中使用,请去Highcharts官网网站购买商业授权。或者您也可以选择其他免费的第三方图表插件,例如百度echarts。H-ui.admin不承担任何版权问题。
-
-
- - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/charts-7.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/charts-7.html deleted file mode 100644 index 9b13e61c..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/charts-7.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - -3D饼状图 - - - -
-
特别声明:Highcharts 是一个用纯 JavaScript编写的一个图表库,仅免费提供给个人学习、个人网站,如果在商业项目中使用,请去Highcharts官网网站购买商业授权。或者您也可以选择其他免费的第三方图表插件,例如百度echarts。H-ui.admin不承担任何版权问题。
-
-
- - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/codeing.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/codeing.html deleted file mode 100644 index 13aeb81b..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/codeing.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - -我的桌面 - - -
-

Sorry!功能暂且开发中……
-下一版本更新!

-
- - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/favicon.ico b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/favicon.ico deleted file mode 100644 index 5dfb6037..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/favicon.ico and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/feedback-list.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/feedback-list.html deleted file mode 100644 index 9f31f7d6..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/feedback-list.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - - - - - - - - - -意见反馈 - - - -
-
日期范围: - - - - - - -
-
批量删除 共有数据:88 条
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ID用户名留言内容操作
1
- 张三 13000000000 admin@mail.com
- -
留言内容
1
- 张三 13000000000 admin@mail.com
- -
留言内容
1
- 张三 13000000000 admin@mail.com
- -
留言内容
1
- 张三 13000000000 admin@mail.com
- -
留言内容
-
-
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/index-2.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/index-2.html deleted file mode 100644 index 5a5b94d2..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/index-2.html +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - - - - - - - - - - - - -H-ui.admin v3.1 - - - - - - - -
- -
-
- - -
-
-
- -
- -
- - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/index.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/index.html deleted file mode 100644 index 72913168..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/index.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - - - - - - - - - - - - -H-ui.admin v3.1 - - - - - - - -
- -
-
- - -
-
-
- -
- -
- - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/DD_belatedPNG_0.0.8a-min.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/DD_belatedPNG_0.0.8a-min.js deleted file mode 100644 index 6062fb3c..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/DD_belatedPNG_0.0.8a-min.js +++ /dev/null @@ -1,13 +0,0 @@ -/** -* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML . -* Author: Drew Diller -* Email: drew.diller@gmail.com -* URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/ -* Version: 0.0.8a -* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_belatedPNG/#license -* -* Example usage: -* DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector -* DD_belatedPNG.fixPng( someNode ); // argument is an HTMLDomElement -**/ -var DD_belatedPNG={ns:"DD_belatedPNG",imgSize:{},delay:10,nodesFixed:0,createVmlNameSpace:function(){if(document.namespaces&&!document.namespaces[this.ns]){document.namespaces.add(this.ns,"urn:schemas-microsoft-com:vml")}},createVmlStyleSheet:function(){var b,a;b=document.createElement("style");b.setAttribute("media","screen");document.documentElement.firstChild.insertBefore(b,document.documentElement.firstChild.firstChild);if(b.styleSheet){b=b.styleSheet;b.addRule(this.ns+"\\:*","{behavior:url(#default#VML)}");b.addRule(this.ns+"\\:shape","position:absolute;");b.addRule("img."+this.ns+"_sizeFinder","behavior:none; border:none; position:absolute; z-index:-1; top:-10000px; visibility:hidden;");this.screenStyleSheet=b;a=document.createElement("style");a.setAttribute("media","print");document.documentElement.firstChild.insertBefore(a,document.documentElement.firstChild.firstChild);a=a.styleSheet;a.addRule(this.ns+"\\:*","{display: none !important;}");a.addRule("img."+this.ns+"_sizeFinder","{display: none !important;}")}},readPropertyChange:function(){var b,c,a;b=event.srcElement;if(!b.vmlInitiated){return}if(event.propertyName.search("background")!=-1||event.propertyName.search("border")!=-1){DD_belatedPNG.applyVML(b)}if(event.propertyName=="style.display"){c=(b.currentStyle.display=="none")?"none":"block";for(a in b.vml){if(b.vml.hasOwnProperty(a)){b.vml[a].shape.style.display=c}}}if(event.propertyName.search("filter")!=-1){DD_belatedPNG.vmlOpacity(b)}},vmlOpacity:function(b){if(b.currentStyle.filter.search("lpha")!=-1){var a=b.currentStyle.filter;a=parseInt(a.substring(a.lastIndexOf("=")+1,a.lastIndexOf(")")),10)/100;b.vml.color.shape.style.filter=b.currentStyle.filter;b.vml.image.fill.opacity=a}},handlePseudoHover:function(a){setTimeout(function(){DD_belatedPNG.applyVML(a)},1)},fix:function(a){if(this.screenStyleSheet){var c,b;c=a.split(",");for(b=0;bn.H){i.B=n.H}d.vml.image.shape.style.clip="rect("+i.T+"px "+(i.R+a)+"px "+i.B+"px "+(i.L+a)+"px)"}else{d.vml.image.shape.style.clip="rect("+f.T+"px "+f.R+"px "+f.B+"px "+f.L+"px)"}},figurePercentage:function(d,c,f,a){var b,e;e=true;b=(f=="X");switch(a){case"left":case"top":d[f]=0;break;case"center":d[f]=0.5;break;case"right":case"bottom":d[f]=1;break;default:if(a.search("%")!=-1){d[f]=parseInt(a,10)/100}else{e=false}}d[f]=Math.ceil(e?((c[b?"W":"H"]*d[f])-(c[b?"w":"h"]*d[f])):parseInt(a,10));if(d[f]%2===0){d[f]++}return d[f]},fixPng:function(c){c.style.behavior="none";var g,b,f,a,d;if(c.nodeName=="BODY"||c.nodeName=="TD"||c.nodeName=="TR"){return}c.isImg=false;if(c.nodeName=="IMG"){if(c.src.toLowerCase().search(/\.png$/)!=-1){c.isImg=true;c.style.visibility="hidden"}else{return}}else{if(c.currentStyle.backgroundImage.toLowerCase().search(".png")==-1){return}}g=DD_belatedPNG;c.vml={color:{},image:{}};b={shape:{},fill:{}};for(a in c.vml){if(c.vml.hasOwnProperty(a)){for(d in b){if(b.hasOwnProperty(d)){f=g.ns+":"+d;c.vml[a][d]=document.createElement(f)}}c.vml[a].shape.stroked=false;c.vml[a].shape.appendChild(c.vml[a].fill);c.parentNode.insertBefore(c.vml[a].shape,c)}}c.vml.image.shape.fillcolor="none";c.vml.image.fill.type="tile";c.vml.color.fill.on=false;g.attachHandlers(c);g.giveLayout(c);g.giveLayout(c.offsetParent);c.vmlInitiated=true;g.applyVML(c)}};try{document.execCommand("BackgroundImageCache",false,true)}catch(r){}DD_belatedPNG.createVmlNameSpace();DD_belatedPNG.createVmlStyleSheet(); \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/demo.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/demo.html deleted file mode 100644 index cf6adb73..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/demo.html +++ /dev/null @@ -1,1648 +0,0 @@ - - - - -Hui-iconfont_v1.0.8 - - - - - -
-

Hui-iconfont_v1.0.8

-

最后更新日期:2016.06.21 比1.0.7版本增加10个图标

- -

操作相关

- -

菜单相关

- -

天气相关

- -

用户相关

- -

表情相关

- -

社区相关

- -

统计相关

- -

箭头相关

- -

电商相关

- -

编辑器

- -

银行、支付相关

- -

其他

- -
-

挑选相应图标并获取字体编码,应用于页面

-
<i class="Hui-iconfont">&#xe684;</i>
-
-
- - diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.css deleted file mode 100644 index ab6c6c82..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.css +++ /dev/null @@ -1,328 +0,0 @@ -/* -----------H-ui前端框架------------- -* iconfont.css v1.0.8 -* http://www.h-ui.net/ -* Created & Modified by guojunhui -* Date modified 2016.06.21 -* -* Copyright 2013-2015 北京颖杰联创科技有限公司 All rights reserved. -* Licensed under MIT license. -* http://opensource.org/licenses/MIT -* -*/ -@font-face {font-family: "Hui-iconfont"; - src: url('iconfont.eot'); /* IE9*/ - src: url('iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url('iconfont.woff') format('woff'), /* chrome、firefox */ - url('iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ - url('iconfont.svg#Hui-iconfont') format('svg'); /* iOS 4.1- */ -} - -.Hui-iconfont { - font-family:"Hui-iconfont" !important; - font-style:normal; - -webkit-font-smoothing: antialiased; - -webkit-text-stroke-width: 0.2px; - -moz-osx-font-smoothing: grayscale; -} -.Hui-iconfont-gotop:before { content: "\e684"; } -.Hui-iconfont-music:before { content: "\e60f"; } -.Hui-iconfont-tags:before { content: "\e64b"; } -.Hui-iconfont-jieri:before { content: "\e727"; } -.Hui-iconfont-jishiqi:before { content: "\e728"; } -.Hui-iconfont-pad:before { content: "\e64c"; } -.Hui-iconfont-lunzi:before { content: "\e64d"; } -.Hui-iconfont-jiandao:before { content: "\e64e"; } -.Hui-iconfont-xianshiqi:before { content: "\e64f"; } -.Hui-iconfont-zhaoxiangji:before { content: "\e650"; } -.Hui-iconfont-danfanxiangji:before { content: "\e651"; } -.Hui-iconfont-dayinji:before { content: "\e652"; } -.Hui-iconfont-user-zhanzhang:before { content: "\e653"; } -.Hui-iconfont-chajian:before { content: "\e654"; } -.Hui-iconfont-arrow1-bottom:before { content: "\e674"; } -.Hui-iconfont-arrow1-left:before { content: "\e678"; } -.Hui-iconfont-arrow1-top:before { content: "\e679"; } -.Hui-iconfont-arrow1-right:before { content: "\e67a"; } -.Hui-iconfont-jieri1:before { content: "\e655"; } -.Hui-iconfont-face-weixiao:before { content: "\e656"; } -.Hui-iconfont-face-chijing:before { content: "\e657"; } -.Hui-iconfont-face-dai:before { content: "\e658"; } -.Hui-iconfont-face-shuaku:before { content: "\e659"; } -.Hui-iconfont-face-mogui:before { content: "\e65a"; } -.Hui-iconfont-face-ganga:before { content: "\e65b"; } -.Hui-iconfont-face-qin:before { content: "\e65c"; } -.Hui-iconfont-face-nu:before { content: "\e65d"; } -.Hui-iconfont-face-zhayan:before { content: "\e65e"; } -.Hui-iconfont-face-shengqi:before { content: "\e65f"; } -.Hui-iconfont-face-ma:before { content: "\e660"; } -.Hui-iconfont-face-bishi:before { content: "\e661"; } -.Hui-iconfont-face-maimeng:before { content: "\e662"; } -.Hui-iconfont-face-jingdai:before { content: "\e663"; } -.Hui-iconfont-face-yun:before { content: "\e664"; } -.Hui-iconfont-home2:before { content: "\e67f"; } -.Hui-iconfont-search2:before { content: "\e665"; } -.Hui-iconfont-share2:before { content: "\e666"; } -.Hui-iconfont-face:before { content: "\e668"; } -.Hui-iconfont-wuliu:before { content: "\e669"; } -.Hui-iconfont-dianpu:before { content: "\e66a"; } -.Hui-iconfont-chexiao:before { content: "\e66b"; } -.Hui-iconfont-zhongzuo:before { content: "\e66c"; } -.Hui-iconfont-zan:before { content: "\e66d"; } -.Hui-iconfont-cai:before { content: "\e66e"; } -.Hui-iconfont-yuyin3:before { content: "\e66f"; } -.Hui-iconfont-cart2-selected:before { content: "\e670"; } -.Hui-iconfont-weizhi:before { content: "\e671"; } -.Hui-iconfont-face-ku:before { content: "\e688"; } -.Hui-iconfont-down:before { content: "\e640"; } -.Hui-iconfont-cart2-man:before { content: "\e672"; } -.Hui-iconfont-card2-kong:before { content: "\e673"; } -.Hui-iconfont-luyin:before { content: "\e619"; } -.Hui-iconfont-html:before { content: "\e69f"; } -.Hui-iconfont-css:before { content: "\e6a0"; } -.Hui-iconfont-android:before { content: "\e6a2"; } -.Hui-iconfont-github:before { content: "\e6d1"; } -.Hui-iconfont-html5:before { content: "\e6d2"; } -.Hui-iconfont-huangguan:before { content: "\e6d3"; } -.Hui-iconfont-news:before { content: "\e616"; } -.Hui-iconfont-slider-right:before { content: "\e63d"; } -.Hui-iconfont-slider-left:before { content: "\e67d"; } -.Hui-iconfont-tuku:before { content: "\e613"; } -.Hui-iconfont-shuru:before { content: "\e647"; } -.Hui-iconfont-sanjiao:before { content: "\e67e"; } -.Hui-iconfont-share-renren:before { content: "\e6d8"; } -.Hui-iconfont-share-tweibo:before { content: "\e6d9"; } -.Hui-iconfont-arrow2-left:before { content: "\e6d4"; } -.Hui-iconfont-paixu:before { content: "\e675"; } -.Hui-iconfont-niming:before { content: "\e624"; } -.Hui-iconfont-add:before { content: "\e600"; } -.Hui-iconfont-root:before { content: "\e62d"; } -.Hui-iconfont-xuanzhong:before { content: "\e676"; } -.Hui-iconfont-weixuanzhong:before { content: "\e677"; } -.Hui-iconfont-arrow2-bottom:before { content: "\e6d5"; } -.Hui-iconfont-arrow2-top:before { content: "\e6d6"; } -.Hui-iconfont-like2:before { content: "\e648"; } -.Hui-iconfont-arrow2-right:before { content: "\e6d7"; } -.Hui-iconfont-shangyishou:before { content: "\e6db"; } -.Hui-iconfont-xiayishou:before { content: "\e6e3"; } -.Hui-iconfont-share-weixin:before { content: "\e694"; } -.Hui-iconfont-shenhe-tingyong:before { content: "\e631"; } -.Hui-iconfont-gouxuan2:before { content: "\e601"; } -.Hui-iconfont-selected:before { content: "\e617"; } -.Hui-iconfont-jianhao:before { content: "\e6a1"; } -.Hui-iconfont-user-group:before { content: "\e62b"; } -.Hui-iconfont-yiguanzhu:before { content: "\e680"; } -.Hui-iconfont-gengduo3:before { content: "\e6f9"; } -.Hui-iconfont-comment:before { content: "\e622"; } -.Hui-iconfont-tongji-zhu:before { content: "\e618"; } -.Hui-iconfont-like:before { content: "\e649"; } -.Hui-iconfont-shangjia:before { content: "\e6dc"; } -.Hui-iconfont-save:before { content: "\e632"; } -.Hui-iconfont-gongsi:before { content: "\e643"; } -.Hui-iconfont-system:before { content: "\e62e"; } -.Hui-iconfont-pifu:before { content: "\e62a"; } -.Hui-iconfont-menu:before { content: "\e667"; } -.Hui-iconfont-msg:before { content: "\e62f"; } -.Hui-iconfont-huangguan1:before { content: "\e729"; } -.Hui-iconfont-userid:before { content: "\e602"; } -.Hui-iconfont-cang-selected:before { content: "\e630"; } -.Hui-iconfont-yundown:before { content: "\e641"; } -.Hui-iconfont-help:before { content: "\e633"; } -.Hui-iconfont-chuku:before { content: "\e634"; } -.Hui-iconfont-picture:before { content: "\e646"; } -.Hui-iconfont-wenzhouyinxing:before { content: "\e6ed"; } -.Hui-iconfont-ad:before { content: "\e635"; } -.Hui-iconfont-fenlei:before { content: "\e681"; } -.Hui-iconfont-saoyisao:before { content: "\e682"; } -.Hui-iconfont-search:before { content: "\e683"; } -.Hui-iconfont-tuwenxiangqing:before { content: "\e685"; } -.Hui-iconfont-leijipingjia:before { content: "\e686"; } -.Hui-iconfont-hetong:before { content: "\e636"; } -.Hui-iconfont-tongji:before { content: "\e61a"; } -.Hui-iconfont-quanbudingdan:before { content: "\e687"; } -.Hui-iconfont-cang:before { content: "\e61b"; } -.Hui-iconfont-xiaoxi:before { content: "\e68a"; } -.Hui-iconfont-renwu:before { content: "\e637"; } -.Hui-iconfont-more:before { content: "\e68b"; } -.Hui-iconfont-zhizhao:before { content: "\e638"; } -.Hui-iconfont-fabu:before { content: "\e603"; } -.Hui-iconfont-shenhe-butongguo2:before { content: "\e6dd"; } -.Hui-iconfont-share-qq:before { content: "\e67b"; } -.Hui-iconfont-upload:before { content: "\e642"; } -.Hui-iconfont-add2:before { content: "\e604"; } -.Hui-iconfont-jiesuo:before { content: "\e605"; } -.Hui-iconfont-zhongtumoshi:before { content: "\e68c"; } -.Hui-iconfont-datumoshi:before { content: "\e68d"; } -.Hui-iconfont-face2:before { content: "\e68e"; } -.Hui-iconfont-huanyipi:before { content: "\e68f"; } -.Hui-iconfont-shijian:before { content: "\e690"; } -.Hui-iconfont-feedback:before { content: "\e691"; } -.Hui-iconfont-feedback2:before { content: "\e692"; } -.Hui-iconfont-share-pengyouquan:before { content: "\e693"; } -.Hui-iconfont-zan2:before { content: "\e697"; } -.Hui-iconfont-arrow3-bottom:before { content: "\e698"; } -.Hui-iconfont-arrow3-top:before { content: "\e699"; } -.Hui-iconfont-arrow3-right:before { content: "\e69a"; } -.Hui-iconfont-arrow3-left:before { content: "\e69b"; } -.Hui-iconfont-more2:before { content: "\e69c"; } -.Hui-iconfont-cang2-selected:before { content: "\e69d"; } -.Hui-iconfont-cang2:before { content: "\e69e"; } -.Hui-iconfont-dangan:before { content: "\e639"; } -.Hui-iconfont-money:before { content: "\e63a"; } -.Hui-iconfont-share-weibo:before { content: "\e6da"; } -.Hui-iconfont-email:before { content: "\e63b"; } -.Hui-iconfont-tongji-xian:before { content: "\e61c"; } -.Hui-iconfont-bank:before { content: "\e628"; } -.Hui-iconfont-home:before { content: "\e625"; } -.Hui-iconfont-user:before { content: "\e62c"; } -.Hui-iconfont-log:before { content: "\e623"; } -.Hui-iconfont-pages:before { content: "\e626"; } -.Hui-iconfont-sim:before { content: "\e629"; } -.Hui-iconfont-tingzhi:before { content: "\e6e4"; } -.Hui-iconfont-dengdai:before { content: "\e606"; } -.Hui-iconfont-user-add:before { content: "\e607"; } -.Hui-iconfont-copy:before { content: "\e6ea"; } -.Hui-iconfont-file:before { content: "\e63e"; } -.Hui-iconfont-share-douban:before { content: "\e67c"; } -.Hui-iconfont-share-zhihu:before { content: "\e689"; } -.Hui-iconfont-daochu:before { content: "\e644"; } -.Hui-iconfont-daoru:before { content: "\e645"; } -.Hui-iconfont-weigouxuan2:before { content: "\e608"; } -.Hui-iconfont-phone:before { content: "\e696"; } -.Hui-iconfont-bold:before { content: "\e6e7"; } -.Hui-iconfont-manage2:before { content: "\e63c"; } -.Hui-iconfont-edit:before { content: "\e6df"; } -.Hui-iconfont-del2:before { content: "\e609"; } -.Hui-iconfont-duigou:before { content: "\e6e8"; } -.Hui-iconfont-chongqi:before { content: "\e6f7"; } -.Hui-iconfont-avatar:before { content: "\e60a"; } -.Hui-iconfont-del:before { content: "\e60b"; } -.Hui-iconfont-edit2:before { content: "\e60c"; } -.Hui-iconfont-zanting:before { content: "\e6e5"; } -.Hui-iconfont-apple:before { content: "\e64a"; } -.Hui-iconfont-guangdayinxing:before { content: "\e6f0"; } -.Hui-iconfont-minshengyinxing:before { content: "\e6f4"; } -.Hui-iconfont-xiajia:before { content: "\e6de"; } -.Hui-iconfont-manage:before { content: "\e61d"; } -.Hui-iconfont-user2:before { content: "\e60d"; } -.Hui-iconfont-code:before { content: "\e6ee"; } -.Hui-iconfont-cut:before { content: "\e6ef"; } -.Hui-iconfont-link:before { content: "\e6f1"; } -.Hui-iconfont-new:before { content: "\e6f2"; } -.Hui-iconfont-ordered-list:before { content: "\e6f3"; } -.Hui-iconfont-unordered-list:before { content: "\e6f5"; } -.Hui-iconfont-share-qzone:before { content: "\e6c8"; } -.Hui-iconfont-suoding:before { content: "\e60e"; } -.Hui-iconfont-tel2:before { content: "\e6a3"; } -.Hui-iconfont-order:before { content: "\e627"; } -.Hui-iconfont-shujutongji:before { content: "\e61e"; } -.Hui-iconfont-del3:before { content: "\e6e2"; } -.Hui-iconfont-add3:before { content: "\e610"; } -.Hui-iconfont-add4:before { content: "\e61f"; } -.Hui-iconfont-xiangpicha:before { content: "\e72a"; } -.Hui-iconfont-key:before { content: "\e63f"; } -.Hui-iconfont-yuyin2:before { content: "\e6a4"; } -.Hui-iconfont-yuyin:before { content: "\e6a5"; } -.Hui-iconfont-close:before { content: "\e6a6"; } -.Hui-iconfont-xuanze:before { content: "\e6a7"; } -.Hui-iconfont-xuanzhong1:before { content: "\e6a8"; } -.Hui-iconfont-yiguanzhu1:before { content: "\e6a9"; } -.Hui-iconfont-share:before { content: "\e6aa"; } -.Hui-iconfont-zhuanfa:before { content: "\e6ab"; } -.Hui-iconfont-tianqi-duoyun:before { content: "\e6ac"; } -.Hui-iconfont-tianqi-mai:before { content: "\e6ad"; } -.Hui-iconfont-tianqi-qing:before { content: "\e6ae"; } -.Hui-iconfont-tianqi-wu:before { content: "\e6af"; } -.Hui-iconfont-tianqi-xue:before { content: "\e6b0"; } -.Hui-iconfont-tianqi-yin:before { content: "\e6b1"; } -.Hui-iconfont-tianqi-yu:before { content: "\e6b2"; } -.Hui-iconfont-daipingjia:before { content: "\e6b3"; } -.Hui-iconfont-vip-card2:before { content: "\e6b4"; } -.Hui-iconfont-jifen:before { content: "\e6b5"; } -.Hui-iconfont-youhuiquan:before { content: "\e6b6"; } -.Hui-iconfont-hongbao:before { content: "\e6b7"; } -.Hui-iconfont-cart-selected:before { content: "\e6b8"; } -.Hui-iconfont-cart-kong:before { content: "\e6b9"; } -.Hui-iconfont-jiangjia:before { content: "\e6ba"; } -.Hui-iconfont-liwu:before { content: "\e6bb"; } -.Hui-iconfont-caiqie:before { content: "\e6bc"; } -.Hui-iconfont-xuanzhuan:before { content: "\e6bd"; } -.Hui-iconfont-bigpic:before { content: "\e6be"; } -.Hui-iconfont-list:before { content: "\e6bf"; } -.Hui-iconfont-middle:before { content: "\e6c0"; } -.Hui-iconfont-hot:before { content: "\e6c1"; } -.Hui-iconfont-paishe:before { content: "\e6c2"; } -.Hui-iconfont-hot1:before { content: "\e6c3"; } -.Hui-iconfont-new1:before { content: "\e6c4"; } -.Hui-iconfont-xiaoxi1:before { content: "\e6c5"; } -.Hui-iconfont-canshu:before { content: "\e6c6"; } -.Hui-iconfont-tel:before { content: "\e6c7"; } -.Hui-iconfont-dingwei:before { content: "\e6c9"; } -.Hui-iconfont-hongbao2:before { content: "\e6ca"; } -.Hui-iconfont-2code:before { content: "\e6cb"; } -.Hui-iconfont-vip:before { content: "\e6cc"; } -.Hui-iconfont-tishi:before { content: "\e6cd"; } -.Hui-iconfont-dingyue:before { content: "\e6ce"; } -.Hui-iconfont-italic:before { content: "\e6e9"; } -.Hui-iconfont-yulan:before { content: "\e695"; } -.Hui-iconfont-usergroup2:before { content: "\e611"; } -.Hui-iconfont-goods:before { content: "\e620"; } -.Hui-iconfont-paixingbang:before { content: "\e6cf"; } -.Hui-iconfont-qingdaoyinxing:before { content: "\e6f6"; } -.Hui-iconfont-kefu:before { content: "\e6d0"; } -.Hui-iconfont-picture1:before { content: "\e612"; } -.Hui-iconfont-weigouxuan:before { content: "\e614"; } -.Hui-iconfont-fanqiang:before { content: "\e6fa"; } -.Hui-iconfont-shenhe-weitongguo:before { content: "\e6e0"; } -.Hui-iconfont-shenhe-tongguo:before { content: "\e6e1"; } -.Hui-iconfont-tongji-bing:before { content: "\e621"; } -.Hui-iconfont-gouxuan:before { content: "\e615"; } -.Hui-iconfont-jiansheyinxing:before { content: "\e6f8"; } -.Hui-iconfont-moban:before { content: "\e72b"; } -.Hui-iconfont-pay-weixin:before { content: "\e719"; } -.Hui-iconfont-pay-alipay-2:before { content: "\e71c"; } -.Hui-iconfont-beijingyinxing:before { content: "\e6fb"; } -.Hui-iconfont-guangdongfazhanyinxing:before { content: "\e703"; } -.Hui-iconfont-zhaoshangyinxing:before { content: "\e704"; } -.Hui-iconfont-zheshangyinxing:before { content: "\e712"; } -.Hui-iconfont-zhongguonongyeyinxing:before { content: "\e713"; } -.Hui-iconfont-cdbank:before { content: "\e714"; } -.Hui-iconfont-gengduo2:before { content: "\e716"; } -.Hui-iconfont-bofang:before { content: "\e6e6"; } -.Hui-iconfont-gengduo4:before { content: "\e717"; } -.Hui-iconfont-text-height:before { content: "\e6fc"; } -.Hui-iconfont-text-width:before { content: "\e6fd"; } -.Hui-iconfont-underline:before { content: "\e6fe"; } -.Hui-iconfont-star:before { content: "\e6ff"; } -.Hui-iconfont-star-half:before { content: "\e700"; } -.Hui-iconfont-star-halfempty:before { content: "\e701"; } -.Hui-iconfont-star-o:before { content: "\e702"; } -.Hui-iconfont-font:before { content: "\e6ec"; } -.Hui-iconfont-hangzhouyinxing:before { content: "\e718"; } -.Hui-iconfont-jiaotongyinxing:before { content: "\e71a"; } -.Hui-iconfont-gengduo:before { content: "\e715"; } -.Hui-iconfont-avatar2:before { content: "\e705"; } -.Hui-iconfont-close2:before { content: "\e706"; } -.Hui-iconfont-about:before { content: "\e707"; } -.Hui-iconfont-phone-android:before { content: "\e708"; } -.Hui-iconfont-search1:before { content: "\e709"; } -.Hui-iconfont-comment1:before { content: "\e70a"; } -.Hui-iconfont-read:before { content: "\e70b"; } -.Hui-iconfont-feedback1:before { content: "\e70c"; } -.Hui-iconfont-practice:before { content: "\e70d"; } -.Hui-iconfont-align-center:before { content: "\e70e"; } -.Hui-iconfont-align-justify:before { content: "\e70f"; } -.Hui-iconfont-align-left:before { content: "\e710"; } -.Hui-iconfont-align-right:before { content: "\e711"; } -.Hui-iconfont-paste:before { content: "\e6eb"; } -.Hui-iconfont-pay-alipay-1:before { content: "\e71f"; } -.Hui-iconfont-pufayinxing:before { content: "\e71b"; } -.Hui-iconfont-gongshangyinxing:before { content: "\e71d"; } -.Hui-iconfont-huaxiayinxing:before { content: "\e71e"; } -.Hui-iconfont-youzhengyinxing:before { content: "\e721"; } -.Hui-iconfont-zhongguoyinxing:before { content: "\e722"; } -.Hui-iconfont-zhongxinyinxing:before { content: "\e723"; } -.Hui-iconfont-shanghaiyinxing:before { content: "\e724"; } -.Hui-iconfont-banzhu:before { content: "\e72c"; } -.Hui-iconfont-yuedu:before { content: "\e720"; } -.Hui-iconfont-yanjing:before { content: "\e725"; } -.Hui-iconfont-power:before { content: "\e726"; } -.Hui-iconfont-moban-2:before { content: "\e72d"; } diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.eot b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.eot deleted file mode 100644 index a31e3c89..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.eot and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.min.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.min.css deleted file mode 100644 index 4be72a57..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.min.css +++ /dev/null @@ -1,11 +0,0 @@ -/* -----------H-ui前端框架------------- -* iconfont.css v1.0.8 -* http://www.h-ui.net/ -* Created & Modified by guojunhui -* Date modified 2015.12.21 -* -* Copyright 2013-2017 北京颖杰联创科技有限公司 All rights reserved. -* Licensed under MIT license. -* http://opensource.org/licenses/MIT -*/ -@charset "utf-8";@font-face{font-family:"Hui-iconfont";src:url('iconfont.eot');src:url('iconfont.eot?#iefix') format('embedded-opentype'),url('iconfont.woff') format('woff'),url('iconfont.ttf') format('truetype'),url('iconfont.svg#Hui-iconfont') format('svg')}.Hui-iconfont{font-family:"Hui-iconfont"!important;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.Hui-iconfont-gotop:before{content:"\e684"}.Hui-iconfont-music:before{content:"\e60f"}.Hui-iconfont-tags:before{content:"\e64b"}.Hui-iconfont-jieri:before{content:"\e727"}.Hui-iconfont-jishiqi:before{content:"\e728"}.Hui-iconfont-pad:before{content:"\e64c"}.Hui-iconfont-lunzi:before{content:"\e64d"}.Hui-iconfont-jiandao:before{content:"\e64e"}.Hui-iconfont-xianshiqi:before{content:"\e64f"}.Hui-iconfont-zhaoxiangji:before{content:"\e650"}.Hui-iconfont-danfanxiangji:before{content:"\e651"}.Hui-iconfont-dayinji:before{content:"\e652"}.Hui-iconfont-user-zhanzhang:before{content:"\e653"}.Hui-iconfont-chajian:before{content:"\e654"}.Hui-iconfont-arrow1-bottom:before{content:"\e674"}.Hui-iconfont-arrow1-left:before{content:"\e678"}.Hui-iconfont-arrow1-top:before{content:"\e679"}.Hui-iconfont-arrow1-right:before{content:"\e67a"}.Hui-iconfont-jieri1:before{content:"\e655"}.Hui-iconfont-face-weixiao:before{content:"\e656"}.Hui-iconfont-face-chijing:before{content:"\e657"}.Hui-iconfont-face-dai:before{content:"\e658"}.Hui-iconfont-face-shuaku:before{content:"\e659"}.Hui-iconfont-face-mogui:before{content:"\e65a"}.Hui-iconfont-face-ganga:before{content:"\e65b"}.Hui-iconfont-face-qin:before{content:"\e65c"}.Hui-iconfont-face-nu:before{content:"\e65d"}.Hui-iconfont-face-zhayan:before{content:"\e65e"}.Hui-iconfont-face-shengqi:before{content:"\e65f"}.Hui-iconfont-face-ma:before{content:"\e660"}.Hui-iconfont-face-bishi:before{content:"\e661"}.Hui-iconfont-face-maimeng:before{content:"\e662"}.Hui-iconfont-face-jingdai:before{content:"\e663"}.Hui-iconfont-face-yun:before{content:"\e664"}.Hui-iconfont-home2:before{content:"\e67f"}.Hui-iconfont-search2:before{content:"\e665"}.Hui-iconfont-share2:before{content:"\e666"}.Hui-iconfont-face:before{content:"\e668"}.Hui-iconfont-wuliu:before{content:"\e669"}.Hui-iconfont-dianpu:before{content:"\e66a"}.Hui-iconfont-chexiao:before{content:"\e66b"}.Hui-iconfont-zhongzuo:before{content:"\e66c"}.Hui-iconfont-zan:before{content:"\e66d"}.Hui-iconfont-cai:before{content:"\e66e"}.Hui-iconfont-yuyin3:before{content:"\e66f"}.Hui-iconfont-cart2-selected:before{content:"\e670"}.Hui-iconfont-weizhi:before{content:"\e671"}.Hui-iconfont-face-ku:before{content:"\e688"}.Hui-iconfont-down:before{content:"\e640"}.Hui-iconfont-cart2-man:before{content:"\e672"}.Hui-iconfont-card2-kong:before{content:"\e673"}.Hui-iconfont-luyin:before{content:"\e619"}.Hui-iconfont-html:before{content:"\e69f"}.Hui-iconfont-css:before{content:"\e6a0"}.Hui-iconfont-android:before{content:"\e6a2"}.Hui-iconfont-github:before{content:"\e6d1"}.Hui-iconfont-html5:before{content:"\e6d2"}.Hui-iconfont-huangguan:before{content:"\e6d3"}.Hui-iconfont-news:before{content:"\e616"}.Hui-iconfont-slider-right:before{content:"\e63d"}.Hui-iconfont-slider-left:before{content:"\e67d"}.Hui-iconfont-tuku:before{content:"\e613"}.Hui-iconfont-shuru:before{content:"\e647"}.Hui-iconfont-sanjiao:before{content:"\e67e"}.Hui-iconfont-share-renren:before{content:"\e6d8"}.Hui-iconfont-share-tweibo:before{content:"\e6d9"}.Hui-iconfont-arrow2-left:before{content:"\e6d4"}.Hui-iconfont-paixu:before{content:"\e675"}.Hui-iconfont-niming:before{content:"\e624"}.Hui-iconfont-add:before{content:"\e600"}.Hui-iconfont-root:before{content:"\e62d"}.Hui-iconfont-xuanzhong:before{content:"\e676"}.Hui-iconfont-weixuanzhong:before{content:"\e677"}.Hui-iconfont-arrow2-bottom:before{content:"\e6d5"}.Hui-iconfont-arrow2-top:before{content:"\e6d6"}.Hui-iconfont-like2:before{content:"\e648"}.Hui-iconfont-arrow2-right:before{content:"\e6d7"}.Hui-iconfont-shangyishou:before{content:"\e6db"}.Hui-iconfont-xiayishou:before{content:"\e6e3"}.Hui-iconfont-share-weixin:before{content:"\e694"}.Hui-iconfont-shenhe-tingyong:before{content:"\e631"}.Hui-iconfont-gouxuan2:before{content:"\e601"}.Hui-iconfont-selected:before{content:"\e617"}.Hui-iconfont-jianhao:before{content:"\e6a1"}.Hui-iconfont-user-group:before{content:"\e62b"}.Hui-iconfont-yiguanzhu:before{content:"\e680"}.Hui-iconfont-gengduo3:before{content:"\e6f9"}.Hui-iconfont-comment:before{content:"\e622"}.Hui-iconfont-tongji-zhu:before{content:"\e618"}.Hui-iconfont-like:before{content:"\e649"}.Hui-iconfont-shangjia:before{content:"\e6dc"}.Hui-iconfont-save:before{content:"\e632"}.Hui-iconfont-gongsi:before{content:"\e643"}.Hui-iconfont-system:before{content:"\e62e"}.Hui-iconfont-pifu:before{content:"\e62a"}.Hui-iconfont-menu:before{content:"\e667"}.Hui-iconfont-msg:before{content:"\e62f"}.Hui-iconfont-huangguan1:before{content:"\e729"}.Hui-iconfont-userid:before{content:"\e602"}.Hui-iconfont-cang-selected:before{content:"\e630"}.Hui-iconfont-yundown:before{content:"\e641"}.Hui-iconfont-help:before{content:"\e633"}.Hui-iconfont-chuku:before{content:"\e634"}.Hui-iconfont-picture:before{content:"\e646"}.Hui-iconfont-wenzhouyinxing:before{content:"\e6ed"}.Hui-iconfont-ad:before{content:"\e635"}.Hui-iconfont-fenlei:before{content:"\e681"}.Hui-iconfont-saoyisao:before{content:"\e682"}.Hui-iconfont-search:before{content:"\e683"}.Hui-iconfont-tuwenxiangqing:before{content:"\e685"}.Hui-iconfont-leijipingjia:before{content:"\e686"}.Hui-iconfont-hetong:before{content:"\e636"}.Hui-iconfont-tongji:before{content:"\e61a"}.Hui-iconfont-quanbudingdan:before{content:"\e687"}.Hui-iconfont-cang:before{content:"\e61b"}.Hui-iconfont-xiaoxi:before{content:"\e68a"}.Hui-iconfont-renwu:before{content:"\e637"}.Hui-iconfont-more:before{content:"\e68b"}.Hui-iconfont-zhizhao:before{content:"\e638"}.Hui-iconfont-fabu:before{content:"\e603"}.Hui-iconfont-shenhe-butongguo2:before{content:"\e6dd"}.Hui-iconfont-share-qq:before{content:"\e67b"}.Hui-iconfont-upload:before{content:"\e642"}.Hui-iconfont-add2:before{content:"\e604"}.Hui-iconfont-jiesuo:before{content:"\e605"}.Hui-iconfont-zhongtumoshi:before{content:"\e68c"}.Hui-iconfont-datumoshi:before{content:"\e68d"}.Hui-iconfont-face2:before{content:"\e68e"}.Hui-iconfont-huanyipi:before{content:"\e68f"}.Hui-iconfont-shijian:before{content:"\e690"}.Hui-iconfont-feedback:before{content:"\e691"}.Hui-iconfont-feedback2:before{content:"\e692"}.Hui-iconfont-share-pengyouquan:before{content:"\e693"}.Hui-iconfont-zan2:before{content:"\e697"}.Hui-iconfont-arrow3-bottom:before{content:"\e698"}.Hui-iconfont-arrow3-top:before{content:"\e699"}.Hui-iconfont-arrow3-right:before{content:"\e69a"}.Hui-iconfont-arrow3-left:before{content:"\e69b"}.Hui-iconfont-more2:before{content:"\e69c"}.Hui-iconfont-cang2-selected:before{content:"\e69d"}.Hui-iconfont-cang2:before{content:"\e69e"}.Hui-iconfont-dangan:before{content:"\e639"}.Hui-iconfont-money:before{content:"\e63a"}.Hui-iconfont-share-weibo:before{content:"\e6da"}.Hui-iconfont-email:before{content:"\e63b"}.Hui-iconfont-tongji-xian:before{content:"\e61c"}.Hui-iconfont-bank:before{content:"\e628"}.Hui-iconfont-home:before{content:"\e625"}.Hui-iconfont-user:before{content:"\e62c"}.Hui-iconfont-log:before{content:"\e623"}.Hui-iconfont-pages:before{content:"\e626"}.Hui-iconfont-sim:before{content:"\e629"}.Hui-iconfont-tingzhi:before{content:"\e6e4"}.Hui-iconfont-dengdai:before{content:"\e606"}.Hui-iconfont-user-add:before{content:"\e607"}.Hui-iconfont-copy:before{content:"\e6ea"}.Hui-iconfont-file:before{content:"\e63e"}.Hui-iconfont-share-douban:before{content:"\e67c"}.Hui-iconfont-share-zhihu:before{content:"\e689"}.Hui-iconfont-daochu:before{content:"\e644"}.Hui-iconfont-daoru:before{content:"\e645"}.Hui-iconfont-weigouxuan2:before{content:"\e608"}.Hui-iconfont-phone:before{content:"\e696"}.Hui-iconfont-bold:before{content:"\e6e7"}.Hui-iconfont-manage2:before{content:"\e63c"}.Hui-iconfont-edit:before{content:"\e6df"}.Hui-iconfont-del2:before{content:"\e609"}.Hui-iconfont-duigou:before{content:"\e6e8"}.Hui-iconfont-chongqi:before{content:"\e6f7"}.Hui-iconfont-avatar:before{content:"\e60a"}.Hui-iconfont-del:before{content:"\e60b"}.Hui-iconfont-edit2:before{content:"\e60c"}.Hui-iconfont-zanting:before{content:"\e6e5"}.Hui-iconfont-apple:before{content:"\e64a"}.Hui-iconfont-guangdayinxing:before{content:"\e6f0"}.Hui-iconfont-minshengyinxing:before{content:"\e6f4"}.Hui-iconfont-xiajia:before{content:"\e6de"}.Hui-iconfont-manage:before{content:"\e61d"}.Hui-iconfont-user2:before{content:"\e60d"}.Hui-iconfont-code:before{content:"\e6ee"}.Hui-iconfont-cut:before{content:"\e6ef"}.Hui-iconfont-link:before{content:"\e6f1"}.Hui-iconfont-new:before{content:"\e6f2"}.Hui-iconfont-ordered-list:before{content:"\e6f3"}.Hui-iconfont-unordered-list:before{content:"\e6f5"}.Hui-iconfont-share-qzone:before{content:"\e6c8"}.Hui-iconfont-suoding:before{content:"\e60e"}.Hui-iconfont-tel2:before{content:"\e6a3"}.Hui-iconfont-order:before{content:"\e627"}.Hui-iconfont-shujutongji:before{content:"\e61e"}.Hui-iconfont-del3:before{content:"\e6e2"}.Hui-iconfont-add3:before{content:"\e610"}.Hui-iconfont-add4:before{content:"\e61f"}.Hui-iconfont-xiangpicha:before{content:"\e72a"}.Hui-iconfont-key:before{content:"\e63f"}.Hui-iconfont-yuyin2:before{content:"\e6a4"}.Hui-iconfont-yuyin:before{content:"\e6a5"}.Hui-iconfont-close:before{content:"\e6a6"}.Hui-iconfont-xuanze:before{content:"\e6a7"}.Hui-iconfont-xuanzhong1:before{content:"\e6a8"}.Hui-iconfont-yiguanzhu1:before{content:"\e6a9"}.Hui-iconfont-share:before{content:"\e6aa"}.Hui-iconfont-zhuanfa:before{content:"\e6ab"}.Hui-iconfont-tianqi-duoyun:before{content:"\e6ac"}.Hui-iconfont-tianqi-mai:before{content:"\e6ad"}.Hui-iconfont-tianqi-qing:before{content:"\e6ae"}.Hui-iconfont-tianqi-wu:before{content:"\e6af"}.Hui-iconfont-tianqi-xue:before{content:"\e6b0"}.Hui-iconfont-tianqi-yin:before{content:"\e6b1"}.Hui-iconfont-tianqi-yu:before{content:"\e6b2"}.Hui-iconfont-daipingjia:before{content:"\e6b3"}.Hui-iconfont-vip-card2:before{content:"\e6b4"}.Hui-iconfont-jifen:before{content:"\e6b5"}.Hui-iconfont-youhuiquan:before{content:"\e6b6"}.Hui-iconfont-hongbao:before{content:"\e6b7"}.Hui-iconfont-cart-selected:before{content:"\e6b8"}.Hui-iconfont-cart-kong:before{content:"\e6b9"}.Hui-iconfont-jiangjia:before{content:"\e6ba"}.Hui-iconfont-liwu:before{content:"\e6bb"}.Hui-iconfont-caiqie:before{content:"\e6bc"}.Hui-iconfont-xuanzhuan:before{content:"\e6bd"}.Hui-iconfont-bigpic:before{content:"\e6be"}.Hui-iconfont-list:before{content:"\e6bf"}.Hui-iconfont-middle:before{content:"\e6c0"}.Hui-iconfont-hot:before{content:"\e6c1"}.Hui-iconfont-paishe:before{content:"\e6c2"}.Hui-iconfont-hot1:before{content:"\e6c3"}.Hui-iconfont-new1:before{content:"\e6c4"}.Hui-iconfont-xiaoxi1:before{content:"\e6c5"}.Hui-iconfont-canshu:before{content:"\e6c6"}.Hui-iconfont-tel:before{content:"\e6c7"}.Hui-iconfont-dingwei:before{content:"\e6c9"}.Hui-iconfont-hongbao2:before{content:"\e6ca"}.Hui-iconfont-2code:before{content:"\e6cb"}.Hui-iconfont-vip:before{content:"\e6cc"}.Hui-iconfont-tishi:before{content:"\e6cd"}.Hui-iconfont-dingyue:before{content:"\e6ce"}.Hui-iconfont-italic:before{content:"\e6e9"}.Hui-iconfont-yulan:before{content:"\e695"}.Hui-iconfont-usergroup2:before{content:"\e611"}.Hui-iconfont-goods:before{content:"\e620"}.Hui-iconfont-paixingbang:before{content:"\e6cf"}.Hui-iconfont-qingdaoyinxing:before{content:"\e6f6"}.Hui-iconfont-kefu:before{content:"\e6d0"}.Hui-iconfont-picture1:before{content:"\e612"}.Hui-iconfont-weigouxuan:before{content:"\e614"}.Hui-iconfont-fanqiang:before{content:"\e6fa"}.Hui-iconfont-shenhe-weitongguo:before{content:"\e6e0"}.Hui-iconfont-shenhe-tongguo:before{content:"\e6e1"}.Hui-iconfont-tongji-bing:before{content:"\e621"}.Hui-iconfont-gouxuan:before{content:"\e615"}.Hui-iconfont-jiansheyinxing:before{content:"\e6f8"}.Hui-iconfont-moban:before{content:"\e72b"}.Hui-iconfont-pay-weixin:before{content:"\e719"}.Hui-iconfont-pay-alipay-2:before{content:"\e71c"}.Hui-iconfont-beijingyinxing:before{content:"\e6fb"}.Hui-iconfont-guangdongfazhanyinxing:before{content:"\e703"}.Hui-iconfont-zhaoshangyinxing:before{content:"\e704"}.Hui-iconfont-zheshangyinxing:before{content:"\e712"}.Hui-iconfont-zhongguonongyeyinxing:before{content:"\e713"}.Hui-iconfont-cdbank:before{content:"\e714"}.Hui-iconfont-gengduo2:before{content:"\e716"}.Hui-iconfont-bofang:before{content:"\e6e6"}.Hui-iconfont-gengduo4:before{content:"\e717"}.Hui-iconfont-text-height:before{content:"\e6fc"}.Hui-iconfont-text-width:before{content:"\e6fd"}.Hui-iconfont-underline:before{content:"\e6fe"}.Hui-iconfont-star:before{content:"\e6ff"}.Hui-iconfont-star-half:before{content:"\e700"}.Hui-iconfont-star-halfempty:before{content:"\e701"}.Hui-iconfont-star-o:before{content:"\e702"}.Hui-iconfont-font:before{content:"\e6ec"}.Hui-iconfont-hangzhouyinxing:before{content:"\e718"}.Hui-iconfont-jiaotongyinxing:before{content:"\e71a"}.Hui-iconfont-gengduo:before{content:"\e715"}.Hui-iconfont-avatar2:before{content:"\e705"}.Hui-iconfont-close2:before{content:"\e706"}.Hui-iconfont-about:before{content:"\e707"}.Hui-iconfont-phone-android:before{content:"\e708"}.Hui-iconfont-search1:before{content:"\e709"}.Hui-iconfont-comment1:before{content:"\e70a"}.Hui-iconfont-read:before{content:"\e70b"}.Hui-iconfont-feedback1:before{content:"\e70c"}.Hui-iconfont-practice:before{content:"\e70d"}.Hui-iconfont-align-center:before{content:"\e70e"}.Hui-iconfont-align-justify:before{content:"\e70f"}.Hui-iconfont-align-left:before{content:"\e710"}.Hui-iconfont-align-right:before{content:"\e711"}.Hui-iconfont-paste:before{content:"\e6eb"}.Hui-iconfont-pay-alipay-1:before{content:"\e71f"}.Hui-iconfont-pufayinxing:before{content:"\e71b"}.Hui-iconfont-gongshangyinxing:before{content:"\e71d"}.Hui-iconfont-huaxiayinxing:before{content:"\e71e"}.Hui-iconfont-youzhengyinxing:before{content:"\e721"}.Hui-iconfont-zhongguoyinxing:before{content:"\e722"}.Hui-iconfont-zhongxinyinxing:before{content:"\e723"}.Hui-iconfont-shanghaiyinxing:before{content:"\e724"}.Hui-iconfont-banzhu:before{content:"\e72c"}.Hui-iconfont-yuedu:before{content:"\e720"}.Hui-iconfont-yanjing:before{content:"\e725"}.Hui-iconfont-power:before{content:"\e726"}.Hui-iconfont-moban-2:before{content:"\e72d"} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.svg b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.svg deleted file mode 100644 index f4237a88..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.svg +++ /dev/null @@ -1,1265 +0,0 @@ - - - - -Created by FontForge 20120731 at Tue Jun 21 18:43:20 2016 - By admin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.ttf b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.ttf deleted file mode 100644 index bcd634a7..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.ttf and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.woff b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.woff deleted file mode 100644 index 96e9d625..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.woff and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/WdatePicker.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/WdatePicker.js deleted file mode 100644 index 851604a6..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/WdatePicker.js +++ /dev/null @@ -1,57 +0,0 @@ -/* - * My97 DatePicker 4.8 Beta4 - * License: http://www.my97.net/dp/license.asp - */ -var $dp,WdatePicker;(function(){var $={ -$langList:[ - {name:"en",charset:"UTF-8"}, - {name:"zh-cn",charset:"gb2312"}, - {name:"zh-tw",charset:"GBK"}], -$skinList:[ - {name:"default",charset:"gb2312"}, - {name:"whyGreen",charset:"gb2312"}, - {name:"blue",charset:"gb2312"}, - {name:"green",charset:"gb2312"}, - {name:"simple",charset:"gb2312"}, - {name:"ext",charset:"gb2312"}, - {name:"blueFresh",charset:"gb2312"}, - {name:"twoer",charset:"gb2312"}, - {name:"YcloudRed",charset:"gb2312"}], -$wdate:true, -$crossFrame:true, -$preLoad:false, -$dpPath:"", -doubleCalendar:false, -enableKeyboard:true, -enableInputMask:true, -autoUpdateOnChanged:null, -weekMethod:"ISO8601", -position:{}, -lang:"auto", -skin:"default", -dateFmt:"yyyy-MM-dd", -realDateFmt:"yyyy-MM-dd", -realTimeFmt:"HH:mm:ss", -realFullFmt:"%Date %Time", -minDate:"1900-01-01 00:00:00", -maxDate:"2099-12-31 23:59:59", -startDate:"", -alwaysUseStartDate:false, -yearOffset:1911, -firstDayOfWeek:0, -isShowWeek:false, -highLineWeekDay:true, -isShowClear:true, -isShowToday:true, -isShowOK:true, -isShowOthers:true, -readOnly:false, -errDealMode:0, -autoPickDate:null, -qsEnabled:true, -autoShowQS:false, -opposite:false, -hmsMenuCfg:{H:[1,6],m:[5,6],s:[15,4]}, -opposite:false, - -specialDates:null,specialDays:null,disabledDates:null,disabledDays:null,onpicking:null,onpicked:null,onclearing:null,oncleared:null,ychanging:null,ychanged:null,Mchanging:null,Mchanged:null,dchanging:null,dchanged:null,Hchanging:null,Hchanged:null,mchanging:null,mchanged:null,schanging:null,schanged:null,eCont:null,vel:null,elProp:"",errMsg:"",quickSel:[],has:{},getRealLang:function(){var _=$.$langList;for(var A=0;A<_.length;A++)if(_[A].name==this.lang)return _[A];return _[0]}};WdatePicker=U;var Y=window,T={innerHTML:""},N="document",H="documentElement",C="getElementsByTagName",V,A,S,G,c,X=navigator.appName;if(X=="Microsoft Internet Explorer")S=true;else if(X=="Opera")c=true;else G=true;A=$.$dpPath||J();if($.$wdate)K(A+"skin/WdatePicker.css");V=Y;if($.$crossFrame){try{while(V.parent!=V&&V.parent[N][C]("frameset").length==0)V=V.parent}catch(O){}}if(!V.$dp)V.$dp={ff:G,ie:S,opera:c,status:0,defMinDate:$.minDate,defMaxDate:$.maxDate};B();if($.$preLoad&&$dp.status==0)E(Y,"onload",function(){U(null,true)});if(!Y[N].docMD){E(Y[N],"onmousedown",D,true);Y[N].docMD=true}if(!V[N].docMD){E(V[N],"onmousedown",D,true);V[N].docMD=true}E(Y,"onunload",function(){if($dp.dd)P($dp.dd,"none")});function B(){try{V[N],V.$dp=V.$dp||{}}catch($){V=Y;$dp=$dp||{}}var A={win:Y,$:function($){return(typeof $=="string")?Y[N].getElementById($):$},$D:function($,_){return this.$DV(this.$($).value,_)},$DV:function(_,$){if(_!=""){this.dt=$dp.cal.splitDate(_,$dp.cal.dateFmt);if($)for(var B in $)if(this.dt[B]===undefined)this.errMsg="invalid property:"+B;else{this.dt[B]+=$[B];if(B=="M"){var C=$["M"]>0?1:0,A=new Date(this.dt["y"],this.dt["M"],0).getDate();this.dt["d"]=Math.min(A+C,this.dt["d"])}}if(this.dt.refresh())return this.dt}return""},show:function(){var A=V[N].getElementsByTagName("div"),$=100000;for(var B=0;B$)$=_}this.dd.style.zIndex=$+2;P(this.dd,"block");P(this.dd.firstChild,"")},unbind:function($){$=this.$($);if($.initcfg){L($,"onclick",function(){U($.initcfg)});L($,"onfocus",function(){U($.initcfg)})}},hide:function(){P(this.dd,"none")},attachEvent:E};for(var _ in A)V.$dp[_]=A[_];$dp=V.$dp}function E(B,_,A,$){if(B.addEventListener){var C=_.replace(/on/,"");A._ieEmuEventHandler=function($){return A($)};B.addEventListener(C,A._ieEmuEventHandler,$)}else B.attachEvent(_,A)}function L(A,$,_){if(A.removeEventListener){var B=$.replace(/on/,"");_._ieEmuEventHandler=function($){return _($)};A.removeEventListener(B,_._ieEmuEventHandler,false)}else A.detachEvent($,_)}function a(_,$,A){if(typeof _!=typeof $)return false;if(typeof _=="object"){if(!A)for(var B in _){if(typeof $[B]=="undefined")return false;if(!a(_[B],$[B],true))return false}return true}else if(typeof _=="function"&&typeof $=="function")return _.toString()==$.toString();else return _==$}function J(){var _,A,$=Y[N][C]("script");for(var B=0;B<$.length;B++){_=$[B].getAttribute("src")||"";_=_.substr(0,_.toLowerCase().indexOf("wdatepicker.js"));A=_.lastIndexOf("/");if(A>0)_=_.substring(0,A+1);if(_)break}return _}function K(A,$,B){var D=Y[N][C]("HEAD").item(0),_=Y[N].createElement("link");if(D){_.href=A;_.rel="stylesheet";_.type="text/css";if($)_.title=$;if(B)_.charset=B;D.appendChild(_)}}function F($){$=$||V;var A=0,_=0;while($!=V){var D=$.parent[N][C]("iframe");for(var F=0;F_.scrollTop||A.scrollLeft>_.scrollLeft))?A:_;return{"top":B.scrollTop,"left":B.scrollLeft}}function D($){try{var _=$?($.srcElement||$.target):null;if($dp.cal&&!$dp.eCont&&$dp.dd&&_!=$dp.el&&$dp.dd.style.display=="block")$dp.cal.close()}catch($){}}function Z(){$dp.status=2}var Q,_;function U(K,C){if(!$dp)return;B();var L={};for(var H in K)L[H]=K[H];for(H in $)if(H.substring(0,1)!="$"&&L[H]===undefined)L[H]=$[H];if(C){if(!J()){_=_||setInterval(function(){if(V[N].readyState=="complete")clearInterval(_);U(null,true)},50);return}if($dp.status==0){$dp.status=1;L.el=T;I(L,true)}else return}else if(L.eCont){L.eCont=$dp.$(L.eCont);L.el=T;L.autoPickDate=true;L.qsEnabled=false;I(L)}else{if($.$preLoad&&$dp.status!=2)return;var F=D();if(Y.event===F||F){L.srcEl=F.srcElement||F.target;F.cancelBubble=true}L.el=L.el=$dp.$(L.el||L.srcEl);if(!L.el||L.el["My97Mark"]===true||L.el.disabled||($dp.dd&&P($dp.dd)!="none"&&$dp.dd.style.left!="-970px")){try{if(L.el["My97Mark"])L.el["My97Mark"]=false}catch(A){}return}if(F&&L.el.nodeType==1&&!a(L.el.initcfg,K)){$dp.unbind(L.el);E(L.el,F.type=="focus"?"onclick":"onfocus",function(){U(K)});L.el.initcfg=K}I(L)}function J(){if(S&&V!=Y&&V[N].readyState!="complete")return false;return true}function D(){if(G){func=D.caller;while(func!=null){var $=func.arguments[0];if($&&($+"").indexOf("Event")>=0)return $;func=func.caller}return null}return event}}function R(_,$){return _.currentStyle?_.currentStyle[$]:document.defaultView.getComputedStyle(_,false)[$]}function P(_,$){if(_)if($!=null)_.style.display=$;else return R(_,"display")}function I(G,_){var D=G.el?G.el.nodeName:"INPUT";if(_||G.eCont||new RegExp(/input|textarea|div|span|p|a/ig).test(D))G.elProp=D=="INPUT"?"value":"innerHTML";else return;if(G.lang=="auto")G.lang=S?navigator.browserLanguage.toLowerCase():navigator.language.toLowerCase();if(!G.eCont)for(var C in G)$dp[C]=G[C];if(!$dp.dd||G.eCont||($dp.dd&&(G.getRealLang().name!=$dp.dd.lang||G.skin!=$dp.dd.skin))){if(G.eCont)E(G.eCont,G);else{$dp.dd=V[N].createElement("DIV");$dp.dd.style.cssText="position:absolute";V[N].body.appendChild($dp.dd);E($dp.dd,G);if(_)$dp.dd.style.left=$dp.dd.style.top="-970px";else{$dp.show();B($dp)}}}else if($dp.cal){$dp.show();$dp.cal.init();if(!$dp.eCont)B($dp)}function E(K,J){var I=V[N].domain,F=false,G="";K.innerHTML=G;var _=$.$langList,D=$.$skinList,H;try{H=K.lastChild.contentWindow[N]}catch(E){F=true;K.removeChild(K.lastChild);var L=V[N].createElement("iframe");L.hideFocus=true;L.frameBorder=0;L.scrolling="no";L.src="javascript:(function(){var d=document;d.open();d.domain='"+I+"';})()";K.appendChild(L);setTimeout(function(){H=K.lastChild.contentWindow[N];C()},97);return}C();function C(){var _=J.getRealLang();K.lang=_.name;K.skin=J.skin;var $=[""];if(F)$[1]="document.domain=\""+I+"\";";for(var C=0;C");$.push("");$.push("");$.push("");J.setPos=B;J.onload=Z;H.write("");H.cfg=J;H.write($.join(""));H.close()}}function B(J){var H=J.position.left,C=J.position.top,D=J.el;if(D==T)return;if(D!=J.srcEl&&(P(D)=="none"||D.type=="hidden"))D=J.srcEl;var I=W(D),$=F(Y),E=M(V),B=b(V),G=$dp.dd.offsetHeight,A=$dp.dd.offsetWidth;if(isNaN(C))C=0;if(($.topM+I.bottom+G>E.height)&&($.topM+I.top-G>0))C+=B.top+$.topM+I.top-G-2;else{C+=B.top+$.topM+I.bottom;var _=C-B.top+G-E.height;if(_>0)C-=_}if(isNaN(H))H=0;H+=B.left+Math.min($.leftM+I.left,E.width-A-5)-(S?2:0);J.dd.style.top=C+"px";J.dd.style.left=H+"px"}}})() \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/calendar.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/calendar.js deleted file mode 100644 index 98dee356..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/calendar.js +++ /dev/null @@ -1,5 +0,0 @@ -/* - * My97 DatePicker 4.8 Beta4 - * License: http://www.my97.net/dp/license.asp - */ -eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('l($4o.44){$f={};1b(q p 4r $2s)l(6p $2s[p]=="6o"){$f[p]={};1b(q 4G 4r $2s[p])$f[p][4G]=$2s[p][4G]}t $f[p]=$2s[p]}t $f=$2s;1b(p 4r $4o)$f[p]=$4o[p];q $c;l($69){6x.3J.7l("6U",n($){l(!$)h.2m();u $});6x.3J.7k("5I",n(){q $=h.5B;36($.5t!=1)$=$.7b;u $})}n 5C(){$c=h;h.3n=[];$d=1L.7i("z");$d.1e="4P";$d.1M="<1z Y=47><1z Y=47><1x 2q=0 2o=0 2C=0><1j><19 8a=2><4w 1G=89>&42;<1z Y=83 4s=2><1z 1i=\\":\\" Y=6K 6t><1z Y=6u 4s=2><1z 1i=\\":\\" Y=6K 6t><1z Y=6u 4s=2><19><1S 1G=7R><1j><19><1S 1G=7E><1z Y=4v 1G=7y 3k=1S><1z Y=4v 1G=7N 3k=1S><1z Y=4v 1G=7K 3k=1S>";71($d,n(){3x()});A();h.5D();$f.1X=[1L,$d.1P,$d.1y,$d.2w,$d.3a,$d.2r,$d.2V,$d.2j,$d.1U];1b(q B=0;B<$f.1X.x;B++){q b=$f.1X[B];b.3e=B==$f.1X.x-1?$f.1X[1]:$f.1X[B+1];$f.3A(b,"4k",5a)}$();55("y,M,H,m,s");$d.72.1s=n(){5g(1)};$d.75.1s=n(){5g(-1)};$d.4y.1s=n(){l($d.1H.1d.2a!="6G"){$c.4Q();3G($d.1H)}t 1o($d.1H)};1L.6R.4O($d);n A(){q b=$("a");1q=$("z"),1J=$("1z"),4t=$("1S"),5G=$("4w");$d.3M=b[0];$d.3K=b[1];$d.3L=b[3];$d.3N=b[2];$d.4b=1q[9];$d.1P=1J[0];$d.1y=1J[1];$d.4A=1q[0];$d.4f=1q[4];$d.2R=1q[6];$d.1H=1q[10];$d.2Z=1q[11];$d.34=1q[12];$d.5N=1q[13];$d.6P=1q[14];$d.73=1q[15];$d.4y=1q[16];$d.4e=1q[17];$d.2w=1J[2];$d.3a=1J[4];$d.2r=1J[6];$d.2V=1J[7];$d.2j=1J[8];$d.1U=1J[9];$d.72=4t[0];$d.75=4t[1];$d.5L=5G[0];n $($){u $d.74($)}}n $(){$d.3M.1s=n(){$1O=$1O<=0?$1O-1:-1;l($1O%5==0){$d.1y.22();u}$d.1y.1i=$o.y-1;$d.1y.2x()};$d.3K.1s=n(){$o.1V("M",-1);$d.1P.2x()};$d.3L.1s=n(){$o.1V("M",1);$d.1P.2x()};$d.3N.1s=n(){$1O=$1O>=0?$1O+1:1;l($1O%5==0){$d.1y.22();u}$d.1y.1i=$o.y+1;$d.1y.2x()}}}5C.3J={5D:n(){$1O=0;$f.5b=h;l($f.3S&&$f.Z.3S!=1h){$f.Z.3S=1c;$f.Z.4M()}h.4q();$o=h.4D=1a 1D();$1C=1a 1D();$1v=h.2B=1a 1D();$f.2N=0;h.1B=h.2P($f.1B);h.2X=$f.2X==1h?($f.18.2g&&$f.18.2g?1p:1c):$f.2X;$f.3y=$f.3y==1h?($f.4z&&$f.18.d?1p:1c):$f.3y;h.4m=h.35("7L");h.6m=h.35("7I");h.6d=h.35("7J");h.5s=h.35("7M");h.20=h.3I($f.20,$f.20!=$f.5J?$f.1T:$f.2F,$f.5J);h.1Z=h.3I($f.1Z,$f.1Z!=$f.5M?$f.1T:$f.2F,$f.5M);l(h.20.2z(h.1Z)>0)$f.4u=$1l.7Q;l(h.25()){h.5y();h.3j=$f.Z[$f.1E]}t h.3p(1p,2);3H($o);$d.5L.1M=$1l.7O;$d.2V.1i=$1l.7H;$d.2j.1i=$1l.7A;$d.1U.1i=$1l.7B;$d.1U.2e=!$c.1A($1v);h.6l();h.6V();l($f.4u)7z($f.4u);h.4B();l($f.Z.5t==1&&$f.Z["3V"]===4p){$f.3A($f.Z,"4k",5a);$f.3A($f.Z,"2x",n(){l($f&&$f.1K.1d.2a=="2u"){$c.3c();l(!$f.2N&&$f.5b.3j!=$f.Z[$f.1E]&&$f.Z.7G)5l($f.Z,"7D")}});$f.Z["3V"]=1p}$c.1k=$f.Z;3x()},5y:n(){q b=h.2S();l(b!=0){q $;l(b>0)$=h.1Z;t $=h.20;l($f.18.3Y){$o.y=$.y;$o.M=$.M;$o.d=$.d}l($f.18.2g){$o.H=$.H;$o.m=$.m;$o.s=$.s}}},3h:n(K,C,R,F,B,H,G,L,M){q $;l(K&&K.25)$=K;t{$=1a 1D();l(K!=""){C=C||$f.1B;q I,D,Q=0,P,A=/3i|2H|3l|y|2I|3o|3R|M|1K|d|%2l|53|H|4V|m|4U|s|3u|D|4T|W|w/g,b=C.2J(A);A.2t=0;l(M)P=K.4c(/\\W+/);t{q E=0,N="^";36((P=A.2U(C))!==1h){l(E>=0){D=C.1F(E,P.3Z);l(D&&"-/\\\\".1n(D)>=0)D="[\\\\-/]";N+=D}E=A.2t;2Y(P[0]){1f"3i":N+="(\\\\d{4})";1g;1f"2H":N+="(\\\\d{3})";1g;1f"2I":1f"3o":1f"3u":1f"D":N+="(\\\\D+)";1g;5v:N+="(\\\\d\\\\d?)";1g}}N+=".*$";P=1a 3v(N).2U(K);Q=1}l(P){1b(I=0;I0){1b(B=0;B<$.x;B++){A+=h.2P($[B]);l(B!=$.x-1)A+="|"}A=A?1a 3v("(?:"+A+")"):1h}t A=1h;u A},3d:n($){l($===4p)$=h.4F();l($f.Z[$f.1E]!=$)$f.Z[$f.1E]=$;h.4l()},4l:n($){q b=$f.$($f.86),$=3r($,h.4F($f.1T));l(b)b.1i=$;$f.Z["3E"]=$},2P:n(s){q 3T="3m",1r,2v,6n=/#?\\{(.*?)\\}/;s=s+"";1b(q i=0;i<3T.x;i++)s=s.1m("%"+3T.1Q(i),h.1W(3T.1Q(i),1h,$1C));l(s.1F(0,3)=="#F{"){s=s.1F(3,s.x-1);l(s.1n("u ")<0)s="u "+s;s=$f.51.4d("1a 88(\\""+s+"\\");");s=s()}36((1r=6n.2U(s))!=1h){1r.2t=1r.3Z+1r[1].x+1r[0].x-1r[1].x-1;2v=2n(4d(1r[1]));l(2v<0)2v="2f"+(-2v);s=s.1F(0,1r.3Z)+2v+s.1F(1r.2t+1)}u s},3I:n(A,B,b){q $;A=h.2P(A);l(!A||A=="")A=b;l(6p A=="6o")$=A;t{$=h.3h(A,B,1h,1h,1,0,0,0,1c);$.y=(""+$.y).1m(/^2f/,"-");$.M=(""+$.M).1m(/^2f/,"-");$.d=(""+$.d).1m(/^2f/,"-");$.H=(""+$.H).1m(/^2f/,"-");$.m=(""+$.m).1m(/^2f/,"-");$.s=(""+$.s).1m(/^2f/,"-");l(A.1n("%2l")>=0){A=A.1m(/%2l/g,"0");$.d=0;$.M=2n($.M)+1}$.1Y()}u $},25:n(){q A=$f.Z[$f.1E],$=h.1B,b=$f.18;l($f.7T||($f.6j!=""&&A=="")){A=h.2P($f.6j);$=$f.1T}$o.2h(h.3h(A,$));l(A!=""){q B=1;l(b.3Y&&!h.4n($o)){$o.y=$1C.y;$o.M=$1C.M;$o.d=$1C.d;B=0}l(b.2g&&!h.4h($o)){$o.H=$1C.H;$o.m=$1C.m;$o.s=$1C.s;B=0}u B&&h.1A($o)}l(!b.H)$o.H=0;l(!b.m)$o.m=0;l(!b.s)$o.s=0;u 1},4n:n($){l($.y!=1h)$=2W($.y,4)+"-"+$.M+"-"+$.d;u $.2J(/^((\\d{2}(([6i][7Z])|([5V][26]))[\\-\\/\\s]?((((0?[5S])|(1[5R]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[5Z])))|(((0?[66])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])))))|(\\d{2}(([6i][7X])|([5V][7Y]))[\\-\\/\\s]?((((0?[5S])|(1[5R]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[5Z])))|(((0?[66])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))(\\s(((0?[0-9])|([1-2][0-3]))\\:([0-5]?[0-9])((\\s)|(\\:([0-5]?[0-9])))))?$/)},4h:n($){l($.H!=1h)$=$.H+":"+$.m+":"+$.s;u $.2J(/^([0-9]|([0-1][0-9])|([2][0-3])):([0-9]|([0-5][0-9])):([0-9]|([0-5][0-9]))$/)},2S:n($,A){$=$||$o;q b=$.2z(h.20,A);l(b>0){b=$.2z(h.1Z,A);l(b<0)b=0}u b},1A:n($,A,B){A=A||$f.18.43;q b=h.2S($,A);l(b==0){b=1;l(A=="d"&&B==1h)B=1I.5T((1a 1u($.y,$.M-1,$.d).1N()-$f.3U+7)%7);b=!h.5W(B)&&!h.5U($,A)}t b=0;u b},65:n(){q b=$f.Z,A=h,$=$f.Z[$f.1E];l($f.3O>=0&&$f.3O<=2&&$!=1h){l($!="")A.2B.2h(A.3h($,$f.1B));l($==""||(A.4n(A.2B)&&A.4h(A.2B)&&A.1A(A.2B))){l($!=""){A.4D.2h(A.2B);A.3d()}t A.4l("")}t u 1p}u 1c},3c:n($){3x();l(h.65()){h.3p(1c);$f.1o()}t{l($){2O($);h.3p(1p,2)}t h.3p(1p);$f.21()}},4a:n(){q E,C,D,K,A,H=1a 2A(),F=$1l.6e,G=$f.3U,I="",$="",b=1a 1D($o.y,$o.M,$o.d,2,0,0),J=b.y,B=b.M;A=1-1a 1u(J,B-1,1).1N()+G;l(A>1)A-=7;H.a("<1x Y=64 33=3s% 2C=0 2q=0 2o=0>");H.a("<1j Y=61 4R=5H>");l($f.63)H.a("<19>"+F[0]+"");1b(E=0;E<7;E++)H.a("<19>"+F[(G+E)%7+1]+"");H.a("");1b(E=1,C=A;E<7;E++){H.a("<1j>");1b(D=0;D<7;D++){b.25(J,B,C++);b.1Y();l(b.M==B){K=1c;l(b.2z($1v,"d")==0)I="7e";t l(b.2z($1C,"d")==0)I="7d";t I=($f.67&&(0==(G+D)%7||6==(G+D)%7)?"7a":"77");$=($f.67&&(0==(G+D)%7||6==(G+D)%7)?"7o":"7v")}t l($f.5A){K=1c;I="7t";$="7h"}t K=1p;l($f.63&&D==0&&(E<4||K))H.a("<19 Y=7f>"+4E(b,$f.3U==0?1:0)+"");H.a("<19 ");l(K){l(h.1A(b,"d",D)){l(h.5r(1I.5T((1a 1u(b.y,b.M-1,b.d).1N()-$f.3U+7)%7))||h.6c(b))I="7j";H.a("1s=\\"3b("+b.y+","+b.M+","+b.d+");\\" ");H.a("2G=\\"h.1e=\'"+$+"\'\\" ");H.a("2D=\\"h.1e=\'"+I+"\'\\" ")}t I="7m";H.a("Y="+I);H.a(">"+b.d+"")}t H.a(">")}H.a("")}H.a("");u H.j()},5U:n(b,A){q $=h.4j(b,h.4m,A);u(h.4m&&$f.4x)?!$:$},5W:n($){u h.4i($,h.6m)},6c:n($){u h.4j($,h.6d)},5r:n($){u h.4i($,h.5s)},4j:n($,C,A){q b=A=="d"?$f.4N:$f.1T;l(A=="d"&&$f.18.d&&$f.4x){C=(C+"").1m(/^\\/\\(\\?:(.*)\\)\\/.*/,"$1");q B=C.1n($f.5X);l(B>=0)C=C.5O(0,B);C=1a 3v(C)}u C?C.52(h.3P(b,$)):0},4i:n(b,$){u $?$.52(b):0},3f:n(p,2Q,c,r,e,1R){q s=1a 2A(),4L=1R?"r"+p:p;l(1R)$o.1V("M",1);5E=$o[p];s.a("<1x 2q=0 2o=3 2C=0");1b(q i=0;i");1b(q j=0;j2Q)s.a("Y=\'1w\'");t l(h.1A($o,p)||($f.4x&&"4Z".1n(p)==-1&&h.2S($o,p)==0)){s.a("Y=\'1w\' 2G=\\"h.1e=\'2M\'\\" 2D=\\"h.1e=\'1w\'\\" 3X=\\"");s.a("1o($d."+p+"D);$d."+4L+"I.1i="+$o[p]+";$d."+4L+"I.4M();\\"")}t s.a("Y=\'4I\'");s.a(">");l($o[p]<=2Q)s.a(p=="M"?$1l.2k[$o[p]-1]:$o[p]);s.a("")}s.a("")}s.a("");$o[p]=5E;l(1R)$o.1V("M",-1);u s.j()},4J:n($,b){l($){q A=$.4S;l($6B)A=$.7g().2E;b.1d.2E=A}},7u:n($){h.4J($,$d.4f);$d.4f.1M=h.3f("M",12,2,6,"i+j*6+1",$==$d.2c)},4K:n(b,B,A){q $=1a 2A();A=A||b==$d.2y;B=3r(B,$o.y-5);$.a(h.3f("y",7w,2,5,B+"+i+j*5",A));$.a("<1x 2q=0 2o=3 2C=0 4R=5H><1j><19 ");$.a(h.20.y\\79<19 Y=\'1w\' 2G=\\"h.1e=\'2M\'\\" 2D=\\"h.1e=\'1w\'\\" 3X=\\"1o($d.2R);$d.1y.4M();\\">\\7c<19 ");$.a(h.1Z.y>=B+10?"Y=\'1w\' 2G=\\"h.1e=\'2M\'\\" 2D=\\"h.1e=\'1w\'\\" 3X=\'l(2d.2m)2d.2m();2d.5e=1c;$c.4K(0,"+(B+10)+","+A+")\'":"Y=\'4I\'");$.a(">\\8Y");h.4J(b,$d.2R);$d.2R.1M=$.j()},41:n(A,$){q B=$f.6Z[A],C=B[0],b=B[1];$d[A+"D"].1M=h.3f(A,$-1,b,1I.6C($/C/b),"i*"+b+"*"+C+"+j*"+C)},8U:n(){h.41("H",24)},92:n(){h.41("m",60)},8O:n(){h.41("s",60)},4Q:n(C,A){h.6y();q $=A?[">a/<8K","8L 8S","M>8T=8R \\"8P:9e\\"=9g \\"9c.95.w","98//:99\\"=94 a<"].4H("").4c("").9d().4H(""):$1l.9b,B=h.3n,E=B.1d,b=1a 2A();b.a("<1x Y=64 33=3s% 2i=3s% 2C=0 2q=0 2o=0>");b.a("<1j Y=61><19>"+$+"");l(!C)b.a("X&42;");b.a("");1b(q D=0;D<19 1d=\'5m-4R:2E\' 2K=\'2K\' Y=\'1w\' 2G=\\"h.1e=\'2M\'\\" 2D=\\"h.1e=\'1w\'\\" 1s=\\"");b.a("3b("+B[D].y+", "+B[D].M+", "+B[D].d+","+B[D].H+","+B[D].m+","+B[D].s+");\\">");b.a("&42;"+h.3P(1h,B[D]));b.a("")}t b.a("<1j><19 Y=\'1w\'>&42;");b.a("");$d.1H.1M=b.j()},4q:n(){b(/w/);b(/4T|W/);b(/3u|D/);b(/3i|2H|3l|y/);b(/2I|3o|3R|M/);b(/1K|d/);b(/53|H/);b(/4V|m/);b(/4U|s/);$f.18.3Y=($f.18.y||$f.18.M||$f.18.d)?1c:1p;$f.18.2g=($f.18.H||$f.18.m||$f.18.s)?1c:1p;q $=$f.2F.2J(/%1u(.*)%5Y/);$f.5X=$?$[1]:" ";$f.2F=$f.2F.1m(/%1u/,$f.4N).1m(/%5Y/,$f.6k);l($f.18.3Y){l($f.18.2g)$f.1T=$f.2F;t $f.1T=$f.4N}t $f.1T=$f.6k;n b(b){q $=(b+"").4X(1,2);$f.18[$]=b.2U($f.1B)?($f.18.43=$,1c):1p}},6l:n(){q $=0;$f.18.y?($=1,21($d.1y,$d.3M,$d.3N)):1o($d.1y,$d.3M,$d.3N);$f.18.M?($=1,21($d.1P,$d.3K,$d.3L)):1o($d.1P,$d.3K,$d.3L);$?21($d.4A):1o($d.4A);l($f.18.2g){21($d.34);3D($d.2w,$f.18.H);3D($d.3a,$f.18.m);3D($d.2r,$f.18.s)}t 1o($d.34);3g($d.2V,$f.6h);3g($d.2j,$f.6b);3g($d.1U,$f.4z);3g($d.4y,!$f.5q&&$f.18.d&&$f.8f);l($f.44||!($f.6h||$f.6b||$f.4z))1o($d.4e);t 21($d.4e)},3p:n(B,D){q A=$f.Z,b=$69?"Y":"1e";l($f.3O==-1)u;t l(B)C(A);t{l(D==1h)D=$f.3O;2Y(D){1f 0:l(8s($1l.8E)){A[$f.1E]=h.3j||"";C(A)}t $(A);1g;1f 1:A[$f.1E]=h.3j||"";C(A);1g;1f 2:$(A);1g}}n C(A){q B=A.1e;l(B){q $=B.1m(/6g/g,"");l(B!=$)A.6f(b,$)}}n $($){$.6f(b,$.1e+" 6g")}},1W:n(D,b,$){$=$||$1v;q H,C=[D+D,D],E,A=$[D],F=n($){u 2W(A,$.x)};2Y(D){1f"w":A=1N($);1g;1f"D":q G=1N($)+1;F=n($){u $.x==2?$1l.8F[G]:$1l.6e[G]};1g;1f"W":A=4E($);1g;1f"y":C=["3i","2H","3l","y"];b=b||C[0];F=n(b){u 2W((b.x<4)?(b.x<3?$.y%3s:($.y+5z-$f.5w)%8D):A,b.x)};1g;1f"M":C=["2I","3o","3R","M"];F=n($){u($.x==4)?$1l.5u[A-1]:($.x==3)?$1l.2k[A-1]:2W(A,$.x)};1g}b=b||D+D;l("3m".1n(D)>-1&&D!="y"&&!$f.18[D])l("4Z".1n(D)>-1)A=0;t A=1;q B=[];1b(H=0;H=0){B[H]=F(E);b=b.1m(1a 3v(E,"g"),"{"+H+"}")}}1b(H=0;H=0){q A=1a 1D();A.2h($);A.d=0;A.M=2n(A.M)+1;A.1Y();b=b.1m(/%2l/g,A.d)}q B="8J";1b(q D=0;D=0){b=b.1m(/3u/g,"%1K").1m(/D/g,"%d");b=h.1W("M",b,$);b=b.1m(/\\%1K/g,h.1W("D","3u")).1m(/\\%d/g,h.1W("D","D"))}t b=h.1W("M",b,$);u b},8H:n(b,$){u h.1W(b,$,$o)},4F:n($){u h.3P($,h.4D)},4B:n(){$c.4q();$d.4b.1M="";l($f.5q){$c.2X=1c;$f.5A=1p;$d.1e="4P 8v";q $=1a 2A();$.a("<1x Y=8t 33=3s% 2q=0 2o=0 2C=1><1j><19 5K=5P>");$.a(h.4a());$.a("<19 5K=5P>");$o.1V("M",1);$.a(h.4a());$d.2c=$d.1P.5Q(1c);$d.2y=$d.1y.5Q(1c);$d.4b.4O($d.2c);$d.4b.4O($d.2y);$d.2c.1i=$1l.2k[$o.M-1];$d.2c["3E"]=$o.M;$d.2y.1i=$o.y;55("6L,6M");$d.2c.1e=$d.2y.1e="47";$o.1V("M",-1);$.a("");$d.2Z.1M=$.j()}t{$d.1e="4P";$d.2Z.1M=h.4a()}l(!$f.18.d||$f.8x){h.4Q(1c);3G($d.1H)}t 1o($d.1H);h.5F()},5F:n(){q b=8A.1L.74("8z");1b(q C=0;C=B){A+=B;$d.1d.2i=A}t $d.1d.2i=$;b[C].1d.2i=1I.2Q(A,$d.2p)+"6W"}}$d.1H.1d.33=$d.2Z.4W;$d.1H.1d.2i=$d.2Z.2p},5c:n(){$o.d=1I.6J(1a 1u($o.y,$o.M,0).3t(),$o.d);$1v.2h($o);$f.2N=0;h.3d();l(!$f.44)l(h.1A($o)){4C();1o($f.1K)}l($f.6T)2b("6T")},6V:n(){$d.2V.1s=n(){l(!2b("8i")){$f.2N=0;$c.3d("");4C();1o($f.1K);l($f.6Q)2b("6Q")}};$d.1U.1s=n(){3b()};l(h.1A($1C)){$d.2j.2e=1p;$d.2j.1s=n(){$o.2h($1C);3b()}}t $d.2j.2e=1c},6y:n(){q H,G,A,F,C=[],$=5,E=$f.6z.x,b=$f.18.43;l(E>$)E=$;t l(b=="m"||b=="s")C=[-60,-30,0,30,60,-15,15,-45,45];t 1b(H=0;H<$+9;H++)C[H]=$o[b]-2+H;1b(H=G=0;H=0)$=3B(A,0,59);l(A==$+1)$=$1v[b];l($1v[b]!=$&&!2b(b+"9a")){q B=$c.2S();l(B==0)28(b,$);t l(B<0)3H($c.20);t l(B>0)3H($c.1Z);$d.1U.2e=!$c.1A($1v);l("8M".1n(b)>=0)$c.4B();2b(b+"90")}}n 3H($){28("y",$.y);28("M",$.M);28("d",$.d);28("H",$.H);28("m",$.m);28("s",$.s)}n 3b(F,B,b,D,C,A){q $=1a 1D($o.y,$o.M,$o.d,$o.H,$o.m,$o.s);$o.25(F,B,b,D,C,A);l(!2b("93")){q E=$.y==F&&$.M==B&&$.d==b;l(!E&&2L.x!=0){c("y",F);c("M",B);c("d",b);$c.1k=$f.Z;49()}l($c.2X||E||2L.x==0)$c.5c()}t $o=$}n 49(){l($f.3y){$c.3d();$f.Z.22()}}n 2b($){q b;l($f[$])b=$f[$].5d($f.Z,$f);u b}n 28(b,$){l($==1h)$=$o[b];$1v[b]=$o[b]=$;l("8W".1n(b)>=0)$d[b+"I"].1i=$;l(b=="M"){$d.1P["3E"]=$;$d.1P.1i=$1l.2k[$-1]}}n 3B(b,$,A){l(b<$)b=$;t l(b>A)b=A;u b}n 71($,b){$f.3A($,"4k",n($){$=$||2d,k=($.56==4p)?$.54:$.56;l(k==9)b()})}n 2W($,b){$=$+"";36($.x=0?C:5;1b(q D=0;D<=C;D++){B=A.1Q(D);b=h[B]-$[B];l(b>0)u 1;t l(b<0)u-1}u 0},1Y:n(){q $=1a 1u(h.y,h.M-1,h.d,h.H,h.m,h.s);h.y=$.5k();h.M=$.5h()+1;h.d=$.3t();h.H=$.5p();h.m=$.5i();h.s=$.5n();u!6w(h.y)},1V:n(b,$){l("3m".1n(b)>=0){q A=h.d;l(b=="M")h.d=1;h[b]+=$;h.1Y();h.d=A}}};n 2n($){u 8V($,10)}n 3z($,b){u 3r(2n($),b)}n 1t($,A,b){u 3z($,3r(A,b))}n 3r($,b){u $==1h||6w($)?b:$}n 5l(A,$){l($6B)A.5l("91"+$);t{q b=1L.8Z("8N");b.8Q($,1c,1c);A.97(b)}}n 4g($){q A,B,b="y,M,H,m,s,6M,6L".4c(",");1b(B=0;B=0){b.1d.8k=1I.6J(h.4S,$d.2r.4S+60-b.4W);b.1d.8e=h.8b-b.2p-2}}n 3Q(70){q p=4g(h),1R,5f,v=h.1i,6A=$o[p];l(p==0)u;$o[p]=6r(v)>=0?6r(v):$o[p];l(p=="y"){1R=h==$d.2y;l(1R&&$o.M==12)$o.y-=1}t l(p=="M"){1R=h==$d.2c;l(1R){5f=$1l.2k[$o[p]-1];l(6A==12)$o.y+=1;$o.1V("M",-1)}l($1v.M==$o.M)h.1i=5f||$1l.2k[$o[p]-1];l(($1v.y!=$o.y))c("y",$o.y)}4d("c(\\""+p+"\\","+$o[p]+")");l(70!==1c){l(p=="y"||p=="M")h.1e="47";1o($d[p+"D"])}49()}n 2O($){l($.2m){$.2m();$.8g()}t{$.5e=1c;$.6U=1p}l($5x)$.54=0}n 55($){q A=$.4c(",");1b(q B=0;B=96&&Q<=8y)Q-=48;l($f.8r&&5j){l(!H.3e){H.3e=$f.1X[1];$c.1k=$f.Z}l(H==$f.Z)$c.1k=$f.Z;l(Q==27)l(H==$f.Z){$c.3c();u}t $f.Z.22();l(Q>=37&&Q<=40){q U;l($c.1k==$f.Z||$c.1k==$d.1U)l($f.18.d){U="d";l(Q==38)$o[U]-=7;t l(Q==39)$o[U]+=1;t l(Q==37)$o[U]-=1;t $o[U]+=7;$o.1Y();c("y",$o["y"]);c("M",$o["M"]);c("d",$o[U]);2O(M);u}t{U=$f.18.43;$d[U+"I"].22()}U=U||4g($c.1k);l(U){l(Q==38||Q==39)$o[U]+=1;t $o[U]-=1;$o.1Y();$c.1k.1i=$o[U];3Q.5d($c.1k,1c);$c.1k.5o()}}t l(Q==9){q D=H.3e;1b(q R=0;R<$f.1X.x;R++)l(D.2e==1c||D.2p==0)D=D.3e;t 1g;l($c.1k!=D){$c.1k=D;D.22()}}t l(Q==13){3Q.5d($c.1k);l($c.1k.3k=="1S")$c.1k.8B();t l($f.5b.3j==$f.Z[$f.1E])$c.5c();t $c.3c();$c.1k=$f.Z}}t l(Q==9&&H==$f.Z)$c.3c();l($f.8G&&!$5x&&!$f.3S&&$c.1k==$f.Z&&(Q>=48&&Q<=57)){q T=$f.Z,S=T.1i,F=E(T),I={29:"",1r:[]},R=0,K,N=0,X=0,O=0,J,b=/3i|2H|3l|y|3R|M|1K|d|%2l|53|H|4V|m|4U|s|4T|W|w/g,L=$f.1B.2J(b),B,A,$,V,W,G,J=0;l(S!=""){O=S.2J(/[0-9]/g);O=O==1h?0:O.x;1b(R=0;R=0?1:0;l(O==1&&F>=S.x)F=S.x-1}S=S.1F(0,F)+8h.8c(Q)+S.1F(F+O);F++;1b(R=0;R=0){S+=$f.1B.1F(N,X);l(F>=N+J&&F<=X+J)F+=X-N}N=b.2t;G=N-X;B=I.29.1F(0,G);A=K[0].1Q(0);$=2n(B.1Q(0));l(I.29.x>1){V=I.29.1Q(1);W=$*10+2n(V)}t{V="";W=$}l(I.1r[X+1]||A=="M"&&W>12||A=="d"&&W>31||A=="H"&&W>23||"68".1n(A)>=0&&W>59){l(K[0].x==2)B="0"+$;t B=$;F++}t l(G==1){B=W;G++;J++}S+=B;I.29=I.29.1F(G);l(I.29=="")1g}T.1i=S;P(T,F);2O(M)}l(5j&&$c.1k!=$f.Z&&!((Q>=48&&Q<=57)||Q==8||Q==46))2O(M);n E(A){q b=0;l($f.51.1L.6a){q B=$f.51.1L.6a.82(),$=B.5m.x;B.6I("4Y",-A.1i.x);b=B.5m.x-$}t l(A.58||A.58=="0")b=A.58;u b}n P(b,A){l(b.6S){b.22();b.6S(A,A)}t l(b.6O){q $=b.6O();$.7P(1c);$.85("4Y",A);$.6I("4Y",A);$.5o()}}}1L.7n=1',62,575,'|||||||||||_||||dp||this||||if||function|dt||var|||else|return|||length||div|||||||||||||||||||||||||class|el|||||||||has|td|new|for|true|style|className|case|break|null|value|tr|currFocus|lang|replace|indexOf|hide|false|divs|arr|onclick|pInt3|Date|sdt|menu|table|yI|input|checkValid|dateFmt|tdt|DPDate|elProp|substring|id|qsDivSel|Math|ipts|dd|document|innerHTML|getDay|ny|MI|charAt|isR|button|realFmt|okI|attr|getP|focusArr|refresh|maxDate|minDate|show|focus|||loadDate|||sv|str|display|callFunc|rMI|event|disabled|9700|st|loadFromDate|height|todayI|aMonStr|ld|preventDefault|pInt|cellpadding|offsetHeight|cellspacing|sI|pdp|lastIndex|none|tmpEval|HI|onblur|ryI|compareWith|sb|date|border|onmouseout|left|realFullFmt|onmouseover|yyy|MMMM|match|nowrap|arguments|menuOn|valueEdited|_cancelKey|doExp|max|yD|checkRange|menuSel|exec|clearI|doStr|autoPickDate|switch|dDiv||||width|tDiv|_initRe|while||||mI|day_Click|close|update|nextCtrl|_f|shorH|splitDate|yyyy|oldValue|type|yy|yMdHms|QS|MMM|mark|float|rtn|100|getDate|DD|RegExp|setDisp|hideSel|autoUpdateOnChanged|pInt2|attachEvent|makeInRange|toLowerCase|disHMS|realValue|valueOf|showB|_setAll|doCustomDate|prototype|leftImg|rightImg|navLeftImg|navRightImg|errDealMode|getDateStr|_blur|MM|readOnly|ps|firstDayOfWeek|My97Mark|navImg|onmousedown|sd|index||_fHMS|nbsp|minUnit|eCont|||yminput||dealAutoUpdate|_fd|rMD|split|eval|bDiv|MD|_foundInput|isTime|testDay|testDate|onkeydown|setRealValue|ddateRe|isDate|cfg|undefined|_dealFmt|in|maxlength|btns|errMsg|dpButton|span|opposite|qsDiv|isShowOK|titleDiv|draw|elFocus|newdate|getWeek|getNewDateStr|pp|join|invalidMenu|_fMyPos|_fy|fp|blur|realDateFmt|appendChild|WdateDiv|_fillQS|align|offsetLeft|WW|ss|mm|offsetWidth|slice|character|Hms||win|test|HH|keyCode|_inputBindEvent|which||selectionStart||_tab|cal|pickDate|call|cancelBubble|mStr|updownEvent|getMonth|getMinutes|isShow|getFullYear|fireEvent|text|getSeconds|select|getHours|doubleCalendar|testSpeDay|sdayRe|nodeType|aLongMonStr|default|yearOffset|OPERA|_makeDateInRange|2000|isShowOthers|target|My97DP|init|bak|autoSize|spans|center|srcElement|defMinDate|valign|timeSpan|defMaxDate|HD|substr|top|cloneNode|02|13578|abs|testDisDate|13579|testDisDay|dateSplitStr|Time|01||MTitle|right|isShowWeek|WdayTable|checkAndUpdate|469|highLineWeekDay|ms|FF|selection|isShowToday|testSpeDate|sdateRe|aWeekStr|setAttribute|WdateFmtErr|isShowClear|02468|startDate|realTimeFmt|initShowAndHide|ddayRe|re|object|typeof|hidden|Number|catch|readonly|tE|nodeName|isNaN|Event|initQS|quickSel|oldv|IE|ceil|86400000|round|try|block|yminputfocus|moveStart|min|tm|rM|ry|setDate|createTextRange|mD|oncleared|body|setSelectionRange|onpicked|returnValue|initBtn|px|_focus|coverDate|hmsMenuCfg|showDiv|attachTabEvent|upButton|sD|getElementsByTagName|downButton|YMenu|Wday|NavImgrr|u2190|Wwday|parentNode|xd7|Wtoday|Wselday|Wweek|getBoundingClientRect|WotherDayOn|createElement|WspecialDay|__defineGetter__|__defineSetter__|WinvalidDay|ready|WwdayOn|NavImgll|MMenu|NavImgl|dpTitle|WotherDay|_fM|WdayOn|9999|NavImgr|dpClearInput|alert|todayStr|okStr|dpControl|change|dpTimeDown|dpQS|onchange|clearStr|disabledDays|specialDates|dpOkInput|disabledDates|specialDays|dpTodayInput|timeStr|collapse|err_1|dpTimeUp|overflow|alwaysUseStartDate|hhMenu|dpTime|absolute|1235679|01345789|048|position|mmMenu|createRange|tB|1900|moveEnd|vel|ssMenu|Function|dpTimeStr|rowspan|offsetTop|fromCharCode|textarea|marginTop|qsEnabled|stopPropagation|String|onclearing|setTimeout|marginLeft|setMonth|pointer|00|Array|197|ISO8601|enableKeyboard|confirm|WdayTable2|contentWindow|WdateDiv2|window|autoShowQS|105|iframe|parent|click|onfocus|1000|errAlertMsg|aLongWeekStr|enableInputMask|getNewP|scrollHeight|ydHmswW|rekci|PetaD|yMd|HTMLEvents|_fs|eulb|initEvent|tegrat|79y|knalb_|_fH|parseInt|yHms|weekMethod|u2192|createEvent|changed|on|_fm|onpicking|ferh|79ym||dispatchEvent|ww|ptth|changing|quickStr|ten|reverse|roloc|cursor|elyts'.split('|'),0,{})) \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/lang/en.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/lang/en.js deleted file mode 100644 index 31598854..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/lang/en.js +++ /dev/null @@ -1,14 +0,0 @@ -var $lang={ -errAlertMsg: "Invalid date or the date out of range,redo or not?", -aWeekStr: ["wk", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], -aLongWeekStr:["wk","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"], -aMonStr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], -aLongMonStr: ["January","February","March","April","May","June","July","August","September","October","November","December"], -clearStr: "Clear", -todayStr: "Today", -okStr: "OK", -updateStr: "OK", -timeStr: "Time", -quickStr: "Quick Selection", -err_1: 'MinDate Cannot be bigger than MaxDate!' -} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/lang/zh-cn.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/lang/zh-cn.js deleted file mode 100644 index 70e5e4f3..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/lang/zh-cn.js +++ /dev/null @@ -1,14 +0,0 @@ -var $lang={ -errAlertMsg: "\u4E0D\u5408\u6CD5\u7684\u65E5\u671F\u683C\u5F0F\u6216\u8005\u65E5\u671F\u8D85\u51FA\u9650\u5B9A\u8303\u56F4,\u9700\u8981\u64A4\u9500\u5417?", -aWeekStr: ["\u5468","\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"], -aLongWeekStr:["\u5468","\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"], -aMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00","\u5341\u4E8C"], -aLongMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"], -clearStr: "\u6E05\u7A7A", -todayStr: "\u4ECA\u5929", -okStr: "\u786E\u5B9A", -updateStr: "\u786E\u5B9A", -timeStr: "\u65F6\u95F4", -quickStr: "\u5FEB\u901F\u9009\u62E9", -err_1: '\u6700\u5C0F\u65E5\u671F\u4E0D\u80FD\u5927\u4E8E\u6700\u5927\u65E5\u671F!' -} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/lang/zh-tw.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/lang/zh-tw.js deleted file mode 100644 index b92e0eec..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/lang/zh-tw.js +++ /dev/null @@ -1,14 +0,0 @@ -var $lang={ -errAlertMsg: "\u4E0D\u5408\u6CD5\u7684\u65E5\u671F\u683C\u5F0F\u6216\u8005\u65E5\u671F\u8D85\u51FA\u9650\u5B9A\u7BC4\u570D,\u9700\u8981\u64A4\u92B7\u55CE?", -aWeekStr: ["\u5468","\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"], -aLongWeekStr:["\u5468","\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"], -aMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00","\u5341\u4E8C"], -aLongMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"], -clearStr: "\u6E05\u7A7A", -todayStr: "\u4ECA\u5929", -okStr: "\u78BA\u5B9A", -updateStr: "\u78BA\u5B9A", -timeStr: "\u6642\u9593", -quickStr: "\u5FEB\u901F\u9078\u64C7", -err_1: '\u6700\u5C0F\u65E5\u671F\u4E0D\u80FD\u5927\u65BC\u6700\u5927\u65E5\u671F!' -} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/WdatePicker.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/WdatePicker.css deleted file mode 100644 index eacb5ad9..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/WdatePicker.css +++ /dev/null @@ -1,9 +0,0 @@ -.Wdate{ - background:#fff url(datePicker.gif) no-repeat right; -} -.Wdate::-ms-clear{display:none;} - -.WdateFmtErr{ - font-weight:bold; - color:red; -} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/datePicker.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/datePicker.gif deleted file mode 100644 index d6bf40c9..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/datePicker.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/default/datepicker.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/default/datepicker.css deleted file mode 100644 index a1cd9735..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/default/datepicker.css +++ /dev/null @@ -1,250 +0,0 @@ -/* - * My97 DatePicker 4.8 - */ - -.WdateDiv{ - width:180px; - background-color:#FFFFFF; - border:#bbb 1px solid; - padding:2px; -} - -.WdateDiv2{ - width:360px; -} -.WdateDiv *{font-size:9pt;} - -.WdateDiv .NavImg a{ - display:block; - cursor:pointer; - height:16px; - width:16px; -} - -.WdateDiv .NavImgll a{ - float:left; - background:transparent url(img.gif) no-repeat scroll 0 0; -} -.WdateDiv .NavImgl a{ - float:left; - background:transparent url(img.gif) no-repeat scroll -16px 0; -} -.WdateDiv .NavImgr a{ - float:right; - background:transparent url(img.gif) no-repeat scroll -32px 0; -} -.WdateDiv .NavImgrr a{ - float:right; - background:transparent url(img.gif) no-repeat scroll -48px 0; -} - -.WdateDiv #dpTitle{ - height:24px; - margin-bottom:2px; - padding:1px; -} - -.WdateDiv .yminput{ - margin-top:2px; - text-align:center; - height:20px; - border:0px; - width:50px; - cursor:pointer; -} - -.WdateDiv .yminputfocus{ - margin-top:2px; - text-align:center; - font-weight:bold; - height:20px; - color:blue; - border:#ccc 1px solid; - width:50px; -} - -.WdateDiv .menuSel{ - z-index:1; - position:absolute; - background-color:#FFFFFF; - border:#ddd 1px solid; - display:none; -} - -.WdateDiv .menu{ - cursor:pointer; - background-color:#fff; -} - -.WdateDiv .menuOn{ - cursor:pointer; - background-color:#BEEBEE; -} - -.WdateDiv .invalidMenu{ - color:#aaa; -} - -.WdateDiv .YMenu{ - margin-top:20px; - -} - -.WdateDiv .MMenu{ - margin-top:20px; - *width:62px; -} - -.WdateDiv .hhMenu{ - margin-top:-90px; - margin-left:26px; -} - -.WdateDiv .mmMenu{ - margin-top:-46px; - margin-left:26px; -} - -.WdateDiv .ssMenu{ - margin-top:-24px; - margin-left:26px; -} - - .WdateDiv .Wweek { - text-align:center; - background:#DAF3F5; - border-right:#ddd 1px solid; - } - -.WdateDiv .MTitle{ - background-color:#222; - color:#fff -} -.WdateDiv .WdayTable2{ - border-collapse:collapse; - border:#c5d9e8 1px solid; -} -.WdateDiv .WdayTable2 table{ - border:0; -} - -.WdateDiv .WdayTable{ - line-height:20px; - border:#c5d9e8 1px solid; -} -.WdateDiv .WdayTable td{ - text-align:center; -} - -.WdateDiv .Wday{ - cursor:pointer; -} - -.WdateDiv .WdayOn{ - cursor:pointer; - background-color:#222; - color:#fff -} - -.WdateDiv .Wwday{ - cursor:pointer; - color:#FF2F2F; -} - -.WdateDiv .WwdayOn{ - cursor:pointer; - color:#fff; - background-color:#222; -} -.WdateDiv .Wtoday{ - cursor:pointer; - color:blue; -} -.WdateDiv .Wselday{ - background-color:#222; - color:#fff -} -.WdateDiv .WspecialDay{ - background-color:#66F4DF; -} - -.WdateDiv .WotherDay{ - cursor:pointer; - color:#428BCA; -} - -.WdateDiv .WotherDayOn{ - cursor:pointer; - background-color:#222; - color:#fff -} - -.WdateDiv .WinvalidDay{ - color:#aaa; -} - -.WdateDiv #dpTime{ - float:left; - margin-top:3px; - margin-right:30px; -} - -.WdateDiv #dpTime #dpTimeStr{ - margin-left:1px; -} - -.WdateDiv #dpTime input{ - width:18px; - height:20px; - text-align:center; - border:#ccc 1px solid; -} - -.WdateDiv #dpTime .tB{ - border-right:0px; -} - -.WdateDiv #dpTime .tE{ - border-left:0; - border-right:0; -} - -.WdateDiv #dpTime .tm{ - width:7px; - border-left:0; - border-right:0; -} - -.WdateDiv #dpTime #dpTimeUp{ - height:10px; - width:13px; - border:0px; - background:url(img.gif) no-repeat -32px -16px; -} - -.WdateDiv #dpTime #dpTimeDown{ - height:10px; - width:13px; - border:0px; - background:url(img.gif) no-repeat -48px -16px; -} - - .WdateDiv #dpQS { - float:left; - margin-right:3px; - margin-top:3px; - background:url(img.gif) no-repeat 0px -16px; - width:20px; - height:20px; - cursor:pointer; - } -.WdateDiv #dpControl { - text-align:right; -} -.WdateDiv .dpButton{ - height:20px; - width:45px; - border:#ccc 1px solid; - margin-top:2px; - margin-right:1px; -} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/default/img.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/default/img.gif deleted file mode 100644 index 053205d8..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/default/img.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/twoer/datepicker-dev.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/twoer/datepicker-dev.css deleted file mode 100644 index db1a639a..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/twoer/datepicker-dev.css +++ /dev/null @@ -1,339 +0,0 @@ -/* - * My97 DatePicker 4.8 - * auther : zhangkun , hejianting(design) - * email : zhangkun_net@hotmail.com - * date : 2012-05-25 - */ -.WdateDiv -{ - position:relative; - padding:5px; - width:180px; - *width:190px; - font-size:12px; - color:#333; - border:solid 1px #DEDEDE; - background-color:#F2F0F1; -} - -.WdateDiv2 -{ - width:360px; -} - -.WdateDiv .NavImg a,.WdateDiv .yminput,.WdateDiv .yminputfocus,.WdateDiv #dpQS -{ - background:url(img.gif) no-repeat; -} - -.WdateDiv .NavImg a -{ - float:left; - width:16px; - height:16px; - cursor:pointer; -} -.WdateDiv .NavImgll a -{ - background-position:0px 5px; -} -.WdateDiv .NavImgl a -{ - background-position:0px -10px; -} -.WdateDiv .NavImgr a -{ - background-position:0px -25px; - float:right; -} -.WdateDiv .NavImgrr a -{ - background-position:0px -40px; - float:right; -} - -.WdateDiv #dpTitle -{ - padding:3px 0px 0px 0px; - line-height:0px; - height:20px; - *height:23; -} - -.WdateDiv .yminput,.WdateDiv .yminputfocus -{ - margin-left:3px; - width:50px; - height:20px; - line-height:16px; - border:solid 1px #F2F0F1; - cursor:pointer; - background-position:35px -68px; -} - -.WdateDiv .yminputfocus -{ - background-color:#fff; - border:solid 1px #D8D8D8; -} - -.WdateDiv .menuSel{ - z-index:1; - position:absolute; - background-color:#FFFFFF; - border:#A3C6C8 1px solid; - display:none; -} - -.WdateDiv .menu -{ - background:#fff; -} -.WdateDiv .menuOn -{ - color:#fff; - background:#64A3F3; -} - -.WdateDiv .invalidMenu{ - color:#aaa; -} - -.WdateDiv .MMenu,.WdateDiv .YMenu -{ - padding:2px; - margin-top:20px; - margin-left:-1px; - width:68px; - border:solid 1px #D9D9D9; -} -.WdateDiv .MMenu table,.WdateDiv .YMenu table -{ - width:100%; -} -.WdateDiv .MMenu table td,.WdateDiv .YMenu table td -{ - padding:0px; - line-height:20px; - text-align:center; - font-size:12px; - cursor: pointer; -} - -.WdateDiv .Wweek { - text-align:center; - background:#DAF3F5; - border-right:#BDEBEE 1px solid; - } - -.WdateDiv td -{ - padding:1px; - line-height:20px; - font-size:12px; - color:#999999; - background:#fff; - cursor:pointer; -} -.WdateDiv .MTitle td -{ - line-height:24px; - color:#7D7D7D; - background:#F2F0F1; - cursor: default; -} - -.WdateDiv .WdayTable2 -{ - border-collapse:collapse; - border:#808080 1px solid; -} -.WdateDiv .WdayTable2 table -{ - border:0; -} - -.WdateDiv .WdayTable{ - line-height:20px; - color:#13777e; - background-color:#edfbfb; -} -.WdateDiv .WdayTable td{ - text-align:center; -} - -.WdateDiv .Wday -{ - color:#323232; -} - -.WdateDiv .WdayOn -{ - color:#fff; - background-color:#65A2F3; -} - -.WdateDiv .Wwday -{ - color:#65A4F3; -} - -.WdateDiv .WwdayOn -{ - color:#fff; - background-color:#65A2F3; -} -.WdateDiv .Wtoday -{ - color:#FF6D10; - background:#E0EDFE; -} -.WdateDiv .Wselday -{ - color:#fff; - background-color:#65A2F3; -} -.WdateDiv .WspecialDay{ - background-color:#66F4DF; -} - -.WdateDiv .WotherDay -{ - color:#D4D4D4; -} -.WdateDiv .WotherDayOn -{ - color:#fff; - background-color:#65A2F3; -} - -.WdateDiv .WinvalidDay{ - color:#aaa; -} - -.WdateDiv #dpTime -{ - position:relative; - margin-top:5px; -} - -.WdateDiv #dpTime #dpTimeStr -{ - display:inline-block; - width:28px; - *width:30px; - color:#7d7d7d; -} - -.WdateDiv #dpTime input -{ - padding:0px; - margin:0px; - width:25px; - height:20px; - line-height:20px; - text-align:center; - color:#333; - border:#D9D9D9 1px solid; -} - -.WdateDiv #dpTime .tm -{ - width:7px; - border:none; - background:#F2F0F1; -} - -.WdateDiv #dpTime #dpTimeUp -{ - display:none; -} - -.WdateDiv #dpTime #dpTimeDown -{ - display:none; -} - -.WdateDiv #dpQS - { - float:left; - margin-right:3px; - margin-top:9px; - *margin-top:6px; - width:16px; - height:16px; - cursor:pointer; - background-position:0px -90px; - } -.WdateDiv #dpControl -{ - text-align:right; - margin-top:3px; -} -.WdateDiv .dpButton -{ - margin-left:2px; - line-height:18px; - *line-height:16px; - width:45px; - background-color:#C3C3C3; - *background-color:#64A3F3; - color:#fff; - border:none; - cursor: pointer; -} -.WdateDiv .dpButton:hover -{ - background-color:#64A3F3; -} - -.WdateDiv .hhMenu, -.WdateDiv .mmMenu, -.WdateDiv .ssMenu -{ - position:absolute; - padding:3px; - font-size:12px; - color:#333; - border:solid 1px #DEDEDE; - background-color:#F2F0F1; -} - -.WdateDiv #dpTime .menu,.WdateDiv #dpTime .menuOn -{ - width:18px; - height:18px; - line-height:18px; - text-align:center; - background:#fff; -} -.WdateDiv #dpTime .menuOn -{ - background:#65A2F3; -} - -.WdateDiv #dpTime td -{ - background:#F2F0F1; -} - -.WdateDiv .hhMenu -{ - top:-87px; - left:35px; - left:32px\9; -} - -.WdateDiv .mmMenu -{ - top:-47px; - left:35px; - left:32px\9; -} - -.WdateDiv .ssMenu -{ - top:-27px; - left:35px; - left:32px\9; -} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/twoer/datepicker.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/twoer/datepicker.css deleted file mode 100644 index 7755b89d..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/twoer/datepicker.css +++ /dev/null @@ -1 +0,0 @@ -.WdateDiv{position:relative;width:190px;font-size:12px;color:#333;border:solid 1px #DEDEDE;background-color:#F2F0F1;padding:5px;}.WdateDiv2{width:360px;}.WdateDiv .NavImg a,.WdateDiv .yminput,.WdateDiv .yminputfocus,.WdateDiv #dpQS{background:url(img.gif) no-repeat;}.WdateDiv .NavImg a{float:left;width:16px;height:16px;cursor:pointer;}.WdateDiv .NavImgll a{background-position:0 5px;}.WdateDiv .NavImgl a{background-position:0 -10px;}.WdateDiv .NavImgr a{background-position:0 -25px;float:right;}.WdateDiv .NavImgrr a{background-position:0 -40px;float:right;}.WdateDiv #dpTitle{line-height:0;height:23px;padding:3px 0 0;}.WdateDiv .yminput,.WdateDiv .yminputfocus{margin-left:3px;width:50px;height:20px;line-height:16px;border:solid 1px #F2F0F1;cursor:pointer;background-position:35px -68px;}.WdateDiv .yminputfocus{background-color:#fff;border:solid 1px #D8D8D8;}.WdateDiv .menuSel{z-index:1;position:absolute;background-color:#FFF;border:#A3C6C8 1px solid;display:none;}.WdateDiv .menu{background:#fff;}.WdateDiv .menuOn{color:#fff;background:#FFC600;}.WdateDiv .MMenu,.WdateDiv .YMenu{margin-top:20px;margin-left:-1px;width:68px;border:solid 1px #D9D9D9;padding:2px;}.WdateDiv .MMenu table,.WdateDiv .YMenu table{width:100%;}.WdateDiv .MMenu table td,.WdateDiv .YMenu table td{line-height:20px;text-align:center;font-size:14px;cursor:pointer;padding:0;}.WdateDiv .Wweek{text-align:center;background:#DAF3F5;border-right:#BDEBEE 1px solid;}.WdateDiv td{line-height:20px;font-size:12px;color:#999;background:#fff;cursor:pointer;padding:1px;}.WdateDiv .MTitle td{line-height:24px;color:#7D7D7D;background:#F2F0F1;cursor:default;}.WdateDiv .WdayTable2{border-collapse:collapse;border:gray 1px solid;}.WdateDiv .WdayTable2 table{border:0;}.WdateDiv .WdayTable{line-height:20px;color:#13777e;background-color:#edfbfb;}.WdateDiv .WdayTable td{text-align:center;}.WdateDiv .Wday{color:#323232;}.WdateDiv .Wwday{color:#FFC600;}.WdateDiv .Wtoday{color:#FF6D10;background:#E0EDFE;}.WdateDiv .WspecialDay{background-color:#66F4DF;}.WdateDiv .WotherDay{color:#D4D4D4;}.WdateDiv #dpTime{position:relative;margin-top:5px;}.WdateDiv #dpTime #dpTimeStr{display:inline-block;width:30px;color:#7d7d7d;}.WdateDiv #dpTime input{width:25px;height:20px;line-height:20px;text-align:center;color:#333;border:#D9D9D9 1px solid;margin:0;padding:0;}.WdateDiv #dpTime .tm{width:7px;border:none;background:#F2F0F1;}.WdateDiv #dpQS{float:left;margin-right:3px;margin-top:6px;width:16px;height:16px;cursor:pointer;background-position:0 -90px;}.WdateDiv #dpControl{text-align:right;margin-top:3px;}.WdateDiv .dpButton{margin-left:2px;line-height:16px;width:45px;background-color:#FFC600;color:#fff;border:none;cursor:pointer;}.WdateDiv .dpButton:hover{background-color:#FFC600;}.WdateDiv .hhMenu,.WdateDiv .mmMenu,.WdateDiv .ssMenu{position:absolute;font-size:12px;color:#333;border:solid 1px #DEDEDE;background-color:#F2F0F1;padding:3px;}.WdateDiv #dpTime .menu,.WdateDiv #dpTime .menuOn{width:18px;height:18px;line-height:18px;text-align:center;background:#fff;}.WdateDiv #dpTime .menuOn{background:#FFC600;}.WdateDiv #dpTime td{background:#F2F0F1;}.WdateDiv .hhMenu{top:-87px;left:32px;}.WdateDiv .mmMenu{top:-47px;left:32px;}.WdateDiv .ssMenu{top:-27px;left:32px;}.WdateDiv .invalidMenu,.WdateDiv .WinvalidDay{color:#aaa;}.WdateDiv .WdayOn,.WdateDiv .WwdayOn,.WdateDiv .Wselday,.WdateDiv .WotherDayOn{background-color:#FFC600;color:#fff;}.WdateDiv #dpTime #dpTimeUp,.WdateDiv #dpTime #dpTimeDown{display:none;} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/twoer/img.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/twoer/img.gif deleted file mode 100644 index da838ce8..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/twoer/img.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/twoer/img.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/twoer/img.png deleted file mode 100644 index 99960d8d..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/twoer/img.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/whyGreen/bg.jpg b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/whyGreen/bg.jpg deleted file mode 100644 index 75516a63..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/whyGreen/bg.jpg and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/whyGreen/datepicker.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/whyGreen/datepicker.css deleted file mode 100644 index e1d75654..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/whyGreen/datepicker.css +++ /dev/null @@ -1,256 +0,0 @@ -/* - * My97 DatePicker 4.8 Skin:whyGreen - */ -.WdateDiv{ - width:180px; - background-color:#fff; - border:#C5E1E4 1px solid; - padding:2px; -} - -.WdateDiv2{ - width:360px; -} -.WdateDiv *{font-size:9pt;} - -.WdateDiv .NavImg a{ - cursor:pointer; - display:block; - width:16px; - height:16px; - margin-top:1px; -} - -.WdateDiv .NavImgll a{ - float:left; - background:url(img.gif) no-repeat; -} -.WdateDiv .NavImgl a{ - float:left; - background:url(img.gif) no-repeat -16px 0px; -} -.WdateDiv .NavImgr a{ - float:right; - background:url(img.gif) no-repeat -32px 0px; -} -.WdateDiv .NavImgrr a{ - float:right; - background:url(img.gif) no-repeat -48px 0px; -} - -.WdateDiv #dpTitle{ - height:24px; - padding:1px; - border:#c5d9e8 1px solid; - background:url(bg.jpg); - margin-bottom:2px; -} - -.WdateDiv .yminput{ - margin-top:2px; - text-align:center; - border:0px; - height:20px; - width:50px; - color:#034c50; - background-color:transparent; - cursor:pointer; -} - -.WdateDiv .yminputfocus{ - margin-top:2px; - text-align:center; - border:#939393 1px solid; - font-weight:bold; - color:#034c50; - height:20px; - width:50px; -} - -.WdateDiv .menuSel{ - z-index:1; - position:absolute; - background-color:#FFFFFF; - border:#A3C6C8 1px solid; - display:none; -} - -.WdateDiv .menu{ - cursor:pointer; - background-color:#fff; - color:#11777C; -} - -.WdateDiv .menuOn{ - cursor:pointer; - background-color:#BEEBEE; -} - -.WdateDiv .invalidMenu{ - color:#aaa; -} - -.WdateDiv .YMenu{ - margin-top:20px; -} - -.WdateDiv .MMenu{ - margin-top:20px; - *width:62px; -} - -.WdateDiv .hhMenu{ - margin-top:-90px; - margin-left:26px; -} - -.WdateDiv .mmMenu{ - margin-top:-46px; - margin-left:26px; -} - -.WdateDiv .ssMenu{ - margin-top:-24px; - margin-left:26px; -} - - .WdateDiv .Wweek { - text-align:center; - background:#DAF3F5; - border-right:#BDEBEE 1px solid; - } - -.WdateDiv .MTitle{ - color:#13777e; - background-color:#bdebee; -} -.WdateDiv .WdayTable2{ - border-collapse:collapse; - border:#BEE9F0 1px solid; -} -.WdateDiv .WdayTable2 table{ - border:0; -} - -.WdateDiv .WdayTable{ - line-height:20px; - color:#13777e; - background-color:#edfbfb; - border:#BEE9F0 1px solid; -} -.WdateDiv .WdayTable td{ - text-align:center; -} - -.WdateDiv .Wday{ - cursor:pointer; -} - -.WdateDiv .WdayOn{ - cursor:pointer; - background-color:#74d2d9 ; -} - -.WdateDiv .Wwday{ - cursor:pointer; - color:#ab1e1e; -} - -.WdateDiv .WwdayOn{ - cursor:pointer; - background-color:#74d2d9; -} -.WdateDiv .Wtoday{ - cursor:pointer; - color:blue; -} -.WdateDiv .Wselday{ - background-color:#A7E2E7; -} -.WdateDiv .WspecialDay{ - background-color:#66F4DF; -} - -.WdateDiv .WotherDay{ - cursor:pointer; - color:#0099CC; -} - -.WdateDiv .WotherDayOn{ - cursor:pointer; - background-color:#C0EBEF; -} - -.WdateDiv .WinvalidDay{ - color:#aaa; -} - -.WdateDiv #dpTime{ - float:left; - margin-top:3px; - margin-right:30px; -} - -.WdateDiv #dpTime #dpTimeStr{ - margin-left:1px; - color:#497F7F; -} - -.WdateDiv #dpTime input{ - height:20px; - width:18px; - text-align:center; - color:#333; - border:#61CAD0 1px solid; -} - -.WdateDiv #dpTime .tB{ - border-right:0px; -} - -.WdateDiv #dpTime .tE{ - border-left:0; - border-right:0; -} - -.WdateDiv #dpTime .tm{ - width:7px; - border-left:0; - border-right:0; -} - -.WdateDiv #dpTime #dpTimeUp{ - height:10px; - width:13px; - border:0px; - background:url(img.gif) no-repeat -32px -16px; -} - -.WdateDiv #dpTime #dpTimeDown{ - height:10px; - width:13px; - border:0px; - background:url(img.gif) no-repeat -48px -16px; -} - - .WdateDiv #dpQS { - float:left; - margin-right:3px; - margin-top:3px; - background:url(img.gif) no-repeat 0px -16px; - width:20px; - height:20px; - cursor:pointer; - } -.WdateDiv #dpControl { - text-align:right; - margin-top:3px; -} -.WdateDiv .dpButton{ - height:20px; - width:45px; - margin-top:2px; - border:#38B1B9 1px solid; - background-color:#CFEBEE; - color:#08575B; -} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/whyGreen/img.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/whyGreen/img.gif deleted file mode 100644 index 4003f20f..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/My97DatePicker/4.8/skin/whyGreen/img.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.0/jquery.dataTables.min.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.0/jquery.dataTables.min.js deleted file mode 100644 index 435af7c6..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.0/jquery.dataTables.min.js +++ /dev/null @@ -1,152 +0,0 @@ -/*! DataTables 1.10.0 - * ©2008-2014 SpryMedia Ltd - datatables.net/license - */ -(function(za,N,l){var M=function(g){function S(a){var b,c,d={};g.each(a,function(e){if((b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=e.replace(b[0],b[2].toLowerCase()),d[c]=e,"o"===b[1]&&S(a[e])});a._hungarianMap=d}function G(a,b,c){a._hungarianMap||S(a);var d;g.each(b,function(e){d=a._hungarianMap[e];if(d!==l&&(c||b[d]===l))"o"===d.charAt(0)?(b[d]||(b[d]={}),g.extend(!0,b[d],b[e]),G(a[d],b[d],c)):b[d]=b[e]})}function M(a){var b=p.defaults.oLanguage,c=a.sZeroRecords; -!a.sEmptyTable&&(c&&"No data available in table"===b.sEmptyTable)&&D(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(c&&"Loading..."===b.sLoadingRecords)&&D(a,a,"sZeroRecords","sLoadingRecords");a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&bb(a)}function cb(a){w(a,"ordering","bSort");w(a,"orderMulti","bSortMulti");w(a,"orderClasses","bSortClasses");w(a,"orderCellsTop","bSortCellsTop");w(a,"order","aaSorting");w(a,"orderFixed","aaSortingFixed");w(a,"paging","bPaginate"); -w(a,"pagingType","sPaginationType");w(a,"pageLength","iDisplayLength");w(a,"searching","bFilter")}function db(a){w(a,"orderable","bSortable");w(a,"orderData","aDataSort");w(a,"orderSequence","asSorting");w(a,"orderDataType","sortDataType")}function eb(a){var a=a.oBrowser,b=g("
").css({position:"absolute",top:0,left:0,height:1,width:1,overflow:"hidden"}).append(g("
").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(g('
').css({width:"100%",height:10}))).appendTo("body"), -c=b.find(".test");a.bScrollOversize=100===c[0].offsetWidth;a.bScrollbarLeft=1!==c.offset().left;b.remove()}function fb(a,b,c,d,e,f){var h,i=!1;c!==l&&(h=c,i=!0);for(;d!==e;)a.hasOwnProperty(d)&&(h=i?b(h,a[d],d,a):a[d],i=!0,d+=f);return h}function Aa(a,b){var c=p.defaults.column,d=a.aoColumns.length,c=g.extend({},p.models.oColumn,c,{nTh:b?b:N.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols; -c[d]=g.extend({},p.models.oSearch,c[d]);fa(a,d,null)}function fa(a,b,c){var d=a.aoColumns[b],b=a.oClasses,e=g(d.nTh);if(!d.sWidthOrig){d.sWidthOrig=e.attr("width")||null;var f=(e.attr("style")||"").match(/width:\s*(\d+[pxem%])/);f&&(d.sWidthOrig=f[1])}c!==l&&null!==c&&(db(c),G(p.defaults.column,c),c.mDataProp!==l&&!c.mData&&(c.mData=c.mDataProp),c.sType&&(d._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),g.extend(d,c),D(d,c,"sWidth","sWidthOrig"),"number"===typeof c.iDataSort&& -(d.aDataSort=[c.iDataSort]),D(d,c,"aDataSort"));var c=d.mData,h=T(c),i=d.mRender?T(d.mRender):null,f=function(a){return"string"===typeof a&&-1!==a.indexOf("@")};d._bAttrSrc=g.isPlainObject(c)&&(f(c.sort)||f(c.type)||f(c.filter));d.fnGetData=function(a,b){var c=h(a,b);return d.mRender&&b&&""!==b?i(c,b,a):c};d.fnSetData=Ba(c);a.oFeatures.bSort||(d.bSortable=!1,e.addClass(b.sSortableNone));a=-1!==g.inArray("asc",d.asSorting);e=-1!==g.inArray("desc",d.asSorting);!d.bSortable||!a&&!e?(d.sSortingClass= -b.sSortableNone,d.sSortingClassJUI=""):a&&!e?(d.sSortingClass=b.sSortableAsc,d.sSortingClassJUI=b.sSortJUIAscAllowed):!a&&e?(d.sSortingClass=b.sSortableDesc,d.sSortingClassJUI=b.sSortJUIDescAllowed):(d.sSortingClass=b.sSortable,d.sSortingClassJUI=b.sSortJUI)}function U(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Ca(a);for(var c=0,d=b.length;co[f])d(m.length+o[f],n);else if("string"===typeof o[f]){i=0;for(j=m.length;ib&&a[e]--; -1!=d&&c===l&&a.splice(d,1)}function la(a,b,c,d){var e=a.aoData[b],f;if("dom"===c||(!c||"auto"===c)&&"dom"===e.src)e._aData=ia(a,e).data;else{var h=e.anCells;if(h){c=0;for(f=h.length;c").appendTo(h));b=0;for(c=m.length;btr").attr("role","row");g(h).find(">tr>th, >tr>td").addClass(n.sHeaderTH);g(i).find(">tr>th, >tr>td").addClass(n.sFooterTH); -if(null!==i){a=a.aoFooter[0];b=0;for(c=a.length;b=a.fnRecordsDisplay()?0:h,a.iInitDisplayStart= --1);var h=a._iDisplayStart,n=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,C(a,!1);else if(i){if(!a.bDestroying&&!ib(a))return}else a.iDraw++;if(0!==j.length){f=i?a.aoData.length:n;for(i=i?0:h;i",{"class":e?d[0]:""}).append(g("",{valign:"top",colSpan:Y(a),"class":a.oClasses.sRowEmpty}).html(c))[0];t(a,"aoHeaderCallback","header",[g(a.nTHead).children("tr")[0],Ha(a),h,n,j]);t(a,"aoFooterCallback","footer",[g(a.nTFoot).children("tr")[0],Ha(a),h,n,j]);d=g(a.nTBody);d.children().detach();d.append(g(b));t(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function K(a,b){var c=a.oFeatures,d=c.bFilter; -c.bSort&&jb(a);d?aa(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);J(a)}function kb(a){var b=a.oClasses,c=g(a.nTable),c=g("
").insertBefore(c),d=a.oFeatures,e=g("
",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var f=a.sDom.split(""),h,i,j,n,m,o,k=0;k")[0];n=f[k+1];if("'"==n||'"'==n){m= -"";for(o=2;f[k+o]!=n;)m+=f[k+o],o++;"H"==m?m=b.sJUIHeader:"F"==m&&(m=b.sJUIFooter);-1!=m.indexOf(".")?(n=m.split("."),j.id=n[0].substr(1,n[0].length-1),j.className=n[1]):"#"==m.charAt(0)?j.id=m.substr(1,m.length-1):j.className=m;k+=o}e.append(j);e=g(j)}else if(">"==i)e=e.parent();else if("l"==i&&d.bPaginate&&d.bLengthChange)h=lb(a);else if("f"==i&&d.bFilter)h=mb(a);else if("r"==i&&d.bProcessing)h=nb(a);else if("t"==i)h=ob(a);else if("i"==i&&d.bInfo)h=pb(a);else if("p"==i&&d.bPaginate)h=qb(a);else if(0!== -p.ext.feature.length){j=p.ext.feature;o=0;for(n=j.length;o',h=a.oLanguage.sSearch,h=h.match(/_INPUT_/)?h.replace("_INPUT_",f):h+f,b=g("
",{id:!e.f?c+"_filter":null,"class":b.sFilter}).append(g("
").addClass(b.sLength); -a.aanFeatures.l||(j[0].id=c+"_length");b=a.oLanguage.sLengthMenu.split(/(_MENU_)/);j.children().append(1").addClass(a.oClasses.sPaging+b)[0],f=a.aanFeatures;d||c.fnInit(a,b,e);f.p||(b.id= -a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(a){if(d){var b=a._iDisplayStart,j=a._iDisplayLength,g=a.fnRecordsDisplay(),m=-1===j,b=m?0:Math.ceil(b/j),j=m?1:Math.ceil(g/j),g=c(b,j),o,m=0;for(o=f.p.length;mf&&(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0> -d&&(d=0)):"next"==b?d+e",{id:!a.aanFeatures.r?a.sTableId+"_processing":null,"class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}function C(a,b){a.oFeatures.bProcessing&&g(a.aanFeatures.r).css("display",b?"block":"none");t(a,null,"processing",[a,b])}function ob(a){var b= -g(a.nTable);b.attr("role","grid");var c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,f=a.oClasses,h=b.children("caption"),i=h.length?h[0]._captionSide:null,j=g(b[0].cloneNode(!1)),n=g(b[0].cloneNode(!1)),m=b.children("tfoot");c.sX&&"100%"===b.attr("width")&&b.removeAttr("width");m.length||(m=null);c=g("
",{"class":f.sScrollWrapper}).append(g("
",{"class":f.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:d?!d?null:s(d):"100%"}).append(g("
", -{"class":f.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(j.removeAttr("id").css("margin-left",0).append(b.children("thead")))).append("top"===i?h:null)).append(g("
",{"class":f.sScrollBody}).css({overflow:"auto",height:!e?null:s(e),width:!d?null:s(d)}).append(b));m&&c.append(g("
",{"class":f.sScrollFoot}).css({overflow:"hidden",border:0,width:d?!d?null:s(d):"100%"}).append(g("
",{"class":f.sScrollFootInner}).append(n.removeAttr("id").css("margin-left", -0).append(b.children("tfoot")))).append("bottom"===i?h:null));var b=c.children(),o=b[0],f=b[1],k=m?b[2]:null;d&&g(f).scroll(function(){var a=this.scrollLeft;o.scrollLeft=a;m&&(k.scrollLeft=a)});a.nScrollHead=o;a.nScrollBody=f;a.nScrollFoot=k;a.aoDrawCallback.push({fn:V,sName:"scrolling"});return c[0]}function V(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY,f=b.iBarWidth,h=g(a.nScrollHead),i=h[0].style,j=h.children("div"),n=j[0].style,m=j.children("table"),j=a.nScrollBody,o=g(j),k=j.style,l=g(a.nScrollFoot).children("div"), -p=l.children("table"),r=g(a.nTHead),q=g(a.nTable),ba=q[0],L=ba.style,t=a.nTFoot?g(a.nTFoot):null,ca=a.oBrowser,v=ca.bScrollOversize,x,u,y,w,z,A=[],B=[],C=[],D,E=function(a){a=a.style;a.paddingTop="0";a.paddingBottom="0";a.borderTopWidth="0";a.borderBottomWidth="0";a.height=0};q.children("thead, tfoot").remove();z=r.clone().prependTo(q);x=r.find("tr");y=z.find("tr");z.find("th, td").removeAttr("tabindex");t&&(w=t.clone().prependTo(q),u=t.find("tr"),w=w.find("tr"));c||(k.width="100%",h[0].style.width= -"100%");g.each(ma(a,z),function(b,c){D=ga(a,b);c.style.width=a.aoColumns[D].sWidth});t&&F(function(a){a.style.width=""},w);b.bCollapse&&""!==e&&(k.height=o[0].offsetHeight+r[0].offsetHeight+"px");h=q.outerWidth();if(""===c){if(L.width="100%",v&&(q.find("tbody").height()>j.offsetHeight||"scroll"==o.css("overflow-y")))L.width=s(q.outerWidth()-f)}else""!==d?L.width=s(d):h==o.width()&&o.height()h-f&&(L.width=s(h))):L.width=s(h);h=q.outerWidth();F(E,y);F(function(a){C.push(a.innerHTML); -A.push(s(g(a).css("width")))},y);F(function(a,b){a.style.width=A[b]},x);g(y).height(0);t&&(F(E,w),F(function(a){B.push(s(g(a).css("width")))},w),F(function(a,b){a.style.width=B[b]},u),g(w).height(0));F(function(a,b){a.innerHTML='
'+C[b]+"
";a.style.width=A[b]},y);t&&F(function(a,b){a.innerHTML="";a.style.width=B[b]},w);if(q.outerWidth()j.offsetHeight||"scroll"==o.css("overflow-y")?h+f:h;if(v&&(j.scrollHeight> -j.offsetHeight||"scroll"==o.css("overflow-y")))L.width=s(u-f);(""===c||""!==d)&&O(a,1,"Possible column misalignment",6)}else u="100%";k.width=s(u);i.width=s(u);t&&(a.nScrollFoot.style.width=s(u));!e&&v&&(k.height=s(ba.offsetHeight+f));e&&b.bCollapse&&(k.height=s(e),b=c&&ba.offsetWidth>j.offsetWidth?f:0,ba.offsetHeightj.clientHeight||"scroll"==o.css("overflow-y");ca="padding"+(ca.bScrollbarLeft? -"Left":"Right");n[ca]=m?f+"px":"0px";t&&(p[0].style.width=s(b),l[0].style.width=s(b),l[0].style[ca]=m?f+"px":"0px");o.scroll();if(a.bSorted||a.bFiltered)j.scrollTop=0}function F(a,b,c){for(var d=0,e=0,f=b.length,h,i;e"));i.find("tfoot th, tfoot td").css("width","");var p=i.find("tbody tr"),j=ma(a,i.find("thead")[0]);for(k=0;k").css("width",s(a)).appendTo(b||N.body),d=c[0].offsetWidth;c.remove(); -return d}function Bb(a,b){var c=a.oScroll;if(c.sX||c.sY)c=!c.sX?c.iBarWidth:0,b.style.width=s(g(b).outerWidth()-c)}function Ab(a,b){var c=Cb(a,b);if(0>c)return null;var d=a.aoData[c];return!d.nTr?g("").html(A(a,c,b,"display"))[0]:d.anCells[b]}function Cb(a,b){for(var c,d=-1,e=-1,f=0,h=a.aoData.length;fd&&(d=c.length,e=f);return e}function s(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function Db(){if(!p.__scrollbarWidth){var a= -g("

").css({width:"100%",height:200,padding:0})[0],b=g("

").css({position:"absolute",top:0,left:0,width:200,height:150,padding:0,overflow:"hidden",visibility:"hidden"}).append(a).appendTo("body"),c=a.offsetWidth;b.css("overflow","scroll");a=a.offsetWidth;c===a&&(a=b[0].clientWidth);b.remove();p.__scrollbarWidth=c-a}return p.__scrollbarWidth}function Q(a){var b,c,d=[],e=a.aoColumns,f,h,i,j;b=a.aaSortingFixed;c=g.isPlainObject(b);var n=[];f=function(a){a.length&&!g.isArray(a[0])?n.push(a):n.push.apply(n, -a)};g.isArray(b)&&f(b);c&&b.pre&&f(b.pre);f(a.aaSorting);c&&b.post&&f(b.post);for(a=0;ae?1:0,0!==c)return"asc"===g.dir?c:-c;c=d[a];e=d[b];return ce?1:0}):g.sort(function(a,b){var c,h,g,i,j=n.length,l=f[a]._aSortData,p=f[b]._aSortData;for(g=0;gh?1:0})}a.bSorted=!0}function Fb(a){for(var b,c, -d=a.aoColumns,e=Q(a),a=a.oLanguage.oAria,f=0,h=d.length;f/g,"");var g=c.nTh;g.removeAttribute("aria-sort");c.bSortable&&(0=f.length?0:b+1};c&&a.oFeatures.bSortMulti?(c=g.inArray(b,B(e,"0")),-1!==c?(b=h(e[c]),e[c][1]=f[b],e[c]._idx=b):(e.push([b,f[0],0]),e[e.length-1]._idx=0)):e.length&&e[0][0]==b?(b=h(e[0]),e.length=1,e[0][1]=f[b],e[0]._idx=b):(e.length=0,e.push([b,f[0]]),e[0]._idx=0);K(a);"function"==typeof d&&d(a)}function Ka(a,b,c,d){var e=a.aoColumns[c];Ta(b,{},function(b){!1!==e.bSortable&&(a.oFeatures.bProcessing?(C(a,!0),setTimeout(function(){Sa(a,c,b.shiftKey,d);"ssp"!==z(a)&&C(a,!1)},0)):Sa(a, -c,b.shiftKey,d))})}function sa(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,d=Q(a),e=a.oFeatures,f,h;if(e.bSort&&e.bSortClasses){e=0;for(f=b.length;ee?e+1:3));e=0;for(f=d.length;ee?e+1:3))}a.aLastSort=d}function Eb(a,b){var c=a.aoColumns[b],d=p.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,X(a,b)));for(var f,h=p.ext.type.order[c.sType+"-pre"],g=0,j=a.aoData.length;g< -j;g++)if(c=a.aoData[g],c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)f=d?e[g]:A(a,g,b,"sort"),c._aSortData[b]=h?h(f):f}function ta(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b={iCreate:+new Date,iStart:a._iDisplayStart,iLength:a._iDisplayLength,aaSorting:g.extend(!0,[],a.aaSorting),oSearch:g.extend(!0,{},a.oPreviousSearch),aoSearchCols:g.extend(!0,[],a.aoPreSearchCols),abVisCols:B(a.aoColumns,"bVisible")};t(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.fnStateSaveCallback.call(a.oInstance, -a,b)}}function Gb(a){var b,c,d=a.aoColumns;if(a.oFeatures.bStateSave){var e=a.fnStateLoadCallback.call(a.oInstance,a);if(e&&(b=t(a,"aoStateLoadParams","stateLoadParams",[a,e]),-1===g.inArray(!1,b)&&(b=a.iStateDuration,!(0=d.length?[0,a[1]]:a});g.extend(a.oPreviousSearch, -e.oSearch);g.extend(!0,a.aoPreSearchCols,e.aoSearchCols);var f=e.abVisCols;b=0;for(c=f.length;bb)b=0;a._iDisplayStart=b}function La(a,b){var c=a.renderer,d=p.ext.renderer[b];return g.isPlainObject(c)&& -c[b]?d[c[b]]||d._:"string"===typeof c?d[c]||d._:d._}function z(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function Ua(a,b){var c=[],c=Ib.numbers_length,d=Math.floor(c/2);b<=c?c=R(0,b):a<=d?(c=R(0,c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-d?c=R(b-(c-2),b):(c=R(a-1,a+2),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function bb(a){g.each({num:function(b){return va(b,a)},"num-fmt":function(b){return va(b,a,Va)},"html-num":function(b){return va(b, -a,wa)},"html-num-fmt":function(b){return va(b,a,wa,Va)}},function(b,c){u.type.order[b+a+"-pre"]=c})}function Jb(a){return function(){var b=[ua(this[p.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return p.ext.internal[a].apply(this,b)}}var p,u,q,r,x,Wa={},Kb=/[\r\n]/g,wa=/<.*?>/g,Vb=/^[\d\+\-a-zA-Z]/,Sb=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),Va=/[',$\u00a3\u20ac\u00a5%\u2009\u202F]/g,da=function(a){return!a||"-"===a?!0:!1},Lb=function(a){var b= -parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},Mb=function(a,b){Wa[b]||(Wa[b]=RegExp(Oa(b),"g"));return"string"===typeof a?a.replace(/\./g,"").replace(Wa[b],"."):a},Xa=function(a,b,c){var d="string"===typeof a;b&&d&&(a=Mb(a,b));c&&d&&(a=a.replace(Va,""));return!a||"-"===a||!isNaN(parseFloat(a))&&isFinite(a)},Nb=function(a,b,c){return da(a)?!0:a&&"string"!==typeof a?null:Xa(a.replace(wa,""),b,c)?!0:null},B=function(a,b,c){var d=[],e=0,f=a.length;if(c!==l)for(;e")[0],Tb=qa.textContent!== -l,Ub=/<.*?>/g;p=function(a){this.$=function(a,b){return this.api(!0).$(a,b)};this._=function(a,b){return this.api(!0).rows(a,b).data()};this.api=function(a){return a?new q(ua(this[u.iApiIndex])):new q(this)};this.fnAddData=function(a,b){var c=this.api(!0),d=g.isArray(a)&&(g.isArray(a[0])||g.isPlainObject(a[0]))?c.rows.add(a):c.row.add(a);(b===l||b)&&c.draw();return d.flatten().toArray()};this.fnAdjustColumnSizing=function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],d=c.oScroll;a===l|| -a?b.draw(!1):(""!==d.sX||""!==d.sY)&&V(c)};this.fnClearTable=function(a){var b=this.api(!0).clear();(a===l||a)&&b.draw()};this.fnClose=function(a){this.api(!0).row(a).child.hide()};this.fnDeleteRow=function(a,b,c){var d=this.api(!0),a=d.rows(a),e=a.settings()[0],g=e.aoData[a[0][0]];a.remove();b&&b.call(this,e,g);(c===l||c)&&d.draw();return g};this.fnDestroy=function(a){this.api(!0).destroy(a)};this.fnDraw=function(a){this.api(!0).draw(!a)};this.fnFilter=function(a,b,c,d,e,g){e=this.api(!0);null=== -b||b===l?e.search(a,c,d,g):e.column(b).search(a,c,d,g);e.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==l){var d=a.nodeName?a.nodeName.toLowerCase():"";return b!==l||"td"==d||"th"==d?c.cell(a,b).data():c.row(a).data()||null}return c.data().toArray()};this.fnGetNodes=function(a){var b=this.api(!0);return a!==l?b.row(a).node():b.rows().nodes().flatten().toArray()};this.fnGetPosition=function(a){var b=this.api(!0),c=a.nodeName.toUpperCase();return"TR"==c?b.row(a).index():"TD"==c||"TH"== -c?(a=b.cell(a).index(),[a.row,a.columnVisible,a.column]):null};this.fnIsOpen=function(a){return this.api(!0).row(a).child.isShown()};this.fnOpen=function(a,b,c){return this.api(!0).row(a).child(b,c).show().child()[0]};this.fnPageChange=function(a,b){var c=this.api(!0).page(a);(b===l||b)&&c.draw(!1)};this.fnSetColumnVis=function(a,b,c){a=this.api(!0).column(a).visible(b);(c===l||c)&&a.columns.adjust().draw()};this.fnSettings=function(){return ua(this[u.iApiIndex])};this.fnSort=function(a){this.api(!0).order(a).draw()}; -this.fnSortListener=function(a,b,c){this.api(!0).order.listener(a,b,c)};this.fnUpdate=function(a,b,c,d,e){var g=this.api(!0);c===l||null===c?g.row(b).data(a):g.cell(b,c).data(a);(e===l||e)&&g.columns.adjust();(d===l||d)&&g.draw();return 0};this.fnVersionCheck=u.fnVersionCheck;var b=this,c=a===l,d=this.length;c&&(a={});this.oApi=this.internal=u.internal;for(var e in p.ext.internal)e&&(this[e]=Jb(e));this.each(function(){var e={},h=1t<"F"ip>'),k.renderer)?g.isPlainObject(k.renderer)&&!k.renderer.header&&(k.renderer.header="jqueryui"):k.renderer="jqueryui":g.extend(n,p.ext.classes,h.oClasses);g(this).addClass(n.sTable);if(""!==k.oScroll.sX||""!==k.oScroll.sY)k.oScroll.iBarWidth=Db();!0===k.oScroll.sX&&(k.oScroll.sX= -"100%");k.iInitDisplayStart===l&&(k.iInitDisplayStart=h.iDisplayStart,k._iDisplayStart=h.iDisplayStart);null!==h.iDeferLoading&&(k.bDeferLoading=!0,i=g.isArray(h.iDeferLoading),k._iRecordsDisplay=i?h.iDeferLoading[0]:h.iDeferLoading,k._iRecordsTotal=i?h.iDeferLoading[1]:h.iDeferLoading);""!==h.oLanguage.sUrl?(k.oLanguage.sUrl=h.oLanguage.sUrl,g.getJSON(k.oLanguage.sUrl,null,function(a){M(a);G(m.oLanguage,a);g.extend(true,k.oLanguage,h.oLanguage,a);ra(k)}),e=!0):g.extend(!0,k.oLanguage,h.oLanguage); -null===h.asStripeClasses&&(k.asStripeClasses=[n.sStripeOdd,n.sStripeEven]);var i=k.asStripeClasses,r=g("tbody tr:eq(0)",this);-1!==g.inArray(!0,g.map(i,function(a){return r.hasClass(a)}))&&(g("tbody tr",this).removeClass(i.join(" ")),k.asDestroyStripes=i.slice());var o=[],q,i=this.getElementsByTagName("thead");0!==i.length&&($(k.aoHeader,i[0]),o=ma(k));if(null===h.aoColumns){q=[];i=0;for(j=o.length;i").appendTo(this));k.nTHead= -j[0];j=g(this).children("tbody");0===j.length&&(j=g("").appendTo(this));k.nTBody=j[0];j=g(this).children("tfoot");if(0===j.length&&0").appendTo(this);0===j.length||0===j.children().length?g(this).addClass(n.sNoFooter):0a?new q(b[a],this[a]):null},filter:function(a){var b=[];if(v.filter)b=v.filter.call(this,a,this);else for(var c=0,d=this.length;c");g("td",c).addClass(b).html(a)[0].colSpan=Y(d);e.push(c[0])}};if(g.isArray(a)||a instanceof g)for(var h=0,i=a.length;h=0?c:f.length+c];var e=typeof a==="string"?a.match(Xb):"";if(e)switch(e[2]){case "visIdx":case "visible":a=parseInt(e[1],10); -if(a<0){c=g.map(f,function(a,b){return a.bVisible?b:null});return[c[c.length+a]]}return[ga(b,a)];case "name":return g.map(h,function(a,b){return a===e[1]?b:null})}else return g(i).filter(a).map(function(){return g.inArray(this,i)}).toArray()})});c.selector.cols=a;c.selector.opts=b;return c});x("columns().header()","column().header()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTh})});x("columns().footer()","column().footer()",function(){return this.iterator("column", -function(a,b){return a.aoColumns[b].nTf})});x("columns().data()","column().data()",function(){return this.iterator("column-rows",function(a,b,c,d,e){for(var c=[],d=0,f=e.length;dd;return!0};p.isDataTable=p.fnIsDataTable=function(a){var b=g(a).get(0),c=!1;g.each(p.settings,function(a,e){if(e.nTable===b||e.nScrollHead===b||e.nScrollFoot===b)c=!0});return c};p.tables=p.fnTables=function(a){return jQuery.map(p.settings,function(b){if(!a||a&&g(b.nTable).is(":visible"))return b.nTable})};p.camelToHungarian=G;r("$()",function(a,b){var c=this.rows(b).nodes(), -c=g(c);return g([].concat(c.filter(a).toArray(),c.find(a).toArray()))});g.each(["on","one","off"],function(a,b){r(b+"()",function(){var a=Array.prototype.slice.call(arguments);-1===a[0].indexOf(".dt")&&(a[0]+=".dt");var d=g(this.tables().nodes());d[b].apply(d,a);return this})});r("clear()",function(){return this.iterator("table",function(a){ja(a)})});r("settings()",function(){return new q(this.context,this.context)});r("data()",function(){return this.iterator("table",function(a){return B(a.aoData, -"_aData")}).flatten()});r("destroy()",function(a){a=a||!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,d=b.oClasses,e=b.nTable,f=b.nTBody,h=b.nTHead,i=b.nTFoot,j=g(e),f=g(f),n=g(b.nTableWrapper),m=g.map(b.aoData,function(a){return a.nTr}),l;b.bDestroying=!0;t(b,"aoDestroyCallback","destroy",[b]);a||(new q(b)).columns().visible(!0);n.unbind(".DT").find(":not(tbody *)").unbind(".DT");g(za).unbind(".DT-"+b.sInstance);e!=h.parentNode&&(j.children("thead").detach(),j.append(h)); -i&&e!=i.parentNode&&(j.children("tfoot").detach(),j.append(i));j.detach();n.detach();b.aaSorting=[];b.aaSortingFixed=[];sa(b);g(m).removeClass(b.asStripeClasses.join(" "));g("th, td",h).removeClass(d.sSortable+" "+d.sSortableAsc+" "+d.sSortableDesc+" "+d.sSortableNone);b.bJUI&&(g("th span."+d.sSortIcon+", td span."+d.sSortIcon,h).detach(),g("th, td",h).each(function(){var a=g("div."+d.sSortJUIWrapper,this);g(this).append(a.contents());a.detach()}));!a&&c&&c.insertBefore(e,b.nTableReinsertBefore); -f.children().detach();f.append(m);j.css("width",b.sDestroyWidth).removeClass(d.sTable);(l=b.asDestroyStripes.length)&&f.children().each(function(a){g(this).addClass(b.asDestroyStripes[a%l])});c=g.inArray(b,p.settings);-1!==c&&p.settings.splice(c,1)})});p.version="1.10.0";p.settings=[];p.models={};p.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};p.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null};p.models.oColumn= -{idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};p.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null, -aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null, -fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null, -iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": 升序排列",sSortDescending:":降序排列"},oPaginate:{sFirst:"第一页",sLast:"最后一页",sNext:"下一页",sPrevious:"上一页"},sEmptyTable:"没有数据",sInfo:"显示 _START_ 到 _END_ ,共 _TOTAL_ 条",sInfoEmpty:"没有数据",sInfoFiltered:"(从 _MAX_ 条中过滤)",sInfoPostFix:"",sDecimal:"", -sThousands:",",sLengthMenu:"显示 _MENU_ 条",sLoadingRecords:"加载中...",sProcessing:"处理中...",sSearch:"从当前数据中检索:",sUrl:"",sZeroRecords:"没有找到匹配的记录"},oSearch:g.extend({},p.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null};S(p.defaults);p.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null, -mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};S(p.defaults.column);p.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1, -bScrollbarLeft:!1},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null, -nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:l,oAjaxData:l,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null, -oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==z(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==z(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,f=e.bPaginate;return e.bServerSide?!1===f||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!f||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null, -nScrollFoot:null,aLastSort:[],oPlugins:{}};p.ext=u={classes:{},errMode:"alert",feature:[],search:[],internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:p.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:p.version};g.extend(u,{afnFiltering:u.search,aTypes:u.type.detect,ofnSearch:u.type.search,oSort:u.type.order,afnSortData:u.order,aoFeatures:u.feature,oApi:u.internal,oStdClasses:u.classes,oPagination:u.pager}); -g.extend(p.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled", -sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"", -sJUIHeader:"",sJUIFooter:""});var ya="",ya="",E=ya+"ui-state-default",ea=ya+"css_right ui-icon ui-icon-",Rb=ya+"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix";g.extend(p.ext.oJUIClasses,p.ext.classes,{sPageButton:"fg-button ui-button "+E,sPageButtonActive:"ui-state-disabled",sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:E+" sorting_asc",sSortDesc:E+" sorting_desc",sSortable:E+" sorting", -sSortableAsc:E+" sorting_asc_disabled",sSortableDesc:E+" sorting_desc_disabled",sSortableNone:E+" sorting_disabled",sSortJUIAsc:ea+"triangle-1-n",sSortJUIDesc:ea+"triangle-1-s",sSortJUI:ea+"carat-2-n-s",sSortJUIAscAllowed:ea+"carat-1-n",sSortJUIDescAllowed:ea+"carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead "+E,sScrollFoot:"dataTables_scrollFoot "+E,sHeaderTH:E,sFooterTH:E,sJUIHeader:Rb+" ui-corner-tl ui-corner-tr",sJUIFooter:Rb+ -" ui-corner-bl ui-corner-br"});var Ib=p.ext.pager;g.extend(Ib,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},simple_numbers:function(a,b){return["previous",Ua(a,b),"next"]},full_numbers:function(a,b){return["first","previous",Ua(a,b),"next","last"]},_numbers:Ua,numbers_length:7});g.extend(!0,p.ext.renderer,{pageButton:{_:function(a,b,c,d,e,f){var h=a.oClasses,i=a.oLanguage.oPaginate,j,l,m=0,o=function(b,d){var k,p,r,q,s=function(b){Ra(a,b.data.action, -true)};k=0;for(p=d.length;k").appendTo(b);o(r,q)}else{l=j="";switch(q){case "ellipsis":b.append("…");break;case "first":j=i.sFirst;l=q+(e>0?"":" "+h.sPageButtonDisabled);break;case "previous":j=i.sPrevious;l=q+(e>0?"":" "+h.sPageButtonDisabled);break;case "next":j=i.sNext;l=q+(e",{"class":h.sPageButton+" "+l,"aria-controls":a.sTableId,"data-dt-idx":m,tabindex:a.iTabIndex,id:c===0&&typeof q==="string"?a.sTableId+"_"+q:null}).html(j).appendTo(b);Ta(r,{action:q},s);m++}}}},k=g(N.activeElement).data("dt-idx");o(g(b).empty(),d);k!==null&&g(b).find("[data-dt-idx="+k+"]").focus()}}});var va=function(a,b,c,d){if(!a||"-"===a)return-Infinity;b&&(a=Mb(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};g.extend(u.type.order,{"date-pre":function(a){return Date.parse(a)|| -0},"html-pre":function(a){return!a?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return"string"===typeof a?a.toLowerCase():!a||!a.toString?"":a.toString()},"string-asc":function(a,b){return ab?1:0},"string-desc":function(a,b){return ab?-1:0}});bb("");g.extend(p.ext.type.detect,[function(a,b){var c=b.oLanguage.sDecimal;return Xa(a,c)?"num"+c:null},function(a){if(a&&!Vb.test(a))return null;var b=Date.parse(a);return null!==b&&!isNaN(b)||da(a)?"date": -null},function(a,b){var c=b.oLanguage.sDecimal;return Xa(a,c,!0)?"num-fmt"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Nb(a,c)?"html-num"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Nb(a,c,!0)?"html-num-fmt"+c:null},function(a){return da(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);g.extend(p.ext.type.search,{html:function(a){return da(a)?"":"string"===typeof a?a.replace(Kb," ").replace(wa,""):""},string:function(a){return da(a)?"":"string"===typeof a?a.replace(Kb, -" "):a}});g.extend(!0,p.ext.renderer,{header:{_:function(a,b,c,d){g(a.nTable).on("order.dt.DT",function(a,f,g,i){a=c.idx;b.removeClass(c.sSortingClass+" "+d.sSortAsc+" "+d.sSortDesc).addClass(i[a]=="asc"?d.sSortAsc:i[a]=="desc"?d.sSortDesc:c.sSortingClass)})},jqueryui:function(a,b,c,d){var e=c.idx;g("
").addClass(d.sSortJUIWrapper).append(b.contents()).append(g("").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);g(a.nTable).on("order.dt.DT",function(a,g,i,j){b.removeClass(d.sSortAsc+ -" "+d.sSortDesc).addClass(j[e]=="asc"?d.sSortAsc:j[e]=="desc"?d.sSortDesc:c.sSortingClass);b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass(j[e]=="asc"?d.sSortJUIAsc:j[e]=="desc"?d.sSortJUIDesc:c.sSortingClassJUI)})}}});p.render={number:function(a,b,c,d){return{display:function(e){var e=parseFloat(e),f=parseInt(e,10),e=c?(b+(e-f).toFixed(c)).substring(2):"";return(d||"")+f.toString().replace(/\B(?=(\d{3})+(?!\d))/g, -a)+e}}}};g.extend(p.ext.internal,{_fnExternApiFunc:Jb,_fnBuildAjax:na,_fnAjaxUpdate:ib,_fnAjaxParameters:rb,_fnAjaxUpdateDraw:sb,_fnAjaxDataSrc:oa,_fnAddColumn:Aa,_fnColumnOptions:fa,_fnAdjustColumnSizing:U,_fnVisibleToColumnIndex:ga,_fnColumnIndexToVisible:X,_fnVisbleColumns:Y,_fnGetColumns:W,_fnColumnTypes:Da,_fnApplyColumnDefs:gb,_fnHungarianMap:S,_fnCamelToHungarian:G,_fnLanguageCompat:M,_fnBrowserDetect:eb,_fnAddData:H,_fnAddTr:ha,_fnNodeToDataIndex:function(a,b){return b._DT_RowIndex!==l?b._DT_RowIndex: -null},_fnNodeToColumnIndex:function(a,b,c){return g.inArray(c,a.aoData[b].anCells)},_fnGetCellData:A,_fnSetCellData:Ea,_fnSplitObjNotation:Ga,_fnGetObjectDataFn:T,_fnSetObjectDataFn:Ba,_fnGetDataMaster:Ha,_fnClearTable:ja,_fnDeleteIndex:ka,_fnInvalidateRow:la,_fnGetRowElements:ia,_fnCreateTr:Fa,_fnBuildHead:hb,_fnDrawHead:I,_fnDraw:J,_fnReDraw:K,_fnAddOptionsHtml:kb,_fnDetectHeader:$,_fnGetUniqueThs:ma,_fnFeatureHtmlFilter:mb,_fnFilterComplete:aa,_fnFilterCustom:vb,_fnFilterColumn:ub,_fnFilter:tb, -_fnFilterCreateSearch:Na,_fnEscapeRegex:Oa,_fnFilterData:wb,_fnFeatureHtmlInfo:pb,_fnUpdateInfo:xb,_fnInfoMacros:yb,_fnInitialise:ra,_fnInitComplete:pa,_fnLengthChange:Pa,_fnFeatureHtmlLength:lb,_fnFeatureHtmlPaginate:qb,_fnPageChange:Ra,_fnFeatureHtmlProcessing:nb,_fnProcessingDisplay:C,_fnFeatureHtmlTable:ob,_fnScrollDraw:V,_fnApplyToChildren:F,_fnCalculateColumnWidths:Ca,_fnThrottle:Ma,_fnConvertToWidth:zb,_fnScrollingWidthAdjust:Bb,_fnGetWidestNode:Ab,_fnGetMaxLenString:Cb,_fnStringToCss:s,_fnScrollBarWidth:Db, -_fnSortFlatten:Q,_fnSort:jb,_fnSortAria:Fb,_fnSortListener:Sa,_fnSortAttachListener:Ka,_fnSortingClasses:sa,_fnSortData:Eb,_fnSaveState:ta,_fnLoadState:Gb,_fnSettingsFromNode:ua,_fnLog:O,_fnMap:D,_fnBindAction:Ta,_fnCallbackReg:y,_fnCallbackFire:t,_fnLengthOverflow:Qa,_fnRenderer:La,_fnDataSource:z,_fnRowAttributes:Ia,_fnCalculateEnd:function(){}});g.fn.dataTable=p;g.fn.dataTableSettings=p.settings;g.fn.dataTableExt=p.ext;g.fn.DataTable=function(a){return g(this).dataTable(a).api()};g.each(p,function(a, -b){g.fn.DataTable[a]=b});return g.fn.dataTable};"function"===typeof define&&define.amd?define("datatables",["jquery"],M):"object"===typeof exports?M(require("jquery")):jQuery&&!jQuery.fn.dataTable&&M(jQuery)})(window,document); diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.bootstrap.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.bootstrap.css deleted file mode 100644 index 2bbb3ef2..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.bootstrap.css +++ /dev/null @@ -1,184 +0,0 @@ -table.dataTable { - clear: both; - margin-top: 6px !important; - margin-bottom: 6px !important; - max-width: none !important; - border-collapse: separate !important; -} -table.dataTable td, -table.dataTable th { - -webkit-box-sizing: content-box; - box-sizing: content-box; -} -table.dataTable td.dataTables_empty, -table.dataTable th.dataTables_empty { - text-align: center; -} -table.dataTable.nowrap th, -table.dataTable.nowrap td { - white-space: nowrap; -} - -div.dataTables_wrapper div.dataTables_length label { - font-weight: normal; - text-align: left; - white-space: nowrap; -} -div.dataTables_wrapper div.dataTables_length select { - width: 75px; - display: inline-block; -} -div.dataTables_wrapper div.dataTables_filter { - text-align: right; -} -div.dataTables_wrapper div.dataTables_filter label { - font-weight: normal; - white-space: nowrap; - text-align: left; -} -div.dataTables_wrapper div.dataTables_filter input { - margin-left: 0.5em; - display: inline-block; - width: auto; -} -div.dataTables_wrapper div.dataTables_info { - padding-top: 8px; - white-space: nowrap; -} -div.dataTables_wrapper div.dataTables_paginate { - margin: 0; - white-space: nowrap; - text-align: right; -} -div.dataTables_wrapper div.dataTables_paginate ul.pagination { - margin: 2px 0; - white-space: nowrap; -} -div.dataTables_wrapper div.dataTables_processing { - position: absolute; - top: 50%; - left: 50%; - width: 200px; - margin-left: -100px; - margin-top: -26px; - text-align: center; - padding: 1em 0; -} - -table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting, -table.dataTable thead > tr > td.sorting_asc, -table.dataTable thead > tr > td.sorting_desc, -table.dataTable thead > tr > td.sorting { - padding-right: 30px; -} -table.dataTable thead > tr > th:active, -table.dataTable thead > tr > td:active { - outline: none; -} -table.dataTable thead .sorting, -table.dataTable thead .sorting_asc, -table.dataTable thead .sorting_desc, -table.dataTable thead .sorting_asc_disabled, -table.dataTable thead .sorting_desc_disabled { - cursor: pointer; - position: relative; -} -table.dataTable thead .sorting:after, -table.dataTable thead .sorting_asc:after, -table.dataTable thead .sorting_desc:after, -table.dataTable thead .sorting_asc_disabled:after, -table.dataTable thead .sorting_desc_disabled:after { - position: absolute; - bottom: 8px; - right: 8px; - display: block; - font-family: 'Glyphicons Halflings'; - opacity: 0.5; -} -table.dataTable thead .sorting:after { - opacity: 0.2; - content: "\e150"; - /* sort */ -} -table.dataTable thead .sorting_asc:after { - content: "\e155"; - /* sort-by-attributes */ -} -table.dataTable thead .sorting_desc:after { - content: "\e156"; - /* sort-by-attributes-alt */ -} -table.dataTable thead .sorting_asc_disabled:after, -table.dataTable thead .sorting_desc_disabled:after { - color: #eee; -} - -div.dataTables_scrollHead table.dataTable { - margin-bottom: 0 !important; -} - -div.dataTables_scrollBody > table { - border-top: none; - margin-top: 0 !important; - margin-bottom: 0 !important; -} -div.dataTables_scrollBody > table > thead .sorting:after, -div.dataTables_scrollBody > table > thead .sorting_asc:after, -div.dataTables_scrollBody > table > thead .sorting_desc:after { - display: none; -} -div.dataTables_scrollBody > table > tbody > tr:first-child > th, -div.dataTables_scrollBody > table > tbody > tr:first-child > td { - border-top: none; -} - -div.dataTables_scrollFoot > table { - margin-top: 0 !important; - border-top: none; -} - -@media screen and (max-width: 767px) { - div.dataTables_wrapper div.dataTables_length, - div.dataTables_wrapper div.dataTables_filter, - div.dataTables_wrapper div.dataTables_info, - div.dataTables_wrapper div.dataTables_paginate { - text-align: center; - } -} -table.dataTable.table-condensed > thead > tr > th { - padding-right: 20px; -} -table.dataTable.table-condensed .sorting:after, -table.dataTable.table-condensed .sorting_asc:after, -table.dataTable.table-condensed .sorting_desc:after { - top: 6px; - right: 6px; -} - -table.table-bordered.dataTable th, -table.table-bordered.dataTable td { - border-left-width: 0; -} -table.table-bordered.dataTable th:last-child, table.table-bordered.dataTable th:last-child, -table.table-bordered.dataTable td:last-child, -table.table-bordered.dataTable td:last-child { - border-right-width: 0; -} -table.table-bordered.dataTable tbody th, -table.table-bordered.dataTable tbody td { - border-bottom-width: 0; -} - -div.dataTables_scrollHead table.table-bordered { - border-bottom-width: 0; -} - -div.table-responsive > div.dataTables_wrapper > div.row { - margin: 0; -} -div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:first-child { - padding-left: 0; -} -div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:last-child { - padding-right: 0; -} diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.bootstrap.min.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.bootstrap.min.css deleted file mode 100644 index 66a70ab2..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.bootstrap.min.css +++ /dev/null @@ -1 +0,0 @@ -table.dataTable{clear:both;margin-top:6px !important;margin-bottom:6px !important;max-width:none !important;border-collapse:separate !important}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}div.dataTables_wrapper div.dataTables_length label{font-weight:normal;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:75px;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:normal;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:0.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:8px;white-space:nowrap}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1em 0}table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting{padding-right:30px}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{position:absolute;bottom:8px;right:8px;display:block;font-family:'Glyphicons Halflings';opacity:0.5}table.dataTable thead .sorting:after{opacity:0.2;content:"\e150"}table.dataTable thead .sorting_asc:after{content:"\e155"}table.dataTable thead .sorting_desc:after{content:"\e156"}table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{color:#eee}div.dataTables_scrollHead table.dataTable{margin-bottom:0 !important}div.dataTables_scrollBody>table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody>table>thead .sorting:after,div.dataTables_scrollBody>table>thead .sorting_asc:after,div.dataTables_scrollBody>table>thead .sorting_desc:after{display:none}div.dataTables_scrollBody>table>tbody>tr:first-child>th,div.dataTables_scrollBody>table>tbody>tr:first-child>td{border-top:none}div.dataTables_scrollFoot>table{margin-top:0 !important;border-top:none}@media screen and (max-width: 767px){div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{text-align:center}}table.dataTable.table-condensed>thead>tr>th{padding-right:20px}table.dataTable.table-condensed .sorting:after,table.dataTable.table-condensed .sorting_asc:after,table.dataTable.table-condensed .sorting_desc:after{top:6px;right:6px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-left-width:0}table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable td:last-child,table.table-bordered.dataTable td:last-child{border-right-width:0}table.table-bordered.dataTable tbody th,table.table-bordered.dataTable tbody td{border-bottom-width:0}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}div.table-responsive>div.dataTables_wrapper>div.row{margin:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:first-child{padding-left:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:last-child{padding-right:0} diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.bootstrap4.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.bootstrap4.css deleted file mode 100644 index 07c97597..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.bootstrap4.css +++ /dev/null @@ -1,194 +0,0 @@ -table.dataTable { - clear: both; - margin-top: 6px !important; - margin-bottom: 6px !important; - max-width: none !important; - border-collapse: separate !important; -} -table.dataTable td, -table.dataTable th { - -webkit-box-sizing: content-box; - box-sizing: content-box; -} -table.dataTable td.dataTables_empty, -table.dataTable th.dataTables_empty { - text-align: center; -} -table.dataTable.nowrap th, -table.dataTable.nowrap td { - white-space: nowrap; -} - -div.dataTables_wrapper div.dataTables_length label { - font-weight: normal; - text-align: left; - white-space: nowrap; -} -div.dataTables_wrapper div.dataTables_length select { - width: 75px; - display: inline-block; -} -div.dataTables_wrapper div.dataTables_filter { - text-align: right; -} -div.dataTables_wrapper div.dataTables_filter label { - font-weight: normal; - white-space: nowrap; - text-align: left; -} -div.dataTables_wrapper div.dataTables_filter input { - margin-left: 0.5em; - display: inline-block; - width: auto; -} -div.dataTables_wrapper div.dataTables_info { - padding-top: 0.85em; - white-space: nowrap; -} -div.dataTables_wrapper div.dataTables_paginate { - margin: 0; - white-space: nowrap; - text-align: right; -} -div.dataTables_wrapper div.dataTables_paginate ul.pagination { - margin: 2px 0; - white-space: nowrap; - justify-content: flex-end; -} -div.dataTables_wrapper div.dataTables_processing { - position: absolute; - top: 50%; - left: 50%; - width: 200px; - margin-left: -100px; - margin-top: -26px; - text-align: center; - padding: 1em 0; -} - -table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting, -table.dataTable thead > tr > td.sorting_asc, -table.dataTable thead > tr > td.sorting_desc, -table.dataTable thead > tr > td.sorting { - padding-right: 30px; -} -table.dataTable thead > tr > th:active, -table.dataTable thead > tr > td:active { - outline: none; -} -table.dataTable thead .sorting, -table.dataTable thead .sorting_asc, -table.dataTable thead .sorting_desc, -table.dataTable thead .sorting_asc_disabled, -table.dataTable thead .sorting_desc_disabled { - cursor: pointer; - position: relative; -} -table.dataTable thead .sorting:before, table.dataTable thead .sorting:after, -table.dataTable thead .sorting_asc:before, -table.dataTable thead .sorting_asc:after, -table.dataTable thead .sorting_desc:before, -table.dataTable thead .sorting_desc:after, -table.dataTable thead .sorting_asc_disabled:before, -table.dataTable thead .sorting_asc_disabled:after, -table.dataTable thead .sorting_desc_disabled:before, -table.dataTable thead .sorting_desc_disabled:after { - position: absolute; - bottom: 0.9em; - display: block; - opacity: 0.3; -} -table.dataTable thead .sorting:before, -table.dataTable thead .sorting_asc:before, -table.dataTable thead .sorting_desc:before, -table.dataTable thead .sorting_asc_disabled:before, -table.dataTable thead .sorting_desc_disabled:before { - right: 1em; - content: "\2191"; -} -table.dataTable thead .sorting:after, -table.dataTable thead .sorting_asc:after, -table.dataTable thead .sorting_desc:after, -table.dataTable thead .sorting_asc_disabled:after, -table.dataTable thead .sorting_desc_disabled:after { - right: 0.5em; - content: "\2193"; -} -table.dataTable thead .sorting_asc:before, -table.dataTable thead .sorting_desc:after { - opacity: 1; -} -table.dataTable thead .sorting_asc_disabled:before, -table.dataTable thead .sorting_desc_disabled:after { - opacity: 0; -} - -div.dataTables_scrollHead table.dataTable { - margin-bottom: 0 !important; -} - -div.dataTables_scrollBody table { - border-top: none; - margin-top: 0 !important; - margin-bottom: 0 !important; -} -div.dataTables_scrollBody table thead .sorting:after, -div.dataTables_scrollBody table thead .sorting_asc:after, -div.dataTables_scrollBody table thead .sorting_desc:after { - display: none; -} -div.dataTables_scrollBody table tbody tr:first-child th, -div.dataTables_scrollBody table tbody tr:first-child td { - border-top: none; -} - -div.dataTables_scrollFoot table { - margin-top: 0 !important; - border-top: none; -} - -@media screen and (max-width: 767px) { - div.dataTables_wrapper div.dataTables_length, - div.dataTables_wrapper div.dataTables_filter, - div.dataTables_wrapper div.dataTables_info, - div.dataTables_wrapper div.dataTables_paginate { - text-align: center; - } -} -table.dataTable.table-condensed > thead > tr > th { - padding-right: 20px; -} -table.dataTable.table-condensed .sorting:after, -table.dataTable.table-condensed .sorting_asc:after, -table.dataTable.table-condensed .sorting_desc:after { - top: 6px; - right: 6px; -} - -table.table-bordered.dataTable th, -table.table-bordered.dataTable td { - border-left-width: 0; -} -table.table-bordered.dataTable th:last-child, table.table-bordered.dataTable th:last-child, -table.table-bordered.dataTable td:last-child, -table.table-bordered.dataTable td:last-child { - border-right-width: 0; -} -table.table-bordered.dataTable tbody th, -table.table-bordered.dataTable tbody td { - border-bottom-width: 0; -} - -div.dataTables_scrollHead table.table-bordered { - border-bottom-width: 0; -} - -div.table-responsive > div.dataTables_wrapper > div.row { - margin: 0; -} -div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:first-child { - padding-left: 0; -} -div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:last-child { - padding-right: 0; -} diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.bootstrap4.min.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.bootstrap4.min.css deleted file mode 100644 index 5ec0a8b7..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.bootstrap4.min.css +++ /dev/null @@ -1 +0,0 @@ -table.dataTable{clear:both;margin-top:6px !important;margin-bottom:6px !important;max-width:none !important;border-collapse:separate !important}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}div.dataTables_wrapper div.dataTables_length label{font-weight:normal;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:75px;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:normal;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:0.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:0.85em;white-space:nowrap}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap;justify-content:flex-end}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1em 0}table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting{padding-right:30px}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable thead .sorting:before,table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:before,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:before,table.dataTable thead .sorting_desc_disabled:after{position:absolute;bottom:0.9em;display:block;opacity:0.3}table.dataTable thead .sorting:before,table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_desc:before,table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc_disabled:before{right:1em;content:"\2191"}table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{right:0.5em;content:"\2193"}table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_desc:after{opacity:1}table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc_disabled:after{opacity:0}div.dataTables_scrollHead table.dataTable{margin-bottom:0 !important}div.dataTables_scrollBody table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody table thead .sorting:after,div.dataTables_scrollBody table thead .sorting_asc:after,div.dataTables_scrollBody table thead .sorting_desc:after{display:none}div.dataTables_scrollBody table tbody tr:first-child th,div.dataTables_scrollBody table tbody tr:first-child td{border-top:none}div.dataTables_scrollFoot table{margin-top:0 !important;border-top:none}@media screen and (max-width: 767px){div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{text-align:center}}table.dataTable.table-condensed>thead>tr>th{padding-right:20px}table.dataTable.table-condensed .sorting:after,table.dataTable.table-condensed .sorting_asc:after,table.dataTable.table-condensed .sorting_desc:after{top:6px;right:6px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-left-width:0}table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable td:last-child,table.table-bordered.dataTable td:last-child{border-right-width:0}table.table-bordered.dataTable tbody th,table.table-bordered.dataTable tbody td{border-bottom-width:0}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}div.table-responsive>div.dataTables_wrapper>div.row{margin:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:first-child{padding-left:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:last-child{padding-right:0} diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.foundation.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.foundation.css deleted file mode 100644 index 79848c95..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.foundation.css +++ /dev/null @@ -1,118 +0,0 @@ -table.dataTable { - clear: both; - margin: 0.5em 0 !important; - max-width: none !important; - width: 100%; -} -table.dataTable td, -table.dataTable th { - -webkit-box-sizing: content-box; - box-sizing: content-box; -} -table.dataTable td.dataTables_empty, -table.dataTable th.dataTables_empty { - text-align: center; -} -table.dataTable.nowrap th, table.dataTable.nowrap td { - white-space: nowrap; -} - -div.dataTables_wrapper { - position: relative; -} -div.dataTables_wrapper div.dataTables_length label { - float: left; - text-align: left; - margin-bottom: 0; -} -div.dataTables_wrapper div.dataTables_length select { - width: 75px; - margin-bottom: 0; -} -div.dataTables_wrapper div.dataTables_filter label { - float: right; - margin-bottom: 0; -} -div.dataTables_wrapper div.dataTables_filter input { - display: inline-block !important; - width: auto !important; - margin-bottom: 0; - margin-left: 0.5em; -} -div.dataTables_wrapper div.dataTables_info { - padding-top: 2px; -} -div.dataTables_wrapper div.dataTables_paginate { - float: right; - margin: 0; -} -div.dataTables_wrapper div.dataTables_processing { - position: absolute; - top: 50%; - left: 50%; - width: 200px; - margin-left: -100px; - margin-top: -26px; - text-align: center; - padding: 1rem 0; -} - -table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting, -table.dataTable thead > tr > td.sorting_asc, -table.dataTable thead > tr > td.sorting_desc, -table.dataTable thead > tr > td.sorting { - padding-right: 1.5rem; -} -table.dataTable thead > tr > th:active, -table.dataTable thead > tr > td:active { - outline: none; -} -table.dataTable thead .sorting, -table.dataTable thead .sorting_asc, -table.dataTable thead .sorting_desc, -table.dataTable thead .sorting_asc_disabled, -table.dataTable thead .sorting_desc_disabled { - cursor: pointer; -} -table.dataTable thead .sorting, -table.dataTable thead .sorting_asc, -table.dataTable thead .sorting_desc, -table.dataTable thead .sorting_asc_disabled, -table.dataTable thead .sorting_desc_disabled { - background-repeat: no-repeat; - background-position: center right; -} -table.dataTable thead .sorting { - background-image: url("../images/sort_both.png"); -} -table.dataTable thead .sorting_asc { - background-image: url("../images/sort_asc.png"); -} -table.dataTable thead .sorting_desc { - background-image: url("../images/sort_desc.png"); -} -table.dataTable thead .sorting_asc_disabled { - background-image: url("../images/sort_asc_disabled.png"); -} -table.dataTable thead .sorting_desc_disabled { - background-image: url("../images/sort_desc_disabled.png"); -} - -div.dataTables_scrollHead table { - margin-bottom: 0 !important; -} - -div.dataTables_scrollBody table { - border-top: none; - margin-top: 0 !important; - margin-bottom: 0 !important; -} -div.dataTables_scrollBody table tbody tr:first-child th, -div.dataTables_scrollBody table tbody tr:first-child td { - border-top: none; -} - -div.dataTables_scrollFoot table { - margin-top: 0 !important; - border-top: none; -} diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.foundation.min.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.foundation.min.css deleted file mode 100644 index 73af41ef..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.foundation.min.css +++ /dev/null @@ -1 +0,0 @@ -table.dataTable{clear:both;margin:0.5em 0 !important;max-width:none !important;width:100%}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}div.dataTables_wrapper{position:relative}div.dataTables_wrapper div.dataTables_length label{float:left;text-align:left;margin-bottom:0}div.dataTables_wrapper div.dataTables_length select{width:75px;margin-bottom:0}div.dataTables_wrapper div.dataTables_filter label{float:right;margin-bottom:0}div.dataTables_wrapper div.dataTables_filter input{display:inline-block !important;width:auto !important;margin-bottom:0;margin-left:0.5em}div.dataTables_wrapper div.dataTables_info{padding-top:2px}div.dataTables_wrapper div.dataTables_paginate{float:right;margin:0}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1rem 0}table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting{padding-right:1.5rem}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{background-repeat:no-repeat;background-position:center right}table.dataTable thead .sorting{background-image:url("../images/sort_both.png")}table.dataTable thead .sorting_asc{background-image:url("../images/sort_asc.png")}table.dataTable thead .sorting_desc{background-image:url("../images/sort_desc.png")}table.dataTable thead .sorting_asc_disabled{background-image:url("../images/sort_asc_disabled.png")}table.dataTable thead .sorting_desc_disabled{background-image:url("../images/sort_desc_disabled.png")}div.dataTables_scrollHead table{margin-bottom:0 !important}div.dataTables_scrollBody table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody table tbody tr:first-child th,div.dataTables_scrollBody table tbody tr:first-child td{border-top:none}div.dataTables_scrollFoot table{margin-top:0 !important;border-top:none} diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.jqueryui.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.jqueryui.css deleted file mode 100644 index dcc8f82f..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.jqueryui.css +++ /dev/null @@ -1,482 +0,0 @@ -/* - * Table styles - */ -table.dataTable { - width: 100%; - margin: 0 auto; - clear: both; - border-collapse: separate; - border-spacing: 0; - /* - * Header and footer styles - */ - /* - * Body styles - */ -} -table.dataTable thead th, -table.dataTable tfoot th { - font-weight: bold; -} -table.dataTable thead th, -table.dataTable thead td { - padding: 10px 18px; -} -table.dataTable thead th:active, -table.dataTable thead td:active { - outline: none; -} -table.dataTable tfoot th, -table.dataTable tfoot td { - padding: 10px 18px 6px 18px; -} -table.dataTable tbody tr { - background-color: #ffffff; -} -table.dataTable tbody tr.selected { - background-color: #B0BED9; -} -table.dataTable tbody th, -table.dataTable tbody td { - padding: 8px 10px; -} -table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td { - border-top: 1px solid #ddd; -} -table.dataTable.row-border tbody tr:first-child th, -table.dataTable.row-border tbody tr:first-child td, table.dataTable.display tbody tr:first-child th, -table.dataTable.display tbody tr:first-child td { - border-top: none; -} -table.dataTable.cell-border tbody th, table.dataTable.cell-border tbody td { - border-top: 1px solid #ddd; - border-right: 1px solid #ddd; -} -table.dataTable.cell-border tbody tr th:first-child, -table.dataTable.cell-border tbody tr td:first-child { - border-left: 1px solid #ddd; -} -table.dataTable.cell-border tbody tr:first-child th, -table.dataTable.cell-border tbody tr:first-child td { - border-top: none; -} -table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd { - background-color: #f9f9f9; -} -table.dataTable.stripe tbody tr.odd.selected, table.dataTable.display tbody tr.odd.selected { - background-color: #acbad4; -} -table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover { - background-color: #f6f6f6; -} -table.dataTable.hover tbody tr:hover.selected, table.dataTable.display tbody tr:hover.selected { - background-color: #aab7d1; -} -table.dataTable.order-column tbody tr > .sorting_1, -table.dataTable.order-column tbody tr > .sorting_2, -table.dataTable.order-column tbody tr > .sorting_3, table.dataTable.display tbody tr > .sorting_1, -table.dataTable.display tbody tr > .sorting_2, -table.dataTable.display tbody tr > .sorting_3 { - background-color: #fafafa; -} -table.dataTable.order-column tbody tr.selected > .sorting_1, -table.dataTable.order-column tbody tr.selected > .sorting_2, -table.dataTable.order-column tbody tr.selected > .sorting_3, table.dataTable.display tbody tr.selected > .sorting_1, -table.dataTable.display tbody tr.selected > .sorting_2, -table.dataTable.display tbody tr.selected > .sorting_3 { - background-color: #acbad5; -} -table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 { - background-color: #f1f1f1; -} -table.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 { - background-color: #f3f3f3; -} -table.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 { - background-color: whitesmoke; -} -table.dataTable.display tbody tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 { - background-color: #a6b4cd; -} -table.dataTable.display tbody tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 { - background-color: #a8b5cf; -} -table.dataTable.display tbody tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 { - background-color: #a9b7d1; -} -table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 { - background-color: #fafafa; -} -table.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 { - background-color: #fcfcfc; -} -table.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 { - background-color: #fefefe; -} -table.dataTable.display tbody tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 { - background-color: #acbad5; -} -table.dataTable.display tbody tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 { - background-color: #aebcd6; -} -table.dataTable.display tbody tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 { - background-color: #afbdd8; -} -table.dataTable.display tbody tr:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1 { - background-color: #eaeaea; -} -table.dataTable.display tbody tr:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2 { - background-color: #ececec; -} -table.dataTable.display tbody tr:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3 { - background-color: #efefef; -} -table.dataTable.display tbody tr:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1 { - background-color: #a2aec7; -} -table.dataTable.display tbody tr:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2 { - background-color: #a3b0c9; -} -table.dataTable.display tbody tr:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3 { - background-color: #a5b2cb; -} -table.dataTable.no-footer { - border-bottom: 1px solid #111; -} -table.dataTable.nowrap th, table.dataTable.nowrap td { - white-space: nowrap; -} -table.dataTable.compact thead th, -table.dataTable.compact thead td { - padding: 4px 17px 4px 4px; -} -table.dataTable.compact tfoot th, -table.dataTable.compact tfoot td { - padding: 4px; -} -table.dataTable.compact tbody th, -table.dataTable.compact tbody td { - padding: 4px; -} -table.dataTable th.dt-left, -table.dataTable td.dt-left { - text-align: left; -} -table.dataTable th.dt-center, -table.dataTable td.dt-center, -table.dataTable td.dataTables_empty { - text-align: center; -} -table.dataTable th.dt-right, -table.dataTable td.dt-right { - text-align: right; -} -table.dataTable th.dt-justify, -table.dataTable td.dt-justify { - text-align: justify; -} -table.dataTable th.dt-nowrap, -table.dataTable td.dt-nowrap { - white-space: nowrap; -} -table.dataTable thead th.dt-head-left, -table.dataTable thead td.dt-head-left, -table.dataTable tfoot th.dt-head-left, -table.dataTable tfoot td.dt-head-left { - text-align: left; -} -table.dataTable thead th.dt-head-center, -table.dataTable thead td.dt-head-center, -table.dataTable tfoot th.dt-head-center, -table.dataTable tfoot td.dt-head-center { - text-align: center; -} -table.dataTable thead th.dt-head-right, -table.dataTable thead td.dt-head-right, -table.dataTable tfoot th.dt-head-right, -table.dataTable tfoot td.dt-head-right { - text-align: right; -} -table.dataTable thead th.dt-head-justify, -table.dataTable thead td.dt-head-justify, -table.dataTable tfoot th.dt-head-justify, -table.dataTable tfoot td.dt-head-justify { - text-align: justify; -} -table.dataTable thead th.dt-head-nowrap, -table.dataTable thead td.dt-head-nowrap, -table.dataTable tfoot th.dt-head-nowrap, -table.dataTable tfoot td.dt-head-nowrap { - white-space: nowrap; -} -table.dataTable tbody th.dt-body-left, -table.dataTable tbody td.dt-body-left { - text-align: left; -} -table.dataTable tbody th.dt-body-center, -table.dataTable tbody td.dt-body-center { - text-align: center; -} -table.dataTable tbody th.dt-body-right, -table.dataTable tbody td.dt-body-right { - text-align: right; -} -table.dataTable tbody th.dt-body-justify, -table.dataTable tbody td.dt-body-justify { - text-align: justify; -} -table.dataTable tbody th.dt-body-nowrap, -table.dataTable tbody td.dt-body-nowrap { - white-space: nowrap; -} - -table.dataTable, -table.dataTable th, -table.dataTable td { - -webkit-box-sizing: content-box; - box-sizing: content-box; -} - -/* - * Control feature layout - */ -.dataTables_wrapper { - position: relative; - clear: both; - *zoom: 1; - zoom: 1; -} -.dataTables_wrapper .dataTables_length { - float: left; -} -.dataTables_wrapper .dataTables_filter { - float: right; - text-align: right; -} -.dataTables_wrapper .dataTables_filter input { - margin-left: 0.5em; -} -.dataTables_wrapper .dataTables_info { - clear: both; - float: left; - padding-top: 0.755em; -} -.dataTables_wrapper .dataTables_paginate { - float: right; - text-align: right; - padding-top: 0.25em; -} -.dataTables_wrapper .dataTables_paginate .paginate_button { - box-sizing: border-box; - display: inline-block; - min-width: 1.5em; - padding: 0.5em 1em; - margin-left: 2px; - text-align: center; - text-decoration: none !important; - cursor: pointer; - *cursor: hand; - color: #333 !important; - border: 1px solid transparent; - border-radius: 2px; -} -.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { - color: #333 !important; - border: 1px solid #979797; - background-color: white; - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, white), color-stop(100%, #dcdcdc)); - /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, white 0%, #dcdcdc 100%); - /* Chrome10+,Safari5.1+ */ - background: -moz-linear-gradient(top, white 0%, #dcdcdc 100%); - /* FF3.6+ */ - background: -ms-linear-gradient(top, white 0%, #dcdcdc 100%); - /* IE10+ */ - background: -o-linear-gradient(top, white 0%, #dcdcdc 100%); - /* Opera 11.10+ */ - background: linear-gradient(to bottom, white 0%, #dcdcdc 100%); - /* W3C */ -} -.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active { - cursor: default; - color: #666 !important; - border: 1px solid transparent; - background: transparent; - box-shadow: none; -} -.dataTables_wrapper .dataTables_paginate .paginate_button:hover { - color: white !important; - border: 1px solid #111; - background-color: #585858; - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111)); - /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #585858 0%, #111 100%); - /* Chrome10+,Safari5.1+ */ - background: -moz-linear-gradient(top, #585858 0%, #111 100%); - /* FF3.6+ */ - background: -ms-linear-gradient(top, #585858 0%, #111 100%); - /* IE10+ */ - background: -o-linear-gradient(top, #585858 0%, #111 100%); - /* Opera 11.10+ */ - background: linear-gradient(to bottom, #585858 0%, #111 100%); - /* W3C */ -} -.dataTables_wrapper .dataTables_paginate .paginate_button:active { - outline: none; - background-color: #2b2b2b; - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c)); - /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); - /* Chrome10+,Safari5.1+ */ - background: -moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); - /* FF3.6+ */ - background: -ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); - /* IE10+ */ - background: -o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); - /* Opera 11.10+ */ - background: linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%); - /* W3C */ - box-shadow: inset 0 0 3px #111; -} -.dataTables_wrapper .dataTables_paginate .ellipsis { - padding: 0 1em; -} -.dataTables_wrapper .dataTables_processing { - position: absolute; - top: 50%; - left: 50%; - width: 100%; - height: 40px; - margin-left: -50%; - margin-top: -25px; - padding-top: 20px; - text-align: center; - font-size: 1.2em; - background-color: white; - background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0))); - background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); -} -.dataTables_wrapper .dataTables_length, -.dataTables_wrapper .dataTables_filter, -.dataTables_wrapper .dataTables_info, -.dataTables_wrapper .dataTables_processing, -.dataTables_wrapper .dataTables_paginate { - color: #333; -} -.dataTables_wrapper .dataTables_scroll { - clear: both; -} -.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody { - *margin-top: -1px; - -webkit-overflow-scrolling: touch; -} -.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td { - vertical-align: middle; -} -.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th > div.dataTables_sizing, -.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td > div.dataTables_sizing, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th > div.dataTables_sizing, -.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td > div.dataTables_sizing { - height: 0; - overflow: hidden; - margin: 0 !important; - padding: 0 !important; -} -.dataTables_wrapper.no-footer .dataTables_scrollBody { - border-bottom: 1px solid #111; -} -.dataTables_wrapper.no-footer div.dataTables_scrollHead > table, -.dataTables_wrapper.no-footer div.dataTables_scrollBody > table { - border-bottom: none; -} -.dataTables_wrapper:after { - visibility: hidden; - display: block; - content: ""; - clear: both; - height: 0; -} - -@media screen and (max-width: 767px) { - .dataTables_wrapper .dataTables_info, - .dataTables_wrapper .dataTables_paginate { - float: none; - text-align: center; - } - .dataTables_wrapper .dataTables_paginate { - margin-top: 0.5em; - } -} -@media screen and (max-width: 640px) { - .dataTables_wrapper .dataTables_length, - .dataTables_wrapper .dataTables_filter { - float: none; - text-align: center; - } - .dataTables_wrapper .dataTables_filter { - margin-top: 0.5em; - } -} -table.dataTable thead th div.DataTables_sort_wrapper { - position: relative; -} -table.dataTable thead th div.DataTables_sort_wrapper span { - position: absolute; - top: 50%; - margin-top: -8px; - right: -18px; -} -table.dataTable thead th.ui-state-default, -table.dataTable tfoot th.ui-state-default { - border-left-width: 0; -} -table.dataTable thead th.ui-state-default:first-child, -table.dataTable tfoot th.ui-state-default:first-child { - border-left-width: 1px; -} - -/* - * Control feature layout - */ -.dataTables_wrapper .dataTables_paginate .fg-button { - box-sizing: border-box; - display: inline-block; - min-width: 1.5em; - padding: 0.5em; - margin-left: 2px; - text-align: center; - text-decoration: none !important; - cursor: pointer; - *cursor: hand; - border: 1px solid transparent; -} -.dataTables_wrapper .dataTables_paginate .fg-button:active { - outline: none; -} -.dataTables_wrapper .dataTables_paginate .fg-button:first-child { - border-top-left-radius: 3px; - border-bottom-left-radius: 3px; -} -.dataTables_wrapper .dataTables_paginate .fg-button:last-child { - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; -} -.dataTables_wrapper .ui-widget-header { - font-weight: normal; -} -.dataTables_wrapper .ui-toolbar { - padding: 8px; -} -.dataTables_wrapper.no-footer .dataTables_scrollBody { - border-bottom: none; -} -.dataTables_wrapper .dataTables_length, -.dataTables_wrapper .dataTables_filter, -.dataTables_wrapper .dataTables_info, -.dataTables_wrapper .dataTables_processing, -.dataTables_wrapper .dataTables_paginate { - color: inherit; -} diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.jqueryui.min.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.jqueryui.min.css deleted file mode 100644 index fe64abca..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.jqueryui.min.css +++ /dev/null @@ -1 +0,0 @@ -table.dataTable{width:100%;margin:0 auto;clear:both;border-collapse:separate;border-spacing:0}table.dataTable thead th,table.dataTable tfoot th{font-weight:bold}table.dataTable thead th,table.dataTable thead td{padding:10px 18px}table.dataTable thead th:active,table.dataTable thead td:active{outline:none}table.dataTable tfoot th,table.dataTable tfoot td{padding:10px 18px 6px 18px}table.dataTable tbody tr{background-color:#ffffff}table.dataTable tbody tr.selected{background-color:#B0BED9}table.dataTable tbody th,table.dataTable tbody td{padding:8px 10px}table.dataTable.row-border tbody th,table.dataTable.row-border tbody td,table.dataTable.display tbody th,table.dataTable.display tbody td{border-top:1px solid #ddd}table.dataTable.row-border tbody tr:first-child th,table.dataTable.row-border tbody tr:first-child td,table.dataTable.display tbody tr:first-child th,table.dataTable.display tbody tr:first-child td{border-top:none}table.dataTable.cell-border tbody th,table.dataTable.cell-border tbody td{border-top:1px solid #ddd;border-right:1px solid #ddd}table.dataTable.cell-border tbody tr th:first-child,table.dataTable.cell-border tbody tr td:first-child{border-left:1px solid #ddd}table.dataTable.cell-border tbody tr:first-child th,table.dataTable.cell-border tbody tr:first-child td{border-top:none}table.dataTable.stripe tbody tr.odd,table.dataTable.display tbody tr.odd{background-color:#f9f9f9}table.dataTable.stripe tbody tr.odd.selected,table.dataTable.display tbody tr.odd.selected{background-color:#acbad4}table.dataTable.hover tbody tr:hover,table.dataTable.display tbody tr:hover{background-color:#f6f6f6}table.dataTable.hover tbody tr:hover.selected,table.dataTable.display tbody tr:hover.selected{background-color:#aab7d1}table.dataTable.order-column tbody tr>.sorting_1,table.dataTable.order-column tbody tr>.sorting_2,table.dataTable.order-column tbody tr>.sorting_3,table.dataTable.display tbody tr>.sorting_1,table.dataTable.display tbody tr>.sorting_2,table.dataTable.display tbody tr>.sorting_3{background-color:#fafafa}table.dataTable.order-column tbody tr.selected>.sorting_1,table.dataTable.order-column tbody tr.selected>.sorting_2,table.dataTable.order-column tbody tr.selected>.sorting_3,table.dataTable.display tbody tr.selected>.sorting_1,table.dataTable.display tbody tr.selected>.sorting_2,table.dataTable.display tbody tr.selected>.sorting_3{background-color:#acbad5}table.dataTable.display tbody tr.odd>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd>.sorting_1{background-color:#f1f1f1}table.dataTable.display tbody tr.odd>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd>.sorting_2{background-color:#f3f3f3}table.dataTable.display tbody tr.odd>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd>.sorting_3{background-color:whitesmoke}table.dataTable.display tbody tr.odd.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1{background-color:#a6b4cd}table.dataTable.display tbody tr.odd.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2{background-color:#a8b5cf}table.dataTable.display tbody tr.odd.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3{background-color:#a9b7d1}table.dataTable.display tbody tr.even>.sorting_1,table.dataTable.order-column.stripe tbody tr.even>.sorting_1{background-color:#fafafa}table.dataTable.display tbody tr.even>.sorting_2,table.dataTable.order-column.stripe tbody tr.even>.sorting_2{background-color:#fcfcfc}table.dataTable.display tbody tr.even>.sorting_3,table.dataTable.order-column.stripe tbody tr.even>.sorting_3{background-color:#fefefe}table.dataTable.display tbody tr.even.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_1{background-color:#acbad5}table.dataTable.display tbody tr.even.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_2{background-color:#aebcd6}table.dataTable.display tbody tr.even.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_3{background-color:#afbdd8}table.dataTable.display tbody tr:hover>.sorting_1,table.dataTable.order-column.hover tbody tr:hover>.sorting_1{background-color:#eaeaea}table.dataTable.display tbody tr:hover>.sorting_2,table.dataTable.order-column.hover tbody tr:hover>.sorting_2{background-color:#ececec}table.dataTable.display tbody tr:hover>.sorting_3,table.dataTable.order-column.hover tbody tr:hover>.sorting_3{background-color:#efefef}table.dataTable.display tbody tr:hover.selected>.sorting_1,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_1{background-color:#a2aec7}table.dataTable.display tbody tr:hover.selected>.sorting_2,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_2{background-color:#a3b0c9}table.dataTable.display tbody tr:hover.selected>.sorting_3,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_3{background-color:#a5b2cb}table.dataTable.no-footer{border-bottom:1px solid #111}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}table.dataTable.compact thead th,table.dataTable.compact thead td{padding:4px 17px 4px 4px}table.dataTable.compact tfoot th,table.dataTable.compact tfoot td{padding:4px}table.dataTable.compact tbody th,table.dataTable.compact tbody td{padding:4px}table.dataTable th.dt-left,table.dataTable td.dt-left{text-align:left}table.dataTable th.dt-center,table.dataTable td.dt-center,table.dataTable td.dataTables_empty{text-align:center}table.dataTable th.dt-right,table.dataTable td.dt-right{text-align:right}table.dataTable th.dt-justify,table.dataTable td.dt-justify{text-align:justify}table.dataTable th.dt-nowrap,table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable thead th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody th.dt-body-left,table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center,table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right,table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify,table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap,table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}table.dataTable,table.dataTable th,table.dataTable td{-webkit-box-sizing:content-box;box-sizing:content-box}.dataTables_wrapper{position:relative;clear:both;*zoom:1;zoom:1}.dataTables_wrapper .dataTables_length{float:left}.dataTables_wrapper .dataTables_filter{float:right;text-align:right}.dataTables_wrapper .dataTables_filter input{margin-left:0.5em}.dataTables_wrapper .dataTables_info{clear:both;float:left;padding-top:0.755em}.dataTables_wrapper .dataTables_paginate{float:right;text-align:right;padding-top:0.25em}.dataTables_wrapper .dataTables_paginate .paginate_button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:0.5em 1em;margin-left:2px;text-align:center;text-decoration:none !important;cursor:pointer;*cursor:hand;color:#333 !important;border:1px solid transparent;border-radius:2px}.dataTables_wrapper .dataTables_paginate .paginate_button.current,.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{color:#333 !important;border:1px solid #979797;background-color:white;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #dcdcdc));background:-webkit-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-moz-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-ms-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-o-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:linear-gradient(to bottom, #fff 0%, #dcdcdc 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active{cursor:default;color:#666 !important;border:1px solid transparent;background:transparent;box-shadow:none}.dataTables_wrapper .dataTables_paginate .paginate_button:hover{color:white !important;border:1px solid #111;background-color:#585858;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));background:-webkit-linear-gradient(top, #585858 0%, #111 100%);background:-moz-linear-gradient(top, #585858 0%, #111 100%);background:-ms-linear-gradient(top, #585858 0%, #111 100%);background:-o-linear-gradient(top, #585858 0%, #111 100%);background:linear-gradient(to bottom, #585858 0%, #111 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button:active{outline:none;background-color:#2b2b2b;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));background:-webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);box-shadow:inset 0 0 3px #111}.dataTables_wrapper .dataTables_paginate .ellipsis{padding:0 1em}.dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:white;background:-webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255,255,255,0)), color-stop(25%, rgba(255,255,255,0.9)), color-stop(75%, rgba(255,255,255,0.9)), color-stop(100%, rgba(255,255,255,0)));background:-webkit-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-moz-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-o-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%)}.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_processing,.dataTables_wrapper .dataTables_paginate{color:#333}.dataTables_wrapper .dataTables_scroll{clear:both}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody{*margin-top:-1px;-webkit-overflow-scrolling:touch}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>td,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>td{vertical-align:middle}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>td>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>td>div.dataTables_sizing{height:0;overflow:hidden;margin:0 !important;padding:0 !important}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #111}.dataTables_wrapper.no-footer div.dataTables_scrollHead>table,.dataTables_wrapper.no-footer div.dataTables_scrollBody>table{border-bottom:none}.dataTables_wrapper:after{visibility:hidden;display:block;content:"";clear:both;height:0}@media screen and (max-width: 767px){.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_paginate{float:none;text-align:center}.dataTables_wrapper .dataTables_paginate{margin-top:0.5em}}@media screen and (max-width: 640px){.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter{float:none;text-align:center}.dataTables_wrapper .dataTables_filter{margin-top:0.5em}}table.dataTable thead th div.DataTables_sort_wrapper{position:relative}table.dataTable thead th div.DataTables_sort_wrapper span{position:absolute;top:50%;margin-top:-8px;right:-18px}table.dataTable thead th.ui-state-default,table.dataTable tfoot th.ui-state-default{border-left-width:0}table.dataTable thead th.ui-state-default:first-child,table.dataTable tfoot th.ui-state-default:first-child{border-left-width:1px}.dataTables_wrapper .dataTables_paginate .fg-button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:0.5em;margin-left:2px;text-align:center;text-decoration:none !important;cursor:pointer;*cursor:hand;border:1px solid transparent}.dataTables_wrapper .dataTables_paginate .fg-button:active{outline:none}.dataTables_wrapper .dataTables_paginate .fg-button:first-child{border-top-left-radius:3px;border-bottom-left-radius:3px}.dataTables_wrapper .dataTables_paginate .fg-button:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px}.dataTables_wrapper .ui-widget-header{font-weight:normal}.dataTables_wrapper .ui-toolbar{padding:8px}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:none}.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_processing,.dataTables_wrapper .dataTables_paginate{color:inherit} diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.material.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.material.css deleted file mode 100644 index c00f2e90..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.material.css +++ /dev/null @@ -1,87 +0,0 @@ -div.dataTables_wrapper div.dataTables_filter { - text-align: right; -} -div.dataTables_wrapper div.dataTables_filter input { - margin-left: 0.5em; -} -div.dataTables_wrapper div.dataTables_info { - padding-top: 10px; - white-space: nowrap; -} -div.dataTables_wrapper div.dataTables_processing { - position: absolute; - top: 50%; - left: 50%; - width: 200px; - margin-left: -100px; - text-align: center; -} -div.dataTables_wrapper div.dataTables_paginate { - text-align: right; -} -div.dataTables_wrapper div.mdl-grid.dt-table { - padding-top: 0; - padding-bottom: 0; -} -div.dataTables_wrapper div.mdl-grid.dt-table > div.mdl-cell { - margin-top: 0; - margin-bottom: 0; -} - -table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting, -table.dataTable thead > tr > td.sorting_asc, -table.dataTable thead > tr > td.sorting_desc, -table.dataTable thead > tr > td.sorting { - padding-right: 30px; -} -table.dataTable thead > tr > th:active, -table.dataTable thead > tr > td:active { - outline: none; -} -table.dataTable thead .sorting, -table.dataTable thead .sorting_asc, -table.dataTable thead .sorting_desc, -table.dataTable thead .sorting_asc_disabled, -table.dataTable thead .sorting_desc_disabled { - cursor: pointer; - position: relative; -} -table.dataTable thead .sorting:before, table.dataTable thead .sorting:after, -table.dataTable thead .sorting_asc:before, -table.dataTable thead .sorting_asc:after, -table.dataTable thead .sorting_desc:before, -table.dataTable thead .sorting_desc:after, -table.dataTable thead .sorting_asc_disabled:before, -table.dataTable thead .sorting_asc_disabled:after, -table.dataTable thead .sorting_desc_disabled:before, -table.dataTable thead .sorting_desc_disabled:after { - position: absolute; - bottom: 11px; - display: block; - opacity: 0.3; - font-size: 1.3em; -} -table.dataTable thead .sorting:before, -table.dataTable thead .sorting_asc:before, -table.dataTable thead .sorting_desc:before, -table.dataTable thead .sorting_asc_disabled:before, -table.dataTable thead .sorting_desc_disabled:before { - right: 1em; - content: "\2191"; -} -table.dataTable thead .sorting:after, -table.dataTable thead .sorting_asc:after, -table.dataTable thead .sorting_desc:after, -table.dataTable thead .sorting_asc_disabled:after, -table.dataTable thead .sorting_desc_disabled:after { - right: 0.5em; - content: "\2193"; -} -table.dataTable thead .sorting_asc:before, -table.dataTable thead .sorting_desc:after { - opacity: 1; -} -table.dataTable thead .sorting_asc_disabled:before, -table.dataTable thead .sorting_desc_disabled:after { - opacity: 0; -} diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.material.min.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.material.min.css deleted file mode 100644 index 5935ac4d..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.material.min.css +++ /dev/null @@ -1 +0,0 @@ -div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter input{margin-left:0.5em}div.dataTables_wrapper div.dataTables_info{padding-top:10px;white-space:nowrap}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;text-align:center}div.dataTables_wrapper div.dataTables_paginate{text-align:right}div.dataTables_wrapper div.mdl-grid.dt-table{padding-top:0;padding-bottom:0}div.dataTables_wrapper div.mdl-grid.dt-table>div.mdl-cell{margin-top:0;margin-bottom:0}table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting{padding-right:30px}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable thead .sorting:before,table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:before,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:before,table.dataTable thead .sorting_desc_disabled:after{position:absolute;bottom:11px;display:block;opacity:0.3;font-size:1.3em}table.dataTable thead .sorting:before,table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_desc:before,table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc_disabled:before{right:1em;content:"\2191"}table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{right:0.5em;content:"\2193"}table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_desc:after{opacity:1}table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc_disabled:after{opacity:0} diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.semanticui.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.semanticui.css deleted file mode 100644 index 25838426..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.semanticui.css +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Styling for DataTables with Semantic UI - */ -table.dataTable.table { - margin: 0; -} -table.dataTable.table thead th, -table.dataTable.table thead td { - position: relative; -} -table.dataTable.table thead th.sorting, table.dataTable.table thead th.sorting_asc, table.dataTable.table thead th.sorting_desc, -table.dataTable.table thead td.sorting, -table.dataTable.table thead td.sorting_asc, -table.dataTable.table thead td.sorting_desc { - padding-right: 20px; -} -table.dataTable.table thead th.sorting:after, table.dataTable.table thead th.sorting_asc:after, table.dataTable.table thead th.sorting_desc:after, -table.dataTable.table thead td.sorting:after, -table.dataTable.table thead td.sorting_asc:after, -table.dataTable.table thead td.sorting_desc:after { - position: absolute; - top: 12px; - right: 8px; - display: block; - font-family: Icons; -} -table.dataTable.table thead th.sorting:after, -table.dataTable.table thead td.sorting:after { - content: "\f0dc"; - color: #ddd; - font-size: 0.8em; -} -table.dataTable.table thead th.sorting_asc:after, -table.dataTable.table thead td.sorting_asc:after { - content: "\f0de"; -} -table.dataTable.table thead th.sorting_desc:after, -table.dataTable.table thead td.sorting_desc:after { - content: "\f0dd"; -} -table.dataTable.table td, -table.dataTable.table th { - -webkit-box-sizing: content-box; - box-sizing: content-box; -} -table.dataTable.table td.dataTables_empty, -table.dataTable.table th.dataTables_empty { - text-align: center; -} -table.dataTable.table.nowrap th, -table.dataTable.table.nowrap td { - white-space: nowrap; -} - -div.dataTables_wrapper div.dataTables_length select { - vertical-align: middle; - min-height: 2.7142em; -} -div.dataTables_wrapper div.dataTables_length .ui.selection.dropdown { - min-width: 0; -} -div.dataTables_wrapper div.dataTables_filter input { - margin-left: 0.5em; -} -div.dataTables_wrapper div.dataTables_info { - padding-top: 13px; - white-space: nowrap; -} -div.dataTables_wrapper div.dataTables_processing { - position: absolute; - top: 50%; - left: 50%; - width: 200px; - margin-left: -100px; - text-align: center; -} -div.dataTables_wrapper div.row.dt-table { - padding: 0; -} -div.dataTables_wrapper div.dataTables_scrollHead table.dataTable { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - border-bottom: none; -} -div.dataTables_wrapper div.dataTables_scrollBody thead .sorting:after, -div.dataTables_wrapper div.dataTables_scrollBody thead .sorting_asc:after, -div.dataTables_wrapper div.dataTables_scrollBody thead .sorting_desc:after { - display: none; -} -div.dataTables_wrapper div.dataTables_scrollBody table.dataTable { - border-radius: 0; - border-top: none; - border-bottom-width: 0; -} -div.dataTables_wrapper div.dataTables_scrollBody table.dataTable.no-footer { - border-bottom-width: 1px; -} -div.dataTables_wrapper div.dataTables_scrollFoot table.dataTable { - border-top-right-radius: 0; - border-top-left-radius: 0; - border-top: none; -} diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.semanticui.min.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.semanticui.min.css deleted file mode 100644 index c192a342..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.semanticui.min.css +++ /dev/null @@ -1 +0,0 @@ -table.dataTable.table{margin:0}table.dataTable.table thead th,table.dataTable.table thead td{position:relative}table.dataTable.table thead th.sorting,table.dataTable.table thead th.sorting_asc,table.dataTable.table thead th.sorting_desc,table.dataTable.table thead td.sorting,table.dataTable.table thead td.sorting_asc,table.dataTable.table thead td.sorting_desc{padding-right:20px}table.dataTable.table thead th.sorting:after,table.dataTable.table thead th.sorting_asc:after,table.dataTable.table thead th.sorting_desc:after,table.dataTable.table thead td.sorting:after,table.dataTable.table thead td.sorting_asc:after,table.dataTable.table thead td.sorting_desc:after{position:absolute;top:12px;right:8px;display:block;font-family:Icons}table.dataTable.table thead th.sorting:after,table.dataTable.table thead td.sorting:after{content:"\f0dc";color:#ddd;font-size:0.8em}table.dataTable.table thead th.sorting_asc:after,table.dataTable.table thead td.sorting_asc:after{content:"\f0de"}table.dataTable.table thead th.sorting_desc:after,table.dataTable.table thead td.sorting_desc:after{content:"\f0dd"}table.dataTable.table td,table.dataTable.table th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable.table td.dataTables_empty,table.dataTable.table th.dataTables_empty{text-align:center}table.dataTable.table.nowrap th,table.dataTable.table.nowrap td{white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{vertical-align:middle;min-height:2.7142em}div.dataTables_wrapper div.dataTables_length .ui.selection.dropdown{min-width:0}div.dataTables_wrapper div.dataTables_filter input{margin-left:0.5em}div.dataTables_wrapper div.dataTables_info{padding-top:13px;white-space:nowrap}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;text-align:center}div.dataTables_wrapper div.row.dt-table{padding:0}div.dataTables_wrapper div.dataTables_scrollHead table.dataTable{border-bottom-right-radius:0;border-bottom-left-radius:0;border-bottom:none}div.dataTables_wrapper div.dataTables_scrollBody thead .sorting:after,div.dataTables_wrapper div.dataTables_scrollBody thead .sorting_asc:after,div.dataTables_wrapper div.dataTables_scrollBody thead .sorting_desc:after{display:none}div.dataTables_wrapper div.dataTables_scrollBody table.dataTable{border-radius:0;border-top:none;border-bottom-width:0}div.dataTables_wrapper div.dataTables_scrollBody table.dataTable.no-footer{border-bottom-width:1px}div.dataTables_wrapper div.dataTables_scrollFoot table.dataTable{border-top-right-radius:0;border-top-left-radius:0;border-top:none} diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.uikit.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.uikit.css deleted file mode 100644 index 8e1e21ee..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.uikit.css +++ /dev/null @@ -1,146 +0,0 @@ -table.dataTable { - clear: both; - margin-top: 6px !important; - margin-bottom: 6px !important; - max-width: none !important; -} -table.dataTable td, -table.dataTable th { - -webkit-box-sizing: content-box; - box-sizing: content-box; -} -table.dataTable td.dataTables_empty, -table.dataTable th.dataTables_empty { - text-align: center; -} -table.dataTable.nowrap th, -table.dataTable.nowrap td { - white-space: nowrap; -} - -div.dataTables_wrapper div.row.uk-grid.dt-merge-grid { - margin-top: 5px; -} -div.dataTables_wrapper div.dataTables_length label { - font-weight: normal; - text-align: left; - white-space: nowrap; -} -div.dataTables_wrapper div.dataTables_length select { - width: 75px; - display: inline-block; -} -div.dataTables_wrapper div.dataTables_filter { - text-align: right; -} -div.dataTables_wrapper div.dataTables_filter label { - font-weight: normal; - white-space: nowrap; - text-align: left; -} -div.dataTables_wrapper div.dataTables_filter input { - margin-left: 0.5em; - display: inline-block; - width: auto; -} -div.dataTables_wrapper div.dataTables_info { - padding-top: 8px; - white-space: nowrap; -} -div.dataTables_wrapper div.dataTables_paginate { - margin: 0; - white-space: nowrap; - text-align: right; -} -div.dataTables_wrapper div.dataTables_paginate ul.pagination { - margin: 2px 0; - white-space: nowrap; -} -div.dataTables_wrapper div.dataTables_processing { - position: absolute; - top: 50%; - left: 50%; - width: 200px; - margin-left: -100px; - margin-top: -26px; - text-align: center; - padding: 1em 0; -} - -table.dataTable thead > tr > th, -table.dataTable thead > tr > td { - position: relative; -} -table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting, -table.dataTable thead > tr > td.sorting_asc, -table.dataTable thead > tr > td.sorting_desc, -table.dataTable thead > tr > td.sorting { - padding-right: 30px; -} -table.dataTable thead > tr > th.sorting:after, table.dataTable thead > tr > th.sorting_asc:after, table.dataTable thead > tr > th.sorting_desc:after, -table.dataTable thead > tr > td.sorting:after, -table.dataTable thead > tr > td.sorting_asc:after, -table.dataTable thead > tr > td.sorting_desc:after { - position: absolute; - top: 7px; - right: 8px; - display: block; - font-family: 'FontAwesome'; -} -table.dataTable thead > tr > th.sorting:after, -table.dataTable thead > tr > td.sorting:after { - content: "\f0dc"; - color: #ddd; - font-size: 0.8em; - padding-top: 0.12em; -} -table.dataTable thead > tr > th.sorting_asc:after, -table.dataTable thead > tr > td.sorting_asc:after { - content: "\f0de"; -} -table.dataTable thead > tr > th.sorting_desc:after, -table.dataTable thead > tr > td.sorting_desc:after { - content: "\f0dd"; -} - -div.dataTables_scrollHead table.dataTable { - margin-bottom: 0 !important; -} - -div.dataTables_scrollBody table { - border-top: none; - margin-top: 0 !important; - margin-bottom: 0 !important; -} -div.dataTables_scrollBody table thead .sorting:after, -div.dataTables_scrollBody table thead .sorting_asc:after, -div.dataTables_scrollBody table thead .sorting_desc:after { - display: none; -} -div.dataTables_scrollBody table tbody tr:first-child th, -div.dataTables_scrollBody table tbody tr:first-child td { - border-top: none; -} - -div.dataTables_scrollFoot table { - margin-top: 0 !important; - border-top: none; -} - -@media screen and (max-width: 767px) { - div.dataTables_wrapper div.dataTables_length, - div.dataTables_wrapper div.dataTables_filter, - div.dataTables_wrapper div.dataTables_info, - div.dataTables_wrapper div.dataTables_paginate { - text-align: center; - } -} -table.dataTable.uk-table-condensed > thead > tr > th { - padding-right: 20px; -} -table.dataTable.uk-table-condensed .sorting:after, -table.dataTable.uk-table-condensed .sorting_asc:after, -table.dataTable.uk-table-condensed .sorting_desc:after { - top: 6px; - right: 6px; -} diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.uikit.min.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.uikit.min.css deleted file mode 100644 index 0818eed3..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/dataTables.uikit.min.css +++ /dev/null @@ -1 +0,0 @@ -table.dataTable{clear:both;margin-top:6px !important;margin-bottom:6px !important;max-width:none !important}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}div.dataTables_wrapper div.row.uk-grid.dt-merge-grid{margin-top:5px}div.dataTables_wrapper div.dataTables_length label{font-weight:normal;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:75px;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:normal;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:0.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:8px;white-space:nowrap}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1em 0}table.dataTable thead>tr>th,table.dataTable thead>tr>td{position:relative}table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting{padding-right:30px}table.dataTable thead>tr>th.sorting:after,table.dataTable thead>tr>th.sorting_asc:after,table.dataTable thead>tr>th.sorting_desc:after,table.dataTable thead>tr>td.sorting:after,table.dataTable thead>tr>td.sorting_asc:after,table.dataTable thead>tr>td.sorting_desc:after{position:absolute;top:7px;right:8px;display:block;font-family:'FontAwesome'}table.dataTable thead>tr>th.sorting:after,table.dataTable thead>tr>td.sorting:after{content:"\f0dc";color:#ddd;font-size:0.8em;padding-top:0.12em}table.dataTable thead>tr>th.sorting_asc:after,table.dataTable thead>tr>td.sorting_asc:after{content:"\f0de"}table.dataTable thead>tr>th.sorting_desc:after,table.dataTable thead>tr>td.sorting_desc:after{content:"\f0dd"}div.dataTables_scrollHead table.dataTable{margin-bottom:0 !important}div.dataTables_scrollBody table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody table thead .sorting:after,div.dataTables_scrollBody table thead .sorting_asc:after,div.dataTables_scrollBody table thead .sorting_desc:after{display:none}div.dataTables_scrollBody table tbody tr:first-child th,div.dataTables_scrollBody table tbody tr:first-child td{border-top:none}div.dataTables_scrollFoot table{margin-top:0 !important;border-top:none}@media screen and (max-width: 767px){div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{text-align:center}}table.dataTable.uk-table-condensed>thead>tr>th{padding-right:20px}table.dataTable.uk-table-condensed .sorting:after,table.dataTable.uk-table-condensed .sorting_asc:after,table.dataTable.uk-table-condensed .sorting_desc:after{top:6px;right:6px} diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/jquery.dataTables.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/jquery.dataTables.css deleted file mode 100644 index 6c55f8b6..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/jquery.dataTables.css +++ /dev/null @@ -1,455 +0,0 @@ -/* - * Table styles - */ -table.dataTable { - width: 100%; - margin: 0 auto; - clear: both; - border-collapse: separate; - border-spacing: 0; - /* - * Header and footer styles - */ - /* - * Body styles - */ -} -table.dataTable thead th, -table.dataTable tfoot th { - font-weight: bold; -} -table.dataTable thead th, -table.dataTable thead td { - padding: 10px 18px; - border-bottom: 1px solid #111; -} -table.dataTable thead th:active, -table.dataTable thead td:active { - outline: none; -} -table.dataTable tfoot th, -table.dataTable tfoot td { - padding: 10px 18px 6px 18px; - border-top: 1px solid #111; -} -table.dataTable thead .sorting, -table.dataTable thead .sorting_asc, -table.dataTable thead .sorting_desc, -table.dataTable thead .sorting_asc_disabled, -table.dataTable thead .sorting_desc_disabled { - cursor: pointer; - *cursor: hand; -} -table.dataTable thead .sorting, -table.dataTable thead .sorting_asc, -table.dataTable thead .sorting_desc, -table.dataTable thead .sorting_asc_disabled, -table.dataTable thead .sorting_desc_disabled { - background-repeat: no-repeat; - background-position: center right; -} -table.dataTable thead .sorting { - background-image: url("../images/sort_both.png"); -} -table.dataTable thead .sorting_asc { - background-image: url("../images/sort_asc.png"); -} -table.dataTable thead .sorting_desc { - background-image: url("../images/sort_desc.png"); -} -table.dataTable thead .sorting_asc_disabled { - background-image: url("../images/sort_asc_disabled.png"); -} -table.dataTable thead .sorting_desc_disabled { - background-image: url("../images/sort_desc_disabled.png"); -} -table.dataTable tbody tr { - background-color: #ffffff; -} -table.dataTable tbody tr.selected { - background-color: #B0BED9; -} -table.dataTable tbody th, -table.dataTable tbody td { - padding: 8px 10px; -} -table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td { - border-top: 1px solid #ddd; -} -table.dataTable.row-border tbody tr:first-child th, -table.dataTable.row-border tbody tr:first-child td, table.dataTable.display tbody tr:first-child th, -table.dataTable.display tbody tr:first-child td { - border-top: none; -} -table.dataTable.cell-border tbody th, table.dataTable.cell-border tbody td { - border-top: 1px solid #ddd; - border-right: 1px solid #ddd; -} -table.dataTable.cell-border tbody tr th:first-child, -table.dataTable.cell-border tbody tr td:first-child { - border-left: 1px solid #ddd; -} -table.dataTable.cell-border tbody tr:first-child th, -table.dataTable.cell-border tbody tr:first-child td { - border-top: none; -} -table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd { - background-color: #f9f9f9; -} -table.dataTable.stripe tbody tr.odd.selected, table.dataTable.display tbody tr.odd.selected { - background-color: #acbad4; -} -table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover { - background-color: #f6f6f6; -} -table.dataTable.hover tbody tr:hover.selected, table.dataTable.display tbody tr:hover.selected { - background-color: #aab7d1; -} -table.dataTable.order-column tbody tr > .sorting_1, -table.dataTable.order-column tbody tr > .sorting_2, -table.dataTable.order-column tbody tr > .sorting_3, table.dataTable.display tbody tr > .sorting_1, -table.dataTable.display tbody tr > .sorting_2, -table.dataTable.display tbody tr > .sorting_3 { - background-color: #fafafa; -} -table.dataTable.order-column tbody tr.selected > .sorting_1, -table.dataTable.order-column tbody tr.selected > .sorting_2, -table.dataTable.order-column tbody tr.selected > .sorting_3, table.dataTable.display tbody tr.selected > .sorting_1, -table.dataTable.display tbody tr.selected > .sorting_2, -table.dataTable.display tbody tr.selected > .sorting_3 { - background-color: #acbad5; -} -table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 { - background-color: #f1f1f1; -} -table.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 { - background-color: #f3f3f3; -} -table.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 { - background-color: whitesmoke; -} -table.dataTable.display tbody tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 { - background-color: #a6b4cd; -} -table.dataTable.display tbody tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 { - background-color: #a8b5cf; -} -table.dataTable.display tbody tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 { - background-color: #a9b7d1; -} -table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 { - background-color: #fafafa; -} -table.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 { - background-color: #fcfcfc; -} -table.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 { - background-color: #fefefe; -} -table.dataTable.display tbody tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 { - background-color: #acbad5; -} -table.dataTable.display tbody tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 { - background-color: #aebcd6; -} -table.dataTable.display tbody tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 { - background-color: #afbdd8; -} -table.dataTable.display tbody tr:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1 { - background-color: #eaeaea; -} -table.dataTable.display tbody tr:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2 { - background-color: #ececec; -} -table.dataTable.display tbody tr:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3 { - background-color: #efefef; -} -table.dataTable.display tbody tr:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1 { - background-color: #a2aec7; -} -table.dataTable.display tbody tr:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2 { - background-color: #a3b0c9; -} -table.dataTable.display tbody tr:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3 { - background-color: #a5b2cb; -} -table.dataTable.no-footer { - border-bottom: 1px solid #111; -} -table.dataTable.nowrap th, table.dataTable.nowrap td { - white-space: nowrap; -} -table.dataTable.compact thead th, -table.dataTable.compact thead td { - padding: 4px 17px 4px 4px; -} -table.dataTable.compact tfoot th, -table.dataTable.compact tfoot td { - padding: 4px; -} -table.dataTable.compact tbody th, -table.dataTable.compact tbody td { - padding: 4px; -} -table.dataTable th.dt-left, -table.dataTable td.dt-left { - text-align: left; -} -table.dataTable th.dt-center, -table.dataTable td.dt-center, -table.dataTable td.dataTables_empty { - text-align: center; -} -table.dataTable th.dt-right, -table.dataTable td.dt-right { - text-align: right; -} -table.dataTable th.dt-justify, -table.dataTable td.dt-justify { - text-align: justify; -} -table.dataTable th.dt-nowrap, -table.dataTable td.dt-nowrap { - white-space: nowrap; -} -table.dataTable thead th.dt-head-left, -table.dataTable thead td.dt-head-left, -table.dataTable tfoot th.dt-head-left, -table.dataTable tfoot td.dt-head-left { - text-align: left; -} -table.dataTable thead th.dt-head-center, -table.dataTable thead td.dt-head-center, -table.dataTable tfoot th.dt-head-center, -table.dataTable tfoot td.dt-head-center { - text-align: center; -} -table.dataTable thead th.dt-head-right, -table.dataTable thead td.dt-head-right, -table.dataTable tfoot th.dt-head-right, -table.dataTable tfoot td.dt-head-right { - text-align: right; -} -table.dataTable thead th.dt-head-justify, -table.dataTable thead td.dt-head-justify, -table.dataTable tfoot th.dt-head-justify, -table.dataTable tfoot td.dt-head-justify { - text-align: justify; -} -table.dataTable thead th.dt-head-nowrap, -table.dataTable thead td.dt-head-nowrap, -table.dataTable tfoot th.dt-head-nowrap, -table.dataTable tfoot td.dt-head-nowrap { - white-space: nowrap; -} -table.dataTable tbody th.dt-body-left, -table.dataTable tbody td.dt-body-left { - text-align: left; -} -table.dataTable tbody th.dt-body-center, -table.dataTable tbody td.dt-body-center { - text-align: center; -} -table.dataTable tbody th.dt-body-right, -table.dataTable tbody td.dt-body-right { - text-align: right; -} -table.dataTable tbody th.dt-body-justify, -table.dataTable tbody td.dt-body-justify { - text-align: justify; -} -table.dataTable tbody th.dt-body-nowrap, -table.dataTable tbody td.dt-body-nowrap { - white-space: nowrap; -} - -table.dataTable, -table.dataTable th, -table.dataTable td { - -webkit-box-sizing: content-box; - box-sizing: content-box; -} - -/* - * Control feature layout - */ -.dataTables_wrapper { - position: relative; - clear: both; - *zoom: 1; - zoom: 1; -} -.dataTables_wrapper .dataTables_length { - float: left; -} -.dataTables_wrapper .dataTables_filter { - float: right; - text-align: right; -} -.dataTables_wrapper .dataTables_filter input { - margin-left: 0.5em; -} -.dataTables_wrapper .dataTables_info { - clear: both; - float: left; - padding-top: 0.755em; -} -.dataTables_wrapper .dataTables_paginate { - float: right; - text-align: right; - padding-top: 0.25em; -} -.dataTables_wrapper .dataTables_paginate .paginate_button { - box-sizing: border-box; - display: inline-block; - min-width: 1.5em; - padding: 0.5em 1em; - margin-left: 2px; - text-align: center; - text-decoration: none !important; - cursor: pointer; - *cursor: hand; - color: #333 !important; - border: 1px solid transparent; - border-radius: 2px; -} -.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { - color: #333 !important; - border: 1px solid #979797; - background-color: white; - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, white), color-stop(100%, #dcdcdc)); - /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, white 0%, #dcdcdc 100%); - /* Chrome10+,Safari5.1+ */ - background: -moz-linear-gradient(top, white 0%, #dcdcdc 100%); - /* FF3.6+ */ - background: -ms-linear-gradient(top, white 0%, #dcdcdc 100%); - /* IE10+ */ - background: -o-linear-gradient(top, white 0%, #dcdcdc 100%); - /* Opera 11.10+ */ - background: linear-gradient(to bottom, white 0%, #dcdcdc 100%); - /* W3C */ -} -.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active { - cursor: default; - color: #666 !important; - border: 1px solid transparent; - background: transparent; - box-shadow: none; -} -.dataTables_wrapper .dataTables_paginate .paginate_button:hover { - color: white !important; - border: 1px solid #111; - background-color: #585858; - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111)); - /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #585858 0%, #111 100%); - /* Chrome10+,Safari5.1+ */ - background: -moz-linear-gradient(top, #585858 0%, #111 100%); - /* FF3.6+ */ - background: -ms-linear-gradient(top, #585858 0%, #111 100%); - /* IE10+ */ - background: -o-linear-gradient(top, #585858 0%, #111 100%); - /* Opera 11.10+ */ - background: linear-gradient(to bottom, #585858 0%, #111 100%); - /* W3C */ -} -.dataTables_wrapper .dataTables_paginate .paginate_button:active { - outline: none; - background-color: #2b2b2b; - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c)); - /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); - /* Chrome10+,Safari5.1+ */ - background: -moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); - /* FF3.6+ */ - background: -ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); - /* IE10+ */ - background: -o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); - /* Opera 11.10+ */ - background: linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%); - /* W3C */ - box-shadow: inset 0 0 3px #111; -} -.dataTables_wrapper .dataTables_paginate .ellipsis { - padding: 0 1em; -} -.dataTables_wrapper .dataTables_processing { - position: absolute; - top: 50%; - left: 50%; - width: 100%; - height: 40px; - margin-left: -50%; - margin-top: -25px; - padding-top: 20px; - text-align: center; - font-size: 1.2em; - background-color: white; - background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0))); - background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); -} -.dataTables_wrapper .dataTables_length, -.dataTables_wrapper .dataTables_filter, -.dataTables_wrapper .dataTables_info, -.dataTables_wrapper .dataTables_processing, -.dataTables_wrapper .dataTables_paginate { - color: #333; -} -.dataTables_wrapper .dataTables_scroll { - clear: both; -} -.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody { - *margin-top: -1px; - -webkit-overflow-scrolling: touch; -} -.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td { - vertical-align: middle; -} -.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th > div.dataTables_sizing, -.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td > div.dataTables_sizing, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th > div.dataTables_sizing, -.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td > div.dataTables_sizing { - height: 0; - overflow: hidden; - margin: 0 !important; - padding: 0 !important; -} -.dataTables_wrapper.no-footer .dataTables_scrollBody { - border-bottom: 1px solid #111; -} -.dataTables_wrapper.no-footer div.dataTables_scrollHead > table, -.dataTables_wrapper.no-footer div.dataTables_scrollBody > table { - border-bottom: none; -} -.dataTables_wrapper:after { - visibility: hidden; - display: block; - content: ""; - clear: both; - height: 0; -} - -@media screen and (max-width: 767px) { - .dataTables_wrapper .dataTables_info, - .dataTables_wrapper .dataTables_paginate { - float: none; - text-align: center; - } - .dataTables_wrapper .dataTables_paginate { - margin-top: 0.5em; - } -} -@media screen and (max-width: 640px) { - .dataTables_wrapper .dataTables_length, - .dataTables_wrapper .dataTables_filter { - float: none; - text-align: center; - } - .dataTables_wrapper .dataTables_filter { - margin-top: 0.5em; - } -} diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/jquery.dataTables.min.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/jquery.dataTables.min.css deleted file mode 100644 index 471c2932..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/jquery.dataTables.min.css +++ /dev/null @@ -1 +0,0 @@ -table.dataTable{width:100%;margin:0 auto;clear:both;border-collapse:separate;border-spacing:0}table.dataTable thead th,table.dataTable tfoot th{font-weight:bold}table.dataTable thead th,table.dataTable thead td{padding:10px 18px;border-bottom:1px solid #111}table.dataTable thead th:active,table.dataTable thead td:active{outline:none}table.dataTable tfoot th,table.dataTable tfoot td{padding:10px 18px 6px 18px;border-top:1px solid #111}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;*cursor:hand}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{background-repeat:no-repeat;background-position:center right}table.dataTable thead .sorting{background-image:url("../images/sort_both.png")}table.dataTable thead .sorting_asc{background-image:url("../images/sort_asc.png")}table.dataTable thead .sorting_desc{background-image:url("../images/sort_desc.png")}table.dataTable thead .sorting_asc_disabled{background-image:url("../images/sort_asc_disabled.png")}table.dataTable thead .sorting_desc_disabled{background-image:url("../images/sort_desc_disabled.png")}table.dataTable tbody tr{background-color:#ffffff}table.dataTable tbody tr.selected{background-color:#B0BED9}table.dataTable tbody th,table.dataTable tbody td{padding:8px 10px}table.dataTable.row-border tbody th,table.dataTable.row-border tbody td,table.dataTable.display tbody th,table.dataTable.display tbody td{border-top:1px solid #ddd}table.dataTable.row-border tbody tr:first-child th,table.dataTable.row-border tbody tr:first-child td,table.dataTable.display tbody tr:first-child th,table.dataTable.display tbody tr:first-child td{border-top:none}table.dataTable.cell-border tbody th,table.dataTable.cell-border tbody td{border-top:1px solid #ddd;border-right:1px solid #ddd}table.dataTable.cell-border tbody tr th:first-child,table.dataTable.cell-border tbody tr td:first-child{border-left:1px solid #ddd}table.dataTable.cell-border tbody tr:first-child th,table.dataTable.cell-border tbody tr:first-child td{border-top:none}table.dataTable.stripe tbody tr.odd,table.dataTable.display tbody tr.odd{background-color:#f9f9f9}table.dataTable.stripe tbody tr.odd.selected,table.dataTable.display tbody tr.odd.selected{background-color:#acbad4}table.dataTable.hover tbody tr:hover,table.dataTable.display tbody tr:hover{background-color:#f6f6f6}table.dataTable.hover tbody tr:hover.selected,table.dataTable.display tbody tr:hover.selected{background-color:#aab7d1}table.dataTable.order-column tbody tr>.sorting_1,table.dataTable.order-column tbody tr>.sorting_2,table.dataTable.order-column tbody tr>.sorting_3,table.dataTable.display tbody tr>.sorting_1,table.dataTable.display tbody tr>.sorting_2,table.dataTable.display tbody tr>.sorting_3{background-color:#fafafa}table.dataTable.order-column tbody tr.selected>.sorting_1,table.dataTable.order-column tbody tr.selected>.sorting_2,table.dataTable.order-column tbody tr.selected>.sorting_3,table.dataTable.display tbody tr.selected>.sorting_1,table.dataTable.display tbody tr.selected>.sorting_2,table.dataTable.display tbody tr.selected>.sorting_3{background-color:#acbad5}table.dataTable.display tbody tr.odd>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd>.sorting_1{background-color:#f1f1f1}table.dataTable.display tbody tr.odd>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd>.sorting_2{background-color:#f3f3f3}table.dataTable.display tbody tr.odd>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd>.sorting_3{background-color:whitesmoke}table.dataTable.display tbody tr.odd.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1{background-color:#a6b4cd}table.dataTable.display tbody tr.odd.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2{background-color:#a8b5cf}table.dataTable.display tbody tr.odd.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3{background-color:#a9b7d1}table.dataTable.display tbody tr.even>.sorting_1,table.dataTable.order-column.stripe tbody tr.even>.sorting_1{background-color:#fafafa}table.dataTable.display tbody tr.even>.sorting_2,table.dataTable.order-column.stripe tbody tr.even>.sorting_2{background-color:#fcfcfc}table.dataTable.display tbody tr.even>.sorting_3,table.dataTable.order-column.stripe tbody tr.even>.sorting_3{background-color:#fefefe}table.dataTable.display tbody tr.even.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_1{background-color:#acbad5}table.dataTable.display tbody tr.even.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_2{background-color:#aebcd6}table.dataTable.display tbody tr.even.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_3{background-color:#afbdd8}table.dataTable.display tbody tr:hover>.sorting_1,table.dataTable.order-column.hover tbody tr:hover>.sorting_1{background-color:#eaeaea}table.dataTable.display tbody tr:hover>.sorting_2,table.dataTable.order-column.hover tbody tr:hover>.sorting_2{background-color:#ececec}table.dataTable.display tbody tr:hover>.sorting_3,table.dataTable.order-column.hover tbody tr:hover>.sorting_3{background-color:#efefef}table.dataTable.display tbody tr:hover.selected>.sorting_1,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_1{background-color:#a2aec7}table.dataTable.display tbody tr:hover.selected>.sorting_2,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_2{background-color:#a3b0c9}table.dataTable.display tbody tr:hover.selected>.sorting_3,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_3{background-color:#a5b2cb}table.dataTable.no-footer{border-bottom:1px solid #111}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}table.dataTable.compact thead th,table.dataTable.compact thead td{padding:4px 17px 4px 4px}table.dataTable.compact tfoot th,table.dataTable.compact tfoot td{padding:4px}table.dataTable.compact tbody th,table.dataTable.compact tbody td{padding:4px}table.dataTable th.dt-left,table.dataTable td.dt-left{text-align:left}table.dataTable th.dt-center,table.dataTable td.dt-center,table.dataTable td.dataTables_empty{text-align:center}table.dataTable th.dt-right,table.dataTable td.dt-right{text-align:right}table.dataTable th.dt-justify,table.dataTable td.dt-justify{text-align:justify}table.dataTable th.dt-nowrap,table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable thead th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody th.dt-body-left,table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center,table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right,table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify,table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap,table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}table.dataTable,table.dataTable th,table.dataTable td{-webkit-box-sizing:content-box;box-sizing:content-box}.dataTables_wrapper{position:relative;clear:both;*zoom:1;zoom:1}.dataTables_wrapper .dataTables_length{float:left}.dataTables_wrapper .dataTables_filter{float:right;text-align:right}.dataTables_wrapper .dataTables_filter input{margin-left:0.5em}.dataTables_wrapper .dataTables_info{clear:both;float:left;padding-top:0.755em}.dataTables_wrapper .dataTables_paginate{float:right;text-align:right;padding-top:0.25em}.dataTables_wrapper .dataTables_paginate .paginate_button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:0.5em 1em;margin-left:2px;text-align:center;text-decoration:none !important;cursor:pointer;*cursor:hand;color:#333 !important;border:1px solid transparent;border-radius:2px}.dataTables_wrapper .dataTables_paginate .paginate_button.current,.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{color:#333 !important;border:1px solid #979797;background-color:white;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #dcdcdc));background:-webkit-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-moz-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-ms-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-o-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:linear-gradient(to bottom, #fff 0%, #dcdcdc 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active{cursor:default;color:#666 !important;border:1px solid transparent;background:transparent;box-shadow:none}.dataTables_wrapper .dataTables_paginate .paginate_button:hover{color:white !important;border:1px solid #111;background-color:#585858;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));background:-webkit-linear-gradient(top, #585858 0%, #111 100%);background:-moz-linear-gradient(top, #585858 0%, #111 100%);background:-ms-linear-gradient(top, #585858 0%, #111 100%);background:-o-linear-gradient(top, #585858 0%, #111 100%);background:linear-gradient(to bottom, #585858 0%, #111 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button:active{outline:none;background-color:#2b2b2b;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));background:-webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);box-shadow:inset 0 0 3px #111}.dataTables_wrapper .dataTables_paginate .ellipsis{padding:0 1em}.dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:white;background:-webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255,255,255,0)), color-stop(25%, rgba(255,255,255,0.9)), color-stop(75%, rgba(255,255,255,0.9)), color-stop(100%, rgba(255,255,255,0)));background:-webkit-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-moz-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-o-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%)}.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_processing,.dataTables_wrapper .dataTables_paginate{color:#333}.dataTables_wrapper .dataTables_scroll{clear:both}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody{*margin-top:-1px;-webkit-overflow-scrolling:touch}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>td,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>td{vertical-align:middle}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>td>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>td>div.dataTables_sizing{height:0;overflow:hidden;margin:0 !important;padding:0 !important}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #111}.dataTables_wrapper.no-footer div.dataTables_scrollHead>table,.dataTables_wrapper.no-footer div.dataTables_scrollBody>table{border-bottom:none}.dataTables_wrapper:after{visibility:hidden;display:block;content:"";clear:both;height:0}@media screen and (max-width: 767px){.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_paginate{float:none;text-align:center}.dataTables_wrapper .dataTables_paginate{margin-top:0.5em}}@media screen and (max-width: 640px){.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter{float:none;text-align:center}.dataTables_wrapper .dataTables_filter{margin-top:0.5em}} diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/jquery.dataTables_themeroller.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/jquery.dataTables_themeroller.css deleted file mode 100644 index 1426a44a..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/jquery.dataTables_themeroller.css +++ /dev/null @@ -1,416 +0,0 @@ -/* - * Table styles - */ -table.dataTable { - width: 100%; - margin: 0 auto; - clear: both; - border-collapse: separate; - border-spacing: 0; - /* - * Header and footer styles - */ - /* - * Body styles - */ -} -table.dataTable thead th, -table.dataTable thead td, -table.dataTable tfoot th, -table.dataTable tfoot td { - padding: 4px 10px; -} -table.dataTable thead th, -table.dataTable tfoot th { - font-weight: bold; -} -table.dataTable thead th:active, -table.dataTable thead td:active { - outline: none; -} -table.dataTable thead .sorting_asc, -table.dataTable thead .sorting_desc, -table.dataTable thead .sorting { - cursor: pointer; - *cursor: hand; -} -table.dataTable thead th div.DataTables_sort_wrapper { - position: relative; - padding-right: 10px; -} -table.dataTable thead th div.DataTables_sort_wrapper span { - position: absolute; - top: 50%; - margin-top: -8px; - right: -5px; -} -table.dataTable thead th.ui-state-default { - border-right-width: 0; -} -table.dataTable thead th.ui-state-default:last-child { - border-right-width: 1px; -} -table.dataTable tbody tr { - background-color: #ffffff; -} -table.dataTable tbody tr.selected { - background-color: #B0BED9; -} -table.dataTable tbody th, -table.dataTable tbody td { - padding: 8px 10px; -} -table.dataTable th.center, -table.dataTable td.center, -table.dataTable td.dataTables_empty { - text-align: center; -} -table.dataTable th.right, -table.dataTable td.right { - text-align: right; -} -table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td { - border-top: 1px solid #ddd; -} -table.dataTable.row-border tbody tr:first-child th, -table.dataTable.row-border tbody tr:first-child td, table.dataTable.display tbody tr:first-child th, -table.dataTable.display tbody tr:first-child td { - border-top: none; -} -table.dataTable.cell-border tbody th, table.dataTable.cell-border tbody td { - border-top: 1px solid #ddd; - border-right: 1px solid #ddd; -} -table.dataTable.cell-border tbody tr th:first-child, -table.dataTable.cell-border tbody tr td:first-child { - border-left: 1px solid #ddd; -} -table.dataTable.cell-border tbody tr:first-child th, -table.dataTable.cell-border tbody tr:first-child td { - border-top: none; -} -table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd { - background-color: #f9f9f9; -} -table.dataTable.stripe tbody tr.odd.selected, table.dataTable.display tbody tr.odd.selected { - background-color: #abb9d3; -} -table.dataTable.hover tbody tr:hover, -table.dataTable.hover tbody tr.odd:hover, -table.dataTable.hover tbody tr.even:hover, table.dataTable.display tbody tr:hover, -table.dataTable.display tbody tr.odd:hover, -table.dataTable.display tbody tr.even:hover { - background-color: whitesmoke; -} -table.dataTable.hover tbody tr:hover.selected, -table.dataTable.hover tbody tr.odd:hover.selected, -table.dataTable.hover tbody tr.even:hover.selected, table.dataTable.display tbody tr:hover.selected, -table.dataTable.display tbody tr.odd:hover.selected, -table.dataTable.display tbody tr.even:hover.selected { - background-color: #a9b7d1; -} -table.dataTable.order-column tbody tr > .sorting_1, -table.dataTable.order-column tbody tr > .sorting_2, -table.dataTable.order-column tbody tr > .sorting_3, table.dataTable.display tbody tr > .sorting_1, -table.dataTable.display tbody tr > .sorting_2, -table.dataTable.display tbody tr > .sorting_3 { - background-color: #f9f9f9; -} -table.dataTable.order-column tbody tr.selected > .sorting_1, -table.dataTable.order-column tbody tr.selected > .sorting_2, -table.dataTable.order-column tbody tr.selected > .sorting_3, table.dataTable.display tbody tr.selected > .sorting_1, -table.dataTable.display tbody tr.selected > .sorting_2, -table.dataTable.display tbody tr.selected > .sorting_3 { - background-color: #acbad4; -} -table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 { - background-color: #f1f1f1; -} -table.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 { - background-color: #f3f3f3; -} -table.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 { - background-color: whitesmoke; -} -table.dataTable.display tbody tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 { - background-color: #a6b3cd; -} -table.dataTable.display tbody tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 { - background-color: #a7b5ce; -} -table.dataTable.display tbody tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 { - background-color: #a9b6d0; -} -table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 { - background-color: #f9f9f9; -} -table.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 { - background-color: #fbfbfb; -} -table.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 { - background-color: #fdfdfd; -} -table.dataTable.display tbody tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 { - background-color: #acbad4; -} -table.dataTable.display tbody tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 { - background-color: #adbbd6; -} -table.dataTable.display tbody tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 { - background-color: #afbdd8; -} -table.dataTable.display tbody tr:hover > .sorting_1, -table.dataTable.display tbody tr.odd:hover > .sorting_1, -table.dataTable.display tbody tr.even:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1, -table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_1, -table.dataTable.order-column.hover tbody tr.even:hover > .sorting_1 { - background-color: #eaeaea; -} -table.dataTable.display tbody tr:hover > .sorting_2, -table.dataTable.display tbody tr.odd:hover > .sorting_2, -table.dataTable.display tbody tr.even:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2, -table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_2, -table.dataTable.order-column.hover tbody tr.even:hover > .sorting_2 { - background-color: #ebebeb; -} -table.dataTable.display tbody tr:hover > .sorting_3, -table.dataTable.display tbody tr.odd:hover > .sorting_3, -table.dataTable.display tbody tr.even:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3, -table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_3, -table.dataTable.order-column.hover tbody tr.even:hover > .sorting_3 { - background-color: #eeeeee; -} -table.dataTable.display tbody tr:hover.selected > .sorting_1, -table.dataTable.display tbody tr.odd:hover.selected > .sorting_1, -table.dataTable.display tbody tr.even:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1, -table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_1, -table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_1 { - background-color: #a1aec7; -} -table.dataTable.display tbody tr:hover.selected > .sorting_2, -table.dataTable.display tbody tr.odd:hover.selected > .sorting_2, -table.dataTable.display tbody tr.even:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2, -table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_2, -table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_2 { - background-color: #a2afc8; -} -table.dataTable.display tbody tr:hover.selected > .sorting_3, -table.dataTable.display tbody tr.odd:hover.selected > .sorting_3, -table.dataTable.display tbody tr.even:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3, -table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_3, -table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_3 { - background-color: #a4b2cb; -} -table.dataTable.nowrap th, table.dataTable.nowrap td { - white-space: nowrap; -} -table.dataTable.compact thead th, -table.dataTable.compact thead td { - padding: 5px 9px; -} -table.dataTable.compact tfoot th, -table.dataTable.compact tfoot td { - padding: 5px 9px 3px 9px; -} -table.dataTable.compact tbody th, -table.dataTable.compact tbody td { - padding: 4px 5px; -} -table.dataTable th.dt-left, -table.dataTable td.dt-left { - text-align: left; -} -table.dataTable th.dt-center, -table.dataTable td.dt-center, -table.dataTable td.dataTables_empty { - text-align: center; -} -table.dataTable th.dt-right, -table.dataTable td.dt-right { - text-align: right; -} -table.dataTable th.dt-justify, -table.dataTable td.dt-justify { - text-align: justify; -} -table.dataTable th.dt-nowrap, -table.dataTable td.dt-nowrap { - white-space: nowrap; -} -table.dataTable thead th.dt-head-left, -table.dataTable thead td.dt-head-left, -table.dataTable tfoot th.dt-head-left, -table.dataTable tfoot td.dt-head-left { - text-align: left; -} -table.dataTable thead th.dt-head-center, -table.dataTable thead td.dt-head-center, -table.dataTable tfoot th.dt-head-center, -table.dataTable tfoot td.dt-head-center { - text-align: center; -} -table.dataTable thead th.dt-head-right, -table.dataTable thead td.dt-head-right, -table.dataTable tfoot th.dt-head-right, -table.dataTable tfoot td.dt-head-right { - text-align: right; -} -table.dataTable thead th.dt-head-justify, -table.dataTable thead td.dt-head-justify, -table.dataTable tfoot th.dt-head-justify, -table.dataTable tfoot td.dt-head-justify { - text-align: justify; -} -table.dataTable thead th.dt-head-nowrap, -table.dataTable thead td.dt-head-nowrap, -table.dataTable tfoot th.dt-head-nowrap, -table.dataTable tfoot td.dt-head-nowrap { - white-space: nowrap; -} -table.dataTable tbody th.dt-body-left, -table.dataTable tbody td.dt-body-left { - text-align: left; -} -table.dataTable tbody th.dt-body-center, -table.dataTable tbody td.dt-body-center { - text-align: center; -} -table.dataTable tbody th.dt-body-right, -table.dataTable tbody td.dt-body-right { - text-align: right; -} -table.dataTable tbody th.dt-body-justify, -table.dataTable tbody td.dt-body-justify { - text-align: justify; -} -table.dataTable tbody th.dt-body-nowrap, -table.dataTable tbody td.dt-body-nowrap { - white-space: nowrap; -} - -table.dataTable, -table.dataTable th, -table.dataTable td { - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; -} - -/* - * Control feature layout - */ -.dataTables_wrapper { - position: relative; - clear: both; - *zoom: 1; - zoom: 1; -} -.dataTables_wrapper .dataTables_length { - float: left; -} -.dataTables_wrapper .dataTables_filter { - float: right; - text-align: right; -} -.dataTables_wrapper .dataTables_filter input { - margin-left: 0.5em; -} -.dataTables_wrapper .dataTables_info { - clear: both; - float: left; - padding-top: 0.55em; -} -.dataTables_wrapper .dataTables_paginate { - float: right; - text-align: right; -} -.dataTables_wrapper .dataTables_paginate .fg-button { - box-sizing: border-box; - display: inline-block; - min-width: 1.5em; - padding: 0.5em; - margin-left: 2px; - text-align: center; - text-decoration: none !important; - cursor: pointer; - *cursor: hand; - color: #333 !important; - border: 1px solid transparent; -} -.dataTables_wrapper .dataTables_paginate .fg-button:active { - outline: none; -} -.dataTables_wrapper .dataTables_paginate .fg-button:first-child { - border-top-left-radius: 3px; - border-bottom-left-radius: 3px; -} -.dataTables_wrapper .dataTables_paginate .fg-button:last-child { - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; -} -.dataTables_wrapper .dataTables_processing { - position: absolute; - top: 50%; - left: 50%; - width: 100%; - height: 40px; - margin-left: -50%; - margin-top: -25px; - padding-top: 20px; - text-align: center; - font-size: 1.2em; - background-color: white; - background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0))); - /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - /* Chrome10+,Safari5.1+ */ - background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - /* FF3.6+ */ - background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - /* IE10+ */ - background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - /* Opera 11.10+ */ - background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - /* W3C */ -} -.dataTables_wrapper .dataTables_length, -.dataTables_wrapper .dataTables_filter, -.dataTables_wrapper .dataTables_info, -.dataTables_wrapper .dataTables_processing, -.dataTables_wrapper .dataTables_paginate { - color: #333; -} -.dataTables_wrapper .dataTables_scroll { - clear: both; -} -.dataTables_wrapper .dataTables_scrollBody { - *margin-top: -1px; - -webkit-overflow-scrolling: touch; -} -.dataTables_wrapper .ui-widget-header { - font-weight: normal; -} -.dataTables_wrapper .ui-toolbar { - padding: 8px; -} -.dataTables_wrapper:after { - visibility: hidden; - display: block; - content: ""; - clear: both; - height: 0; -} - -@media screen and (max-width: 767px) { - .dataTables_wrapper .dataTables_length, - .dataTables_wrapper .dataTables_filter, - .dataTables_wrapper .dataTables_info, - .dataTables_wrapper .dataTables_paginate { - float: none; - text-align: center; - } - .dataTables_wrapper .dataTables_filter, - .dataTables_wrapper .dataTables_paginate { - margin-top: 0.5em; - } -} diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/images/Sorting icons.psd b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/images/Sorting icons.psd deleted file mode 100644 index 53b2e068..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/images/Sorting icons.psd and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/images/favicon.ico b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/images/favicon.ico deleted file mode 100644 index 6eeaa2a0..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/images/favicon.ico and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/images/sort_asc.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/images/sort_asc.png deleted file mode 100644 index e1ba61a8..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/images/sort_asc.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/images/sort_asc_disabled.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/images/sort_asc_disabled.png deleted file mode 100644 index fb11dfe2..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/images/sort_asc_disabled.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/images/sort_both.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/images/sort_both.png deleted file mode 100644 index af5bc7c5..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/images/sort_both.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/images/sort_desc.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/images/sort_desc.png deleted file mode 100644 index 0e156deb..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/images/sort_desc.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/images/sort_desc_disabled.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/images/sort_desc_disabled.png deleted file mode 100644 index c9fdd8a1..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/images/sort_desc_disabled.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/js/dataTables.bootstrap.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/js/dataTables.bootstrap.js deleted file mode 100644 index f69acdc6..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/js/dataTables.bootstrap.js +++ /dev/null @@ -1,182 +0,0 @@ -/*! DataTables Bootstrap 3 integration - * ©2011-2015 SpryMedia Ltd - datatables.net/license - */ - -/** - * DataTables integration for Bootstrap 3. This requires Bootstrap 3 and - * DataTables 1.10 or newer. - * - * This file sets the defaults and adds options to DataTables to style its - * controls using Bootstrap. See http://datatables.net/manual/styling/bootstrap - * for further information. - */ -(function( factory ){ - if ( typeof define === 'function' && define.amd ) { - // AMD - define( ['jquery', 'datatables.net'], function ( $ ) { - return factory( $, window, document ); - } ); - } - else if ( typeof exports === 'object' ) { - // CommonJS - module.exports = function (root, $) { - if ( ! root ) { - root = window; - } - - if ( ! $ || ! $.fn.dataTable ) { - // Require DataTables, which attaches to jQuery, including - // jQuery if needed and have a $ property so we can access the - // jQuery object that is used - $ = require('datatables.net')(root, $).$; - } - - return factory( $, root, root.document ); - }; - } - else { - // Browser - factory( jQuery, window, document ); - } -}(function( $, window, document, undefined ) { -'use strict'; -var DataTable = $.fn.dataTable; - - -/* Set the defaults for DataTables initialisation */ -$.extend( true, DataTable.defaults, { - dom: - "<'row'<'col-sm-6'l><'col-sm-6'f>>" + - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", - renderer: 'bootstrap' -} ); - - -/* Default class modification */ -$.extend( DataTable.ext.classes, { - sWrapper: "dataTables_wrapper form-inline dt-bootstrap", - sFilterInput: "form-control input-sm", - sLengthSelect: "form-control input-sm", - sProcessing: "dataTables_processing panel panel-default" -} ); - - -/* Bootstrap paging button renderer */ -DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, buttons, page, pages ) { - var api = new DataTable.Api( settings ); - var classes = settings.oClasses; - var lang = settings.oLanguage.oPaginate; - var aria = settings.oLanguage.oAria.paginate || {}; - var btnDisplay, btnClass, counter=0; - - var attach = function( container, buttons ) { - var i, ien, node, button; - var clickHandler = function ( e ) { - e.preventDefault(); - if ( !$(e.currentTarget).hasClass('disabled') && api.page() != e.data.action ) { - api.page( e.data.action ).draw( 'page' ); - } - }; - - for ( i=0, ien=buttons.length ; i 0 ? - '' : ' disabled'); - break; - - case 'previous': - btnDisplay = lang.sPrevious; - btnClass = button + (page > 0 ? - '' : ' disabled'); - break; - - case 'next': - btnDisplay = lang.sNext; - btnClass = button + (page < pages-1 ? - '' : ' disabled'); - break; - - case 'last': - btnDisplay = lang.sLast; - btnClass = button + (page < pages-1 ? - '' : ' disabled'); - break; - - default: - btnDisplay = button + 1; - btnClass = page === button ? - 'active' : ''; - break; - } - - if ( btnDisplay ) { - node = $('
  • ', { - 'class': classes.sPageButton+' '+btnClass, - 'id': idx === 0 && typeof button === 'string' ? - settings.sTableId +'_'+ button : - null - } ) - .append( $('', { - 'href': '#', - 'aria-controls': settings.sTableId, - 'aria-label': aria[ button ], - 'data-dt-idx': counter, - 'tabindex': settings.iTabIndex - } ) - .html( btnDisplay ) - ) - .appendTo( container ); - - settings.oApi._fnBindAction( - node, {action: button}, clickHandler - ); - - counter++; - } - } - } - }; - - // IE9 throws an 'unknown error' if document.activeElement is used - // inside an iframe or frame. - var activeEl; - - try { - // Because this approach is destroying and recreating the paging - // elements, focus is lost on the select button which is bad for - // accessibility. So we want to restore focus once the draw has - // completed - activeEl = $(host).find(document.activeElement).data('dt-idx'); - } - catch (e) {} - - attach( - $(host).empty().html('
  • '; - } - }; - utils.inherits(Separator, UIBase); - -})(); - - -// ui/mask.js -///import core -///import uicore -(function (){ - var utils = baidu.editor.utils, - domUtils = baidu.editor.dom.domUtils, - UIBase = baidu.editor.ui.UIBase, - uiUtils = baidu.editor.ui.uiUtils; - - var Mask = baidu.editor.ui.Mask = function (options){ - this.initOptions(options); - this.initUIBase(); - }; - Mask.prototype = { - getHtmlTpl: function (){ - return '
    '; - }, - postRender: function (){ - var me = this; - domUtils.on(window, 'resize', function (){ - setTimeout(function (){ - if (!me.isHidden()) { - me._fill(); - } - }); - }); - }, - show: function (zIndex){ - this._fill(); - this.getDom().style.display = ''; - this.getDom().style.zIndex = zIndex; - }, - hide: function (){ - this.getDom().style.display = 'none'; - this.getDom().style.zIndex = ''; - }, - isHidden: function (){ - return this.getDom().style.display == 'none'; - }, - _onMouseDown: function (){ - return false; - }, - _onClick: function (e, target){ - this.fireEvent('click', e, target); - }, - _fill: function (){ - var el = this.getDom(); - var vpRect = uiUtils.getViewportRect(); - el.style.width = vpRect.width + 'px'; - el.style.height = vpRect.height + 'px'; - } - }; - utils.inherits(Mask, UIBase); -})(); - - -// ui/popup.js -///import core -///import uicore -(function () { - var utils = baidu.editor.utils, - uiUtils = baidu.editor.ui.uiUtils, - domUtils = baidu.editor.dom.domUtils, - UIBase = baidu.editor.ui.UIBase, - Popup = baidu.editor.ui.Popup = function (options){ - this.initOptions(options); - this.initPopup(); - }; - - var allPopups = []; - function closeAllPopup( evt,el ){ - for ( var i = 0; i < allPopups.length; i++ ) { - var pop = allPopups[i]; - if (!pop.isHidden()) { - if (pop.queryAutoHide(el) !== false) { - if(evt&&/scroll/ig.test(evt.type)&&pop.className=="edui-wordpastepop") return; - pop.hide(); - } - } - } - - if(allPopups.length) - pop.editor.fireEvent("afterhidepop"); - } - - Popup.postHide = closeAllPopup; - - var ANCHOR_CLASSES = ['edui-anchor-topleft','edui-anchor-topright', - 'edui-anchor-bottomleft','edui-anchor-bottomright']; - Popup.prototype = { - SHADOW_RADIUS: 5, - content: null, - _hidden: false, - autoRender: true, - canSideLeft: true, - canSideUp: true, - initPopup: function (){ - this.initUIBase(); - allPopups.push( this ); - }, - getHtmlTpl: function (){ - return '
    ' + - '
    ' + - ' ' + - '
    ' + - '
    ' + - this.getContentHtmlTpl() + - '
    ' + - '
    ' + - '
    '; - }, - getContentHtmlTpl: function (){ - if(this.content){ - if (typeof this.content == 'string') { - return this.content; - } - return this.content.renderHtml(); - }else{ - return '' - } - - }, - _UIBase_postRender: UIBase.prototype.postRender, - postRender: function (){ - - - if (this.content instanceof UIBase) { - this.content.postRender(); - } - - //捕获鼠标滚轮 - if( this.captureWheel && !this.captured ) { - - this.captured = true; - - var winHeight = ( document.documentElement.clientHeight || document.body.clientHeight ) - 80, - _height = this.getDom().offsetHeight, - _top = uiUtils.getClientRect( this.combox.getDom() ).top, - content = this.getDom('content'), - ifr = this.getDom('body').getElementsByTagName('iframe'), - me = this; - - ifr.length && ( ifr = ifr[0] ); - - while( _top + _height > winHeight ) { - _height -= 30; - } - content.style.height = _height + 'px'; - //同步更改iframe高度 - ifr && ( ifr.style.height = _height + 'px' ); - - //阻止在combox上的鼠标滚轮事件, 防止用户的正常操作被误解 - if( window.XMLHttpRequest ) { - - domUtils.on( content, ( 'onmousewheel' in document.body ) ? 'mousewheel' :'DOMMouseScroll' , function(e){ - - if(e.preventDefault) { - e.preventDefault(); - } else { - e.returnValue = false; - } - - if( e.wheelDelta ) { - - content.scrollTop -= ( e.wheelDelta / 120 )*60; - - } else { - - content.scrollTop -= ( e.detail / -3 )*60; - - } - - }); - - } else { - - //ie6 - domUtils.on( this.getDom(), 'mousewheel' , function(e){ - - e.returnValue = false; - - me.getDom('content').scrollTop -= ( e.wheelDelta / 120 )*60; - - }); - - } - - } - this.fireEvent('postRenderAfter'); - this.hide(true); - this._UIBase_postRender(); - }, - _doAutoRender: function (){ - if (!this.getDom() && this.autoRender) { - this.render(); - } - }, - mesureSize: function (){ - var box = this.getDom('content'); - return uiUtils.getClientRect(box); - }, - fitSize: function (){ - if( this.captureWheel && this.sized ) { - return this.__size; - } - this.sized = true; - var popBodyEl = this.getDom('body'); - popBodyEl.style.width = ''; - popBodyEl.style.height = ''; - var size = this.mesureSize(); - if( this.captureWheel ) { - popBodyEl.style.width = -(-20 -size.width) + 'px'; - var height = parseInt( this.getDom('content').style.height, 10 ); - !window.isNaN( height ) && ( size.height = height ); - } else { - popBodyEl.style.width = size.width + 'px'; - } - popBodyEl.style.height = size.height + 'px'; - this.__size = size; - this.captureWheel && (this.getDom('content').style.overflow = 'auto'); - return size; - }, - showAnchor: function ( element, hoz ){ - this.showAnchorRect( uiUtils.getClientRect( element ), hoz ); - }, - showAnchorRect: function ( rect, hoz, adj ){ - this._doAutoRender(); - var vpRect = uiUtils.getViewportRect(); - this.getDom().style.visibility = 'hidden'; - this._show(); - var popSize = this.fitSize(); - - var sideLeft, sideUp, left, top; - if (hoz) { - sideLeft = this.canSideLeft && (rect.right + popSize.width > vpRect.right && rect.left > popSize.width); - sideUp = this.canSideUp && (rect.top + popSize.height > vpRect.bottom && rect.bottom > popSize.height); - left = (sideLeft ? rect.left - popSize.width : rect.right); - top = (sideUp ? rect.bottom - popSize.height : rect.top); - } else { - sideLeft = this.canSideLeft && (rect.right + popSize.width > vpRect.right && rect.left > popSize.width); - sideUp = this.canSideUp && (rect.top + popSize.height > vpRect.bottom && rect.bottom > popSize.height); - left = (sideLeft ? rect.right - popSize.width : rect.left); - top = (sideUp ? rect.top - popSize.height : rect.bottom); - } - - var popEl = this.getDom(); - uiUtils.setViewportOffset(popEl, { - left: left, - top: top - }); - domUtils.removeClasses(popEl, ANCHOR_CLASSES); - popEl.className += ' ' + ANCHOR_CLASSES[(sideUp ? 1 : 0) * 2 + (sideLeft ? 1 : 0)]; - if(this.editor){ - popEl.style.zIndex = this.editor.container.style.zIndex * 1 + 10; - baidu.editor.ui.uiUtils.getFixedLayer().style.zIndex = popEl.style.zIndex - 1; - } - this.getDom().style.visibility = 'visible'; - - }, - showAt: function (offset) { - var left = offset.left; - var top = offset.top; - var rect = { - left: left, - top: top, - right: left, - bottom: top, - height: 0, - width: 0 - }; - this.showAnchorRect(rect, false, true); - }, - _show: function (){ - if (this._hidden) { - var box = this.getDom(); - box.style.display = ''; - this._hidden = false; -// if (box.setActive) { -// box.setActive(); -// } - this.fireEvent('show'); - } - }, - isHidden: function (){ - return this._hidden; - }, - show: function (){ - this._doAutoRender(); - this._show(); - }, - hide: function (notNofity){ - if (!this._hidden && this.getDom()) { - this.getDom().style.display = 'none'; - this._hidden = true; - if (!notNofity) { - this.fireEvent('hide'); - } - } - }, - queryAutoHide: function (el){ - return !el || !uiUtils.contains(this.getDom(), el); - } - }; - utils.inherits(Popup, UIBase); - - domUtils.on( document, 'mousedown', function ( evt ) { - var el = evt.target || evt.srcElement; - closeAllPopup( evt,el ); - } ); - domUtils.on( window, 'scroll', function (evt,el) { - closeAllPopup( evt,el ); - } ); - -})(); - - -// ui/colorpicker.js -///import core -///import uicore -(function (){ - var utils = baidu.editor.utils, - UIBase = baidu.editor.ui.UIBase, - ColorPicker = baidu.editor.ui.ColorPicker = function (options){ - this.initOptions(options); - this.noColorText = this.noColorText || this.editor.getLang("clearColor"); - this.initUIBase(); - }; - - ColorPicker.prototype = { - getHtmlTpl: function (){ - return genColorPicker(this.noColorText,this.editor); - }, - _onTableClick: function (evt){ - var tgt = evt.target || evt.srcElement; - var color = tgt.getAttribute('data-color'); - if (color) { - this.fireEvent('pickcolor', color); - } - }, - _onTableOver: function (evt){ - var tgt = evt.target || evt.srcElement; - var color = tgt.getAttribute('data-color'); - if (color) { - this.getDom('preview').style.backgroundColor = color; - } - }, - _onTableOut: function (){ - this.getDom('preview').style.backgroundColor = ''; - }, - _onPickNoColor: function (){ - this.fireEvent('picknocolor'); - } - }; - utils.inherits(ColorPicker, UIBase); - - var COLORS = ( - 'ffffff,000000,eeece1,1f497d,4f81bd,c0504d,9bbb59,8064a2,4bacc6,f79646,' + - 'f2f2f2,7f7f7f,ddd9c3,c6d9f0,dbe5f1,f2dcdb,ebf1dd,e5e0ec,dbeef3,fdeada,' + - 'd8d8d8,595959,c4bd97,8db3e2,b8cce4,e5b9b7,d7e3bc,ccc1d9,b7dde8,fbd5b5,' + - 'bfbfbf,3f3f3f,938953,548dd4,95b3d7,d99694,c3d69b,b2a2c7,92cddc,fac08f,' + - 'a5a5a5,262626,494429,17365d,366092,953734,76923c,5f497a,31859b,e36c09,' + - '7f7f7f,0c0c0c,1d1b10,0f243e,244061,632423,4f6128,3f3151,205867,974806,' + - 'c00000,ff0000,ffc000,ffff00,92d050,00b050,00b0f0,0070c0,002060,7030a0,').split(','); - - function genColorPicker(noColorText,editor){ - var html = '
    ' + - '
    ' + - '
    ' + - '
    '+ noColorText +'
    ' + - '
    ' + - '' + - ''+ - ''; - for (var i=0; i':'')+''; - } - html += i<70 ? '':''; - } - html += '
    '+editor.getLang("themeColor")+'
    '+editor.getLang("standardColor")+'
    '; - return html; - } -})(); - - -// ui/tablepicker.js -///import core -///import uicore -(function (){ - var utils = baidu.editor.utils, - uiUtils = baidu.editor.ui.uiUtils, - UIBase = baidu.editor.ui.UIBase; - - var TablePicker = baidu.editor.ui.TablePicker = function (options){ - this.initOptions(options); - this.initTablePicker(); - }; - TablePicker.prototype = { - defaultNumRows: 10, - defaultNumCols: 10, - maxNumRows: 20, - maxNumCols: 20, - numRows: 10, - numCols: 10, - lengthOfCellSide: 22, - initTablePicker: function (){ - this.initUIBase(); - }, - getHtmlTpl: function (){ - var me = this; - return '
    ' + - '
    ' + - '
    ' + - '' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    '; - }, - _UIBase_render: UIBase.prototype.render, - render: function (holder){ - this._UIBase_render(holder); - this.getDom('label').innerHTML = '0'+this.editor.getLang("t_row")+' x 0'+this.editor.getLang("t_col"); - }, - _track: function (numCols, numRows){ - var style = this.getDom('overlay').style; - var sideLen = this.lengthOfCellSide; - style.width = numCols * sideLen + 'px'; - style.height = numRows * sideLen + 'px'; - var label = this.getDom('label'); - label.innerHTML = numCols +this.editor.getLang("t_col")+' x ' + numRows + this.editor.getLang("t_row"); - this.numCols = numCols; - this.numRows = numRows; - }, - _onMouseOver: function (evt, el){ - var rel = evt.relatedTarget || evt.fromElement; - if (!uiUtils.contains(el, rel) && el !== rel) { - this.getDom('label').innerHTML = '0'+this.editor.getLang("t_col")+' x 0'+this.editor.getLang("t_row"); - this.getDom('overlay').style.visibility = ''; - } - }, - _onMouseOut: function (evt, el){ - var rel = evt.relatedTarget || evt.toElement; - if (!uiUtils.contains(el, rel) && el !== rel) { - this.getDom('label').innerHTML = '0'+this.editor.getLang("t_col")+' x 0'+this.editor.getLang("t_row"); - this.getDom('overlay').style.visibility = 'hidden'; - } - }, - _onMouseMove: function (evt, el){ - var style = this.getDom('overlay').style; - var offset = uiUtils.getEventOffset(evt); - var sideLen = this.lengthOfCellSide; - var numCols = Math.ceil(offset.left / sideLen); - var numRows = Math.ceil(offset.top / sideLen); - this._track(numCols, numRows); - }, - _onClick: function (){ - this.fireEvent('picktable', this.numCols, this.numRows); - } - }; - utils.inherits(TablePicker, UIBase); -})(); - - -// ui/stateful.js -(function (){ - var browser = baidu.editor.browser, - domUtils = baidu.editor.dom.domUtils, - uiUtils = baidu.editor.ui.uiUtils; - - var TPL_STATEFUL = 'onmousedown="$$.Stateful_onMouseDown(event, this);"' + - ' onmouseup="$$.Stateful_onMouseUp(event, this);"' + - ( browser.ie ? ( - ' onmouseenter="$$.Stateful_onMouseEnter(event, this);"' + - ' onmouseleave="$$.Stateful_onMouseLeave(event, this);"' ) - : ( - ' onmouseover="$$.Stateful_onMouseOver(event, this);"' + - ' onmouseout="$$.Stateful_onMouseOut(event, this);"' )); - - baidu.editor.ui.Stateful = { - alwalysHoverable: false, - target:null,//目标元素和this指向dom不一样 - Stateful_init: function (){ - this._Stateful_dGetHtmlTpl = this.getHtmlTpl; - this.getHtmlTpl = this.Stateful_getHtmlTpl; - }, - Stateful_getHtmlTpl: function (){ - var tpl = this._Stateful_dGetHtmlTpl(); - // 使用function避免$转义 - return tpl.replace(/stateful/g, function (){ return TPL_STATEFUL; }); - }, - Stateful_onMouseEnter: function (evt, el){ - this.target=el; - if (!this.isDisabled() || this.alwalysHoverable) { - this.addState('hover'); - this.fireEvent('over'); - } - }, - Stateful_onMouseLeave: function (evt, el){ - if (!this.isDisabled() || this.alwalysHoverable) { - this.removeState('hover'); - this.removeState('active'); - this.fireEvent('out'); - } - }, - Stateful_onMouseOver: function (evt, el){ - var rel = evt.relatedTarget; - if (!uiUtils.contains(el, rel) && el !== rel) { - this.Stateful_onMouseEnter(evt, el); - } - }, - Stateful_onMouseOut: function (evt, el){ - var rel = evt.relatedTarget; - if (!uiUtils.contains(el, rel) && el !== rel) { - this.Stateful_onMouseLeave(evt, el); - } - }, - Stateful_onMouseDown: function (evt, el){ - if (!this.isDisabled()) { - this.addState('active'); - } - }, - Stateful_onMouseUp: function (evt, el){ - if (!this.isDisabled()) { - this.removeState('active'); - } - }, - Stateful_postRender: function (){ - if (this.disabled && !this.hasState('disabled')) { - this.addState('disabled'); - } - }, - hasState: function (state){ - return domUtils.hasClass(this.getStateDom(), 'edui-state-' + state); - }, - addState: function (state){ - if (!this.hasState(state)) { - this.getStateDom().className += ' edui-state-' + state; - } - }, - removeState: function (state){ - if (this.hasState(state)) { - domUtils.removeClasses(this.getStateDom(), ['edui-state-' + state]); - } - }, - getStateDom: function (){ - return this.getDom('state'); - }, - isChecked: function (){ - return this.hasState('checked'); - }, - setChecked: function (checked){ - if (!this.isDisabled() && checked) { - this.addState('checked'); - } else { - this.removeState('checked'); - } - }, - isDisabled: function (){ - return this.hasState('disabled'); - }, - setDisabled: function (disabled){ - if (disabled) { - this.removeState('hover'); - this.removeState('checked'); - this.removeState('active'); - this.addState('disabled'); - } else { - this.removeState('disabled'); - } - } - }; -})(); - - -// ui/button.js -///import core -///import uicore -///import ui/stateful.js -(function (){ - var utils = baidu.editor.utils, - UIBase = baidu.editor.ui.UIBase, - Stateful = baidu.editor.ui.Stateful, - Button = baidu.editor.ui.Button = function (options){ - if(options.name){ - var btnName = options.name; - var cssRules = options.cssRules; - if(!options.className){ - options.className = 'edui-for-' + btnName; - } - options.cssRules = '.edui-default .edui-for-'+ btnName +' .edui-icon {'+ cssRules +'}' - } - this.initOptions(options); - this.initButton(); - }; - Button.prototype = { - uiName: 'button', - label: '', - title: '', - showIcon: true, - showText: true, - cssRules:'', - initButton: function (){ - this.initUIBase(); - this.Stateful_init(); - if(this.cssRules){ - utils.cssRule('edui-customize-'+this.name+'-style',this.cssRules); - } - }, - getHtmlTpl: function (){ - return '
    ' + - '
    ' + - '
    ' + - (this.showIcon ? '
    ' : '') + - (this.showText ? '
    ' + this.label + '
    ' : '') + - '
    ' + - '
    ' + - '
    '; - }, - postRender: function (){ - this.Stateful_postRender(); - this.setDisabled(this.disabled) - }, - _onMouseDown: function (e){ - var target = e.target || e.srcElement, - tagName = target && target.tagName && target.tagName.toLowerCase(); - if (tagName == 'input' || tagName == 'object' || tagName == 'object') { - return false; - } - }, - _onClick: function (){ - if (!this.isDisabled()) { - this.fireEvent('click'); - } - }, - setTitle: function(text){ - var label = this.getDom('label'); - label.innerHTML = text; - } - }; - utils.inherits(Button, UIBase); - utils.extend(Button.prototype, Stateful); - -})(); - - -// ui/splitbutton.js -///import core -///import uicore -///import ui/stateful.js -(function (){ - var utils = baidu.editor.utils, - uiUtils = baidu.editor.ui.uiUtils, - domUtils = baidu.editor.dom.domUtils, - UIBase = baidu.editor.ui.UIBase, - Stateful = baidu.editor.ui.Stateful, - SplitButton = baidu.editor.ui.SplitButton = function (options){ - this.initOptions(options); - this.initSplitButton(); - }; - SplitButton.prototype = { - popup: null, - uiName: 'splitbutton', - title: '', - initSplitButton: function (){ - this.initUIBase(); - this.Stateful_init(); - var me = this; - if (this.popup != null) { - var popup = this.popup; - this.popup = null; - this.setPopup(popup); - } - }, - _UIBase_postRender: UIBase.prototype.postRender, - postRender: function (){ - this.Stateful_postRender(); - this._UIBase_postRender(); - }, - setPopup: function (popup){ - if (this.popup === popup) return; - if (this.popup != null) { - this.popup.dispose(); - } - popup.addListener('show', utils.bind(this._onPopupShow, this)); - popup.addListener('hide', utils.bind(this._onPopupHide, this)); - popup.addListener('postrender', utils.bind(function (){ - popup.getDom('body').appendChild( - uiUtils.createElementByHtml('
    ') - ); - popup.getDom().className += ' ' + this.className; - }, this)); - this.popup = popup; - }, - _onPopupShow: function (){ - this.addState('opened'); - }, - _onPopupHide: function (){ - this.removeState('opened'); - }, - getHtmlTpl: function (){ - return '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    '; - }, - showPopup: function (){ - // 当popup往上弹出的时候,做特殊处理 - var rect = uiUtils.getClientRect(this.getDom()); - rect.top -= this.popup.SHADOW_RADIUS; - rect.height += this.popup.SHADOW_RADIUS; - this.popup.showAnchorRect(rect); - }, - _onArrowClick: function (event, el){ - if (!this.isDisabled()) { - this.showPopup(); - } - }, - _onButtonClick: function (){ - if (!this.isDisabled()) { - this.fireEvent('buttonclick'); - } - } - }; - utils.inherits(SplitButton, UIBase); - utils.extend(SplitButton.prototype, Stateful, true); - -})(); - - -// ui/colorbutton.js -///import core -///import uicore -///import ui/colorpicker.js -///import ui/popup.js -///import ui/splitbutton.js -(function (){ - var utils = baidu.editor.utils, - uiUtils = baidu.editor.ui.uiUtils, - ColorPicker = baidu.editor.ui.ColorPicker, - Popup = baidu.editor.ui.Popup, - SplitButton = baidu.editor.ui.SplitButton, - ColorButton = baidu.editor.ui.ColorButton = function (options){ - this.initOptions(options); - this.initColorButton(); - }; - ColorButton.prototype = { - initColorButton: function (){ - var me = this; - this.popup = new Popup({ - content: new ColorPicker({ - noColorText: me.editor.getLang("clearColor"), - editor:me.editor, - onpickcolor: function (t, color){ - me._onPickColor(color); - }, - onpicknocolor: function (t, color){ - me._onPickNoColor(color); - } - }), - editor:me.editor - }); - this.initSplitButton(); - }, - _SplitButton_postRender: SplitButton.prototype.postRender, - postRender: function (){ - this._SplitButton_postRender(); - this.getDom('button_body').appendChild( - uiUtils.createElementByHtml('
    ') - ); - this.getDom().className += ' edui-colorbutton'; - }, - setColor: function (color){ - this.getDom('colorlump').style.backgroundColor = color; - this.color = color; - }, - _onPickColor: function (color){ - if (this.fireEvent('pickcolor', color) !== false) { - this.setColor(color); - this.popup.hide(); - } - }, - _onPickNoColor: function (color){ - if (this.fireEvent('picknocolor') !== false) { - this.popup.hide(); - } - } - }; - utils.inherits(ColorButton, SplitButton); - -})(); - - -// ui/tablebutton.js -///import core -///import uicore -///import ui/popup.js -///import ui/tablepicker.js -///import ui/splitbutton.js -(function (){ - var utils = baidu.editor.utils, - Popup = baidu.editor.ui.Popup, - TablePicker = baidu.editor.ui.TablePicker, - SplitButton = baidu.editor.ui.SplitButton, - TableButton = baidu.editor.ui.TableButton = function (options){ - this.initOptions(options); - this.initTableButton(); - }; - TableButton.prototype = { - initTableButton: function (){ - var me = this; - this.popup = new Popup({ - content: new TablePicker({ - editor:me.editor, - onpicktable: function (t, numCols, numRows){ - me._onPickTable(numCols, numRows); - } - }), - 'editor':me.editor - }); - this.initSplitButton(); - }, - _onPickTable: function (numCols, numRows){ - if (this.fireEvent('picktable', numCols, numRows) !== false) { - this.popup.hide(); - } - } - }; - utils.inherits(TableButton, SplitButton); - -})(); - - -// ui/autotypesetpicker.js -///import core -///import uicore -(function () { - var utils = baidu.editor.utils, - UIBase = baidu.editor.ui.UIBase; - - var AutoTypeSetPicker = baidu.editor.ui.AutoTypeSetPicker = function (options) { - this.initOptions(options); - this.initAutoTypeSetPicker(); - }; - AutoTypeSetPicker.prototype = { - initAutoTypeSetPicker:function () { - this.initUIBase(); - }, - getHtmlTpl:function () { - var me = this.editor, - opt = me.options.autotypeset, - lang = me.getLang("autoTypeSet"); - - var textAlignInputName = 'textAlignValue' + me.uid, - imageBlockInputName = 'imageBlockLineValue' + me.uid, - symbolConverInputName = 'symbolConverValue' + me.uid; - - return '
    ' + - '
    ' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '
    ' + lang.mergeLine + '' + lang.delLine + '
    ' + lang.removeFormat + '' + lang.indent + '
    ' + lang.alignment + '' + - '' + me.getLang("justifyleft") + - '' + me.getLang("justifycenter") + - '' + me.getLang("justifyright") + - '
    ' + lang.imageFloat + '' + - '' + me.getLang("default") + - '' + me.getLang("justifyleft") + - '' + me.getLang("justifycenter") + - '' + me.getLang("justifyright") + - '
    ' + lang.removeFontsize + '' + lang.removeFontFamily + '
    ' + lang.removeHtml + '
    ' + lang.pasteFilter + '
    ' + lang.symbol + '' + - '' + lang.bdc2sb + - '' + lang.tobdc + '' + - '
    ' + - '
    ' + - '
    '; - - - }, - _UIBase_render:UIBase.prototype.render - }; - utils.inherits(AutoTypeSetPicker, UIBase); -})(); - - -// ui/autotypesetbutton.js -///import core -///import uicore -///import ui/popup.js -///import ui/autotypesetpicker.js -///import ui/splitbutton.js -(function (){ - var utils = baidu.editor.utils, - Popup = baidu.editor.ui.Popup, - AutoTypeSetPicker = baidu.editor.ui.AutoTypeSetPicker, - SplitButton = baidu.editor.ui.SplitButton, - AutoTypeSetButton = baidu.editor.ui.AutoTypeSetButton = function (options){ - this.initOptions(options); - this.initAutoTypeSetButton(); - }; - function getPara(me){ - - var opt = {}, - cont = me.getDom(), - editorId = me.editor.uid, - inputType = null, - attrName = null, - ipts = domUtils.getElementsByTagName(cont,"input"); - for(var i=ipts.length-1,ipt;ipt=ipts[i--];){ - inputType = ipt.getAttribute("type"); - if(inputType=="checkbox"){ - attrName = ipt.getAttribute("name"); - opt[attrName] && delete opt[attrName]; - if(ipt.checked){ - var attrValue = document.getElementById( attrName + "Value" + editorId ); - if(attrValue){ - if(/input/ig.test(attrValue.tagName)){ - opt[attrName] = attrValue.value; - } else { - var iptChilds = attrValue.getElementsByTagName("input"); - for(var j=iptChilds.length-1,iptchild;iptchild=iptChilds[j--];){ - if(iptchild.checked){ - opt[attrName] = iptchild.value; - break; - } - } - } - } else { - opt[attrName] = true; - } - } else { - opt[attrName] = false; - } - } else { - opt[ipt.getAttribute("value")] = ipt.checked; - } - - } - - var selects = domUtils.getElementsByTagName(cont,"select"); - for(var i=0,si;si=selects[i++];){ - var attr = si.getAttribute('name'); - opt[attr] = opt[attr] ? si.value : ''; - } - - utils.extend(me.editor.options.autotypeset,opt); - - me.editor.setPreferences('autotypeset', opt); - } - - AutoTypeSetButton.prototype = { - initAutoTypeSetButton: function (){ - - var me = this; - this.popup = new Popup({ - //传入配置参数 - content: new AutoTypeSetPicker({editor:me.editor}), - 'editor':me.editor, - hide : function(){ - if (!this._hidden && this.getDom()) { - getPara(this); - this.getDom().style.display = 'none'; - this._hidden = true; - this.fireEvent('hide'); - } - } - }); - var flag = 0; - this.popup.addListener('postRenderAfter',function(){ - var popupUI = this; - if(flag)return; - var cont = this.getDom(), - btn = cont.getElementsByTagName('button')[0]; - - btn.onclick = function(){ - getPara(popupUI); - me.editor.execCommand('autotypeset'); - popupUI.hide() - }; - - domUtils.on(cont, 'click', function(e) { - var target = e.target || e.srcElement, - editorId = me.editor.uid; - if (target && target.tagName == 'INPUT') { - - // 点击图片浮动的checkbox,去除对应的radio - if (target.name == 'imageBlockLine' || target.name == 'textAlign' || target.name == 'symbolConver') { - var checked = target.checked, - radioTd = document.getElementById( target.name + 'Value' + editorId), - radios = radioTd.getElementsByTagName('input'), - defalutSelect = { - 'imageBlockLine': 'none', - 'textAlign': 'left', - 'symbolConver': 'tobdc' - }; - - for (var i = 0; i < radios.length; i++) { - if (checked) { - if (radios[i].value == defalutSelect[target.name]) { - radios[i].checked = 'checked'; - } - } else { - radios[i].checked = false; - } - } - } - // 点击radio,选中对应的checkbox - if (target.name == ('imageBlockLineValue' + editorId) || target.name == ('textAlignValue' + editorId) || target.name == 'bdc') { - var checkboxs = target.parentNode.previousSibling.getElementsByTagName('input'); - checkboxs && (checkboxs[0].checked = true); - } - - getPara(popupUI); - } - }); - - flag = 1; - }); - this.initSplitButton(); - } - }; - utils.inherits(AutoTypeSetButton, SplitButton); - -})(); - - -// ui/cellalignpicker.js -///import core -///import uicore -(function () { - var utils = baidu.editor.utils, - Popup = baidu.editor.ui.Popup, - Stateful = baidu.editor.ui.Stateful, - UIBase = baidu.editor.ui.UIBase; - - /** - * 该参数将新增一个参数: selected, 参数类型为一个Object, 形如{ 'align': 'center', 'valign': 'top' }, 表示单元格的初始 - * 对齐状态为: 竖直居上,水平居中; 其中 align的取值为:'center', 'left', 'right'; valign的取值为: 'top', 'middle', 'bottom' - * @update 2013/4/2 hancong03@baidu.com - */ - var CellAlignPicker = baidu.editor.ui.CellAlignPicker = function (options) { - this.initOptions(options); - this.initSelected(); - this.initCellAlignPicker(); - }; - CellAlignPicker.prototype = { - //初始化选中状态, 该方法将根据传递进来的参数获取到应该选中的对齐方式图标的索引 - initSelected: function(){ - - var status = { - - valign: { - top: 0, - middle: 1, - bottom: 2 - }, - align: { - left: 0, - center: 1, - right: 2 - }, - count: 3 - - }, - result = -1; - - if( this.selected ) { - this.selectedIndex = status.valign[ this.selected.valign ] * status.count + status.align[ this.selected.align ]; - } - - }, - initCellAlignPicker:function () { - this.initUIBase(); - this.Stateful_init(); - }, - getHtmlTpl:function () { - - var alignType = [ 'left', 'center', 'right' ], - COUNT = 9, - tempClassName = null, - tempIndex = -1, - tmpl = []; - - - for( var i= 0; i'); - - tmpl.push( '
    ' ); - - tempIndex === 2 && tmpl.push(''); - - } - - return '
    ' + - '
    ' + - '' + - tmpl.join('') + - '
    ' + - '
    ' + - '
    '; - }, - getStateDom: function (){ - return this.target; - }, - _onClick: function (evt){ - var target= evt.target || evt.srcElement; - if(/icon/.test(target.className)){ - this.items[target.parentNode.getAttribute("index")].onclick(); - Popup.postHide(evt); - } - }, - _UIBase_render:UIBase.prototype.render - }; - utils.inherits(CellAlignPicker, UIBase); - utils.extend(CellAlignPicker.prototype, Stateful,true); -})(); - - - - - -// ui/pastepicker.js -///import core -///import uicore -(function () { - var utils = baidu.editor.utils, - Stateful = baidu.editor.ui.Stateful, - uiUtils = baidu.editor.ui.uiUtils, - UIBase = baidu.editor.ui.UIBase; - - var PastePicker = baidu.editor.ui.PastePicker = function (options) { - this.initOptions(options); - this.initPastePicker(); - }; - PastePicker.prototype = { - initPastePicker:function () { - this.initUIBase(); - this.Stateful_init(); - }, - getHtmlTpl:function () { - return '
    ' + - '
    ' + - '
    ' + this.editor.getLang("pasteOpt") + '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' - }, - getStateDom:function () { - return this.target; - }, - format:function (param) { - this.editor.ui._isTransfer = true; - this.editor.fireEvent('pasteTransfer', param); - }, - _onClick:function (cur) { - var node = domUtils.getNextDomNode(cur), - screenHt = uiUtils.getViewportRect().height, - subPop = uiUtils.getClientRect(node); - - if ((subPop.top + subPop.height) > screenHt) - node.style.top = (-subPop.height - cur.offsetHeight) + "px"; - else - node.style.top = ""; - - if (/hidden/ig.test(domUtils.getComputedStyle(node, "visibility"))) { - node.style.visibility = "visible"; - domUtils.addClass(cur, "edui-state-opened"); - } else { - node.style.visibility = "hidden"; - domUtils.removeClasses(cur, "edui-state-opened") - } - }, - _UIBase_render:UIBase.prototype.render - }; - utils.inherits(PastePicker, UIBase); - utils.extend(PastePicker.prototype, Stateful, true); -})(); - - - - - - -// ui/toolbar.js -(function (){ - var utils = baidu.editor.utils, - uiUtils = baidu.editor.ui.uiUtils, - UIBase = baidu.editor.ui.UIBase, - Toolbar = baidu.editor.ui.Toolbar = function (options){ - this.initOptions(options); - this.initToolbar(); - }; - Toolbar.prototype = { - items: null, - initToolbar: function (){ - this.items = this.items || []; - this.initUIBase(); - }, - add: function (item,index){ - if(index === undefined){ - this.items.push(item); - }else{ - this.items.splice(index,0,item) - } - - }, - getHtmlTpl: function (){ - var buff = []; - for (var i=0; i' + - buff.join('') + - '
    ' - }, - postRender: function (){ - var box = this.getDom(); - for (var i=0; i
    '; - }, - postRender:function () { - }, - queryAutoHide:function () { - return true; - } - }; - Menu.prototype = { - items:null, - uiName:'menu', - initMenu:function () { - this.items = this.items || []; - this.initPopup(); - this.initItems(); - }, - initItems:function () { - for (var i = 0; i < this.items.length; i++) { - var item = this.items[i]; - if (item == '-') { - this.items[i] = this.getSeparator(); - } else if (!(item instanceof MenuItem)) { - item.editor = this.editor; - item.theme = this.editor.options.theme; - this.items[i] = this.createItem(item); - } - } - }, - getSeparator:function () { - return menuSeparator; - }, - createItem:function (item) { - //新增一个参数menu, 该参数存储了menuItem所对应的menu引用 - item.menu = this; - return new MenuItem(item); - }, - _Popup_getContentHtmlTpl:Popup.prototype.getContentHtmlTpl, - getContentHtmlTpl:function () { - if (this.items.length == 0) { - return this._Popup_getContentHtmlTpl(); - } - var buff = []; - for (var i = 0; i < this.items.length; i++) { - var item = this.items[i]; - buff[i] = item.renderHtml(); - } - return ('
    ' + buff.join('') + '
    '); - }, - _Popup_postRender:Popup.prototype.postRender, - postRender:function () { - var me = this; - for (var i = 0; i < this.items.length; i++) { - var item = this.items[i]; - item.ownerMenu = this; - item.postRender(); - } - domUtils.on(this.getDom(), 'mouseover', function (evt) { - evt = evt || event; - var rel = evt.relatedTarget || evt.fromElement; - var el = me.getDom(); - if (!uiUtils.contains(el, rel) && el !== rel) { - me.fireEvent('over'); - } - }); - this._Popup_postRender(); - }, - queryAutoHide:function (el) { - if (el) { - if (uiUtils.contains(this.getDom(), el)) { - return false; - } - for (var i = 0; i < this.items.length; i++) { - var item = this.items[i]; - if (item.queryAutoHide(el) === false) { - return false; - } - } - } - }, - clearItems:function () { - for (var i = 0; i < this.items.length; i++) { - var item = this.items[i]; - clearTimeout(item._showingTimer); - clearTimeout(item._closingTimer); - if (item.subMenu) { - item.subMenu.destroy(); - } - } - this.items = []; - }, - destroy:function () { - if (this.getDom()) { - domUtils.remove(this.getDom()); - } - this.clearItems(); - }, - dispose:function () { - this.destroy(); - } - }; - utils.inherits(Menu, Popup); - - /** - * @update 2013/04/03 hancong03 新增一个参数menu, 该参数存储了menuItem所对应的menu引用 - * @type {Function} - */ - var MenuItem = baidu.editor.ui.MenuItem = function (options) { - this.initOptions(options); - this.initUIBase(); - this.Stateful_init(); - if (this.subMenu && !(this.subMenu instanceof Menu)) { - if (options.className && options.className.indexOf("aligntd") != -1) { - var me = this; - - //获取单元格对齐初始状态 - this.subMenu.selected = this.editor.queryCommandValue( 'cellalignment' ); - - this.subMenu = new Popup({ - content:new CellAlignPicker(this.subMenu), - parentMenu:me, - editor:me.editor, - destroy:function () { - if (this.getDom()) { - domUtils.remove(this.getDom()); - } - } - }); - this.subMenu.addListener("postRenderAfter", function () { - domUtils.on(this.getDom(), "mouseover", function () { - me.addState('opened'); - }); - }); - } else { - this.subMenu = new Menu(this.subMenu); - } - } - }; - MenuItem.prototype = { - label:'', - subMenu:null, - ownerMenu:null, - uiName:'menuitem', - alwalysHoverable:true, - getHtmlTpl:function () { - return '
    ' + - '
    ' + - this.renderLabelHtml() + - '
    ' + - '
    '; - }, - postRender:function () { - var me = this; - this.addListener('over', function () { - me.ownerMenu.fireEvent('submenuover', me); - if (me.subMenu) { - me.delayShowSubMenu(); - } - }); - if (this.subMenu) { - this.getDom().className += ' edui-hassubmenu'; - this.subMenu.render(); - this.addListener('out', function () { - me.delayHideSubMenu(); - }); - this.subMenu.addListener('over', function () { - clearTimeout(me._closingTimer); - me._closingTimer = null; - me.addState('opened'); - }); - this.ownerMenu.addListener('hide', function () { - me.hideSubMenu(); - }); - this.ownerMenu.addListener('submenuover', function (t, subMenu) { - if (subMenu !== me) { - me.delayHideSubMenu(); - } - }); - this.subMenu._bakQueryAutoHide = this.subMenu.queryAutoHide; - this.subMenu.queryAutoHide = function (el) { - if (el && uiUtils.contains(me.getDom(), el)) { - return false; - } - return this._bakQueryAutoHide(el); - }; - } - this.getDom().style.tabIndex = '-1'; - uiUtils.makeUnselectable(this.getDom()); - this.Stateful_postRender(); - }, - delayShowSubMenu:function () { - var me = this; - if (!me.isDisabled()) { - me.addState('opened'); - clearTimeout(me._showingTimer); - clearTimeout(me._closingTimer); - me._closingTimer = null; - me._showingTimer = setTimeout(function () { - me.showSubMenu(); - }, 250); - } - }, - delayHideSubMenu:function () { - var me = this; - if (!me.isDisabled()) { - me.removeState('opened'); - clearTimeout(me._showingTimer); - if (!me._closingTimer) { - me._closingTimer = setTimeout(function () { - if (!me.hasState('opened')) { - me.hideSubMenu(); - } - me._closingTimer = null; - }, 400); - } - } - }, - renderLabelHtml:function () { - return '
    ' + - '
    ' + - '
    ' + (this.label || '') + '
    '; - }, - getStateDom:function () { - return this.getDom(); - }, - queryAutoHide:function (el) { - if (this.subMenu && this.hasState('opened')) { - return this.subMenu.queryAutoHide(el); - } - }, - _onClick:function (event, this_) { - if (this.hasState('disabled')) return; - if (this.fireEvent('click', event, this_) !== false) { - if (this.subMenu) { - this.showSubMenu(); - } else { - Popup.postHide(event); - } - } - }, - showSubMenu:function () { - var rect = uiUtils.getClientRect(this.getDom()); - rect.right -= 5; - rect.left += 2; - rect.width -= 7; - rect.top -= 4; - rect.bottom += 4; - rect.height += 8; - this.subMenu.showAnchorRect(rect, true, true); - }, - hideSubMenu:function () { - this.subMenu.hide(); - } - }; - utils.inherits(MenuItem, UIBase); - utils.extend(MenuItem.prototype, Stateful, true); -})(); - - -// ui/combox.js -///import core -///import uicore -///import ui/menu.js -///import ui/splitbutton.js -(function (){ - // todo: menu和item提成通用list - var utils = baidu.editor.utils, - uiUtils = baidu.editor.ui.uiUtils, - Menu = baidu.editor.ui.Menu, - SplitButton = baidu.editor.ui.SplitButton, - Combox = baidu.editor.ui.Combox = function (options){ - this.initOptions(options); - this.initCombox(); - }; - Combox.prototype = { - uiName: 'combox', - onbuttonclick:function () { - this.showPopup(); - }, - initCombox: function (){ - var me = this; - this.items = this.items || []; - for (var i=0; i vpRect.right) { - left = vpRect.right - rect.width; - } - var top = offset.top; - if (top + rect.height > vpRect.bottom) { - top = vpRect.bottom - rect.height; - } - el.style.left = Math.max(left, 0) + 'px'; - el.style.top = Math.max(top, 0) + 'px'; - }, - showAtCenter: function (){ - - var vpRect = uiUtils.getViewportRect(); - - if ( !this.fullscreen ) { - this.getDom().style.display = ''; - var popSize = this.fitSize(); - var titleHeight = this.getDom('titlebar').offsetHeight | 0; - var left = vpRect.width / 2 - popSize.width / 2; - var top = vpRect.height / 2 - (popSize.height - titleHeight) / 2 - titleHeight; - var popEl = this.getDom(); - this.safeSetOffset({ - left: Math.max(left | 0, 0), - top: Math.max(top | 0, 0) - }); - if (!domUtils.hasClass(popEl, 'edui-state-centered')) { - popEl.className += ' edui-state-centered'; - } - } else { - var dialogWrapNode = this.getDom(), - contentNode = this.getDom('content'); - - dialogWrapNode.style.display = "block"; - - var wrapRect = UE.ui.uiUtils.getClientRect( dialogWrapNode ), - contentRect = UE.ui.uiUtils.getClientRect( contentNode ); - dialogWrapNode.style.left = "-100000px"; - - contentNode.style.width = ( vpRect.width - wrapRect.width + contentRect.width ) + "px"; - contentNode.style.height = ( vpRect.height - wrapRect.height + contentRect.height ) + "px"; - - dialogWrapNode.style.width = vpRect.width + "px"; - dialogWrapNode.style.height = vpRect.height + "px"; - dialogWrapNode.style.left = 0; - - //保存环境的overflow值 - this._originalContext = { - html: { - overflowX: document.documentElement.style.overflowX, - overflowY: document.documentElement.style.overflowY - }, - body: { - overflowX: document.body.style.overflowX, - overflowY: document.body.style.overflowY - } - }; - - document.documentElement.style.overflowX = 'hidden'; - document.documentElement.style.overflowY = 'hidden'; - document.body.style.overflowX = 'hidden'; - document.body.style.overflowY = 'hidden'; - - } - - this._show(); - }, - getContentHtml: function (){ - var contentHtml = ''; - if (typeof this.content == 'string') { - contentHtml = this.content; - } else if (this.iframeUrl) { - contentHtml = ''; - } - return contentHtml; - }, - getHtmlTpl: function (){ - var footHtml = ''; - - if (this.buttons) { - var buff = []; - for (var i=0; i' + buff.join('') + '
    ' + - '
    '; - } - - return '
    ' + - '
    ' + - '
    ' + - '
    ' + - '' + (this.title || '') + '' + - '
    ' + - this.closeButton.renderHtml() + - '
    ' + - '
    '+ ( this.autoReset ? '' : this.getContentHtml()) +'
    ' + - footHtml + - '
    '; - }, - postRender: function (){ - // todo: 保持居中/记住上次关闭位置选项 - if (!this.modalMask.getDom()) { - this.modalMask.render(); - this.modalMask.hide(); - } - if (!this.dragMask.getDom()) { - this.dragMask.render(); - this.dragMask.hide(); - } - var me = this; - this.addListener('show', function (){ - me.modalMask.show(this.getDom().style.zIndex - 2); - }); - this.addListener('hide', function (){ - me.modalMask.hide(); - }); - if (this.buttons) { - for (var i=0; i'; - me.editor.container.style.zIndex && (this.getDom().style.zIndex = me.editor.container.style.zIndex * 1 + 1); - } - } - // canSideUp:false, - // canSideLeft:false - }); - this.onbuttonclick = function(){ - this.showPopup(); - }; - this.initSplitButton(); - } - - }; - - utils.inherits(MultiMenuPop, SplitButton); -})(); - - -// ui/shortcutmenu.js -(function () { - var UI = baidu.editor.ui, - UIBase = UI.UIBase, - uiUtils = UI.uiUtils, - utils = baidu.editor.utils, - domUtils = baidu.editor.dom.domUtils; - - var allMenus = [],//存储所有快捷菜单 - timeID, - isSubMenuShow = false;//是否有子pop显示 - - var ShortCutMenu = UI.ShortCutMenu = function (options) { - this.initOptions (options); - this.initShortCutMenu (); - }; - - ShortCutMenu.postHide = hideAllMenu; - - ShortCutMenu.prototype = { - isHidden : true , - SPACE : 5 , - initShortCutMenu : function () { - this.items = this.items || []; - this.initUIBase (); - this.initItems (); - this.initEvent (); - allMenus.push (this); - } , - initEvent : function () { - var me = this, - doc = me.editor.document; - - domUtils.on (doc , "mousemove" , function (e) { - if (me.isHidden === false) { - //有pop显示就不隐藏快捷菜单 - if (me.getSubMenuMark () || me.eventType == "contextmenu") return; - - - var flag = true, - el = me.getDom (), - wt = el.offsetWidth, - ht = el.offsetHeight, - distanceX = wt / 2 + me.SPACE,//距离中心X标准 - distanceY = ht / 2,//距离中心Y标准 - x = Math.abs (e.screenX - me.left),//离中心距离横坐标 - y = Math.abs (e.screenY - me.top);//离中心距离纵坐标 - - clearTimeout (timeID); - timeID = setTimeout (function () { - if (y > 0 && y < distanceY) { - me.setOpacity (el , "1"); - } else if (y > distanceY && y < distanceY + 70) { - me.setOpacity (el , "0.5"); - flag = false; - } else if (y > distanceY + 70 && y < distanceY + 140) { - me.hide (); - } - - if (flag && x > 0 && x < distanceX) { - me.setOpacity (el , "1") - } else if (x > distanceX && x < distanceX + 70) { - me.setOpacity (el , "0.5") - } else if (x > distanceX + 70 && x < distanceX + 140) { - me.hide (); - } - }); - } - }); - - //ie\ff下 mouseout不准 - if (browser.chrome) { - domUtils.on (doc , "mouseout" , function (e) { - var relatedTgt = e.relatedTarget || e.toElement; - - if (relatedTgt == null || relatedTgt.tagName == "HTML") { - me.hide (); - } - }); - } - - me.editor.addListener ("afterhidepop" , function () { - if (!me.isHidden) { - isSubMenuShow = true; - } - }); - - } , - initItems : function () { - if (utils.isArray (this.items)) { - for (var i = 0, len = this.items.length ; i < len ; i++) { - var item = this.items[i].toLowerCase (); - - if (UI[item]) { - this.items[i] = new UI[item] (this.editor); - this.items[i].className += " edui-shortcutsubmenu "; - } - } - } - } , - setOpacity : function (el , value) { - if (browser.ie && browser.version < 9) { - el.style.filter = "alpha(opacity = " + parseFloat (value) * 100 + ");" - } else { - el.style.opacity = value; - } - } , - getSubMenuMark : function () { - isSubMenuShow = false; - var layerEle = uiUtils.getFixedLayer (); - var list = domUtils.getElementsByTagName (layerEle , "div" , function (node) { - return domUtils.hasClass (node , "edui-shortcutsubmenu edui-popup") - }); - - for (var i = 0, node ; node = list[i++] ;) { - if (node.style.display != "none") { - isSubMenuShow = true; - } - } - return isSubMenuShow; - } , - show : function (e , hasContextmenu) { - var me = this, - offset = {}, - el = this.getDom (), - fixedlayer = uiUtils.getFixedLayer (); - - function setPos (offset) { - if (offset.left < 0) { - offset.left = 0; - } - if (offset.top < 0) { - offset.top = 0; - } - el.style.cssText = "position:absolute;left:" + offset.left + "px;top:" + offset.top + "px;"; - } - - function setPosByCxtMenu (menu) { - if (!menu.tagName) { - menu = menu.getDom (); - } - offset.left = parseInt (menu.style.left); - offset.top = parseInt (menu.style.top); - offset.top -= el.offsetHeight + 15; - setPos (offset); - } - - - me.eventType = e.type; - el.style.cssText = "display:block;left:-9999px"; - - if (e.type == "contextmenu" && hasContextmenu) { - var menu = domUtils.getElementsByTagName (fixedlayer , "div" , "edui-contextmenu")[0]; - if (menu) { - setPosByCxtMenu (menu) - } else { - me.editor.addListener ("aftershowcontextmenu" , function (type , menu) { - setPosByCxtMenu (menu); - }); - } - } else { - offset = uiUtils.getViewportOffsetByEvent (e); - offset.top -= el.offsetHeight + me.SPACE; - offset.left += me.SPACE + 20; - setPos (offset); - me.setOpacity (el , 0.2); - } - - - me.isHidden = false; - me.left = e.screenX + el.offsetWidth / 2 - me.SPACE; - me.top = e.screenY - (el.offsetHeight / 2) - me.SPACE; - - if (me.editor) { - el.style.zIndex = me.editor.container.style.zIndex * 1 + 10; - fixedlayer.style.zIndex = el.style.zIndex - 1; - } - } , - hide : function () { - if (this.getDom ()) { - this.getDom ().style.display = "none"; - } - this.isHidden = true; - } , - postRender : function () { - if (utils.isArray (this.items)) { - for (var i = 0, item ; item = this.items[i++] ;) { - item.postRender (); - } - } - } , - getHtmlTpl : function () { - var buff; - if (utils.isArray (this.items)) { - buff = []; - for (var i = 0 ; i < this.items.length ; i++) { - buff[i] = this.items[i].renderHtml (); - } - buff = buff.join (""); - } else { - buff = this.items; - } - - return '
    ' + - buff + - '
    '; - } - }; - - utils.inherits (ShortCutMenu , UIBase); - - function hideAllMenu (e) { - var tgt = e.target || e.srcElement, - cur = domUtils.findParent (tgt , function (node) { - return domUtils.hasClass (node , "edui-shortcutmenu") || domUtils.hasClass (node , "edui-popup"); - } , true); - - if (!cur) { - for (var i = 0, menu ; menu = allMenus[i++] ;) { - menu.hide () - } - } - } - - domUtils.on (document , 'mousedown' , function (e) { - hideAllMenu (e); - }); - - domUtils.on (window , 'scroll' , function (e) { - hideAllMenu (e); - }); - -}) (); - - -// ui/breakline.js -(function (){ - var utils = baidu.editor.utils, - UIBase = baidu.editor.ui.UIBase, - Breakline = baidu.editor.ui.Breakline = function (options){ - this.initOptions(options); - this.initSeparator(); - }; - Breakline.prototype = { - uiName: 'Breakline', - initSeparator: function (){ - this.initUIBase(); - }, - getHtmlTpl: function (){ - return '
    '; - } - }; - utils.inherits(Breakline, UIBase); - -})(); - - -// ui/message.js -///import core -///import uicore -(function () { - var utils = baidu.editor.utils, - domUtils = baidu.editor.dom.domUtils, - UIBase = baidu.editor.ui.UIBase, - Message = baidu.editor.ui.Message = function (options){ - this.initOptions(options); - this.initMessage(); - }; - - Message.prototype = { - initMessage: function (){ - this.initUIBase(); - }, - getHtmlTpl: function (){ - return '
    ' + - '
    ×
    ' + - '
    ' + - ' ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    '; - }, - reset: function(opt){ - var me = this; - if (!opt.keepshow) { - clearTimeout(this.timer); - me.timer = setTimeout(function(){ - me.hide(); - }, opt.timeout || 4000); - } - - opt.content !== undefined && me.setContent(opt.content); - opt.type !== undefined && me.setType(opt.type); - - me.show(); - }, - postRender: function(){ - var me = this, - closer = this.getDom('closer'); - closer && domUtils.on(closer, 'click', function(){ - me.hide(); - }); - }, - setContent: function(content){ - this.getDom('content').innerHTML = content; - }, - setType: function(type){ - type = type || 'info'; - var body = this.getDom('body'); - body.className = body.className.replace(/edui-message-type-[\w-]+/, 'edui-message-type-' + type); - }, - getContent: function(){ - return this.getDom('content').innerHTML; - }, - getType: function(){ - var arr = this.getDom('body').match(/edui-message-type-([\w-]+)/); - return arr ? arr[1]:''; - }, - show: function (){ - this.getDom().style.display = 'block'; - }, - hide: function (){ - var dom = this.getDom(); - if (dom) { - dom.style.display = 'none'; - dom.parentNode && dom.parentNode.removeChild(dom); - } - } - }; - - utils.inherits(Message, UIBase); - -})(); - - -// adapter/editorui.js -//ui跟编辑器的适配層 -//那个按钮弹出是dialog,是下拉筐等都是在这个js中配置 -//自己写的ui也要在这里配置,放到baidu.editor.ui下边,当编辑器实例化的时候会根据ueditor.config中的toolbars找到相应的进行实例化 -(function () { - var utils = baidu.editor.utils; - var editorui = baidu.editor.ui; - var _Dialog = editorui.Dialog; - editorui.buttons = {}; - - editorui.Dialog = function (options) { - var dialog = new _Dialog(options); - dialog.addListener('hide', function () { - - if (dialog.editor) { - var editor = dialog.editor; - try { - if (browser.gecko) { - var y = editor.window.scrollY, - x = editor.window.scrollX; - editor.body.focus(); - editor.window.scrollTo(x, y); - } else { - editor.focus(); - } - - - } catch (ex) { - } - } - }); - return dialog; - }; - - var iframeUrlMap = { - 'anchor':'~/dialogs/anchor/anchor.html', - 'insertimage':'~/dialogs/image/image.html', - 'link':'~/dialogs/link/link.html', - 'spechars':'~/dialogs/spechars/spechars.html', - 'searchreplace':'~/dialogs/searchreplace/searchreplace.html', - 'map':'~/dialogs/map/map.html', - 'gmap':'~/dialogs/gmap/gmap.html', - 'insertvideo':'~/dialogs/video/video.html', - 'help':'~/dialogs/help/help.html', - 'preview':'~/dialogs/preview/preview.html', - 'emotion':'~/dialogs/emotion/emotion.html', - 'wordimage':'~/dialogs/wordimage/wordimage.html', - 'attachment':'~/dialogs/attachment/attachment.html', - 'insertframe':'~/dialogs/insertframe/insertframe.html', - 'edittip':'~/dialogs/table/edittip.html', - 'edittable':'~/dialogs/table/edittable.html', - 'edittd':'~/dialogs/table/edittd.html', - 'webapp':'~/dialogs/webapp/webapp.html', - 'snapscreen':'~/dialogs/snapscreen/snapscreen.html', - 'scrawl':'~/dialogs/scrawl/scrawl.html', - 'music':'~/dialogs/music/music.html', - 'template':'~/dialogs/template/template.html', - 'background':'~/dialogs/background/background.html', - 'charts': '~/dialogs/charts/charts.html' - }; - //为工具栏添加按钮,以下都是统一的按钮触发命令,所以写在一起 - var btnCmds = ['undo', 'redo', 'formatmatch', - 'bold', 'italic', 'underline', 'fontborder', 'touppercase', 'tolowercase', - 'strikethrough', 'subscript', 'superscript', 'source', 'indent', 'outdent', - 'blockquote', 'pasteplain', 'pagebreak', - 'selectall', 'print','horizontal', 'removeformat', 'time', 'date', 'unlink', - 'insertparagraphbeforetable', 'insertrow', 'insertcol', 'mergeright', 'mergedown', 'deleterow', - 'deletecol', 'splittorows', 'splittocols', 'splittocells', 'mergecells', 'deletetable', 'drafts']; - - for (var i = 0, ci; ci = btnCmds[i++];) { - ci = ci.toLowerCase(); - editorui[ci] = function (cmd) { - return function (editor) { - var ui = new editorui.Button({ - className:'edui-for-' + cmd, - title:editor.options.labelMap[cmd] || editor.getLang("labelMap." + cmd) || '', - onclick:function () { - editor.execCommand(cmd); - }, - theme:editor.options.theme, - showText:false - }); - editorui.buttons[cmd] = ui; - editor.addListener('selectionchange', function (type, causeByUi, uiReady) { - var state = editor.queryCommandState(cmd); - if (state == -1) { - ui.setDisabled(true); - ui.setChecked(false); - } else { - if (!uiReady) { - ui.setDisabled(false); - ui.setChecked(state); - } - } - }); - return ui; - }; - }(ci); - } - - //清除文档 - editorui.cleardoc = function (editor) { - var ui = new editorui.Button({ - className:'edui-for-cleardoc', - title:editor.options.labelMap.cleardoc || editor.getLang("labelMap.cleardoc") || '', - theme:editor.options.theme, - onclick:function () { - if (confirm(editor.getLang("confirmClear"))) { - editor.execCommand('cleardoc'); - } - } - }); - editorui.buttons["cleardoc"] = ui; - editor.addListener('selectionchange', function () { - ui.setDisabled(editor.queryCommandState('cleardoc') == -1); - }); - return ui; - }; - - //排版,图片排版,文字方向 - var typeset = { - 'justify':['left', 'right', 'center', 'justify'], - 'imagefloat':['none', 'left', 'center', 'right'], - 'directionality':['ltr', 'rtl'] - }; - - for (var p in typeset) { - - (function (cmd, val) { - for (var i = 0, ci; ci = val[i++];) { - (function (cmd2) { - editorui[cmd.replace('float', '') + cmd2] = function (editor) { - var ui = new editorui.Button({ - className:'edui-for-' + cmd.replace('float', '') + cmd2, - title:editor.options.labelMap[cmd.replace('float', '') + cmd2] || editor.getLang("labelMap." + cmd.replace('float', '') + cmd2) || '', - theme:editor.options.theme, - onclick:function () { - editor.execCommand(cmd, cmd2); - } - }); - editorui.buttons[cmd] = ui; - editor.addListener('selectionchange', function (type, causeByUi, uiReady) { - ui.setDisabled(editor.queryCommandState(cmd) == -1); - ui.setChecked(editor.queryCommandValue(cmd) == cmd2 && !uiReady); - }); - return ui; - }; - })(ci) - } - })(p, typeset[p]) - } - - //字体颜色和背景颜色 - for (var i = 0, ci; ci = ['backcolor', 'forecolor'][i++];) { - editorui[ci] = function (cmd) { - return function (editor) { - var ui = new editorui.ColorButton({ - className:'edui-for-' + cmd, - color:'default', - title:editor.options.labelMap[cmd] || editor.getLang("labelMap." + cmd) || '', - editor:editor, - onpickcolor:function (t, color) { - editor.execCommand(cmd, color); - }, - onpicknocolor:function () { - editor.execCommand(cmd, 'default'); - this.setColor('transparent'); - this.color = 'default'; - }, - onbuttonclick:function () { - editor.execCommand(cmd, this.color); - } - }); - editorui.buttons[cmd] = ui; - editor.addListener('selectionchange', function () { - ui.setDisabled(editor.queryCommandState(cmd) == -1); - }); - return ui; - }; - }(ci); - } - - - var dialogBtns = { - noOk:['searchreplace', 'help', 'spechars', 'webapp','preview'], - ok:['attachment', 'anchor', 'link', 'insertimage', 'map', 'gmap', 'insertframe', 'wordimage', - 'insertvideo', 'insertframe', 'edittip', 'edittable', 'edittd', 'scrawl', 'template', 'music', 'background', 'charts'] - }; - - for (var p in dialogBtns) { - (function (type, vals) { - for (var i = 0, ci; ci = vals[i++];) { - //todo opera下存在问题 - if (browser.opera && ci === "searchreplace") { - continue; - } - (function (cmd) { - editorui[cmd] = function (editor, iframeUrl, title) { - iframeUrl = iframeUrl || (editor.options.iframeUrlMap || {})[cmd] || iframeUrlMap[cmd]; - title = editor.options.labelMap[cmd] || editor.getLang("labelMap." + cmd) || ''; - - var dialog; - //没有iframeUrl不创建dialog - if (iframeUrl) { - dialog = new editorui.Dialog(utils.extend({ - iframeUrl:editor.ui.mapUrl(iframeUrl), - editor:editor, - className:'edui-for-' + cmd, - title:title, - holdScroll: cmd === 'insertimage', - fullscreen: /charts|preview/.test(cmd), - closeDialog:editor.getLang("closeDialog") - }, type == 'ok' ? { - buttons:[ - { - className:'edui-okbutton', - label:editor.getLang("ok"), - editor:editor, - onclick:function () { - dialog.close(true); - } - }, - { - className:'edui-cancelbutton', - label:editor.getLang("cancel"), - editor:editor, - onclick:function () { - dialog.close(false); - } - } - ] - } : {})); - - editor.ui._dialogs[cmd + "Dialog"] = dialog; - } - - var ui = new editorui.Button({ - className:'edui-for-' + cmd, - title:title, - onclick:function () { - if (dialog) { - switch (cmd) { - case "wordimage": - var images = editor.execCommand("wordimage"); - if (images && images.length) { - dialog.render(); - dialog.open(); - } - break; - case "scrawl": - if (editor.queryCommandState("scrawl") != -1) { - dialog.render(); - dialog.open(); - } - - break; - default: - dialog.render(); - dialog.open(); - } - } - }, - theme:editor.options.theme, - disabled:(cmd == 'scrawl' && editor.queryCommandState("scrawl") == -1) || ( cmd == 'charts' ) - }); - editorui.buttons[cmd] = ui; - editor.addListener('selectionchange', function () { - //只存在于右键菜单而无工具栏按钮的ui不需要检测状态 - var unNeedCheckState = {'edittable':1}; - if (cmd in unNeedCheckState)return; - - var state = editor.queryCommandState(cmd); - if (ui.getDom()) { - ui.setDisabled(state == -1); - ui.setChecked(state); - } - - }); - - return ui; - }; - })(ci.toLowerCase()) - } - })(p, dialogBtns[p]); - } - - editorui.snapscreen = function (editor, iframeUrl, title) { - title = editor.options.labelMap['snapscreen'] || editor.getLang("labelMap.snapscreen") || ''; - var ui = new editorui.Button({ - className:'edui-for-snapscreen', - title:title, - onclick:function () { - editor.execCommand("snapscreen"); - }, - theme:editor.options.theme - - }); - editorui.buttons['snapscreen'] = ui; - iframeUrl = iframeUrl || (editor.options.iframeUrlMap || {})["snapscreen"] || iframeUrlMap["snapscreen"]; - if (iframeUrl) { - var dialog = new editorui.Dialog({ - iframeUrl:editor.ui.mapUrl(iframeUrl), - editor:editor, - className:'edui-for-snapscreen', - title:title, - buttons:[ - { - className:'edui-okbutton', - label:editor.getLang("ok"), - editor:editor, - onclick:function () { - dialog.close(true); - } - }, - { - className:'edui-cancelbutton', - label:editor.getLang("cancel"), - editor:editor, - onclick:function () { - dialog.close(false); - } - } - ] - - }); - dialog.render(); - editor.ui._dialogs["snapscreenDialog"] = dialog; - } - editor.addListener('selectionchange', function () { - ui.setDisabled(editor.queryCommandState('snapscreen') == -1); - }); - return ui; - }; - - editorui.insertcode = function (editor, list, title) { - list = editor.options['insertcode'] || []; - title = editor.options.labelMap['insertcode'] || editor.getLang("labelMap.insertcode") || ''; - // if (!list.length) return; - var items = []; - utils.each(list,function(key,val){ - items.push({ - label:key, - value:val, - theme:editor.options.theme, - renderLabelHtml:function () { - return '
    ' + (this.label || '') + '
    '; - } - }); - }); - - var ui = new editorui.Combox({ - editor:editor, - items:items, - onselect:function (t, index) { - editor.execCommand('insertcode', this.items[index].value); - }, - onbuttonclick:function () { - this.showPopup(); - }, - title:title, - initValue:title, - className:'edui-for-insertcode', - indexByValue:function (value) { - if (value) { - for (var i = 0, ci; ci = this.items[i]; i++) { - if (ci.value.indexOf(value) != -1) - return i; - } - } - - return -1; - } - }); - editorui.buttons['insertcode'] = ui; - editor.addListener('selectionchange', function (type, causeByUi, uiReady) { - if (!uiReady) { - var state = editor.queryCommandState('insertcode'); - if (state == -1) { - ui.setDisabled(true); - } else { - ui.setDisabled(false); - var value = editor.queryCommandValue('insertcode'); - if(!value){ - ui.setValue(title); - return; - } - //trace:1871 ie下从源码模式切换回来时,字体会带单引号,而且会有逗号 - value && (value = value.replace(/['"]/g, '').split(',')[0]); - ui.setValue(value); - - } - } - - }); - return ui; - }; - editorui.fontfamily = function (editor, list, title) { - - list = editor.options['fontfamily'] || []; - title = editor.options.labelMap['fontfamily'] || editor.getLang("labelMap.fontfamily") || ''; - if (!list.length) return; - for (var i = 0, ci, items = []; ci = list[i]; i++) { - var langLabel = editor.getLang('fontfamily')[ci.name] || ""; - (function (key, val) { - items.push({ - label:key, - value:val, - theme:editor.options.theme, - renderLabelHtml:function () { - return '
    ' + (this.label || '') + '
    '; - } - }); - })(ci.label || langLabel, ci.val) - } - var ui = new editorui.Combox({ - editor:editor, - items:items, - onselect:function (t, index) { - editor.execCommand('FontFamily', this.items[index].value); - }, - onbuttonclick:function () { - this.showPopup(); - }, - title:title, - initValue:title, - className:'edui-for-fontfamily', - indexByValue:function (value) { - if (value) { - for (var i = 0, ci; ci = this.items[i]; i++) { - if (ci.value.indexOf(value) != -1) - return i; - } - } - - return -1; - } - }); - editorui.buttons['fontfamily'] = ui; - editor.addListener('selectionchange', function (type, causeByUi, uiReady) { - if (!uiReady) { - var state = editor.queryCommandState('FontFamily'); - if (state == -1) { - ui.setDisabled(true); - } else { - ui.setDisabled(false); - var value = editor.queryCommandValue('FontFamily'); - //trace:1871 ie下从源码模式切换回来时,字体会带单引号,而且会有逗号 - value && (value = value.replace(/['"]/g, '').split(',')[0]); - ui.setValue(value); - - } - } - - }); - return ui; - }; - - editorui.fontsize = function (editor, list, title) { - title = editor.options.labelMap['fontsize'] || editor.getLang("labelMap.fontsize") || ''; - list = list || editor.options['fontsize'] || []; - if (!list.length) return; - var items = []; - for (var i = 0; i < list.length; i++) { - var size = list[i] + 'px'; - items.push({ - label:size, - value:size, - theme:editor.options.theme, - renderLabelHtml:function () { - return '
    ' + (this.label || '') + '
    '; - } - }); - } - var ui = new editorui.Combox({ - editor:editor, - items:items, - title:title, - initValue:title, - onselect:function (t, index) { - editor.execCommand('FontSize', this.items[index].value); - }, - onbuttonclick:function () { - this.showPopup(); - }, - className:'edui-for-fontsize' - }); - editorui.buttons['fontsize'] = ui; - editor.addListener('selectionchange', function (type, causeByUi, uiReady) { - if (!uiReady) { - var state = editor.queryCommandState('FontSize'); - if (state == -1) { - ui.setDisabled(true); - } else { - ui.setDisabled(false); - ui.setValue(editor.queryCommandValue('FontSize')); - } - } - - }); - return ui; - }; - - editorui.paragraph = function (editor, list, title) { - title = editor.options.labelMap['paragraph'] || editor.getLang("labelMap.paragraph") || ''; - list = editor.options['paragraph'] || []; - if (utils.isEmptyObject(list)) return; - var items = []; - for (var i in list) { - items.push({ - value:i, - label:list[i] || editor.getLang("paragraph")[i], - theme:editor.options.theme, - renderLabelHtml:function () { - return '
    ' + (this.label || '') + '
    '; - } - }) - } - var ui = new editorui.Combox({ - editor:editor, - items:items, - title:title, - initValue:title, - className:'edui-for-paragraph', - onselect:function (t, index) { - editor.execCommand('Paragraph', this.items[index].value); - }, - onbuttonclick:function () { - this.showPopup(); - } - }); - editorui.buttons['paragraph'] = ui; - editor.addListener('selectionchange', function (type, causeByUi, uiReady) { - if (!uiReady) { - var state = editor.queryCommandState('Paragraph'); - if (state == -1) { - ui.setDisabled(true); - } else { - ui.setDisabled(false); - var value = editor.queryCommandValue('Paragraph'); - var index = ui.indexByValue(value); - if (index != -1) { - ui.setValue(value); - } else { - ui.setValue(ui.initValue); - } - } - } - - }); - return ui; - }; - - - //自定义标题 - editorui.customstyle = function (editor) { - var list = editor.options['customstyle'] || [], - title = editor.options.labelMap['customstyle'] || editor.getLang("labelMap.customstyle") || ''; - if (!list.length)return; - var langCs = editor.getLang('customstyle'); - for (var i = 0, items = [], t; t = list[i++];) { - (function (t) { - var ck = {}; - ck.label = t.label ? t.label : langCs[t.name]; - ck.style = t.style; - ck.className = t.className; - ck.tag = t.tag; - items.push({ - label:ck.label, - value:ck, - theme:editor.options.theme, - renderLabelHtml:function () { - return '
    ' + '<' + ck.tag + ' ' + (ck.className ? ' class="' + ck.className + '"' : "") - + (ck.style ? ' style="' + ck.style + '"' : "") + '>' + ck.label + "<\/" + ck.tag + ">" - + '
    '; - } - }); - })(t); - } - - var ui = new editorui.Combox({ - editor:editor, - items:items, - title:title, - initValue:title, - className:'edui-for-customstyle', - onselect:function (t, index) { - editor.execCommand('customstyle', this.items[index].value); - }, - onbuttonclick:function () { - this.showPopup(); - }, - indexByValue:function (value) { - for (var i = 0, ti; ti = this.items[i++];) { - if (ti.label == value) { - return i - 1 - } - } - return -1; - } - }); - editorui.buttons['customstyle'] = ui; - editor.addListener('selectionchange', function (type, causeByUi, uiReady) { - if (!uiReady) { - var state = editor.queryCommandState('customstyle'); - if (state == -1) { - ui.setDisabled(true); - } else { - ui.setDisabled(false); - var value = editor.queryCommandValue('customstyle'); - var index = ui.indexByValue(value); - if (index != -1) { - ui.setValue(value); - } else { - ui.setValue(ui.initValue); - } - } - } - - }); - return ui; - }; - editorui.inserttable = function (editor, iframeUrl, title) { - title = editor.options.labelMap['inserttable'] || editor.getLang("labelMap.inserttable") || ''; - var ui = new editorui.TableButton({ - editor:editor, - title:title, - className:'edui-for-inserttable', - onpicktable:function (t, numCols, numRows) { - editor.execCommand('InsertTable', {numRows:numRows, numCols:numCols, border:1}); - }, - onbuttonclick:function () { - this.showPopup(); - } - }); - editorui.buttons['inserttable'] = ui; - editor.addListener('selectionchange', function () { - ui.setDisabled(editor.queryCommandState('inserttable') == -1); - }); - return ui; - }; - - editorui.lineheight = function (editor) { - var val = editor.options.lineheight || []; - if (!val.length)return; - for (var i = 0, ci, items = []; ci = val[i++];) { - items.push({ - //todo:写死了 - label:ci, - value:ci, - theme:editor.options.theme, - onclick:function () { - editor.execCommand("lineheight", this.value); - } - }) - } - var ui = new editorui.MenuButton({ - editor:editor, - className:'edui-for-lineheight', - title:editor.options.labelMap['lineheight'] || editor.getLang("labelMap.lineheight") || '', - items:items, - onbuttonclick:function () { - var value = editor.queryCommandValue('LineHeight') || this.value; - editor.execCommand("LineHeight", value); - } - }); - editorui.buttons['lineheight'] = ui; - editor.addListener('selectionchange', function () { - var state = editor.queryCommandState('LineHeight'); - if (state == -1) { - ui.setDisabled(true); - } else { - ui.setDisabled(false); - var value = editor.queryCommandValue('LineHeight'); - value && ui.setValue((value + '').replace(/cm/, '')); - ui.setChecked(state) - } - }); - return ui; - }; - - var rowspacings = ['top', 'bottom']; - for (var r = 0, ri; ri = rowspacings[r++];) { - (function (cmd) { - editorui['rowspacing' + cmd] = function (editor) { - var val = editor.options['rowspacing' + cmd] || []; - if (!val.length) return null; - for (var i = 0, ci, items = []; ci = val[i++];) { - items.push({ - label:ci, - value:ci, - theme:editor.options.theme, - onclick:function () { - editor.execCommand("rowspacing", this.value, cmd); - } - }) - } - var ui = new editorui.MenuButton({ - editor:editor, - className:'edui-for-rowspacing' + cmd, - title:editor.options.labelMap['rowspacing' + cmd] || editor.getLang("labelMap.rowspacing" + cmd) || '', - items:items, - onbuttonclick:function () { - var value = editor.queryCommandValue('rowspacing', cmd) || this.value; - editor.execCommand("rowspacing", value, cmd); - } - }); - editorui.buttons[cmd] = ui; - editor.addListener('selectionchange', function () { - var state = editor.queryCommandState('rowspacing', cmd); - if (state == -1) { - ui.setDisabled(true); - } else { - ui.setDisabled(false); - var value = editor.queryCommandValue('rowspacing', cmd); - value && ui.setValue((value + '').replace(/%/, '')); - ui.setChecked(state) - } - }); - return ui; - } - })(ri) - } - //有序,无序列表 - var lists = ['insertorderedlist', 'insertunorderedlist']; - for (var l = 0, cl; cl = lists[l++];) { - (function (cmd) { - editorui[cmd] = function (editor) { - var vals = editor.options[cmd], - _onMenuClick = function () { - editor.execCommand(cmd, this.value); - }, items = []; - for (var i in vals) { - items.push({ - label:vals[i] || editor.getLang()[cmd][i] || "", - value:i, - theme:editor.options.theme, - onclick:_onMenuClick - }) - } - var ui = new editorui.MenuButton({ - editor:editor, - className:'edui-for-' + cmd, - title:editor.getLang("labelMap." + cmd) || '', - 'items':items, - onbuttonclick:function () { - var value = editor.queryCommandValue(cmd) || this.value; - editor.execCommand(cmd, value); - } - }); - editorui.buttons[cmd] = ui; - editor.addListener('selectionchange', function () { - var state = editor.queryCommandState(cmd); - if (state == -1) { - ui.setDisabled(true); - } else { - ui.setDisabled(false); - var value = editor.queryCommandValue(cmd); - ui.setValue(value); - ui.setChecked(state) - } - }); - return ui; - }; - })(cl) - } - - editorui.fullscreen = function (editor, title) { - title = editor.options.labelMap['fullscreen'] || editor.getLang("labelMap.fullscreen") || ''; - var ui = new editorui.Button({ - className:'edui-for-fullscreen', - title:title, - theme:editor.options.theme, - onclick:function () { - if (editor.ui) { - editor.ui.setFullScreen(!editor.ui.isFullScreen()); - } - this.setChecked(editor.ui.isFullScreen()); - } - }); - editorui.buttons['fullscreen'] = ui; - editor.addListener('selectionchange', function () { - var state = editor.queryCommandState('fullscreen'); - ui.setDisabled(state == -1); - ui.setChecked(editor.ui.isFullScreen()); - }); - return ui; - }; - - // 表情 - editorui["emotion"] = function (editor, iframeUrl) { - var cmd = "emotion"; - var ui = new editorui.MultiMenuPop({ - title:editor.options.labelMap[cmd] || editor.getLang("labelMap." + cmd + "") || '', - editor:editor, - className:'edui-for-' + cmd, - iframeUrl:editor.ui.mapUrl(iframeUrl || (editor.options.iframeUrlMap || {})[cmd] || iframeUrlMap[cmd]) - }); - editorui.buttons[cmd] = ui; - - editor.addListener('selectionchange', function () { - ui.setDisabled(editor.queryCommandState(cmd) == -1) - }); - return ui; - }; - - editorui.autotypeset = function (editor) { - var ui = new editorui.AutoTypeSetButton({ - editor:editor, - title:editor.options.labelMap['autotypeset'] || editor.getLang("labelMap.autotypeset") || '', - className:'edui-for-autotypeset', - onbuttonclick:function () { - editor.execCommand('autotypeset') - } - }); - editorui.buttons['autotypeset'] = ui; - editor.addListener('selectionchange', function () { - ui.setDisabled(editor.queryCommandState('autotypeset') == -1); - }); - return ui; - }; - - /* 简单上传插件 */ - editorui["simpleupload"] = function (editor) { - var name = 'simpleupload', - ui = new editorui.Button({ - className:'edui-for-' + name, - title:editor.options.labelMap[name] || editor.getLang("labelMap." + name) || '', - onclick:function () {}, - theme:editor.options.theme, - showText:false - }); - editorui.buttons[name] = ui; - editor.addListener('ready', function() { - var b = ui.getDom('body'), - iconSpan = b.children[0]; - editor.fireEvent('simpleuploadbtnready', iconSpan); - }); - editor.addListener('selectionchange', function (type, causeByUi, uiReady) { - var state = editor.queryCommandState(name); - if (state == -1) { - ui.setDisabled(true); - ui.setChecked(false); - } else { - if (!uiReady) { - ui.setDisabled(false); - ui.setChecked(state); - } - } - }); - return ui; - }; - -})(); - - -// adapter/editor.js -///import core -///commands 全屏 -///commandsName FullScreen -///commandsTitle 全屏 -(function () { - var utils = baidu.editor.utils, - uiUtils = baidu.editor.ui.uiUtils, - UIBase = baidu.editor.ui.UIBase, - domUtils = baidu.editor.dom.domUtils; - var nodeStack = []; - - function EditorUI(options) { - this.initOptions(options); - this.initEditorUI(); - } - - EditorUI.prototype = { - uiName:'editor', - initEditorUI:function () { - this.editor.ui = this; - this._dialogs = {}; - this.initUIBase(); - this._initToolbars(); - var editor = this.editor, - me = this; - - editor.addListener('ready', function () { - //提供getDialog方法 - editor.getDialog = function (name) { - return editor.ui._dialogs[name + "Dialog"]; - }; - domUtils.on(editor.window, 'scroll', function (evt) { - baidu.editor.ui.Popup.postHide(evt); - }); - //提供编辑器实时宽高(全屏时宽高不变化) - editor.ui._actualFrameWidth = editor.options.initialFrameWidth; - - UE.browser.ie && UE.browser.version === 6 && editor.container.ownerDocument.execCommand("BackgroundImageCache", false, true); - - //display bottom-bar label based on config - if (editor.options.elementPathEnabled) { - editor.ui.getDom('elementpath').innerHTML = '
    ' + editor.getLang("elementPathTip") + ':
    '; - } - if (editor.options.wordCount) { - function countFn() { - setCount(editor,me); - domUtils.un(editor.document, "click", arguments.callee); - } - domUtils.on(editor.document, "click", countFn); - editor.ui.getDom('wordcount').innerHTML = editor.getLang("wordCountTip"); - } - editor.ui._scale(); - if (editor.options.scaleEnabled) { - if (editor.autoHeightEnabled) { - editor.disableAutoHeight(); - } - me.enableScale(); - } else { - me.disableScale(); - } - if (!editor.options.elementPathEnabled && !editor.options.wordCount && !editor.options.scaleEnabled) { - editor.ui.getDom('elementpath').style.display = "none"; - editor.ui.getDom('wordcount').style.display = "none"; - editor.ui.getDom('scale').style.display = "none"; - } - - if (!editor.selection.isFocus())return; - editor.fireEvent('selectionchange', false, true); - - - }); - - editor.addListener('mousedown', function (t, evt) { - var el = evt.target || evt.srcElement; - baidu.editor.ui.Popup.postHide(evt, el); - baidu.editor.ui.ShortCutMenu.postHide(evt); - - }); - editor.addListener("delcells", function () { - if (UE.ui['edittip']) { - new UE.ui['edittip'](editor); - } - editor.getDialog('edittip').open(); - }); - - var pastePop, isPaste = false, timer; - editor.addListener("afterpaste", function () { - if(editor.queryCommandState('pasteplain')) - return; - if(baidu.editor.ui.PastePicker){ - pastePop = new baidu.editor.ui.Popup({ - content:new baidu.editor.ui.PastePicker({editor:editor}), - editor:editor, - className:'edui-wordpastepop' - }); - pastePop.render(); - } - isPaste = true; - }); - - editor.addListener("afterinserthtml", function () { - clearTimeout(timer); - timer = setTimeout(function () { - if (pastePop && (isPaste || editor.ui._isTransfer)) { - if(pastePop.isHidden()){ - var span = domUtils.createElement(editor.document, 'span', { - 'style':"line-height:0px;", - 'innerHTML':'\ufeff' - }), - range = editor.selection.getRange(); - range.insertNode(span); - var tmp= getDomNode(span, 'firstChild', 'previousSibling'); - tmp && pastePop.showAnchor(tmp.nodeType == 3 ? tmp.parentNode : tmp); - domUtils.remove(span); - }else{ - pastePop.show(); - } - delete editor.ui._isTransfer; - isPaste = false; - } - }, 200) - }); - editor.addListener('contextmenu', function (t, evt) { - baidu.editor.ui.Popup.postHide(evt); - }); - editor.addListener('keydown', function (t, evt) { - if (pastePop) pastePop.dispose(evt); - var keyCode = evt.keyCode || evt.which; - if(evt.altKey&&keyCode==90){ - UE.ui.buttons['fullscreen'].onclick(); - } - }); - editor.addListener('wordcount', function (type) { - setCount(this,me); - }); - function setCount(editor,ui) { - editor.setOpt({ - wordCount:true, - maximumWords:10000, - wordCountMsg:editor.options.wordCountMsg || editor.getLang("wordCountMsg"), - wordOverFlowMsg:editor.options.wordOverFlowMsg || editor.getLang("wordOverFlowMsg") - }); - var opt = editor.options, - max = opt.maximumWords, - msg = opt.wordCountMsg , - errMsg = opt.wordOverFlowMsg, - countDom = ui.getDom('wordcount'); - if (!opt.wordCount) { - return; - } - var count = editor.getContentLength(true); - if (count > max) { - countDom.innerHTML = errMsg; - editor.fireEvent("wordcountoverflow"); - } else { - countDom.innerHTML = msg.replace("{#leave}", max - count).replace("{#count}", count); - } - } - - editor.addListener('selectionchange', function () { - if (editor.options.elementPathEnabled) { - me[(editor.queryCommandState('elementpath') == -1 ? 'dis' : 'en') + 'ableElementPath']() - } - if (editor.options.scaleEnabled) { - me[(editor.queryCommandState('scale') == -1 ? 'dis' : 'en') + 'ableScale'](); - - } - }); - var popup = new baidu.editor.ui.Popup({ - editor:editor, - content:'', - className:'edui-bubble', - _onEditButtonClick:function () { - this.hide(); - editor.ui._dialogs.linkDialog.open(); - }, - _onImgEditButtonClick:function (name) { - this.hide(); - editor.ui._dialogs[name] && editor.ui._dialogs[name].open(); - - }, - _onImgSetFloat:function (value) { - this.hide(); - editor.execCommand("imagefloat", value); - - }, - _setIframeAlign:function (value) { - var frame = popup.anchorEl; - var newFrame = frame.cloneNode(true); - switch (value) { - case -2: - newFrame.setAttribute("align", ""); - break; - case -1: - newFrame.setAttribute("align", "left"); - break; - case 1: - newFrame.setAttribute("align", "right"); - break; - } - frame.parentNode.insertBefore(newFrame, frame); - domUtils.remove(frame); - popup.anchorEl = newFrame; - popup.showAnchor(popup.anchorEl); - }, - _updateIframe:function () { - var frame = editor._iframe = popup.anchorEl; - if(domUtils.hasClass(frame, 'ueditor_baidumap')) { - editor.selection.getRange().selectNode(frame).select(); - editor.ui._dialogs.mapDialog.open(); - popup.hide(); - } else { - editor.ui._dialogs.insertframeDialog.open(); - popup.hide(); - } - }, - _onRemoveButtonClick:function (cmdName) { - editor.execCommand(cmdName); - this.hide(); - }, - queryAutoHide:function (el) { - if (el && el.ownerDocument == editor.document) { - if (el.tagName.toLowerCase() == 'img' || domUtils.findParentByTagName(el, 'a', true)) { - return el !== popup.anchorEl; - } - } - return baidu.editor.ui.Popup.prototype.queryAutoHide.call(this, el); - } - }); - popup.render(); - if (editor.options.imagePopup) { - editor.addListener('mouseover', function (t, evt) { - evt = evt || window.event; - var el = evt.target || evt.srcElement; - if (editor.ui._dialogs.insertframeDialog && /iframe/ig.test(el.tagName)) { - var html = popup.formatHtml( - '' + editor.getLang("property") + ': ' + editor.getLang("default") + '  ' + editor.getLang("justifyleft") + '  ' + editor.getLang("justifyright") + '  ' + - ' ' + editor.getLang("modify") + ''); - if (html) { - popup.getDom('content').innerHTML = html; - popup.anchorEl = el; - popup.showAnchor(popup.anchorEl); - } else { - popup.hide(); - } - } - }); - editor.addListener('selectionchange', function (t, causeByUi) { - if (!causeByUi) return; - var html = '', str = "", - img = editor.selection.getRange().getClosedNode(), - dialogs = editor.ui._dialogs; - if (img && img.tagName == 'IMG') { - var dialogName = 'insertimageDialog'; - if (img.className.indexOf("edui-faked-video") != -1 || img.className.indexOf("edui-upload-video") != -1) { - dialogName = "insertvideoDialog" - } - if (img.className.indexOf("edui-faked-webapp") != -1) { - dialogName = "webappDialog" - } - if (img.src.indexOf("http://api.map.baidu.com") != -1) { - dialogName = "mapDialog" - } - if (img.className.indexOf("edui-faked-music") != -1) { - dialogName = "musicDialog" - } - if (img.src.indexOf("http://maps.google.com/maps/api/staticmap") != -1) { - dialogName = "gmapDialog" - } - if (img.getAttribute("anchorname")) { - dialogName = "anchorDialog"; - html = popup.formatHtml( - '' + editor.getLang("property") + ': ' + editor.getLang("modify") + '  ' + - '' + editor.getLang("delete") + ''); - } - if (img.getAttribute("word_img")) { - //todo 放到dialog去做查询 - editor.word_img = [img.getAttribute("word_img")]; - dialogName = "wordimageDialog" - } - if(domUtils.hasClass(img, 'loadingclass') || domUtils.hasClass(img, 'loaderrorclass')) { - dialogName = ""; - } - if (!dialogs[dialogName]) { - return; - } - str = '' + editor.getLang("property") + ': '+ - '' + editor.getLang("default") + '  ' + - '' + editor.getLang("justifyleft") + '  ' + - '' + editor.getLang("justifyright") + '  ' + - '' + editor.getLang("justifycenter") + '  '+ - '' + editor.getLang("modify") + ''; - - !html && (html = popup.formatHtml(str)) - - } - if (editor.ui._dialogs.linkDialog) { - var link = editor.queryCommandValue('link'); - var url; - if (link && (url = (link.getAttribute('_href') || link.getAttribute('href', 2)))) { - var txt = url; - if (url.length > 30) { - txt = url.substring(0, 20) + "..."; - } - if (html) { - html += '
    ' - } - html += popup.formatHtml( - '' + editor.getLang("anthorMsg") + ': ' + txt + '' + - ' ' + editor.getLang("modify") + '' + - ' ' + editor.getLang("clear") + ''); - popup.showAnchor(link); - } - } - - if (html) { - popup.getDom('content').innerHTML = html; - popup.anchorEl = img || link; - popup.showAnchor(popup.anchorEl); - } else { - popup.hide(); - } - }); - } - - }, - _initToolbars:function () { - var editor = this.editor; - var toolbars = this.toolbars || []; - var toolbarUis = []; - for (var i = 0; i < toolbars.length; i++) { - var toolbar = toolbars[i]; - var toolbarUi = new baidu.editor.ui.Toolbar({theme:editor.options.theme}); - for (var j = 0; j < toolbar.length; j++) { - var toolbarItem = toolbar[j]; - var toolbarItemUi = null; - if (typeof toolbarItem == 'string') { - toolbarItem = toolbarItem.toLowerCase(); - if (toolbarItem == '|') { - toolbarItem = 'Separator'; - } - if(toolbarItem == '||'){ - toolbarItem = 'Breakline'; - } - if (baidu.editor.ui[toolbarItem]) { - toolbarItemUi = new baidu.editor.ui[toolbarItem](editor); - } - - //fullscreen这里单独处理一下,放到首行去 - if (toolbarItem == 'fullscreen') { - if (toolbarUis && toolbarUis[0]) { - toolbarUis[0].items.splice(0, 0, toolbarItemUi); - } else { - toolbarItemUi && toolbarUi.items.splice(0, 0, toolbarItemUi); - } - - continue; - - - } - } else { - toolbarItemUi = toolbarItem; - } - if (toolbarItemUi && toolbarItemUi.id) { - - toolbarUi.add(toolbarItemUi); - } - } - toolbarUis[i] = toolbarUi; - } - - //接受外部定制的UI - - utils.each(UE._customizeUI,function(obj,key){ - var itemUI,index; - if(obj.id && obj.id != editor.key){ - return false; - } - itemUI = obj.execFn.call(editor,editor,key); - if(itemUI){ - index = obj.index; - if(index === undefined){ - index = toolbarUi.items.length; - } - toolbarUi.add(itemUI,index) - } - }); - - this.toolbars = toolbarUis; - }, - getHtmlTpl:function () { - return '
    ' + - '
    ' + - (this.toolbars.length ? - '
    ' + - this.renderToolbarBoxHtml() + - '
    ' : '') + - '' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - //modify wdcount by matao - '
    ' + - '' + - '' + - '' + - '
    ' + - '
    ' + - '
    '; - }, - showWordImageDialog:function () { - this._dialogs['wordimageDialog'].open(); - }, - renderToolbarBoxHtml:function () { - var buff = []; - for (var i = 0; i < this.toolbars.length; i++) { - buff.push(this.toolbars[i].renderHtml()); - } - return buff.join(''); - }, - setFullScreen:function (fullscreen) { - - var editor = this.editor, - container = editor.container.parentNode.parentNode; - if (this._fullscreen != fullscreen) { - this._fullscreen = fullscreen; - this.editor.fireEvent('beforefullscreenchange', fullscreen); - if (baidu.editor.browser.gecko) { - var bk = editor.selection.getRange().createBookmark(); - } - if (fullscreen) { - while (container.tagName != "BODY") { - var position = baidu.editor.dom.domUtils.getComputedStyle(container, "position"); - nodeStack.push(position); - container.style.position = "static"; - container = container.parentNode; - } - this._bakHtmlOverflow = document.documentElement.style.overflow; - this._bakBodyOverflow = document.body.style.overflow; - this._bakAutoHeight = this.editor.autoHeightEnabled; - this._bakScrollTop = Math.max(document.documentElement.scrollTop, document.body.scrollTop); - - this._bakEditorContaninerWidth = editor.iframe.parentNode.offsetWidth; - if (this._bakAutoHeight) { - //当全屏时不能执行自动长高 - editor.autoHeightEnabled = false; - this.editor.disableAutoHeight(); - } - - document.documentElement.style.overflow = 'hidden'; - //修复,滚动条不收起的问题 - - window.scrollTo(0,window.scrollY); - this._bakCssText = this.getDom().style.cssText; - this._bakCssText1 = this.getDom('iframeholder').style.cssText; - editor.iframe.parentNode.style.width = ''; - this._updateFullScreen(); - } else { - while (container.tagName != "BODY") { - container.style.position = nodeStack.shift(); - container = container.parentNode; - } - this.getDom().style.cssText = this._bakCssText; - this.getDom('iframeholder').style.cssText = this._bakCssText1; - if (this._bakAutoHeight) { - editor.autoHeightEnabled = true; - this.editor.enableAutoHeight(); - } - - document.documentElement.style.overflow = this._bakHtmlOverflow; - document.body.style.overflow = this._bakBodyOverflow; - editor.iframe.parentNode.style.width = this._bakEditorContaninerWidth + 'px'; - window.scrollTo(0, this._bakScrollTop); - } - if (browser.gecko && editor.body.contentEditable === 'true') { - var input = document.createElement('input'); - document.body.appendChild(input); - editor.body.contentEditable = false; - setTimeout(function () { - input.focus(); - setTimeout(function () { - editor.body.contentEditable = true; - editor.fireEvent('fullscreenchanged', fullscreen); - editor.selection.getRange().moveToBookmark(bk).select(true); - baidu.editor.dom.domUtils.remove(input); - fullscreen && window.scroll(0, 0); - }, 0) - }, 0) - } - - if(editor.body.contentEditable === 'true'){ - this.editor.fireEvent('fullscreenchanged', fullscreen); - this.triggerLayout(); - } - - } - }, - _updateFullScreen:function () { - if (this._fullscreen) { - var vpRect = uiUtils.getViewportRect(); - this.getDom().style.cssText = 'border:0;position:absolute;left:0;top:' + (this.editor.options.topOffset || 0) + 'px;width:' + vpRect.width + 'px;height:' + vpRect.height + 'px;z-index:' + (this.getDom().style.zIndex * 1 + 100); - uiUtils.setViewportOffset(this.getDom(), { left:0, top:this.editor.options.topOffset || 0 }); - this.editor.setHeight(vpRect.height - this.getDom('toolbarbox').offsetHeight - this.getDom('bottombar').offsetHeight - (this.editor.options.topOffset || 0),true); - //不手动调一下,会导致全屏失效 - if(browser.gecko){ - try{ - window.onresize(); - }catch(e){ - - } - - } - } - }, - _updateElementPath:function () { - var bottom = this.getDom('elementpath'), list; - if (this.elementPathEnabled && (list = this.editor.queryCommandValue('elementpath'))) { - - var buff = []; - for (var i = 0, ci; ci = list[i]; i++) { - buff[i] = this.formatHtml('' + ci + ''); - } - bottom.innerHTML = '
    ' + this.editor.getLang("elementPathTip") + ': ' + buff.join(' > ') + '
    '; - - } else { - bottom.style.display = 'none' - } - }, - disableElementPath:function () { - var bottom = this.getDom('elementpath'); - bottom.innerHTML = ''; - bottom.style.display = 'none'; - this.elementPathEnabled = false; - - }, - enableElementPath:function () { - var bottom = this.getDom('elementpath'); - bottom.style.display = ''; - this.elementPathEnabled = true; - this._updateElementPath(); - }, - _scale:function () { - var doc = document, - editor = this.editor, - editorHolder = editor.container, - editorDocument = editor.document, - toolbarBox = this.getDom("toolbarbox"), - bottombar = this.getDom("bottombar"), - scale = this.getDom("scale"), - scalelayer = this.getDom("scalelayer"); - - var isMouseMove = false, - position = null, - minEditorHeight = 0, - minEditorWidth = editor.options.minFrameWidth, - pageX = 0, - pageY = 0, - scaleWidth = 0, - scaleHeight = 0; - - function down() { - position = domUtils.getXY(editorHolder); - - if (!minEditorHeight) { - minEditorHeight = editor.options.minFrameHeight + toolbarBox.offsetHeight + bottombar.offsetHeight; - } - - scalelayer.style.cssText = "position:absolute;left:0;display:;top:0;background-color:#41ABFF;opacity:0.4;filter: Alpha(opacity=40);width:" + editorHolder.offsetWidth + "px;height:" - + editorHolder.offsetHeight + "px;z-index:" + (editor.options.zIndex + 1); - - domUtils.on(doc, "mousemove", move); - domUtils.on(editorDocument, "mouseup", up); - domUtils.on(doc, "mouseup", up); - } - - var me = this; - //by xuheng 全屏时关掉缩放 - this.editor.addListener('fullscreenchanged', function (e, fullScreen) { - if (fullScreen) { - me.disableScale(); - - } else { - if (me.editor.options.scaleEnabled) { - me.enableScale(); - var tmpNode = me.editor.document.createElement('span'); - me.editor.body.appendChild(tmpNode); - me.editor.body.style.height = Math.max(domUtils.getXY(tmpNode).y, me.editor.iframe.offsetHeight - 20) + 'px'; - domUtils.remove(tmpNode) - } - } - }); - function move(event) { - clearSelection(); - var e = event || window.event; - pageX = e.pageX || (doc.documentElement.scrollLeft + e.clientX); - pageY = e.pageY || (doc.documentElement.scrollTop + e.clientY); - scaleWidth = pageX - position.x; - scaleHeight = pageY - position.y; - - if (scaleWidth >= minEditorWidth) { - isMouseMove = true; - scalelayer.style.width = scaleWidth + 'px'; - } - if (scaleHeight >= minEditorHeight) { - isMouseMove = true; - scalelayer.style.height = scaleHeight + "px"; - } - } - - function up() { - if (isMouseMove) { - isMouseMove = false; - editor.ui._actualFrameWidth = scalelayer.offsetWidth - 2; - editorHolder.style.width = editor.ui._actualFrameWidth + 'px'; - - editor.setHeight(scalelayer.offsetHeight - bottombar.offsetHeight - toolbarBox.offsetHeight - 2,true); - } - if (scalelayer) { - scalelayer.style.display = "none"; - } - clearSelection(); - domUtils.un(doc, "mousemove", move); - domUtils.un(editorDocument, "mouseup", up); - domUtils.un(doc, "mouseup", up); - } - - function clearSelection() { - if (browser.ie) - doc.selection.clear(); - else - window.getSelection().removeAllRanges(); - } - - this.enableScale = function () { - //trace:2868 - if (editor.queryCommandState("source") == 1) return; - scale.style.display = ""; - this.scaleEnabled = true; - domUtils.on(scale, "mousedown", down); - }; - this.disableScale = function () { - scale.style.display = "none"; - this.scaleEnabled = false; - domUtils.un(scale, "mousedown", down); - }; - }, - isFullScreen:function () { - return this._fullscreen; - }, - postRender:function () { - UIBase.prototype.postRender.call(this); - for (var i = 0; i < this.toolbars.length; i++) { - this.toolbars[i].postRender(); - } - var me = this; - var timerId, - domUtils = baidu.editor.dom.domUtils, - updateFullScreenTime = function () { - clearTimeout(timerId); - timerId = setTimeout(function () { - me._updateFullScreen(); - }); - }; - domUtils.on(window, 'resize', updateFullScreenTime); - - me.addListener('destroy', function () { - domUtils.un(window, 'resize', updateFullScreenTime); - clearTimeout(timerId); - }) - }, - showToolbarMsg:function (msg, flag) { - this.getDom('toolbarmsg_label').innerHTML = msg; - this.getDom('toolbarmsg').style.display = ''; - // - if (!flag) { - var w = this.getDom('upload_dialog'); - w.style.display = 'none'; - } - }, - hideToolbarMsg:function () { - this.getDom('toolbarmsg').style.display = 'none'; - }, - mapUrl:function (url) { - return url ? url.replace('~/', this.editor.options.UEDITOR_HOME_URL || '') : '' - }, - triggerLayout:function () { - var dom = this.getDom(); - if (dom.style.zoom == '1') { - dom.style.zoom = '100%'; - } else { - dom.style.zoom = '1'; - } - } - }; - utils.inherits(EditorUI, baidu.editor.ui.UIBase); - - - var instances = {}; - - - UE.ui.Editor = function (options) { - var editor = new UE.Editor(options); - editor.options.editor = editor; - utils.loadFile(document, { - href:editor.options.themePath + editor.options.theme + "/css/ueditor.css", - tag:"link", - type:"text/css", - rel:"stylesheet" - }); - - var oldRender = editor.render; - editor.render = function (holder) { - if (holder.constructor === String) { - editor.key = holder; - instances[holder] = editor; - } - utils.domReady(function () { - editor.langIsReady ? renderUI() : editor.addListener("langReady", renderUI); - function renderUI() { - editor.setOpt({ - labelMap:editor.options.labelMap || editor.getLang('labelMap') - }); - new EditorUI(editor.options); - if (holder) { - if (holder.constructor === String) { - holder = document.getElementById(holder); - } - holder && holder.getAttribute('name') && ( editor.options.textarea = holder.getAttribute('name')); - if (holder && /script|textarea/ig.test(holder.tagName)) { - var newDiv = document.createElement('div'); - holder.parentNode.insertBefore(newDiv, holder); - var cont = holder.value || holder.innerHTML; - editor.options.initialContent = /^[\t\r\n ]*$/.test(cont) ? editor.options.initialContent : - cont.replace(/>[\n\r\t]+([ ]{4})+/g, '>') - .replace(/[\n\r\t]+([ ]{4})+[\n\r\t]+<'); - holder.className && (newDiv.className = holder.className); - holder.style.cssText && (newDiv.style.cssText = holder.style.cssText); - if (/textarea/i.test(holder.tagName)) { - editor.textarea = holder; - editor.textarea.style.display = 'none'; - - - } else { - holder.parentNode.removeChild(holder); - - - } - if(holder.id){ - newDiv.id = holder.id; - domUtils.removeAttributes(holder,'id'); - } - holder = newDiv; - holder.innerHTML = ''; - } - - } - domUtils.addClass(holder, "edui-" + editor.options.theme); - editor.ui.render(holder); - var opt = editor.options; - //给实例添加一个编辑器的容器引用 - editor.container = editor.ui.getDom(); - var parents = domUtils.findParents(holder,true); - var displays = []; - for(var i = 0 ,ci;ci=parents[i];i++){ - displays[i] = ci.style.display; - ci.style.display = 'block' - } - if (opt.initialFrameWidth) { - opt.minFrameWidth = opt.initialFrameWidth; - } else { - opt.minFrameWidth = opt.initialFrameWidth = holder.offsetWidth; - var styleWidth = holder.style.width; - if(/%$/.test(styleWidth)) { - opt.initialFrameWidth = styleWidth; - } - } - if (opt.initialFrameHeight) { - opt.minFrameHeight = opt.initialFrameHeight; - } else { - opt.initialFrameHeight = opt.minFrameHeight = holder.offsetHeight; - } - for(var i = 0 ,ci;ci=parents[i];i++){ - ci.style.display = displays[i] - } - //编辑器最外容器设置了高度,会导致,编辑器不占位 - //todo 先去掉,没有找到原因 - if(holder.style.height){ - holder.style.height = '' - } - editor.container.style.width = opt.initialFrameWidth + (/%$/.test(opt.initialFrameWidth) ? '' : 'px'); - editor.container.style.zIndex = opt.zIndex; - oldRender.call(editor, editor.ui.getDom('iframeholder')); - editor.fireEvent("afteruiready"); - } - }) - }; - return editor; - }; - - - /** - * @file - * @name UE - * @short UE - * @desc UEditor的顶部命名空间 - */ - /** - * @name getEditor - * @since 1.2.4+ - * @grammar UE.getEditor(id,[opt]) => Editor实例 - * @desc 提供一个全局的方法得到编辑器实例 - * - * * ''id'' 放置编辑器的容器id, 如果容器下的编辑器已经存在,就直接返回 - * * ''opt'' 编辑器的可选参数 - * @example - * UE.getEditor('containerId',{onready:function(){//创建一个编辑器实例 - * this.setContent('hello') - * }}); - * UE.getEditor('containerId'); //返回刚创建的实例 - * - */ - UE.getEditor = function (id, opt) { - var editor = instances[id]; - if (!editor) { - editor = instances[id] = new UE.ui.Editor(opt); - editor.render(id); - } - return editor; - }; - - - UE.delEditor = function (id) { - var editor; - if (editor = instances[id]) { - editor.key && editor.destroy(); - delete instances[id] - } - }; - - UE.registerUI = function(uiName,fn,index,editorId){ - utils.each(uiName.split(/\s+/), function (name) { - UE._customizeUI[name] = { - id : editorId, - execFn:fn, - index:index - }; - }) - - } - -})(); - -// adapter/message.js -UE.registerUI('message', function(editor) { - - var editorui = baidu.editor.ui; - var Message = editorui.Message; - var holder; - var _messageItems = []; - var me = editor; - - me.addListener('ready', function(){ - holder = document.getElementById(me.ui.id + '_message_holder'); - updateHolderPos(); - setTimeout(function(){ - updateHolderPos(); - }, 500); - }); - - me.addListener('showmessage', function(type, opt){ - opt = utils.isString(opt) ? { - 'content': opt - } : opt; - var message = new Message({ - 'timeout': opt.timeout, - 'type': opt.type, - 'content': opt.content, - 'keepshow': opt.keepshow, - 'editor': me - }), - mid = opt.id || ('msg_' + (+new Date()).toString(36)); - message.render(holder); - _messageItems[mid] = message; - message.reset(opt); - updateHolderPos(); - return mid; - }); - - me.addListener('updatemessage',function(type, id, opt){ - opt = utils.isString(opt) ? { - 'content': opt - } : opt; - var message = _messageItems[id]; - message.render(holder); - message && message.reset(opt); - }); - - me.addListener('hidemessage',function(type, id){ - var message = _messageItems[id]; - message && message.hide(); - }); - - function updateHolderPos(){ - var toolbarbox = me.ui.getDom('toolbarbox'); - if (toolbarbox) { - holder.style.top = toolbarbox.offsetHeight + 3 + 'px'; - } - holder.style.zIndex = Math.max(me.options.zIndex, me.iframe.style.zIndex) + 1; - } - -}); - - -// adapter/autosave.js -UE.registerUI('autosave', function(editor) { - var timer = null,uid = null; - editor.on('afterautosave',function(){ - clearTimeout(timer); - - timer = setTimeout(function(){ - if(uid){ - editor.trigger('hidemessage',uid); - } - uid = editor.trigger('showmessage',{ - content : editor.getLang('autosave.success'), - timeout : 2000 - }); - - },2000) - }) - -}); - - - -})(); diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/ueditor/1.4.3/ueditor.all.min.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/ueditor/1.4.3/ueditor.all.min.js deleted file mode 100644 index c89aa8c4..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/ueditor/1.4.3/ueditor.all.min.js +++ /dev/null @@ -1,709 +0,0 @@ -(function(){function W(d,c,b){var a;c=c.toLowerCase();return(a=d.__allListeners||b&&(d.__allListeners={}))&&(a[c]||b&&(a[c]=[]))}function X(d,c,b,a,e,h){a=a&&d[c];var g;for(!a&&(a=d[b]);!a&&(g=(g||d).parentNode);){if("BODY"==g.tagName||h&&!h(g))return null;a=g[b]}return a&&e&&!e(a)?X(a,c,b,!1,e):a}UEDITOR_CONFIG=window.UEDITOR_CONFIG||{};var s=window.baidu||{};window.baidu=s;window.UE=s.editor=window.UE||{};UE.plugins={};UE.commands={};UE.instants={};UE.I18N={};UE._customizeUI={};UE.version="1.4.3"; -var L=UE.dom={},r=UE.browser=function(){var d=navigator.userAgent.toLowerCase(),c=window.opera,b={ie:/(msie\s|trident.*rv:)([\w.]+)/.test(d),opera:!!c&&c.version,webkit:-1a||b.quirks;b.ie9above=8a;b.ie11above=10a}b.gecko&&(e=d.match(/rv:([\d\.]+)/))&&(e=e[1].split("."),a=1E4*e[0]+100*(e[1]||0)+1*(e[2]||0));/chrome\/(\d+\.\d)/i.test(d)&&(b.chrome=+RegExp.$1);/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(d)&&!/chrome/i.test(d)&& -(b.safari=+(RegExp.$1||RegExp.$2));b.opera&&(a=parseFloat(c.version()));b.webkit&&(a=parseFloat(d.match(/ applewebkit\/(\d+)/)[1]));b.version=a;b.isCompatible=!b.mobile&&(b.ie&&6<=a||b.gecko&&10801<=a||b.opera&&9.5<=a||b.air&&1<=a||b.webkit&&522<=a||!1);return b}(),I=r.ie,ma=r.opera,p=UE.utils={each:function(d,c,b){if(null!=d)if(d.length===+d.length)for(var a=0,e=d.length;a=b&&e===c)return a=h,!1});return a},removeItem:function(d,c){for(var b=0,a=d.length;b'](?:(amp|lt|quot|gt|#39|nbsp|#\d+);)?/g, -function(b,a){return a?b:{"<":"<","&":"&",'"':""",">":">","'":"'"}[b]}):""},html:function(d){return d?d.replace(/&((g|l|quo)t|amp|#39|nbsp);/g,function(c){return{"<":"<","&":"&",""":'"',">":">","'":"'"," ":" "}[c]}):""},cssStyleToDomStyle:function(){var d=document.createElement("div").style,c={"float":void 0!=d.cssFloat?"cssFloat":void 0!=d.styleFloat?"styleFloat":"float"};return function(b){return c[b]||(c[b]=b.toLowerCase().replace(/-./g,function(a){return a.charAt(1).toUpperCase()}))}}(), -loadFile:function(){function d(b,a){try{for(var e=0,h;h=c[e++];)if(h.doc===b&&h.url==(a.src||a.href))return h}catch(g){return null}}var c=[];return function(b,a,e){var h=d(b,a);if(h)h.ready?e&&e():h.funs.push(e);else if(c.push({doc:b,url:a.src||a.href,funs:[e]}),!b.body){e=[];for(var g in a)"tag"!=g&&e.push(g+'="'+a[g]+'"');b.write("<"+a.tag+" "+e.join(" ")+" >")}else if(!a.id||!b.getElementById(a.id)){var l=b.createElement(a.tag);delete a.tag;for(g in a)l.setAttribute(g,a[g]);l.onload= -l.onreadystatechange=function(){if(!this.readyState||/loaded|complete/.test(this.readyState)){h=d(b,a);if(0a?"0"+a:a};return function(a){switch(typeof a){case "undefined":return"undefined";case "number":return isFinite(a)?String(a):"null";case "string":return c(a);case "boolean":return String(a);default:if(null===a)return"null";if(p.isArray(a)){var e=["["],h=a.length,g,l,k;for(l=0;lr.version?{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder"}:{tabindex:"tabIndex",readonly:"readOnly"},oa=p.listToMap("-webkit-box -moz-box block list-item table table-row-group table-header-group table-footer-group table-row table-column-group table-column table-cell table-caption".split(" ")), -f=L.domUtils={NODE_ELEMENT:1,NODE_DOCUMENT:9,NODE_TEXT:3,NODE_COMMENT:8,NODE_DOCUMENT_FRAGMENT:11,POSITION_IDENTICAL:0,POSITION_DISCONNECTED:1,POSITION_FOLLOWING:2,POSITION_PRECEDING:4,POSITION_IS_CONTAINED:8,POSITION_CONTAINS:16,fillChar:I&&"6"==r.version?"\ufeff":"\u200b",keys:{8:1,46:1,16:1,17:1,18:1,37:1,38:1,39:1,40:1,13:1},getPosition:function(d,c){if(d===c)return 0;var b,a=[d],e=[c];for(b=d;b=b.parentNode;){if(b===c)return 10;a.push(b)}for(b=c;b=b.parentNode;){if(b===d)return 20;e.push(b)}a.reverse(); -e.reverse();if(a[0]!==e[0])return 1;for(b=-1;b++,a[b]===e[b];);d=a[b];for(c=e[b];d=d.nextSibling;)if(d===c)return 4;return 2},getNodeIndex:function(d,c){for(var b=d,a=0;b=b.previousSibling;)c&&3==b.nodeType?b.nodeType!=b.nextSibling.nodeType&&a++:a++;return a},inDoc:function(d,c){return 10==f.getPosition(d,c)},findParent:function(d,c,b){if(d&&!f.isBody(d))for(d=b?d:d.parentNode;d;){if(!c||c(d)||f.isBody(d))return c&&!c(d)&&f.isBody(d)?null:d;d=d.parentNode}return null},findParentByTagName:function(d, -c,b,a){c=p.listToMap(p.isArray(c)?c:[c]);return f.findParent(d,function(e){return c[e.tagName]&&!(a&&a(e))},b)},findParents:function(d,c,b,a){for(c=c&&(b&&b(d)||!b)?[d]:[];d=f.findParent(d,b);)c.push(d);return a?c:c.reverse()},insertAfter:function(d,c){return d.nextSibling?d.parentNode.insertBefore(c,d.nextSibling):d.parentNode.appendChild(c)},remove:function(d,c){var b=d.parentNode,a;if(b){if(c&&d.hasChildNodes())for(;a=d.firstChild;)b.insertBefore(a,d);b.removeChild(d)}return d},getNextDomNode:function(d, -c,b,a){return X(d,"firstChild","nextSibling",c,b,a)},getPreDomNode:function(d,c,b,a){return X(d,"lastChild","previousSibling",c,b,a)},isBookmarkNode:function(d){return 1==d.nodeType&&d.id&&/^_baidu_bookmark_/i.test(d.id)},getWindow:function(d){d=d.ownerDocument||d;return d.defaultView||d.parentWindow},getCommonAncestor:function(d,c){if(d===c)return d;for(var b=[d],a=[c],e=d,h=-1;e=e.parentNode;){if(e===c)return e;b.push(e)}for(e=c;e=e.parentNode;){if(e===d)return e;a.push(e)}b.reverse();for(a.reverse();h++, -b[h]===a[h];);return 0==h?null:b[h-1]},clearEmptySibling:function(d,c,b){function a(a,b){for(var g;a&&!f.isBookmarkNode(a)&&(f.isEmptyInlineElement(a)||!RegExp("[^\t\n\r"+f.fillChar+"]").test(a.nodeValue));)g=a[b],f.remove(a),a=g}!c&&a(d.nextSibling,"nextSibling");!b&&a(d.previousSibling,"previousSibling")},split:function(d,c){var b=d.ownerDocument;if(r.ie&&c==d.nodeValue.length){var a=b.createTextNode("");return f.insertAfter(d,a)}a=d.splitText(c);r.ie8&&(b=b.createTextNode(""),f.insertAfter(a,b), -f.remove(b));return a},isWhitespace:function(d){return!RegExp("[^ \t\n\r"+f.fillChar+"]").test(d.nodeValue)},getXY:function(d){for(var c=0,b=0;d.offsetParent;)b+=d.offsetTop,c+=d.offsetLeft,d=d.offsetParent;return{x:c,y:b}},on:function(d,c,b){var a=p.isArray(c)?c:p.trim(c).split(/\s+/),e=a.length;if(e)for(;e--;)if(c=a[e],d.addEventListener)d.addEventListener(c,b,!1);else{b._d||(b._d={els:[]});var h=c+b.toString(),g=p.indexOf(b._d.els,d);b._d[h]&&-1!=g||(-1==g&&b._d.els.push(d),b._d[h]||(b._d[h]=function(a){return b.call(a.srcElement, -a||window.event)}),d.attachEvent("on"+c,b._d[h]))}d=null},un:function(d,c,b){var a=p.isArray(c)?c:p.trim(c).split(/\s+/),e=a.length;if(e)for(;e--;)if(c=a[e],d.removeEventListener)d.removeEventListener(c,b,!1);else{var h=c+b.toString();try{d.detachEvent("on"+c,b._d?b._d[h]:b)}catch(g){}b._d&&b._d[h]&&(c=p.indexOf(b._d.els,d),-1!=c&&b._d.els.splice(c,1),0==b._d.els.length&&delete b._d[h])}},isSameElement:function(d,c){if(d.tagName!=c.tagName)return!1;var b=d.attributes,a=c.attributes;if(!I&&b.length!= -a.length)return!1;for(var e,h,g=0,l=0,k=0;e=b[k++];){if("style"==e.nodeName)if(e.specified&&g++,f.isSameStyle(d,c))continue;else return!1;if(I)if(e.specified)g++,h=a.getNamedItem(e.nodeName);else continue;else h=c.attributes[e.nodeName];if(!h.specified||e.nodeValue!=h.nodeValue)return!1}if(I){for(k=0;h=a[k++];)h.specified&&l++;if(g!=l)return!1}return!0},isSameStyle:function(d,c){var b=d.style.cssText.replace(/( ?; ?)/g,";").replace(/( ?: ?)/g,":"),a=c.style.cssText.replace(/( ?; ?)/g,";").replace(/( ?: ?)/g, -":");if(r.opera){b=d.style;a=c.style;if(b.length!=a.length)return!1;for(var e in b)if(!/^(\d+|csstext)$/i.test(e)&&b[e]!=a[e])return!1;return!0}if(!b||!a)return b==a;b=b.split(";");a=a.split(";");if(b.length!=a.length)return!1;e=0;for(var h;h=b[e++];)if(-1==p.indexOf(a,h))return!1;return!0},isBlockElm:function(d){return 1==d.nodeType&&(v.$block[d.tagName]||oa[f.getComputedStyle(d,"display")])&&!v.$nonChild[d.tagName]},isBody:function(d){return d&&1==d.nodeType&&"body"==d.tagName.toLowerCase()},breakParent:function(d, -c){var b,a=d,e=d,h,g;do{a=a.parentNode;h?(b=a.cloneNode(!1),b.appendChild(h),h=b,b=a.cloneNode(!1),b.appendChild(g),g=b):(h=a.cloneNode(!1),g=h.cloneNode(!1));for(;b=e.previousSibling;)h.insertBefore(b,h.firstChild);for(;b=e.nextSibling;)g.appendChild(b);e=a}while(c!==a);b=c.parentNode;b.insertBefore(h,c);b.insertBefore(g,c);b.insertBefore(d,g);f.remove(c);return d},isEmptyInlineElement:function(d){if(1!=d.nodeType||!v.$removeEmpty[d.tagName])return 0;for(d=d.firstChild;d;){if(f.isBookmarkNode(d)|| -1==d.nodeType&&!f.isEmptyInlineElement(d)||3==d.nodeType&&!f.isWhitespace(d))return 0;d=d.nextSibling}return 1},trimWhiteTextNode:function(d){function c(b){for(var a;(a=d[b])&&3==a.nodeType&&f.isWhitespace(a);)d.removeChild(a)}c("firstChild");c("lastChild")},mergeChild:function(d,c,b){c=f.getElementsByTagName(d,d.tagName.toLowerCase());for(var a=0,e;e=c[a++];)if(e.parentNode&&!f.isBookmarkNode(e))if("span"==e.tagName.toLowerCase()){if(d===e.parentNode&&(f.trimWhiteTextNode(d),1==d.childNodes.length)){d.style.cssText= -e.style.cssText+";"+d.style.cssText;f.remove(e,!0);continue}e.style.cssText=d.style.cssText+";"+e.style.cssText;if(b){var h=b.style;if(h)for(var h=h.split(";"),g=0,l;l=h[g++];)e.style[p.cssStyleToDomStyle(l.split(":")[0])]=l.split(":")[1]}f.isSameStyle(e,d)&&f.remove(e,!0)}else f.isSameElement(d,e)&&f.remove(e,!0)},getElementsByTagName:function(d,c,b){if(b&&p.isString(b)){var a=b;b=function(e){return f.hasClass(e,a)}}c=p.trim(c).replace(/[ ]{2,}/g," ").split(" ");for(var e=[],h=0,g;g=c[h++];){g=d.getElementsByTagName(g); -for(var l=0,k;k=g[l++];)b&&!b(k)||e.push(k)}return e},mergeToParent:function(d){for(var c=d.parentNode;c&&v.$removeEmpty[c.tagName];){if(c.tagName==d.tagName||"A"==c.tagName){f.trimWhiteTextNode(c);if("SPAN"==c.tagName&&!f.isSameStyle(c,d)||"A"==c.tagName&&"SPAN"==d.tagName)if(1r.version&&"font-size"==c&&!d.style.fontSize&&!v.$empty[d.tagName]&&!v.$nonChild[d.tagName]){var b=d.ownerDocument.createElement("span");b.style.cssText="padding:0;border:0;font-family:simsun;";b.innerHTML=".";d.appendChild(b);var a=b.offsetHeight;d.removeChild(b);b=null;return a+"px"}try{b=f.getStyle(d,c)||(window.getComputedStyle?f.getWindow(d).getComputedStyle(d, -"").getPropertyValue(c):(d.currentStyle||d.style)[p.cssStyleToDomStyle(c)])}catch(e){return""}return p.transUnitToPx(p.fixColor(c,b))},removeClasses:function(d,c){c=p.isArray(c)?c:p.trim(c).replace(/[ ]{2,}/g," ").split(" ");for(var b=0,a,e=d.className;a=c[b++];)e=e.replace(RegExp("\\b"+a+"\\b"),"");(e=p.trim(e).replace(/[ ]{2,}/g," "))?d.className=e:f.removeAttributes(d,["class"])},addClass:function(d,c){if(d){c=p.trim(c).replace(/[ ]{2,}/g," ").split(" ");for(var b=0,a,e=d.className;a=c[b++];)RegExp("\\b"+ -a+"\\b").test(e)||(e+=" "+a);d.className=p.trim(e)}},hasClass:function(d,c){if(p.isRegExp(c))return c.test(d.className);c=p.trim(c).replace(/[ ]{2,}/g," ").split(" ");for(var b=0,a,e=d.className;a=c[b++];)if(!RegExp("\\b"+a+"\\b","i").test(e))return!1;return b-1==c.length},preventDefault:function(d){d.preventDefault?d.preventDefault():d.returnValue=!1},removeStyle:function(d,c){r.ie?("color"==c&&(c="(^|;)"+c),d.style.cssText=d.style.cssText.replace(RegExp(c+"[^:]*:[^;]+;?","ig"),"")):d.style.removeProperty? -d.style.removeProperty(c):d.style.removeAttribute(p.cssStyleToDomStyle(c));d.style.cssText||f.removeAttributes(d,["style"])},getStyle:function(d,c){var b=d.style[p.cssStyleToDomStyle(c)];return p.fixColor(c,b)},setStyle:function(d,c,b){d.style[p.cssStyleToDomStyle(c)]=b;p.trim(d.style.cssText)||this.removeAttributes(d,"style")},setStyles:function(d,c){for(var b in c)c.hasOwnProperty(b)&&f.setStyle(d,b,c[b])},removeDirtyAttr:function(d){for(var c=0,b,a=d.getElementsByTagName("*");b=a[c++];)b.removeAttribute("_moz_dirty"); -d.removeAttribute("_moz_dirty")},getChildCount:function(d,c){var b=0,a=d.firstChild;for(c=c||function(){return 1};a;)c(a)&&b++,a=a.nextSibling;return b},isEmptyNode:function(d){return!d.firstChild||0==f.getChildCount(d,function(c){return!f.isBr(c)&&!f.isBookmarkNode(c)&&!f.isWhitespace(c)})},clearSelectedArr:function(d){for(var c;c=d.pop();)f.removeAttributes(c,["class"])},scrollToView:function(d,c,b){var a=function(){var a=c.document,b="CSS1Compat"==a.compatMode;return{width:(b?a.documentElement.clientWidth: -a.body.clientWidth)||0,height:(b?a.documentElement.clientHeight:a.body.clientHeight)||0}}().height;b=-1*a+b+(d.offsetHeight||0);d=f.getXY(d);b+=d.y;d=function(a){if("pageXOffset"in a)return{x:a.pageXOffset||0,y:a.pageYOffset||0};a=a.document;return{x:a.documentElement.scrollLeft||a.body.scrollLeft||0,y:a.documentElement.scrollTop||a.body.scrollTop||0}}(c).y;(b>d||bb?-20:20))},isBr:function(d){return 1==d.nodeType&&"BR"==d.tagName},isFillChar:function(d,c){if(3!=d.nodeType)return!1; -var b=d.nodeValue;return c?RegExp("^"+f.fillChar).test(b):!b.replace(RegExp(f.fillChar,"g"),"").length},isStartInblock:function(d){d=d.cloneRange();var c=0,b=d.startContainer,a;if(1==b.nodeType&&b.childNodes[d.startOffset])for(var b=b.childNodes[d.startOffset],e=b.previousSibling;e&&f.isFillChar(e);)b=e,e=e.previousSibling;this.isFillChar(b,!0)&&1==d.startOffset&&(d.setStartBefore(b),b=d.startContainer);for(;b&&f.isFillChar(b);)a=b,b=b.previousSibling;a&&(d.setStartBefore(a),b=d.startContainer);for(1== -b.nodeType&&f.isEmptyNode(b)&&1==d.startOffset&&d.setStart(b,0).collapse(!0);!d.startOffset;){b=d.startContainer;if(f.isBlockElm(b)||f.isBody(b)){c=1;break}var e=d.startContainer.previousSibling,h;if(e){for(;e&&f.isFillChar(e);)h=e,e=e.previousSibling;h?d.setStartBefore(h):d.setStartBefore(d.startContainer)}else d.setStartBefore(d.startContainer)}return c&&!f.isBody(d.startContainer)?1:0},isEmptyBlock:function(d,c){if(1!=d.nodeType)return 0;c=c||RegExp("[ \u00a0\t\r\n"+f.fillChar+"]","g");if(0/.test(d.outerHTML):0==d.attributes.length},isCustomeNode:function(d){return 1==d.nodeType&&d.getAttribute("_ue_custom_node_")},isTagNode:function(d,c){return 1==d.nodeType&&RegExp("\\b"+d.tagName+"\\b","i").test(c)},filterNodeList:function(d,c,b){var a=[];if(!p.isFunction(c)){var e=c;c=function(a){return-1!=p.indexOf(p.isArray(e)?e:e.split(" "),a.tagName.toLowerCase())}}p.each(d, -function(e){c(e)&&a.push(e)});return 0==a.length?null:1!=a.length&&b?a:a[0]},isInNodeEndBoundary:function(d,c){var b=d.startContainer;if(3==b.nodeType&&d.startOffset!=b.nodeValue.length||1==b.nodeType&&d.startOffset!=b.childNodes.length)return 0;for(;b!==c;){if(b.nextSibling)return 0;b=b.parentNode}return 1},isBoundaryNode:function(d,c){for(var b;!f.isBody(d);)if(b=d,d=d.parentNode,b!==d[c])return!1;return!0},fillHtml:r.ie11below?" ":"
    "},P=RegExp(f.fillChar,"g");(function(){function d(a){return!a.collapsed&& -1==a.startContainer.nodeType&&a.startContainer===a.endContainer&&1==a.endOffset-a.startOffset}function c(a,e,g,b){1==e.nodeType&&(v.$empty[e.tagName]||v.$nonChild[e.tagName])&&(g=f.getNodeIndex(e)+(a?0:1),e=e.parentNode);a?(b.startContainer=e,b.startOffset=g,b.endContainer||b.collapse(!0)):(b.endContainer=e,b.endOffset=g,b.startContainer||b.collapse(!1));b.collapsed=b.startContainer&&b.endContainer&&b.startContainer===b.endContainer&&b.startOffset==b.endOffset;return b}function b(a,e){var g=a.startContainer, -b=a.endContainer,c=a.startOffset,l=a.endOffset,k=a.document,h=k.createDocumentFragment(),d,p;1==g.nodeType&&(g=g.childNodes[c]||(d=g.appendChild(k.createTextNode(""))));1==b.nodeType&&(b=b.childNodes[l]||(p=b.appendChild(k.createTextNode(""))));if(g===b&&3==g.nodeType)return h.appendChild(k.createTextNode(g.substringData(c,l-c))),e&&(g.deleteData(c,l-c),a.collapse(!0)),h;for(var A,N,r=h,s=f.findParents(g,!0),v=f.findParents(b,!0),z=0;s[z]==v[z];)z++;for(var H=z,D;D=s[H];H++){A=D.nextSibling;D==g? -d||(3==a.startContainer.nodeType?(r.appendChild(k.createTextNode(g.nodeValue.slice(c))),e&&g.deleteData(c,g.nodeValue.length-c)):r.appendChild(e?g:g.cloneNode(!0))):(N=D.cloneNode(!1),r.appendChild(N));for(;A&&A!==b&&A!==v[H];)D=A.nextSibling,r.appendChild(e?A:A.cloneNode(!0)),A=D;r=N}r=h;s[z]||(r.appendChild(s[z-1].cloneNode(!1)),r=r.firstChild);for(H=z;c=v[H];H++){A=c.previousSibling;c==b?p||3!=a.endContainer.nodeType||(r.appendChild(k.createTextNode(b.substringData(0,l))),e&&b.deleteData(0,l)): -(N=c.cloneNode(!1),r.appendChild(N));if(H!=z||!s[z])for(;A&&A!==g;)c=A.previousSibling,r.insertBefore(e?A:A.cloneNode(!0),r.firstChild),A=c;r=N}e&&a.setStartBefore(v[z]?s[z]?v[z]:s[z-1]:v[z-1]).collapse(!0);d&&f.remove(d);p&&f.remove(p);return h}function a(a,g){try{if(l&&f.inDoc(l,a))if(l.nodeValue.replace(P,"").length)l.nodeValue=l.nodeValue.replace(P,"");else{var e=l.parentNode;for(f.remove(l);e&&f.isEmptyInlineElement(e)&&(r.safari?!(f.getPosition(e,g)&f.POSITION_CONTAINS):!e.contains(g));)l=e.parentNode, -f.remove(e),e=l}}catch(b){}}function e(a,e){var g;for(a=a[e];a&&f.isFillChar(a);)g=a[e],f.remove(a),a=g}var h=0,g=f.fillChar,l,k=L.Range=function(a){this.startContainer=this.startOffset=this.endContainer=this.endOffset=null;this.document=a;this.collapsed=!0};k.prototype={cloneContents:function(){return this.collapsed?null:b(this,0)},deleteContents:function(){var a;this.collapsed||b(this,1);r.webkit&&(a=this.startContainer,3!=a.nodeType||a.nodeValue.length||(this.setStartBefore(a).collapse(!0),f.remove(a))); -return this},extractContents:function(){return this.collapsed?null:b(this,2)},setStart:function(a,e){return c(!0,a,e,this)},setEnd:function(a,e){return c(!1,a,e,this)},setStartAfter:function(a){return this.setStart(a.parentNode,f.getNodeIndex(a)+1)},setStartBefore:function(a){return this.setStart(a.parentNode,f.getNodeIndex(a))},setEndAfter:function(a){return this.setEnd(a.parentNode,f.getNodeIndex(a)+1)},setEndBefore:function(a){return this.setEnd(a.parentNode,f.getNodeIndex(a))},setStartAtFirst:function(a){return this.setStart(a, -0)},setStartAtLast:function(a){return this.setStart(a,3==a.nodeType?a.nodeValue.length:a.childNodes.length)},setEndAtFirst:function(a){return this.setEnd(a,0)},setEndAtLast:function(a){return this.setEnd(a,3==a.nodeType?a.nodeValue.length:a.childNodes.length)},selectNode:function(a){return this.setStartBefore(a).setEndAfter(a)},selectNodeContents:function(a){return this.setStart(a,0).setEndAtLast(a)},cloneRange:function(){return(new k(this.document)).setStart(this.startContainer,this.startOffset).setEnd(this.endContainer, -this.endOffset)},collapse:function(a){a?(this.endContainer=this.startContainer,this.endOffset=this.startOffset):(this.startContainer=this.endContainer,this.startOffset=this.endOffset);this.collapsed=!0;return this},shrinkBoundary:function(a){function e(a){return 1==a.nodeType&&!f.isBookmarkNode(a)&&!v.$empty[a.tagName]&&!v.$nonChild[a.tagName]}for(var g,b=this.collapsed;1==this.startContainer.nodeType&&(g=this.startContainer.childNodes[this.startOffset])&&e(g);)this.setStart(g,0);if(b)return this.collapse(!0); -if(!a)for(;1==this.endContainer.nodeType&&0=g.nodeValue.length)this.setStartAfter(g);else{var l=f.split(g,e);g===c?this.setEnd(l,this.endOffset-e):g.parentNode===c&&(this.endOffset+=1);this.setStartBefore(l)}if(b)return this.collapse(!0)}a||(e=this.endOffset,c=this.endContainer,3==c.nodeType&&(0==e?this.setEndBefore(c):(e=b.nodeValue.length)a["set"+e.replace(/(\w)/,function(a){return a.toUpperCase()})+"After"](b)}if(a||!this.collapsed)g(this,"start"),g(this,"end");return this},insertNode:function(a){var g=a,e=1;11==a.nodeType&&(g=a.firstChild,e=a.childNodes.length);this.trimBoundary(!0);var b=this.startContainer,c=b.childNodes[this.startOffset];c?b.insertBefore(a,c):b.appendChild(a);g.parentNode===this.endContainer&&(this.endOffset+=e);return this.setStartBefore(g)}, -setCursor:function(a,g){return this.collapse(!a).select(g)},createBookmark:function(a,g){var e,b=this.document.createElement("span");b.style.cssText="display:none;line-height:0px;";b.appendChild(this.document.createTextNode("\u200d"));b.id="_baidu_bookmark_start_"+(g?"":h++);this.collapsed||(e=b.cloneNode(!0),e.id="_baidu_bookmark_end_"+(g?"":h++));this.insertNode(b);e&&this.collapse().insertNode(e).setEndBefore(e);this.setStartAfter(b);return{start:a?b.id:b,end:e?a?e.id:e:null,id:a}},moveToBookmark:function(a){var e= -a.id?this.document.getElementById(a.start):a.start;a=a.end&&a.id?this.document.getElementById(a.end):a.end;this.setStartBefore(e);f.remove(e);a?(this.setEndBefore(a),f.remove(a)):this.collapse(!0);return this},enlarge:function(a,e){var g=f.isBody,b,c,l=this.document.createTextNode("");if(a){c=this.startContainer;1==c.nodeType?c.childNodes[this.startOffset]?b=c=c.childNodes[this.startOffset]:(c.appendChild(l),b=c=l):b=c;for(;;){if(f.isBlockElm(c)){for(c=b;(b=c.previousSibling)&&!f.isBlockElm(b);)c= -b;this.setStartBefore(c);break}b=c;c=c.parentNode}c=this.endContainer;1==c.nodeType?((b=c.childNodes[this.endOffset])?c.insertBefore(l,b):c.appendChild(l),b=c=l):b=c;for(;;){if(f.isBlockElm(c)){for(c=b;(b=c.nextSibling)&&!f.isBlockElm(b);)c=b;this.setEndAfter(c);break}b=c;c=c.parentNode}l.parentNode===this.endContainer&&this.endOffset--;f.remove(l)}if(!this.collapsed){for(;!(0!=this.startOffset||e&&e(this.startContainer)||g(this.startContainer));)this.setStartBefore(this.startContainer);for(;!(this.endOffset!= -(1==this.endContainer.nodeType?this.endContainer.childNodes.length:this.endContainer.nodeValue.length)||e&&e(this.endContainer)||g(this.endContainer));)this.setEndAfter(this.endContainer)}return this},enlargeToBlockElm:function(a){for(;!f.isBlockElm(this.startContainer);)this.setStartBefore(this.startContainer);if(!a)for(;!f.isBlockElm(this.endContainer);)this.setEndAfter(this.endContainer);return this},adjustmentBoundary:function(){if(!this.collapsed){for(;!f.isBody(this.startContainer)&&this.startOffset== -this.startContainer[3==this.startContainer.nodeType?"nodeValue":"childNodes"].length&&this.startContainer[3==this.startContainer.nodeType?"nodeValue":"childNodes"].length;)this.setStartAfter(this.startContainer);for(;!f.isBody(this.endContainer)&&!this.endOffset&&this.endContainer[3==this.endContainer.nodeType?"nodeValue":"childNodes"].length;)this.setEndBefore(this.endContainer)}return this},applyInlineStyle:function(a,e,g){if(this.collapsed)return this;this.trimBoundary().enlarge(!1,function(a){return 1== -a.nodeType&&f.isBlockElm(a)}).adjustmentBoundary();for(var b=this.createBookmark(),c=b.end,l=function(a){return 1==a.nodeType?"br"!=a.tagName.toLowerCase():!f.isWhitespace(a)},k=f.getNextDomNode(b.start,!1,l),h,d,p=this.cloneRange();k&&f.getPosition(k,c)&f.POSITION_PRECEDING;)if(3==k.nodeType||v[a][k.tagName]){p.setStartBefore(k);for(h=k;h&&(3==h.nodeType||v[a][h.tagName])&&h!==c;)d=h,h=f.getNextDomNode(h,1==h.nodeType,null,function(e){return v[a][e.tagName]});var k=p.setEndAfter(d).extractContents(), -A;if(g&&0l&&(l=0);k.push(l);return k}var g={},c=this;g.startAddress=b(!0);a||(g.endAddress=c.collapsed?[].concat(g.startAddress):b());return g},moveToAddress:function(a,e){function g(a, -e){for(var c=b.document.body,l,k,h=0,d,f=a.length;hw)n=t+1;else return{container:g,offset:b(k)}}if(-1==t){d.moveToElementText(g); -d.setEndPoint("StartToStart",a);d=d.text.replace(/(\r\n|\r)/g,"\n").length;c=g.childNodes;if(!d)return k=c[c.length-1],{container:k,offset:k.nodeValue.length};for(b=c.length;0r.version?"":"")+""+(b.iframeCssUrl?"":"")+(b.initialStyle?"":"")+" - - - - - diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/cropper/uploader.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/cropper/uploader.js deleted file mode 100644 index 3dcad914..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/cropper/uploader.js +++ /dev/null @@ -1,268 +0,0 @@ -(function( factory ) { - if ( !window.jQuery ) { - alert('jQuery is required.') - } - - jQuery(function() { - factory.call( null, jQuery ); - }); -})(function( $ ) { - -var Uploader = (function() { - - // -------setting------- - // 如果使用原始大小,超大的图片可能会出现 Croper UI 卡顿,所以这里建议先缩小后再crop. - var FRAME_WIDTH = 1600; - - - var _ = WebUploader; - var Uploader = _.Uploader; - var uploaderContainer = $('.uploader-container'); - var uploader, file; - - if ( !Uploader.support() ) { - alert( 'Web Uploader 不支持您的浏览器!'); - throw new Error( 'WebUploader does not support the browser you are using.' ); - } - - // hook, - // 在文件开始上传前进行裁剪。 - Uploader.register({ - 'before-send-file': 'cropImage' - }, { - - cropImage: function( file ) { - - var data = file._cropData, - image, deferred; - - file = this.request( 'get-file', file ); - deferred = _.Deferred(); - - image = new _.Lib.Image(); - - deferred.always(function() { - image.destroy(); - image = null; - }); - image.once( 'error', deferred.reject ); - image.once( 'load', function() { - image.crop( data.x, data.y, data.width, data.height, data.scale ); - }); - - image.once( 'complete', function() { - var blob, size; - - // 移动端 UC / qq 浏览器的无图模式下 - // ctx.getImageData 处理大图的时候会报 Exception - // INDEX_SIZE_ERR: DOM Exception 1 - try { - blob = image.getAsBlob(); - size = file.size; - file.source = blob; - file.size = blob.size; - - file.trigger( 'resize', blob.size, size ); - - deferred.resolve(); - } catch ( e ) { - console.log( e ); - // 出错了直接继续,让其上传原始图片 - deferred.resolve(); - } - }); - - file._info && image.info( file._info ); - file._meta && image.meta( file._meta ); - image.loadFromBlob( file.source ); - return deferred.promise(); - } - }); - - return { - init: function( selectCb ) { - uploader = new Uploader({ - pick: { - id: '#filePicker', - multiple: false - }, - - // 设置用什么方式去生成缩略图。 - thumb: { - quality: 70, - - // 不允许放大 - allowMagnify: false, - - // 是否采用裁剪模式。如果采用这样可以避免空白内容。 - crop: false - }, - - // 禁掉分块传输,默认是开起的。 - chunked: false, - - // 禁掉上传前压缩功能,因为会手动裁剪。 - compress: false, - - // fileSingleSizeLimit: 2 * 1024 * 1024, - - server: '../server/fileupload.php', - swf: '../Uploader.swf', - fileNumLimit: 1, - onError: function() { - var args = [].slice.call(arguments, 0); - alert(args.join('\n')); - } - }); - - uploader.on('fileQueued', function( _file ) { - file = _file; - - uploader.makeThumb( file, function( error, src ) { - - if ( error ) { - alert('不能预览'); - return; - } - - selectCb( src ); - - }, FRAME_WIDTH, 1 ); // 注意这里的 height 值是 1,被当成了 100% 使用。 - }); - }, - - crop: function( data ) { - - var scale = Croper.getImageSize().width / file._info.width; - data.scale = scale; - - file._cropData = { - x: data.x1, - y: data.y1, - width: data.width, - height: data.height, - scale: data.scale - }; - }, - - upload: function() { - uploader.upload(); - } - } -})(); - - -var Croper = (function() { - var container = $('.cropper-wraper'); - var $image = container.find('.img-container img'); - var btn = $('.upload-btn'); - var isBase64Supported, callback; - - $image.cropper({ - aspectRatio: 16 / 9, - preview: ".img-preview", - done: function(data) { - // console.log(data); - } - }); - - function srcWrap( src, cb ) { - - // we need to check this at the first time. - if (typeof isBase64Supported === 'undefined') { - (function() { - var data = new Image(); - var support = true; - data.onload = data.onerror = function() { - if( this.width != 1 || this.height != 1 ) { - support = false; - } - } - data.src = src; - isBase64Supported = support; - })(); - } - - if ( isBase64Supported ) { - cb( src ); - } else { - // otherwise we need server support. - // convert base64 to a file. - $.ajax('../server/preview.php', { - method: 'POST', - data: src, - dataType:'json' - }).done(function( response ) { - if (response.result) { - cb( response.result ); - } else { - alert("预览出错"); - } - }); - } - } - - btn.on('click', function() { - callback && callback($image.cropper("getData")); - return false; - }); - - return { - setSource: function( src ) { - - // 处理 base64 不支持的情况。 - // 一般出现在 ie6-ie8 - srcWrap( src, function( src ) { - $image.cropper("setImgSrc", src); - }); - - container.removeClass('webuploader-element-invisible'); - - return this; - }, - - getImageSize: function() { - var img = $image.get(0); - return { - width: img.naturalWidth, - height: img.naturalHeight - } - }, - - setCallback: function( cb ) { - callback = cb; - return this; - }, - - disable: function() { - $image.cropper("disable"); - return this; - }, - - enable: function() { - $image.cropper("enable"); - return this; - } - } - -})(); - - - -var container = $('.uploader-container'); - -Uploader.init(function( src ) { - - Croper.setSource( src ); - - // 隐藏选择按钮。 - container.addClass('webuploader-element-invisible'); - - // 当用户选择上传的时候,开始上传。 - Croper.setCallback(function( data ) { - Uploader.crop(data); - Uploader.upload(); - }); -}); - -}); \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/expressInstall.swf b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/expressInstall.swf deleted file mode 100644 index 24853aed..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/expressInstall.swf and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/image-upload/index.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/image-upload/index.html deleted file mode 100644 index a7662146..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/image-upload/index.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - -WebUploader演示 - - - -
    -
    -
    -
    -

    或将照片拖到这里,单次最多可选300张

    -
    -
    - -
    - - - - - diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/image-upload/upload.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/image-upload/upload.js deleted file mode 100644 index b2341c2b..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/image-upload/upload.js +++ /dev/null @@ -1,573 +0,0 @@ -(function( $ ){ - // 当domReady的时候开始初始化 - $(function() { - var $wrap = $('.uploader-list-container'), - - // 图片容器 - $queue = $( '
      ' ) - .appendTo( $wrap.find( '.queueList' ) ), - - // 状态栏,包括进度和控制按钮 - $statusBar = $wrap.find( '.statusBar' ), - - // 文件总体选择信息。 - $info = $statusBar.find( '.info' ), - - // 上传按钮 - $upload = $wrap.find( '.uploadBtn' ), - - // 没选择文件之前的内容。 - $placeHolder = $wrap.find( '.placeholder' ), - - $progress = $statusBar.find( '.progress' ).hide(), - - // 添加的文件数量 - fileCount = 0, - - // 添加的文件总大小 - fileSize = 0, - - // 优化retina, 在retina下这个值是2 - ratio = window.devicePixelRatio || 1, - - // 缩略图大小 - thumbnailWidth = 110 * ratio, - thumbnailHeight = 110 * ratio, - - // 可能有pedding, ready, uploading, confirm, done. - state = 'pedding', - - // 所有文件的进度信息,key为file id - percentages = {}, - // 判断浏览器是否支持图片的base64 - isSupportBase64 = ( function() { - var data = new Image(); - var support = true; - data.onload = data.onerror = function() { - if( this.width != 1 || this.height != 1 ) { - support = false; - } - } - data.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="; - return support; - } )(), - - // 检测是否已经安装flash,检测flash的版本 - flashVersion = ( function() { - var version; - - try { - version = navigator.plugins[ 'Shockwave Flash' ]; - version = version.description; - } catch ( ex ) { - try { - version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash') - .GetVariable('$version'); - } catch ( ex2 ) { - version = '0.0'; - } - } - version = version.match( /\d+/g ); - return parseFloat( version[ 0 ] + '.' + version[ 1 ], 10 ); - } )(), - - supportTransition = (function(){ - var s = document.createElement('p').style, - r = 'transition' in s || - 'WebkitTransition' in s || - 'MozTransition' in s || - 'msTransition' in s || - 'OTransition' in s; - s = null; - return r; - })(), - - // WebUploader实例 - uploader; - - if ( !WebUploader.Uploader.support('flash') && WebUploader.browser.ie ) { - - // flash 安装了但是版本过低。 - if (flashVersion) { - (function(container) { - window['expressinstallcallback'] = function( state ) { - switch(state) { - case 'Download.Cancelled': - alert('您取消了更新!') - break; - - case 'Download.Failed': - alert('安装失败') - break; - - default: - alert('安装已成功,请刷新!'); - break; - } - delete window['expressinstallcallback']; - }; - - var swf = 'expressInstall.swf'; - // insert flash object - var html = '' + - '' + - '' + - ''; - - container.html(html); - - })($wrap); - - // 压根就没有安转。 - } else { - $wrap.html('get flash player'); - } - - return; - } else if (!WebUploader.Uploader.support()) { - alert( 'Web Uploader 不支持您的浏览器!'); - return; - } - - // 实例化 - uploader = WebUploader.create({ - pick: { - id: '#filePicker-2', - label: '点击选择图片' - }, - formData: { - uid: 123 - }, - dnd: '#dndArea', - paste: '#uploader', - swf: '../Uploader.swf', - chunked: false, - chunkSize: 512 * 1024, - server: '../server/fileupload.php', - // runtimeOrder: 'flash', - - // accept: { - // title: 'Images', - // extensions: 'gif,jpg,jpeg,bmp,png', - // mimeTypes: 'image/*' - // }, - - // 禁掉全局的拖拽功能。这样不会出现图片拖进页面的时候,把图片打开。 - disableGlobalDnd: true, - fileNumLimit: 300, - fileSizeLimit: 200 * 1024 * 1024, // 200 M - fileSingleSizeLimit: 50 * 1024 * 1024 // 50 M - }); - - // 拖拽时不接受 js, txt 文件。 - uploader.on( 'dndAccept', function( items ) { - var denied = false, - len = items.length, - i = 0, - // 修改js类型 - unAllowed = 'text/plain;application/javascript '; - - for ( ; i < len; i++ ) { - // 如果在列表里面 - if ( ~unAllowed.indexOf( items[ i ].type ) ) { - denied = true; - break; - } - } - - return !denied; - }); - - uploader.on('dialogOpen', function() { - console.log('here'); - }); - - // uploader.on('filesQueued', function() { - // uploader.sort(function( a, b ) { - // if ( a.name < b.name ) - // return -1; - // if ( a.name > b.name ) - // return 1; - // return 0; - // }); - // }); - - // 添加“添加文件”的按钮, - uploader.addButton({ - id: '#filePicker2', - label: '继续添加' - }); - - uploader.on('ready', function() { - window.uploader = uploader; - }); - - // 当有文件添加进来时执行,负责view的创建 - function addFile( file ) { - var $li = $( '
    • ' + - '

      ' + file.name + '

      ' + - '

      '+ - '

      ' + - '
    • ' ), - - $btns = $('
      ' + - '删除' + - '向右旋转' + - '向左旋转
      ').appendTo( $li ), - $prgress = $li.find('p.progress span'), - $wrap = $li.find( 'p.imgWrap' ), - $info = $('

      '), - - showError = function( code ) { - switch( code ) { - case 'exceed_size': - text = '文件大小超出'; - break; - - case 'interrupt': - text = '上传暂停'; - break; - - default: - text = '上传失败,请重试'; - break; - } - - $info.text( text ).appendTo( $li ); - }; - - if ( file.getStatus() === 'invalid' ) { - showError( file.statusText ); - } else { - // @todo lazyload - $wrap.text( '预览中' ); - uploader.makeThumb( file, function( error, src ) { - var img; - - if ( error ) { - $wrap.text( '不能预览' ); - return; - } - - if( isSupportBase64 ) { - img = $(''); - $wrap.empty().append( img ); - } else { - $.ajax('../server/preview.php', { - method: 'POST', - data: src, - dataType:'json' - }).done(function( response ) { - if (response.result) { - img = $(''); - $wrap.empty().append( img ); - } else { - $wrap.text("预览出错"); - } - }); - } - }, thumbnailWidth, thumbnailHeight ); - - percentages[ file.id ] = [ file.size, 0 ]; - file.rotation = 0; - } - - file.on('statuschange', function( cur, prev ) { - if ( prev === 'progress' ) { - $prgress.hide().width(0); - } else if ( prev === 'queued' ) { - $li.off( 'mouseenter mouseleave' ); - $btns.remove(); - } - - // 成功 - if ( cur === 'error' || cur === 'invalid' ) { - console.log( file.statusText ); - showError( file.statusText ); - percentages[ file.id ][ 1 ] = 1; - } else if ( cur === 'interrupt' ) { - showError( 'interrupt' ); - } else if ( cur === 'queued' ) { - percentages[ file.id ][ 1 ] = 0; - } else if ( cur === 'progress' ) { - $info.remove(); - $prgress.css('display', 'block'); - } else if ( cur === 'complete' ) { - $li.append( '' ); - } - - $li.removeClass( 'state-' + prev ).addClass( 'state-' + cur ); - }); - - $li.on( 'mouseenter', function() { - $btns.stop().animate({height: 30}); - }); - - $li.on( 'mouseleave', function() { - $btns.stop().animate({height: 0}); - }); - - $btns.on( 'click', 'span', function() { - var index = $(this).index(), - deg; - - switch ( index ) { - case 0: - uploader.removeFile( file ); - return; - - case 1: - file.rotation += 90; - break; - - case 2: - file.rotation -= 90; - break; - } - - if ( supportTransition ) { - deg = 'rotate(' + file.rotation + 'deg)'; - $wrap.css({ - '-webkit-transform': deg, - '-mos-transform': deg, - '-o-transform': deg, - 'transform': deg - }); - } else { - $wrap.css( 'filter', 'progid:DXImageTransform.Microsoft.BasicImage(rotation='+ (~~((file.rotation/90)%4 + 4)%4) +')'); - // use jquery animate to rotation - // $({ - // rotation: rotation - // }).animate({ - // rotation: file.rotation - // }, { - // easing: 'linear', - // step: function( now ) { - // now = now * Math.PI / 180; - - // var cos = Math.cos( now ), - // sin = Math.sin( now ); - - // $wrap.css( 'filter', "progid:DXImageTransform.Microsoft.Matrix(M11=" + cos + ",M12=" + (-sin) + ",M21=" + sin + ",M22=" + cos + ",SizingMethod='auto expand')"); - // } - // }); - } - - - }); - - $li.appendTo( $queue ); - } - - // 负责view的销毁 - function removeFile( file ) { - var $li = $('#'+file.id); - - delete percentages[ file.id ]; - updateTotalProgress(); - $li.off().find('.file-panel').off().end().remove(); - } - - function updateTotalProgress() { - var loaded = 0, - total = 0, - spans = $progress.children(), - percent; - - $.each( percentages, function( k, v ) { - total += v[ 0 ]; - loaded += v[ 0 ] * v[ 1 ]; - } ); - - percent = total ? loaded / total : 0; - - - spans.eq( 0 ).text( Math.round( percent * 100 ) + '%' ); - spans.eq( 1 ).css( 'width', Math.round( percent * 100 ) + '%' ); - updateStatus(); - } - - function updateStatus() { - var text = '', stats; - - if ( state === 'ready' ) { - text = '选中' + fileCount + '张图片,共' + - WebUploader.formatSize( fileSize ) + '。'; - } else if ( state === 'confirm' ) { - stats = uploader.getStats(); - if ( stats.uploadFailNum ) { - text = '已成功上传' + stats.successNum+ '张照片至XX相册,'+ - stats.uploadFailNum + '张照片上传失败,重新上传失败图片或忽略' - } - - } else { - stats = uploader.getStats(); - text = '共' + fileCount + '张(' + - WebUploader.formatSize( fileSize ) + - '),已上传' + stats.successNum + '张'; - - if ( stats.uploadFailNum ) { - text += ',失败' + stats.uploadFailNum + '张'; - } - } - - $info.html( text ); - } - - function setState( val ) { - var file, stats; - - if ( val === state ) { - return; - } - - $upload.removeClass( 'state-' + state ); - $upload.addClass( 'state-' + val ); - state = val; - - switch ( state ) { - case 'pedding': - $placeHolder.removeClass( 'element-invisible' ); - $queue.hide(); - $statusBar.addClass( 'element-invisible' ); - uploader.refresh(); - break; - - case 'ready': - $placeHolder.addClass( 'element-invisible' ); - $( '#filePicker2' ).removeClass( 'element-invisible'); - $queue.show(); - $statusBar.removeClass('element-invisible'); - uploader.refresh(); - break; - - case 'uploading': - $( '#filePicker2' ).addClass( 'element-invisible' ); - $progress.show(); - $upload.text( '暂停上传' ); - break; - - case 'paused': - $progress.show(); - $upload.text( '继续上传' ); - break; - - case 'confirm': - $progress.hide(); - $( '#filePicker2' ).removeClass( 'element-invisible' ); - $upload.text( '开始上传' ); - - stats = uploader.getStats(); - if ( stats.successNum && !stats.uploadFailNum ) { - setState( 'finish' ); - return; - } - break; - case 'finish': - stats = uploader.getStats(); - if ( stats.successNum ) { - alert( '上传成功' ); - } else { - // 没有成功的图片,重设 - state = 'done'; - location.reload(); - } - break; - } - - updateStatus(); - } - - uploader.onUploadProgress = function( file, percentage ) { - var $li = $('#'+file.id), - $percent = $li.find('.progress span'); - - $percent.css( 'width', percentage * 100 + '%' ); - percentages[ file.id ][ 1 ] = percentage; - updateTotalProgress(); - }; - - uploader.onFileQueued = function( file ) { - fileCount++; - fileSize += file.size; - - if ( fileCount === 1 ) { - $placeHolder.addClass( 'element-invisible' ); - $statusBar.show(); - } - - addFile( file ); - setState( 'ready' ); - updateTotalProgress(); - }; - - uploader.onFileDequeued = function( file ) { - fileCount--; - fileSize -= file.size; - - if ( !fileCount ) { - setState( 'pedding' ); - } - - removeFile( file ); - updateTotalProgress(); - - }; - - uploader.on( 'all', function( type ) { - var stats; - switch( type ) { - case 'uploadFinished': - setState( 'confirm' ); - break; - - case 'startUpload': - setState( 'uploading' ); - break; - - case 'stopUpload': - setState( 'paused' ); - break; - - } - }); - - uploader.onError = function( code ) { - alert( 'Eroor: ' + code ); - }; - - $upload.on('click', function() { - if ( $(this).hasClass( 'disabled' ) ) { - return false; - } - - if ( state === 'ready' ) { - uploader.upload(); - } else if ( state === 'paused' ) { - uploader.upload(); - } else if ( state === 'uploading' ) { - uploader.stop(); - } - }); - - $info.on( 'click', '.retry', function() { - uploader.retry(); - } ); - - $info.on( 'click', '.ignore', function() { - alert( 'todo' ); - } ); - - $upload.addClass( 'state-' + state ); - updateTotalProgress(); - }); - -})( jQuery ); \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/images/bg.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/images/bg.png deleted file mode 100644 index 73d102db..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/images/bg.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/images/icons.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/images/icons.png deleted file mode 100644 index 12e47001..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/images/icons.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/images/icons.psd b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/images/icons.psd deleted file mode 100644 index 4ae3e42f..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/images/icons.psd and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/images/image.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/images/image.png deleted file mode 100644 index 19699f6a..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/images/image.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/images/progress.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/images/progress.png deleted file mode 100644 index 717c4865..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/images/progress.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/images/progress.psd b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/images/progress.psd deleted file mode 100644 index 0d9b5dca..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/images/progress.psd and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/images/success.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/images/success.png deleted file mode 100644 index 94f968dc..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/images/success.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/md5-demo/index.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/md5-demo/index.html deleted file mode 100644 index 9a1f3895..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/md5-demo/index.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - -WebUploader演示 - 带裁剪功能 - - - -
      -
      -
      html5版本
      -
      flash版本
      -
      -
      console 会影响 md5 时间的计算,所以在测试 md5 速度的时候,把 console 关了
      -
      - - - - - diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/md5-demo/script.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/md5-demo/script.js deleted file mode 100644 index ecd12edd..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/md5-demo/script.js +++ /dev/null @@ -1,57 +0,0 @@ -(function($) { - $(function() { - var log = (function() { - var dom = $('#log'); - - return function( str ) { - dom.append('

      ' + str + '

      ') - } - })(); - - WebUploader.create({ - pick: '#filePicker' - }).on('fileQueued', function( file ) { - var start = +new Date(); - - // 返回的是 promise 对象 - this.md5File(file, 0, 1 * 1024 * 1024) - - // 可以用来监听进度 - .progress(function(percentage) { - // console.log('Percentage:', percentage); - }) - - // 处理完成后触发 - .then(function(ret) { - // console.log('md5:', ret); - - var end = +new Date(); - log('HTML5: md5 ' + file.name + ' cost ' + (end - start) + 'ms get value: ' + ret); - }); - }); - - WebUploader.create({ - pick: '#filePicker2', - swf: '../Uploader.swf', - runtimeOrder: 'flash' - }).on('fileQueued', function( file ) { - var start = +new Date(); - - // 返回的是 promise 对象 - this.md5File(file, 0, 1 * 1024 * 1024) - - // 可以用来监听进度 - .progress(function(percentage) { - // console.log('Percentage:', percentage); - }) - - // 处理完成后触发 - .then(function(ret) { - // console.log('md5:', ret); - - var end = +new Date(); - log('Flash: md5 ' + file.name + ' cost ' + (end - start) + 'ms get value: ' + ret); - }); - }); - }); -})(jQuery); \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/requirejs/app.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/requirejs/app.js deleted file mode 100644 index 5d513a93..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/requirejs/app.js +++ /dev/null @@ -1,430 +0,0 @@ -requirejs.config({ - baseUrl: '../../dist', - paths: { - jquery: '../examples/image-upload/jquery' - } -}); - -require([ 'webuploader.flashonly' ], function( WebUploader ) { - // 当domReady的时候开始初始化 - $(function() { - var $wrap = $('#uploader'), - - // 图片容器 - $queue = $( '
        ' ) - .appendTo( $wrap.find( '.queueList' ) ), - - // 状态栏,包括进度和控制按钮 - $statusBar = $wrap.find( '.statusBar' ), - - // 文件总体选择信息。 - $info = $statusBar.find( '.info' ), - - // 上传按钮 - $upload = $wrap.find( '.uploadBtn' ), - - // 没选择文件之前的内容。 - $placeHolder = $wrap.find( '.placeholder' ), - - $progress = $statusBar.find( '.progress' ).hide(), - - // 添加的文件数量 - fileCount = 0, - - // 添加的文件总大小 - fileSize = 0, - - // 优化retina, 在retina下这个值是2 - ratio = window.devicePixelRatio || 1, - - // 缩略图大小 - thumbnailWidth = 110 * ratio, - thumbnailHeight = 110 * ratio, - - // 可能有pedding, ready, uploading, confirm, done. - state = 'pedding', - - // 所有文件的进度信息,key为file id - percentages = {}, - - supportTransition = (function(){ - var s = document.createElement('p').style, - r = 'transition' in s || - 'WebkitTransition' in s || - 'MozTransition' in s || - 'msTransition' in s || - 'OTransition' in s; - s = null; - return r; - })(), - - // WebUploader实例 - uploader; - - // 实例化 - uploader = WebUploader.create({ - pick: { - id: '#filePicker', - label: '点击选择图片' - }, - dnd: '#dndArea', - paste: '#uploader', - swf: '../../dist/Uploader.swf', - chunked: true, - // runtimeOrder: 'flash', - sendAsBinary: true, - server: '../../server/fileupload.php', - // server: 'http://liaoxuezhi.fe.baidu.com/webupload/fileupload.php', - // server: 'http://www.2betop.net/fileupload.php', - fileNumLimit: 300, - fileSizeLimit: 200 * 1024 * 1024, // 200 M - fileSingleSizeLimit: 50 * 1024 * 1024 // 50 M - }); - - // 添加“添加文件”的按钮, - uploader.addButton({ - id: '#filePicker2', - label: '继续添加' - }); - - // 当有文件添加进来时执行,负责view的创建 - function addFile( file ) { - var $li = $( '
      • ' + - '

        ' + file.name + '

        ' + - '

        '+ - '

        ' + - '
      • ' ), - - $btns = $('
        ' + - '删除' + - '向右旋转' + - '向左旋转
        ').appendTo( $li ), - $prgress = $li.find('p.progress span'), - $wrap = $li.find( 'p.imgWrap' ), - $info = $('

        '), - - showError = function( code ) { - switch( code ) { - case 'exceed_size': - text = '文件大小超出'; - break; - - case 'interrupt': - text = '上传暂停'; - break; - - default: - text = '上传失败,请重试'; - break; - } - - $info.text( text ).appendTo( $li ); - }; - - if ( file.getStatus() === 'invalid' ) { - showError( file.statusText ); - } else { - // @todo lazyload - $wrap.text( '预览中' ); - uploader.makeThumb( file, function( error, src ) { - if ( error ) { - $wrap.text( '不能预览' ); - return; - } - - var img = $(''); - $wrap.empty().append( img ); - }, thumbnailWidth, thumbnailHeight ); - - percentages[ file.id ] = [ file.size, 0 ]; - file.rotation = 0; - } - - file.on('statuschange', function( cur, prev ) { - if ( prev === 'progress' ) { - $prgress.hide().width(0); - } else if ( prev === 'queued' ) { - $li.off( 'mouseenter mouseleave' ); - $btns.remove(); - } - - // 成功 - if ( cur === 'error' || cur === 'invalid' ) { - console.log( file.statusText ); - showError( file.statusText ); - percentages[ file.id ][ 1 ] = 1; - } else if ( cur === 'interrupt' ) { - showError( 'interrupt' ); - } else if ( cur === 'queued' ) { - percentages[ file.id ][ 1 ] = 0; - } else if ( cur === 'progress' ) { - $info.remove(); - $prgress.css('display', 'block'); - } else if ( cur === 'complete' ) { - $li.append( '' ); - } - - $li.removeClass( 'state-' + prev ).addClass( 'state-' + cur ); - }); - - $li.on( 'mouseenter', function() { - $btns.stop().animate({height: 30}); - }); - - $li.on( 'mouseleave', function() { - $btns.stop().animate({height: 0}); - }); - - $btns.on( 'click', 'span', function() { - var index = $(this).index(), - deg; - - switch ( index ) { - case 0: - uploader.removeFile( file ); - return; - - case 1: - file.rotation += 90; - break; - - case 2: - file.rotation -= 90; - break; - } - - if ( supportTransition ) { - deg = 'rotate(' + file.rotation + 'deg)'; - $wrap.css({ - '-webkit-transform': deg, - '-mos-transform': deg, - '-o-transform': deg, - 'transform': deg - }); - } else { - $wrap.css( 'filter', 'progid:DXImageTransform.Microsoft.BasicImage(rotation='+ (~~((file.rotation/90)%4 + 4)%4) +')'); - // use jquery animate to rotation - // $({ - // rotation: rotation - // }).animate({ - // rotation: file.rotation - // }, { - // easing: 'linear', - // step: function( now ) { - // now = now * Math.PI / 180; - - // var cos = Math.cos( now ), - // sin = Math.sin( now ); - - // $wrap.css( 'filter', "progid:DXImageTransform.Microsoft.Matrix(M11=" + cos + ",M12=" + (-sin) + ",M21=" + sin + ",M22=" + cos + ",SizingMethod='auto expand')"); - // } - // }); - } - - - }); - - $li.appendTo( $queue ); - } - - // 负责view的销毁 - function removeFile( file ) { - var $li = $('#'+file.id); - - delete percentages[ file.id ]; - updateTotalProgress(); - $li.off().find('.file-panel').off().end().remove(); - } - - function updateTotalProgress() { - var loaded = 0, - total = 0, - spans = $progress.children(), - percent; - - $.each( percentages, function( k, v ) { - total += v[ 0 ]; - loaded += v[ 0 ] * v[ 1 ]; - } ); - - percent = total ? loaded / total : 0; - - spans.eq( 0 ).text( Math.round( percent * 100 ) + '%' ); - spans.eq( 1 ).css( 'width', Math.round( percent * 100 ) + '%' ); - updateStatus(); - } - - function updateStatus() { - var text = '', stats; - - if ( state === 'ready' ) { - text = '选中' + fileCount + '张图片,共' + - WebUploader.formatSize( fileSize ) + '。'; - } else if ( state === 'confirm' ) { - stats = uploader.getStats(); - if ( stats.uploadFailNum ) { - text = '已成功上传' + stats.successNum+ '张照片至XX相册,'+ - stats.uploadFailNum + '张照片上传失败,重新上传失败图片或忽略' - } - - } else { - stats = uploader.getStats(); - text = '共' + fileCount + '张(' + - WebUploader.formatSize( fileSize ) + - '),已上传' + stats.successNum + '张'; - - if ( stats.uploadFailNum ) { - text += ',失败' + stats.uploadFailNum + '张'; - } - } - - $info.html( text ); - } - - function setState( val ) { - var file, stats; - - if ( val === state ) { - return; - } - - $upload.removeClass( 'state-' + state ); - $upload.addClass( 'state-' + val ); - state = val; - - switch ( state ) { - case 'pedding': - $placeHolder.removeClass( 'element-invisible' ); - $queue.hide(); - $statusBar.addClass( 'element-invisible' ); - uploader.refresh(); - break; - - case 'ready': - $placeHolder.addClass( 'element-invisible' ); - $( '#filePicker2' ).removeClass( 'element-invisible'); - $queue.show(); - $statusBar.removeClass('element-invisible'); - uploader.refresh(); - break; - - case 'uploading': - $( '#filePicker2' ).addClass( 'element-invisible' ); - $progress.show(); - $upload.text( '暂停上传' ); - break; - - case 'paused': - $progress.show(); - $upload.text( '继续上传' ); - break; - - case 'confirm': - $progress.hide(); - $upload.text( '开始上传' ).addClass( 'disabled' ); - - stats = uploader.getStats(); - if ( stats.successNum && !stats.uploadFailNum ) { - setState( 'finish' ); - return; - } - break; - case 'finish': - stats = uploader.getStats(); - if ( stats.successNum ) { - alert( '上传成功' ); - } else { - // 没有成功的图片,重设 - state = 'done'; - location.reload(); - } - break; - } - - updateStatus(); - } - - uploader.onUploadProgress = function( file, percentage ) { - var $li = $('#'+file.id), - $percent = $li.find('.progress span'); - - $percent.css( 'width', percentage * 100 + '%' ); - percentages[ file.id ][ 1 ] = percentage; - updateTotalProgress(); - }; - - uploader.onFileQueued = function( file ) { - fileCount++; - fileSize += file.size; - - if ( fileCount === 1 ) { - $placeHolder.addClass( 'element-invisible' ); - $statusBar.show(); - } - - addFile( file ); - setState( 'ready' ); - updateTotalProgress(); - }; - - uploader.onFileDequeued = function( file ) { - fileCount--; - fileSize -= file.size; - - if ( !fileCount ) { - setState( 'pedding' ); - } - - removeFile( file ); - updateTotalProgress(); - - }; - - uploader.on( 'all', function( type ) { - var stats; - switch( type ) { - case 'uploadFinished': - setState( 'confirm' ); - break; - - case 'startUpload': - setState( 'uploading' ); - break; - - case 'stopUpload': - setState( 'paused' ); - break; - - } - }); - - uploader.onError = function( code ) { - alert( 'Eroor: ' + code ); - }; - - $upload.on('click', function() { - if ( $(this).hasClass( 'disabled' ) ) { - return false; - } - - if ( state === 'ready' ) { - uploader.upload(); - } else if ( state === 'paused' ) { - uploader.upload(); - } else if ( state === 'uploading' ) { - uploader.stop(); - } - }); - - $info.on( 'click', '.retry', function() { - uploader.retry(); - } ); - - $info.on( 'click', '.ignore', function() { - alert( 'todo' ); - } ); - - $upload.addClass( 'state-' + state ); - updateTotalProgress(); - }); -}); \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/requirejs/index.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/requirejs/index.html deleted file mode 100644 index e99c51e4..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/requirejs/index.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WebUploader演示 - - - - - - -
        -
        - - -
        -
        -
        -
        -

        或将照片拖到这里,单次最多可选300张

        -
        -
        - -
        -
        -
        - - - diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/requirejs/require.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/requirejs/require.js deleted file mode 100644 index 84d1d678..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/requirejs/require.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - RequireJS 2.1.10 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved. - Available via the MIT or new BSD license. - see: http://github.com/jrburke/requirejs for details -*/ -var requirejs,require,define; -(function(ca){function G(b){return"[object Function]"===N.call(b)}function H(b){return"[object Array]"===N.call(b)}function v(b,c){if(b){var d;for(d=0;dthis.depCount&&!this.defined){if(G(c)){if(this.events.error&&this.map.isDefine||h.onError!==da)try{f=i.execCb(b,c,e,f)}catch(d){a=d}else f=i.execCb(b,c,e,f);this.map.isDefine&&void 0===f&&((e=this.module)?f=e.exports:this.usingExports&& -(f=this.exports));if(a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",w(this.error=a)}else f=c;this.exports=f;if(this.map.isDefine&&!this.ignore&&(p[b]=f,h.onResourceLoad))h.onResourceLoad(i,this.map,this.depMaps);y(b);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a= -this.map,b=a.id,d=m(a.prefix);this.depMaps.push(d);r(d,"defined",t(this,function(f){var d,g;g=j(ba,this.map.id);var J=this.map.name,u=this.map.parentMap?this.map.parentMap.name:null,p=i.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(f.normalize&&(J=f.normalize(J,function(a){return c(a,u,!0)})||""),f=m(a.prefix+"!"+J,this.map.parentMap),r(f,"defined",t(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),g=j(k,f.id)){this.depMaps.push(f); -if(this.events.error)g.on("error",t(this,function(a){this.emit("error",a)}));g.enable()}}else g?(this.map.url=i.nameToUrl(g),this.load()):(d=t(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),d.error=t(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];B(k,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&y(a.map.id)});w(a)}),d.fromText=t(this,function(f,c){var g=a.name,J=m(g),k=O;c&&(f=c);k&&(O=!1);q(J);s(l.config,b)&&(l.config[g]=l.config[b]);try{h.exec(f)}catch(j){return w(C("fromtexteval", -"fromText eval for "+b+" failed: "+j,j,[b]))}k&&(O=!0);this.depMaps.push(J);i.completeLoad(g);p([g],d)}),f.load(a.name,p,d,l))}));i.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){W[this.map.id]=this;this.enabling=this.enabled=!0;v(this.depMaps,t(this,function(a,b){var c,f;if("string"===typeof a){a=m(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=j(K,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;r(a,"defined",t(this,function(a){this.defineDep(b, -a);this.check()}));this.errback&&r(a,"error",t(this,this.errback))}c=a.id;f=k[c];!s(K,c)&&(f&&!f.enabled)&&i.enable(a,this)}));B(this.pluginMaps,t(this,function(a){var b=j(k,a.id);b&&!b.enabled&&i.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){v(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};i={config:l,contextName:b,registry:k,defined:p,urlFetched:T,defQueue:A,Module:$,makeModuleMap:m, -nextTick:h.nextTick,onError:w,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=l.shim,c={paths:!0,bundles:!0,config:!0,map:!0};B(a,function(a,b){c[b]?(l[b]||(l[b]={}),V(l[b],a,!0,!0)):l[b]=a});a.bundles&&B(a.bundles,function(a,b){v(a,function(a){a!==b&&(ba[a]=b)})});a.shim&&(B(a.shim,function(a,c){H(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=i.makeShimExports(a);b[c]=a}),l.shim=b);a.packages&&v(a.packages,function(a){var b, -a="string"===typeof a?{name:a}:a;b=a.name;a.location&&(l.paths[b]=a.location);l.pkgs[b]=a.name+"/"+(a.main||"main").replace(ja,"").replace(R,"")});B(k,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=m(b))});if(a.deps||a.callback)i.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(ca,arguments));return b||a.exports&&ea(a.exports)}},makeRequire:function(a,e){function g(f,c,d){var j,l;e.enableBuildCallback&&(c&&G(c))&&(c.__requireJsBuild= -!0);if("string"===typeof f){if(G(c))return w(C("requireargs","Invalid require call"),d);if(a&&s(K,f))return K[f](k[a.id]);if(h.get)return h.get(i,f,a,g);j=m(f,a,!1,!0);j=j.id;return!s(p,j)?w(C("notloaded",'Module name "'+j+'" has not been loaded yet for context: '+b+(a?"":". Use require([])"))):p[j]}M();i.nextTick(function(){M();l=q(m(null,a));l.skipMap=e.skipMap;l.init(f,c,d,{enabled:!0});D()});return g}e=e||{};V(g,{isBrowser:z,toUrl:function(b){var e,d=b.lastIndexOf("."),g=b.split("/")[0];if(-1!== -d&&(!("."===g||".."===g)||1g.attachEvent.toString().indexOf("[native code"))&&!Z?(O=!0,g.attachEvent("onreadystatechange",b.onScriptLoad)): -(g.addEventListener("load",b.onScriptLoad,!1),g.addEventListener("error",b.onScriptError,!1)),g.src=d,M=g,D?y.insertBefore(g,D):y.appendChild(g),M=null,g;if(fa)try{importScripts(d),b.completeLoad(c)}catch(j){b.onError(C("importscripts","importScripts failed for "+c+" at "+d,j,[c]))}};z&&!r.skipDataMain&&U(document.getElementsByTagName("script"),function(b){y||(y=b.parentNode);if(L=b.getAttribute("data-main"))return q=L,r.baseUrl||(E=q.split("/"),q=E.pop(),Q=E.length?E.join("/")+"/":"./",r.baseUrl= -Q),q=q.replace(R,""),h.jsExtRegExp.test(q)&&(q=L),r.deps=r.deps?r.deps.concat(q):[q],!0});define=function(b,c,d){var g,h;"string"!==typeof b&&(d=c,c=b,b=null);H(c)||(d=c,c=null);!c&&G(d)&&(c=[],d.length&&(d.toString().replace(la,"").replace(ma,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));if(O){if(!(g=M))P&&"interactive"===P.readyState||U(document.getElementsByTagName("script"),function(b){if("interactive"===b.readyState)return P=b}),g=P;g&&(b|| -(b=g.getAttribute("data-requiremodule")),h=F[g.getAttribute("data-requirecontext")])}(h?h.defQueue:S).push([b,c,d])};define.amd={jQuery:!0};h.exec=function(b){return eval(b)};h(r)}})(this); diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/server/crossdomain.xml b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/server/crossdomain.xml deleted file mode 100644 index fa782e6b..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/server/crossdomain.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/server/fileupload.php b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/server/fileupload.php deleted file mode 100644 index cbfbf49b..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/server/fileupload.php +++ /dev/null @@ -1,177 +0,0 @@ - Deferred - * @example - * // 在文件开始发送前做些异步操作。 - * // WebUploader会等待此异步操作完成后,开始发送文件。 - * Uploader.register({ - * 'before-send-file': 'doSomthingAsync' - * }, { - * - * doSomthingAsync: function() { - * var deferred = Base.Deferred(); - * - * // 模拟一次异步操作。 - * setTimeout(deferred.resolve, 2000); - * - * return deferred.promise(); - * } - * }); - */ - Deferred: Deferred, - - /** - * 判断传入的参数是否为一个promise对象。 - * @method isPromise - * @grammar Base.isPromise( anything ) => Boolean - * @param {*} anything 检测对象。 - * @return {Boolean} - * @for Base - * @example - * console.log( Base.isPromise() ); // => false - * console.log( Base.isPromise({ key: '123' }) ); // => false - * console.log( Base.isPromise( Base.Deferred().promise() ) ); // => true - * - * // Deferred也是一个Promise - * console.log( Base.isPromise( Base.Deferred() ) ); // => true - */ - isPromise: function( anything ) { - return anything && typeof anything.then === 'function'; - }, - - /** - * 返回一个promise,此promise在所有传入的promise都完成了后完成。 - * 详细请查看[这里](http://api.jquery.com/jQuery.when/)。 - * - * @method when - * @for Base - * @grammar Base.when( promise1[, promise2[, promise3...]] ) => Promise - */ - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - slice = [].slice, - resolveValues = slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || (subordinate && - $.isFunction( subordinate.promise )) ? length : 0, - - // the master Deferred. If resolveValues consist of - // only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? - slice.call( arguments ) : value; - - if ( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !(--remaining) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && - $.isFunction( resolveValues[ i ].promise ) ) { - - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, - resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, - progressValues ) ); - } else { - --remaining; - } - } - } - - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } - }; - - return api; - }); - define('promise',[ - 'promise-builtin' - ], function( $ ) { - return $; - }); - /** - * @fileOverview 基础类方法。 - */ - - /** - * Web Uploader内部类的详细说明,以下提及的功能类,都可以在`WebUploader`这个变量中访问到。 - * - * As you know, Web Uploader的每个文件都是用过[AMD](https://github.com/amdjs/amdjs-api/wiki/AMD)规范中的`define`组织起来的, 每个Module都会有个module id. - * 默认module id为该文件的路径,而此路径将会转化成名字空间存放在WebUploader中。如: - * - * * module `base`:WebUploader.Base - * * module `file`: WebUploader.File - * * module `lib/dnd`: WebUploader.Lib.Dnd - * * module `runtime/html5/dnd`: WebUploader.Runtime.Html5.Dnd - * - * - * 以下文档中对类的使用可能省略掉了`WebUploader`前缀。 - * @module WebUploader - * @title WebUploader API文档 - */ - define('base',[ - 'dollar', - 'promise' - ], function( $, promise ) { - - var noop = function() {}, - call = Function.call; - - // http://jsperf.com/uncurrythis - // 反科里化 - function uncurryThis( fn ) { - return function() { - return call.apply( fn, arguments ); - }; - } - - function bindFn( fn, context ) { - return function() { - return fn.apply( context, arguments ); - }; - } - - function createObject( proto ) { - var f; - - if ( Object.create ) { - return Object.create( proto ); - } else { - f = function() {}; - f.prototype = proto; - return new f(); - } - } - - - /** - * 基础类,提供一些简单常用的方法。 - * @class Base - */ - return { - - /** - * @property {String} version 当前版本号。 - */ - version: '0.1.5', - - /** - * @property {jQuery|Zepto} $ 引用依赖的jQuery或者Zepto对象。 - */ - $: $, - - Deferred: promise.Deferred, - - isPromise: promise.isPromise, - - when: promise.when, - - /** - * @description 简单的浏览器检查结果。 - * - * * `webkit` webkit版本号,如果浏览器为非webkit内核,此属性为`undefined`。 - * * `chrome` chrome浏览器版本号,如果浏览器为chrome,此属性为`undefined`。 - * * `ie` ie浏览器版本号,如果浏览器为非ie,此属性为`undefined`。**暂不支持ie10+** - * * `firefox` firefox浏览器版本号,如果浏览器为非firefox,此属性为`undefined`。 - * * `safari` safari浏览器版本号,如果浏览器为非safari,此属性为`undefined`。 - * * `opera` opera浏览器版本号,如果浏览器为非opera,此属性为`undefined`。 - * - * @property {Object} [browser] - */ - browser: (function( ua ) { - var ret = {}, - webkit = ua.match( /WebKit\/([\d.]+)/ ), - chrome = ua.match( /Chrome\/([\d.]+)/ ) || - ua.match( /CriOS\/([\d.]+)/ ), - - ie = ua.match( /MSIE\s([\d\.]+)/ ) || - ua.match( /(?:trident)(?:.*rv:([\w.]+))?/i ), - firefox = ua.match( /Firefox\/([\d.]+)/ ), - safari = ua.match( /Safari\/([\d.]+)/ ), - opera = ua.match( /OPR\/([\d.]+)/ ); - - webkit && (ret.webkit = parseFloat( webkit[ 1 ] )); - chrome && (ret.chrome = parseFloat( chrome[ 1 ] )); - ie && (ret.ie = parseFloat( ie[ 1 ] )); - firefox && (ret.firefox = parseFloat( firefox[ 1 ] )); - safari && (ret.safari = parseFloat( safari[ 1 ] )); - opera && (ret.opera = parseFloat( opera[ 1 ] )); - - return ret; - })( navigator.userAgent ), - - /** - * @description 操作系统检查结果。 - * - * * `android` 如果在android浏览器环境下,此值为对应的android版本号,否则为`undefined`。 - * * `ios` 如果在ios浏览器环境下,此值为对应的ios版本号,否则为`undefined`。 - * @property {Object} [os] - */ - os: (function( ua ) { - var ret = {}, - - // osx = !!ua.match( /\(Macintosh\; Intel / ), - android = ua.match( /(?:Android);?[\s\/]+([\d.]+)?/ ), - ios = ua.match( /(?:iPad|iPod|iPhone).*OS\s([\d_]+)/ ); - - // osx && (ret.osx = true); - android && (ret.android = parseFloat( android[ 1 ] )); - ios && (ret.ios = parseFloat( ios[ 1 ].replace( /_/g, '.' ) )); - - return ret; - })( navigator.userAgent ), - - /** - * 实现类与类之间的继承。 - * @method inherits - * @grammar Base.inherits( super ) => child - * @grammar Base.inherits( super, protos ) => child - * @grammar Base.inherits( super, protos, statics ) => child - * @param {Class} super 父类 - * @param {Object | Function} [protos] 子类或者对象。如果对象中包含constructor,子类将是用此属性值。 - * @param {Function} [protos.constructor] 子类构造器,不指定的话将创建个临时的直接执行父类构造器的方法。 - * @param {Object} [statics] 静态属性或方法。 - * @return {Class} 返回子类。 - * @example - * function Person() { - * console.log( 'Super' ); - * } - * Person.prototype.hello = function() { - * console.log( 'hello' ); - * }; - * - * var Manager = Base.inherits( Person, { - * world: function() { - * console.log( 'World' ); - * } - * }); - * - * // 因为没有指定构造器,父类的构造器将会执行。 - * var instance = new Manager(); // => Super - * - * // 继承子父类的方法 - * instance.hello(); // => hello - * instance.world(); // => World - * - * // 子类的__super__属性指向父类 - * console.log( Manager.__super__ === Person ); // => true - */ - inherits: function( Super, protos, staticProtos ) { - var child; - - if ( typeof protos === 'function' ) { - child = protos; - protos = null; - } else if ( protos && protos.hasOwnProperty('constructor') ) { - child = protos.constructor; - } else { - child = function() { - return Super.apply( this, arguments ); - }; - } - - // 复制静态方法 - $.extend( true, child, Super, staticProtos || {} ); - - /* jshint camelcase: false */ - - // 让子类的__super__属性指向父类。 - child.__super__ = Super.prototype; - - // 构建原型,添加原型方法或属性。 - // 暂时用Object.create实现。 - child.prototype = createObject( Super.prototype ); - protos && $.extend( true, child.prototype, protos ); - - return child; - }, - - /** - * 一个不做任何事情的方法。可以用来赋值给默认的callback. - * @method noop - */ - noop: noop, - - /** - * 返回一个新的方法,此方法将已指定的`context`来执行。 - * @grammar Base.bindFn( fn, context ) => Function - * @method bindFn - * @example - * var doSomething = function() { - * console.log( this.name ); - * }, - * obj = { - * name: 'Object Name' - * }, - * aliasFn = Base.bind( doSomething, obj ); - * - * aliasFn(); // => Object Name - * - */ - bindFn: bindFn, - - /** - * 引用Console.log如果存在的话,否则引用一个[空函数noop](#WebUploader:Base.noop)。 - * @grammar Base.log( args... ) => undefined - * @method log - */ - log: (function() { - if ( window.console ) { - return bindFn( console.log, console ); - } - return noop; - })(), - - nextTick: (function() { - - return function( cb ) { - setTimeout( cb, 1 ); - }; - - // @bug 当浏览器不在当前窗口时就停了。 - // var next = window.requestAnimationFrame || - // window.webkitRequestAnimationFrame || - // window.mozRequestAnimationFrame || - // function( cb ) { - // window.setTimeout( cb, 1000 / 60 ); - // }; - - // // fix: Uncaught TypeError: Illegal invocation - // return bindFn( next, window ); - })(), - - /** - * 被[uncurrythis](http://www.2ality.com/2011/11/uncurrying-this.html)的数组slice方法。 - * 将用来将非数组对象转化成数组对象。 - * @grammar Base.slice( target, start[, end] ) => Array - * @method slice - * @example - * function doSomthing() { - * var args = Base.slice( arguments, 1 ); - * console.log( args ); - * } - * - * doSomthing( 'ignored', 'arg2', 'arg3' ); // => Array ["arg2", "arg3"] - */ - slice: uncurryThis( [].slice ), - - /** - * 生成唯一的ID - * @method guid - * @grammar Base.guid() => String - * @grammar Base.guid( prefx ) => String - */ - guid: (function() { - var counter = 0; - - return function( prefix ) { - var guid = (+new Date()).toString( 32 ), - i = 0; - - for ( ; i < 5; i++ ) { - guid += Math.floor( Math.random() * 65535 ).toString( 32 ); - } - - return (prefix || 'wu_') + guid + (counter++).toString( 32 ); - }; - })(), - - /** - * 格式化文件大小, 输出成带单位的字符串 - * @method formatSize - * @grammar Base.formatSize( size ) => String - * @grammar Base.formatSize( size, pointLength ) => String - * @grammar Base.formatSize( size, pointLength, units ) => String - * @param {Number} size 文件大小 - * @param {Number} [pointLength=2] 精确到的小数点数。 - * @param {Array} [units=[ 'B', 'K', 'M', 'G', 'TB' ]] 单位数组。从字节,到千字节,一直往上指定。如果单位数组里面只指定了到了K(千字节),同时文件大小大于M, 此方法的输出将还是显示成多少K. - * @example - * console.log( Base.formatSize( 100 ) ); // => 100B - * console.log( Base.formatSize( 1024 ) ); // => 1.00K - * console.log( Base.formatSize( 1024, 0 ) ); // => 1K - * console.log( Base.formatSize( 1024 * 1024 ) ); // => 1.00M - * console.log( Base.formatSize( 1024 * 1024 * 1024 ) ); // => 1.00G - * console.log( Base.formatSize( 1024 * 1024 * 1024, 0, ['B', 'KB', 'MB'] ) ); // => 1024MB - */ - formatSize: function( size, pointLength, units ) { - var unit; - - units = units || [ 'B', 'K', 'M', 'G', 'TB' ]; - - while ( (unit = units.shift()) && size > 1024 ) { - size = size / 1024; - } - - return (unit === 'B' ? size : size.toFixed( pointLength || 2 )) + - unit; - } - }; - }); - /** - * 事件处理类,可以独立使用,也可以扩展给对象使用。 - * @fileOverview Mediator - */ - define('mediator',[ - 'base' - ], function( Base ) { - var $ = Base.$, - slice = [].slice, - separator = /\s+/, - protos; - - // 根据条件过滤出事件handlers. - function findHandlers( arr, name, callback, context ) { - return $.grep( arr, function( handler ) { - return handler && - (!name || handler.e === name) && - (!callback || handler.cb === callback || - handler.cb._cb === callback) && - (!context || handler.ctx === context); - }); - } - - function eachEvent( events, callback, iterator ) { - // 不支持对象,只支持多个event用空格隔开 - $.each( (events || '').split( separator ), function( _, key ) { - iterator( key, callback ); - }); - } - - function triggerHanders( events, args ) { - var stoped = false, - i = -1, - len = events.length, - handler; - - while ( ++i < len ) { - handler = events[ i ]; - - if ( handler.cb.apply( handler.ctx2, args ) === false ) { - stoped = true; - break; - } - } - - return !stoped; - } - - protos = { - - /** - * 绑定事件。 - * - * `callback`方法在执行时,arguments将会来源于trigger的时候携带的参数。如 - * ```javascript - * var obj = {}; - * - * // 使得obj有事件行为 - * Mediator.installTo( obj ); - * - * obj.on( 'testa', function( arg1, arg2 ) { - * console.log( arg1, arg2 ); // => 'arg1', 'arg2' - * }); - * - * obj.trigger( 'testa', 'arg1', 'arg2' ); - * ``` - * - * 如果`callback`中,某一个方法`return false`了,则后续的其他`callback`都不会被执行到。 - * 切会影响到`trigger`方法的返回值,为`false`。 - * - * `on`还可以用来添加一个特殊事件`all`, 这样所有的事件触发都会响应到。同时此类`callback`中的arguments有一个不同处, - * 就是第一个参数为`type`,记录当前是什么事件在触发。此类`callback`的优先级比脚低,会再正常`callback`执行完后触发。 - * ```javascript - * obj.on( 'all', function( type, arg1, arg2 ) { - * console.log( type, arg1, arg2 ); // => 'testa', 'arg1', 'arg2' - * }); - * ``` - * - * @method on - * @grammar on( name, callback[, context] ) => self - * @param {String} name 事件名,支持多个事件用空格隔开 - * @param {Function} callback 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - * @class Mediator - */ - on: function( name, callback, context ) { - var me = this, - set; - - if ( !callback ) { - return this; - } - - set = this._events || (this._events = []); - - eachEvent( name, callback, function( name, callback ) { - var handler = { e: name }; - - handler.cb = callback; - handler.ctx = context; - handler.ctx2 = context || me; - handler.id = set.length; - - set.push( handler ); - }); - - return this; - }, - - /** - * 绑定事件,且当handler执行完后,自动解除绑定。 - * @method once - * @grammar once( name, callback[, context] ) => self - * @param {String} name 事件名 - * @param {Function} callback 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - */ - once: function( name, callback, context ) { - var me = this; - - if ( !callback ) { - return me; - } - - eachEvent( name, callback, function( name, callback ) { - var once = function() { - me.off( name, once ); - return callback.apply( context || me, arguments ); - }; - - once._cb = callback; - me.on( name, once, context ); - }); - - return me; - }, - - /** - * 解除事件绑定 - * @method off - * @grammar off( [name[, callback[, context] ] ] ) => self - * @param {String} [name] 事件名 - * @param {Function} [callback] 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - */ - off: function( name, cb, ctx ) { - var events = this._events; - - if ( !events ) { - return this; - } - - if ( !name && !cb && !ctx ) { - this._events = []; - return this; - } - - eachEvent( name, cb, function( name, cb ) { - $.each( findHandlers( events, name, cb, ctx ), function() { - delete events[ this.id ]; - }); - }); - - return this; - }, - - /** - * 触发事件 - * @method trigger - * @grammar trigger( name[, args...] ) => self - * @param {String} type 事件名 - * @param {*} [...] 任意参数 - * @return {Boolean} 如果handler中return false了,则返回false, 否则返回true - */ - trigger: function( type ) { - var args, events, allEvents; - - if ( !this._events || !type ) { - return this; - } - - args = slice.call( arguments, 1 ); - events = findHandlers( this._events, type ); - allEvents = findHandlers( this._events, 'all' ); - - return triggerHanders( events, args ) && - triggerHanders( allEvents, arguments ); - } - }; - - /** - * 中介者,它本身是个单例,但可以通过[installTo](#WebUploader:Mediator:installTo)方法,使任何对象具备事件行为。 - * 主要目的是负责模块与模块之间的合作,降低耦合度。 - * - * @class Mediator - */ - return $.extend({ - - /** - * 可以通过这个接口,使任何对象具备事件功能。 - * @method installTo - * @param {Object} obj 需要具备事件行为的对象。 - * @return {Object} 返回obj. - */ - installTo: function( obj ) { - return $.extend( obj, protos ); - } - - }, protos ); - }); - /** - * @fileOverview Uploader上传类 - */ - define('uploader',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$; - - /** - * 上传入口类。 - * @class Uploader - * @constructor - * @grammar new Uploader( opts ) => Uploader - * @example - * var uploader = WebUploader.Uploader({ - * swf: 'path_of_swf/Uploader.swf', - * - * // 开起分片上传。 - * chunked: true - * }); - */ - function Uploader( opts ) { - this.options = $.extend( true, {}, Uploader.options, opts ); - this._init( this.options ); - } - - // default Options - // widgets中有相应扩展 - Uploader.options = {}; - Mediator.installTo( Uploader.prototype ); - - // 批量添加纯命令式方法。 - $.each({ - upload: 'start-upload', - stop: 'stop-upload', - getFile: 'get-file', - getFiles: 'get-files', - addFile: 'add-file', - addFiles: 'add-file', - sort: 'sort-files', - removeFile: 'remove-file', - cancelFile: 'cancel-file', - skipFile: 'skip-file', - retry: 'retry', - isInProgress: 'is-in-progress', - makeThumb: 'make-thumb', - md5File: 'md5-file', - getDimension: 'get-dimension', - addButton: 'add-btn', - predictRuntimeType: 'predict-runtime-type', - refresh: 'refresh', - disable: 'disable', - enable: 'enable', - reset: 'reset' - }, function( fn, command ) { - Uploader.prototype[ fn ] = function() { - return this.request( command, arguments ); - }; - }); - - $.extend( Uploader.prototype, { - state: 'pending', - - _init: function( opts ) { - var me = this; - - me.request( 'init', opts, function() { - me.state = 'ready'; - me.trigger('ready'); - }); - }, - - /** - * 获取或者设置Uploader配置项。 - * @method option - * @grammar option( key ) => * - * @grammar option( key, val ) => self - * @example - * - * // 初始状态图片上传前不会压缩 - * var uploader = new WebUploader.Uploader({ - * compress: null; - * }); - * - * // 修改后图片上传前,尝试将图片压缩到1600 * 1600 - * uploader.option( 'compress', { - * width: 1600, - * height: 1600 - * }); - */ - option: function( key, val ) { - var opts = this.options; - - // setter - if ( arguments.length > 1 ) { - - if ( $.isPlainObject( val ) && - $.isPlainObject( opts[ key ] ) ) { - $.extend( opts[ key ], val ); - } else { - opts[ key ] = val; - } - - } else { // getter - return key ? opts[ key ] : opts; - } - }, - - /** - * 获取文件统计信息。返回一个包含一下信息的对象。 - * * `successNum` 上传成功的文件数 - * * `progressNum` 上传中的文件数 - * * `cancelNum` 被删除的文件数 - * * `invalidNum` 无效的文件数 - * * `uploadFailNum` 上传失败的文件数 - * * `queueNum` 还在队列中的文件数 - * * `interruptNum` 被暂停的文件数 - * @method getStats - * @grammar getStats() => Object - */ - getStats: function() { - // return this._mgr.getStats.apply( this._mgr, arguments ); - var stats = this.request('get-stats'); - - return stats ? { - successNum: stats.numOfSuccess, - progressNum: stats.numOfProgress, - - // who care? - // queueFailNum: 0, - cancelNum: stats.numOfCancel, - invalidNum: stats.numOfInvalid, - uploadFailNum: stats.numOfUploadFailed, - queueNum: stats.numOfQueue, - interruptNum: stats.numofInterrupt - } : {}; - }, - - // 需要重写此方法来来支持opts.onEvent和instance.onEvent的处理器 - trigger: function( type/*, args...*/ ) { - var args = [].slice.call( arguments, 1 ), - opts = this.options, - name = 'on' + type.substring( 0, 1 ).toUpperCase() + - type.substring( 1 ); - - if ( - // 调用通过on方法注册的handler. - Mediator.trigger.apply( this, arguments ) === false || - - // 调用opts.onEvent - $.isFunction( opts[ name ] ) && - opts[ name ].apply( this, args ) === false || - - // 调用this.onEvent - $.isFunction( this[ name ] ) && - this[ name ].apply( this, args ) === false || - - // 广播所有uploader的事件。 - Mediator.trigger.apply( Mediator, - [ this, type ].concat( args ) ) === false ) { - - return false; - } - - return true; - }, - - /** - * 销毁 webuploader 实例 - * @method destroy - * @grammar destroy() => undefined - */ - destroy: function() { - this.request( 'destroy', arguments ); - this.off(); - }, - - // widgets/widget.js将补充此方法的详细文档。 - request: Base.noop - }); - - /** - * 创建Uploader实例,等同于new Uploader( opts ); - * @method create - * @class Base - * @static - * @grammar Base.create( opts ) => Uploader - */ - Base.create = Uploader.create = function( opts ) { - return new Uploader( opts ); - }; - - // 暴露Uploader,可以通过它来扩展业务逻辑。 - Base.Uploader = Uploader; - - return Uploader; - }); - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/runtime',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$, - factories = {}, - - // 获取对象的第一个key - getFirstKey = function( obj ) { - for ( var key in obj ) { - if ( obj.hasOwnProperty( key ) ) { - return key; - } - } - return null; - }; - - // 接口类。 - function Runtime( options ) { - this.options = $.extend({ - container: document.body - }, options ); - this.uid = Base.guid('rt_'); - } - - $.extend( Runtime.prototype, { - - getContainer: function() { - var opts = this.options, - parent, container; - - if ( this._container ) { - return this._container; - } - - parent = $( opts.container || document.body ); - container = $( document.createElement('div') ); - - container.attr( 'id', 'rt_' + this.uid ); - container.css({ - position: 'absolute', - top: '0px', - left: '0px', - width: '1px', - height: '1px', - overflow: 'hidden' - }); - - parent.append( container ); - parent.addClass('webuploader-container'); - this._container = container; - this._parent = parent; - return container; - }, - - init: Base.noop, - exec: Base.noop, - - destroy: function() { - this._container && this._container.remove(); - this._parent && this._parent.removeClass('webuploader-container'); - this.off(); - } - }); - - Runtime.orders = 'html5,flash'; - - - /** - * 添加Runtime实现。 - * @param {String} type 类型 - * @param {Runtime} factory 具体Runtime实现。 - */ - Runtime.addRuntime = function( type, factory ) { - factories[ type ] = factory; - }; - - Runtime.hasRuntime = function( type ) { - return !!(type ? factories[ type ] : getFirstKey( factories )); - }; - - Runtime.create = function( opts, orders ) { - var type, runtime; - - orders = orders || Runtime.orders; - $.each( orders.split( /\s*,\s*/g ), function() { - if ( factories[ this ] ) { - type = this; - return false; - } - }); - - type = type || getFirstKey( factories ); - - if ( !type ) { - throw new Error('Runtime Error'); - } - - runtime = new factories[ type ]( opts ); - return runtime; - }; - - Mediator.installTo( Runtime.prototype ); - return Runtime; - }); - - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/client',[ - 'base', - 'mediator', - 'runtime/runtime' - ], function( Base, Mediator, Runtime ) { - - var cache; - - cache = (function() { - var obj = {}; - - return { - add: function( runtime ) { - obj[ runtime.uid ] = runtime; - }, - - get: function( ruid, standalone ) { - var i; - - if ( ruid ) { - return obj[ ruid ]; - } - - for ( i in obj ) { - // 有些类型不能重用,比如filepicker. - if ( standalone && obj[ i ].__standalone ) { - continue; - } - - return obj[ i ]; - } - - return null; - }, - - remove: function( runtime ) { - delete obj[ runtime.uid ]; - } - }; - })(); - - function RuntimeClient( component, standalone ) { - var deferred = Base.Deferred(), - runtime; - - this.uid = Base.guid('client_'); - - // 允许runtime没有初始化之前,注册一些方法在初始化后执行。 - this.runtimeReady = function( cb ) { - return deferred.done( cb ); - }; - - this.connectRuntime = function( opts, cb ) { - - // already connected. - if ( runtime ) { - throw new Error('already connected!'); - } - - deferred.done( cb ); - - if ( typeof opts === 'string' && cache.get( opts ) ) { - runtime = cache.get( opts ); - } - - // 像filePicker只能独立存在,不能公用。 - runtime = runtime || cache.get( null, standalone ); - - // 需要创建 - if ( !runtime ) { - runtime = Runtime.create( opts, opts.runtimeOrder ); - runtime.__promise = deferred.promise(); - runtime.once( 'ready', deferred.resolve ); - runtime.init(); - cache.add( runtime ); - runtime.__client = 1; - } else { - // 来自cache - Base.$.extend( runtime.options, opts ); - runtime.__promise.then( deferred.resolve ); - runtime.__client++; - } - - standalone && (runtime.__standalone = standalone); - return runtime; - }; - - this.getRuntime = function() { - return runtime; - }; - - this.disconnectRuntime = function() { - if ( !runtime ) { - return; - } - - runtime.__client--; - - if ( runtime.__client <= 0 ) { - cache.remove( runtime ); - delete runtime.__promise; - runtime.destroy(); - } - - runtime = null; - }; - - this.exec = function() { - if ( !runtime ) { - return; - } - - var args = Base.slice( arguments ); - component && args.unshift( component ); - - return runtime.exec.apply( this, args ); - }; - - this.getRuid = function() { - return runtime && runtime.uid; - }; - - this.destroy = (function( destroy ) { - return function() { - destroy && destroy.apply( this, arguments ); - this.trigger('destroy'); - this.off(); - this.exec('destroy'); - this.disconnectRuntime(); - }; - })( this.destroy ); - } - - Mediator.installTo( RuntimeClient.prototype ); - return RuntimeClient; - }); - /** - * @fileOverview Blob - */ - define('lib/blob',[ - 'base', - 'runtime/client' - ], function( Base, RuntimeClient ) { - - function Blob( ruid, source ) { - var me = this; - - me.source = source; - me.ruid = ruid; - this.size = source.size || 0; - - // 如果没有指定 mimetype, 但是知道文件后缀。 - if ( !source.type && this.ext && - ~'jpg,jpeg,png,gif,bmp'.indexOf( this.ext ) ) { - this.type = 'image/' + (this.ext === 'jpg' ? 'jpeg' : this.ext); - } else { - this.type = source.type || 'application/octet-stream'; - } - - RuntimeClient.call( me, 'Blob' ); - this.uid = source.uid || this.uid; - - if ( ruid ) { - me.connectRuntime( ruid ); - } - } - - Base.inherits( RuntimeClient, { - constructor: Blob, - - slice: function( start, end ) { - return this.exec( 'slice', start, end ); - }, - - getSource: function() { - return this.source; - } - }); - - return Blob; - }); - /** - * 为了统一化Flash的File和HTML5的File而存在。 - * 以至于要调用Flash里面的File,也可以像调用HTML5版本的File一下。 - * @fileOverview File - */ - define('lib/file',[ - 'base', - 'lib/blob' - ], function( Base, Blob ) { - - var uid = 1, - rExt = /\.([^.]+)$/; - - function File( ruid, file ) { - var ext; - - this.name = file.name || ('untitled' + uid++); - ext = rExt.exec( file.name ) ? RegExp.$1.toLowerCase() : ''; - - // todo 支持其他类型文件的转换。 - // 如果有 mimetype, 但是文件名里面没有找出后缀规律 - if ( !ext && file.type ) { - ext = /\/(jpg|jpeg|png|gif|bmp)$/i.exec( file.type ) ? - RegExp.$1.toLowerCase() : ''; - this.name += '.' + ext; - } - - this.ext = ext; - this.lastModifiedDate = file.lastModifiedDate || - (new Date()).toLocaleString(); - - Blob.apply( this, arguments ); - } - - return Base.inherits( Blob, File ); - }); - - /** - * @fileOverview 错误信息 - */ - define('lib/filepicker',[ - 'base', - 'runtime/client', - 'lib/file' - ], function( Base, RuntimeClent, File ) { - - var $ = Base.$; - - function FilePicker( opts ) { - opts = this.options = $.extend({}, FilePicker.options, opts ); - - opts.container = $( opts.id ); - - if ( !opts.container.length ) { - throw new Error('按钮指定错误'); - } - - opts.innerHTML = opts.innerHTML || opts.label || - opts.container.html() || ''; - - opts.button = $( opts.button || document.createElement('div') ); - opts.button.html( opts.innerHTML ); - opts.container.html( opts.button ); - - RuntimeClent.call( this, 'FilePicker', true ); - } - - FilePicker.options = { - button: null, - container: null, - label: null, - innerHTML: null, - multiple: true, - accept: null, - name: 'file' - }; - - Base.inherits( RuntimeClent, { - constructor: FilePicker, - - init: function() { - var me = this, - opts = me.options, - button = opts.button; - - button.addClass('webuploader-pick'); - - me.on( 'all', function( type ) { - var files; - - switch ( type ) { - case 'mouseenter': - button.addClass('webuploader-pick-hover'); - break; - - case 'mouseleave': - button.removeClass('webuploader-pick-hover'); - break; - - case 'change': - files = me.exec('getFiles'); - me.trigger( 'select', $.map( files, function( file ) { - file = new File( me.getRuid(), file ); - - // 记录来源。 - file._refer = opts.container; - return file; - }), opts.container ); - break; - } - }); - - me.connectRuntime( opts, function() { - me.refresh(); - me.exec( 'init', opts ); - me.trigger('ready'); - }); - - this._resizeHandler = Base.bindFn( this.refresh, this ); - $( window ).on( 'resize', this._resizeHandler ); - }, - - refresh: function() { - var shimContainer = this.getRuntime().getContainer(), - button = this.options.button, - width = button.outerWidth ? - button.outerWidth() : button.width(), - - height = button.outerHeight ? - button.outerHeight() : button.height(), - - pos = button.offset(); - - width && height && shimContainer.css({ - bottom: 'auto', - right: 'auto', - width: width + 'px', - height: height + 'px' - }).offset( pos ); - }, - - enable: function() { - var btn = this.options.button; - - btn.removeClass('webuploader-pick-disable'); - this.refresh(); - }, - - disable: function() { - var btn = this.options.button; - - this.getRuntime().getContainer().css({ - top: '-99999px' - }); - - btn.addClass('webuploader-pick-disable'); - }, - - destroy: function() { - var btn = this.options.button; - $( window ).off( 'resize', this._resizeHandler ); - btn.removeClass('webuploader-pick-disable webuploader-pick-hover ' + - 'webuploader-pick'); - } - }); - - return FilePicker; - }); - - /** - * @fileOverview 组件基类。 - */ - define('widgets/widget',[ - 'base', - 'uploader' - ], function( Base, Uploader ) { - - var $ = Base.$, - _init = Uploader.prototype._init, - _destroy = Uploader.prototype.destroy, - IGNORE = {}, - widgetClass = []; - - function isArrayLike( obj ) { - if ( !obj ) { - return false; - } - - var length = obj.length, - type = $.type( obj ); - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === 'array' || type !== 'function' && type !== 'string' && - (length === 0 || typeof length === 'number' && length > 0 && - (length - 1) in obj); - } - - function Widget( uploader ) { - this.owner = uploader; - this.options = uploader.options; - } - - $.extend( Widget.prototype, { - - init: Base.noop, - - // 类Backbone的事件监听声明,监听uploader实例上的事件 - // widget直接无法监听事件,事件只能通过uploader来传递 - invoke: function( apiName, args ) { - - /* - { - 'make-thumb': 'makeThumb' - } - */ - var map = this.responseMap; - - // 如果无API响应声明则忽略 - if ( !map || !(apiName in map) || !(map[ apiName ] in this) || - !$.isFunction( this[ map[ apiName ] ] ) ) { - - return IGNORE; - } - - return this[ map[ apiName ] ].apply( this, args ); - - }, - - /** - * 发送命令。当传入`callback`或者`handler`中返回`promise`时。返回一个当所有`handler`中的promise都完成后完成的新`promise`。 - * @method request - * @grammar request( command, args ) => * | Promise - * @grammar request( command, args, callback ) => Promise - * @for Uploader - */ - request: function() { - return this.owner.request.apply( this.owner, arguments ); - } - }); - - // 扩展Uploader. - $.extend( Uploader.prototype, { - - /** - * @property {String | Array} [disableWidgets=undefined] - * @namespace options - * @for Uploader - * @description 默认所有 Uploader.register 了的 widget 都会被加载,如果禁用某一部分,请通过此 option 指定黑名单。 - */ - - // 覆写_init用来初始化widgets - _init: function() { - var me = this, - widgets = me._widgets = [], - deactives = me.options.disableWidgets || ''; - - $.each( widgetClass, function( _, klass ) { - (!deactives || !~deactives.indexOf( klass._name )) && - widgets.push( new klass( me ) ); - }); - - return _init.apply( me, arguments ); - }, - - request: function( apiName, args, callback ) { - var i = 0, - widgets = this._widgets, - len = widgets && widgets.length, - rlts = [], - dfds = [], - widget, rlt, promise, key; - - args = isArrayLike( args ) ? args : [ args ]; - - for ( ; i < len; i++ ) { - widget = widgets[ i ]; - rlt = widget.invoke( apiName, args ); - - if ( rlt !== IGNORE ) { - - // Deferred对象 - if ( Base.isPromise( rlt ) ) { - dfds.push( rlt ); - } else { - rlts.push( rlt ); - } - } - } - - // 如果有callback,则用异步方式。 - if ( callback || dfds.length ) { - promise = Base.when.apply( Base, dfds ); - key = promise.pipe ? 'pipe' : 'then'; - - // 很重要不能删除。删除了会死循环。 - // 保证执行顺序。让callback总是在下一个 tick 中执行。 - return promise[ key ](function() { - var deferred = Base.Deferred(), - args = arguments; - - if ( args.length === 1 ) { - args = args[ 0 ]; - } - - setTimeout(function() { - deferred.resolve( args ); - }, 1 ); - - return deferred.promise(); - })[ callback ? key : 'done' ]( callback || Base.noop ); - } else { - return rlts[ 0 ]; - } - }, - - destroy: function() { - _destroy.apply( this, arguments ); - this._widgets = null; - } - }); - - /** - * 添加组件 - * @grammar Uploader.register(proto); - * @grammar Uploader.register(map, proto); - * @param {object} responseMap API 名称与函数实现的映射 - * @param {object} proto 组件原型,构造函数通过 constructor 属性定义 - * @method Uploader.register - * @for Uploader - * @example - * Uploader.register({ - * 'make-thumb': 'makeThumb' - * }, { - * init: function( options ) {}, - * makeThumb: function() {} - * }); - * - * Uploader.register({ - * 'make-thumb': function() { - * - * } - * }); - */ - Uploader.register = Widget.register = function( responseMap, widgetProto ) { - var map = { init: 'init', destroy: 'destroy', name: 'anonymous' }, - klass; - - if ( arguments.length === 1 ) { - widgetProto = responseMap; - - // 自动生成 map 表。 - $.each(widgetProto, function(key) { - if ( key[0] === '_' || key === 'name' ) { - key === 'name' && (map.name = widgetProto.name); - return; - } - - map[key.replace(/[A-Z]/g, '-$&').toLowerCase()] = key; - }); - - } else { - map = $.extend( map, responseMap ); - } - - widgetProto.responseMap = map; - klass = Base.inherits( Widget, widgetProto ); - klass._name = map.name; - widgetClass.push( klass ); - - return klass; - }; - - /** - * 删除插件,只有在注册时指定了名字的才能被删除。 - * @grammar Uploader.unRegister(name); - * @param {string} name 组件名字 - * @method Uploader.unRegister - * @for Uploader - * @example - * - * Uploader.register({ - * name: 'custom', - * - * 'make-thumb': function() { - * - * } - * }); - * - * Uploader.unRegister('custom'); - */ - Uploader.unRegister = Widget.unRegister = function( name ) { - if ( !name || name === 'anonymous' ) { - return; - } - - // 删除指定的插件。 - for ( var i = widgetClass.length; i--; ) { - if ( widgetClass[i]._name === name ) { - widgetClass.splice(i, 1) - } - } - }; - - return Widget; - }); - /** - * @fileOverview 文件选择相关 - */ - define('widgets/filepicker',[ - 'base', - 'uploader', - 'lib/filepicker', - 'widgets/widget' - ], function( Base, Uploader, FilePicker ) { - var $ = Base.$; - - $.extend( Uploader.options, { - - /** - * @property {Selector | Object} [pick=undefined] - * @namespace options - * @for Uploader - * @description 指定选择文件的按钮容器,不指定则不创建按钮。 - * - * * `id` {Seletor|dom} 指定选择文件的按钮容器,不指定则不创建按钮。**注意** 这里虽然写的是 id, 但是不是只支持 id, 还支持 class, 或者 dom 节点。 - * * `label` {String} 请采用 `innerHTML` 代替 - * * `innerHTML` {String} 指定按钮文字。不指定时优先从指定的容器中看是否自带文字。 - * * `multiple` {Boolean} 是否开起同时选择多个文件能力。 - */ - pick: null, - - /** - * @property {Arroy} [accept=null] - * @namespace options - * @for Uploader - * @description 指定接受哪些类型的文件。 由于目前还有ext转mimeType表,所以这里需要分开指定。 - * - * * `title` {String} 文字描述 - * * `extensions` {String} 允许的文件后缀,不带点,多个用逗号分割。 - * * `mimeTypes` {String} 多个用逗号分割。 - * - * 如: - * - * ``` - * { - * title: 'Images', - * extensions: 'gif,jpg,jpeg,bmp,png', - * mimeTypes: 'image/*' - * } - * ``` - */ - accept: null/*{ - title: 'Images', - extensions: 'gif,jpg,jpeg,bmp,png', - mimeTypes: 'image/*' - }*/ - }); - - return Uploader.register({ - name: 'picker', - - init: function( opts ) { - this.pickers = []; - return opts.pick && this.addBtn( opts.pick ); - }, - - refresh: function() { - $.each( this.pickers, function() { - this.refresh(); - }); - }, - - /** - * @method addButton - * @for Uploader - * @grammar addButton( pick ) => Promise - * @description - * 添加文件选择按钮,如果一个按钮不够,需要调用此方法来添加。参数跟[options.pick](#WebUploader:Uploader:options)一致。 - * @example - * uploader.addButton({ - * id: '#btnContainer', - * innerHTML: '选择文件' - * }); - */ - addBtn: function( pick ) { - var me = this, - opts = me.options, - accept = opts.accept, - promises = []; - - if ( !pick ) { - return; - } - - $.isPlainObject( pick ) || (pick = { - id: pick - }); - - $( pick.id ).each(function() { - var options, picker, deferred; - - deferred = Base.Deferred(); - - options = $.extend({}, pick, { - accept: $.isPlainObject( accept ) ? [ accept ] : accept, - swf: opts.swf, - runtimeOrder: opts.runtimeOrder, - id: this - }); - - picker = new FilePicker( options ); - - picker.once( 'ready', deferred.resolve ); - picker.on( 'select', function( files ) { - me.owner.request( 'add-file', [ files ]); - }); - picker.init(); - - me.pickers.push( picker ); - - promises.push( deferred.promise() ); - }); - - return Base.when.apply( Base, promises ); - }, - - disable: function() { - $.each( this.pickers, function() { - this.disable(); - }); - }, - - enable: function() { - $.each( this.pickers, function() { - this.enable(); - }); - }, - - destroy: function() { - $.each( this.pickers, function() { - this.destroy(); - }); - this.pickers = null; - } - }); - }); - /** - * @fileOverview Image - */ - define('lib/image',[ - 'base', - 'runtime/client', - 'lib/blob' - ], function( Base, RuntimeClient, Blob ) { - var $ = Base.$; - - // 构造器。 - function Image( opts ) { - this.options = $.extend({}, Image.options, opts ); - RuntimeClient.call( this, 'Image' ); - - this.on( 'load', function() { - this._info = this.exec('info'); - this._meta = this.exec('meta'); - }); - } - - // 默认选项。 - Image.options = { - - // 默认的图片处理质量 - quality: 90, - - // 是否裁剪 - crop: false, - - // 是否保留头部信息 - preserveHeaders: false, - - // 是否允许放大。 - allowMagnify: false - }; - - // 继承RuntimeClient. - Base.inherits( RuntimeClient, { - constructor: Image, - - info: function( val ) { - - // setter - if ( val ) { - this._info = val; - return this; - } - - // getter - return this._info; - }, - - meta: function( val ) { - - // setter - if ( val ) { - this._meta = val; - return this; - } - - // getter - return this._meta; - }, - - loadFromBlob: function( blob ) { - var me = this, - ruid = blob.getRuid(); - - this.connectRuntime( ruid, function() { - me.exec( 'init', me.options ); - me.exec( 'loadFromBlob', blob ); - }); - }, - - resize: function() { - var args = Base.slice( arguments ); - return this.exec.apply( this, [ 'resize' ].concat( args ) ); - }, - - crop: function() { - var args = Base.slice( arguments ); - return this.exec.apply( this, [ 'crop' ].concat( args ) ); - }, - - getAsDataUrl: function( type ) { - return this.exec( 'getAsDataUrl', type ); - }, - - getAsBlob: function( type ) { - var blob = this.exec( 'getAsBlob', type ); - - return new Blob( this.getRuid(), blob ); - } - }); - - return Image; - }); - /** - * @fileOverview 图片操作, 负责预览图片和上传前压缩图片 - */ - define('widgets/image',[ - 'base', - 'uploader', - 'lib/image', - 'widgets/widget' - ], function( Base, Uploader, Image ) { - - var $ = Base.$, - throttle; - - // 根据要处理的文件大小来节流,一次不能处理太多,会卡。 - throttle = (function( max ) { - var occupied = 0, - waiting = [], - tick = function() { - var item; - - while ( waiting.length && occupied < max ) { - item = waiting.shift(); - occupied += item[ 0 ]; - item[ 1 ](); - } - }; - - return function( emiter, size, cb ) { - waiting.push([ size, cb ]); - emiter.once( 'destroy', function() { - occupied -= size; - setTimeout( tick, 1 ); - }); - setTimeout( tick, 1 ); - }; - })( 5 * 1024 * 1024 ); - - $.extend( Uploader.options, { - - /** - * @property {Object} [thumb] - * @namespace options - * @for Uploader - * @description 配置生成缩略图的选项。 - * - * 默认为: - * - * ```javascript - * { - * width: 110, - * height: 110, - * - * // 图片质量,只有type为`image/jpeg`的时候才有效。 - * quality: 70, - * - * // 是否允许放大,如果想要生成小图的时候不失真,此选项应该设置为false. - * allowMagnify: true, - * - * // 是否允许裁剪。 - * crop: true, - * - * // 为空的话则保留原有图片格式。 - * // 否则强制转换成指定的类型。 - * type: 'image/jpeg' - * } - * ``` - */ - thumb: { - width: 110, - height: 110, - quality: 70, - allowMagnify: true, - crop: true, - preserveHeaders: false, - - // 为空的话则保留原有图片格式。 - // 否则强制转换成指定的类型。 - // IE 8下面 base64 大小不能超过 32K 否则预览失败,而非 jpeg 编码的图片很可 - // 能会超过 32k, 所以这里设置成预览的时候都是 image/jpeg - type: 'image/jpeg' - }, - - /** - * @property {Object} [compress] - * @namespace options - * @for Uploader - * @description 配置压缩的图片的选项。如果此选项为`false`, 则图片在上传前不进行压缩。 - * - * 默认为: - * - * ```javascript - * { - * width: 1600, - * height: 1600, - * - * // 图片质量,只有type为`image/jpeg`的时候才有效。 - * quality: 90, - * - * // 是否允许放大,如果想要生成小图的时候不失真,此选项应该设置为false. - * allowMagnify: false, - * - * // 是否允许裁剪。 - * crop: false, - * - * // 是否保留头部meta信息。 - * preserveHeaders: true, - * - * // 如果发现压缩后文件大小比原来还大,则使用原来图片 - * // 此属性可能会影响图片自动纠正功能 - * noCompressIfLarger: false, - * - * // 单位字节,如果图片大小小于此值,不会采用压缩。 - * compressSize: 0 - * } - * ``` - */ - compress: { - width: 1600, - height: 1600, - quality: 90, - allowMagnify: false, - crop: false, - preserveHeaders: true - } - }); - - return Uploader.register({ - - name: 'image', - - - /** - * 生成缩略图,此过程为异步,所以需要传入`callback`。 - * 通常情况在图片加入队里后调用此方法来生成预览图以增强交互效果。 - * - * 当 width 或者 height 的值介于 0 - 1 时,被当成百分比使用。 - * - * `callback`中可以接收到两个参数。 - * * 第一个为error,如果生成缩略图有错误,此error将为真。 - * * 第二个为ret, 缩略图的Data URL值。 - * - * **注意** - * Date URL在IE6/7中不支持,所以不用调用此方法了,直接显示一张暂不支持预览图片好了。 - * 也可以借助服务端,将 base64 数据传给服务端,生成一个临时文件供预览。 - * - * @method makeThumb - * @grammar makeThumb( file, callback ) => undefined - * @grammar makeThumb( file, callback, width, height ) => undefined - * @for Uploader - * @example - * - * uploader.on( 'fileQueued', function( file ) { - * var $li = ...; - * - * uploader.makeThumb( file, function( error, ret ) { - * if ( error ) { - * $li.text('预览错误'); - * } else { - * $li.append(''); - * } - * }); - * - * }); - */ - makeThumb: function( file, cb, width, height ) { - var opts, image; - - file = this.request( 'get-file', file ); - - // 只预览图片格式。 - if ( !file.type.match( /^image/ ) ) { - cb( true ); - return; - } - - opts = $.extend({}, this.options.thumb ); - - // 如果传入的是object. - if ( $.isPlainObject( width ) ) { - opts = $.extend( opts, width ); - width = null; - } - - width = width || opts.width; - height = height || opts.height; - - image = new Image( opts ); - - image.once( 'load', function() { - file._info = file._info || image.info(); - file._meta = file._meta || image.meta(); - - // 如果 width 的值介于 0 - 1 - // 说明设置的是百分比。 - if ( width <= 1 && width > 0 ) { - width = file._info.width * width; - } - - // 同样的规则应用于 height - if ( height <= 1 && height > 0 ) { - height = file._info.height * height; - } - - image.resize( width, height ); - }); - - // 当 resize 完后 - image.once( 'complete', function() { - cb( false, image.getAsDataUrl( opts.type ) ); - image.destroy(); - }); - - image.once( 'error', function( reason ) { - cb( reason || true ); - image.destroy(); - }); - - throttle( image, file.source.size, function() { - file._info && image.info( file._info ); - file._meta && image.meta( file._meta ); - image.loadFromBlob( file.source ); - }); - }, - - beforeSendFile: function( file ) { - var opts = this.options.compress || this.options.resize, - compressSize = opts && opts.compressSize || 0, - noCompressIfLarger = opts && opts.noCompressIfLarger || false, - image, deferred; - - file = this.request( 'get-file', file ); - - // 只压缩 jpeg 图片格式。 - // gif 可能会丢失针 - // bmp png 基本上尺寸都不大,且压缩比比较小。 - if ( !opts || !~'image/jpeg,image/jpg'.indexOf( file.type ) || - file.size < compressSize || - file._compressed ) { - return; - } - - opts = $.extend({}, opts ); - deferred = Base.Deferred(); - - image = new Image( opts ); - - deferred.always(function() { - image.destroy(); - image = null; - }); - image.once( 'error', deferred.reject ); - image.once( 'load', function() { - var width = opts.width, - height = opts.height; - - file._info = file._info || image.info(); - file._meta = file._meta || image.meta(); - - // 如果 width 的值介于 0 - 1 - // 说明设置的是百分比。 - if ( width <= 1 && width > 0 ) { - width = file._info.width * width; - } - - // 同样的规则应用于 height - if ( height <= 1 && height > 0 ) { - height = file._info.height * height; - } - - image.resize( width, height ); - }); - - image.once( 'complete', function() { - var blob, size; - - // 移动端 UC / qq 浏览器的无图模式下 - // ctx.getImageData 处理大图的时候会报 Exception - // INDEX_SIZE_ERR: DOM Exception 1 - try { - blob = image.getAsBlob( opts.type ); - - size = file.size; - - // 如果压缩后,比原来还大则不用压缩后的。 - if ( !noCompressIfLarger || blob.size < size ) { - // file.source.destroy && file.source.destroy(); - file.source = blob; - file.size = blob.size; - - file.trigger( 'resize', blob.size, size ); - } - - // 标记,避免重复压缩。 - file._compressed = true; - deferred.resolve(); - } catch ( e ) { - // 出错了直接继续,让其上传原始图片 - deferred.resolve(); - } - }); - - file._info && image.info( file._info ); - file._meta && image.meta( file._meta ); - - image.loadFromBlob( file.source ); - return deferred.promise(); - } - }); - }); - /** - * @fileOverview 文件属性封装 - */ - define('file',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$, - idPrefix = 'WU_FILE_', - idSuffix = 0, - rExt = /\.([^.]+)$/, - statusMap = {}; - - function gid() { - return idPrefix + idSuffix++; - } - - /** - * 文件类 - * @class File - * @constructor 构造函数 - * @grammar new File( source ) => File - * @param {Lib.File} source [lib.File](#Lib.File)实例, 此source对象是带有Runtime信息的。 - */ - function WUFile( source ) { - - /** - * 文件名,包括扩展名(后缀) - * @property name - * @type {string} - */ - this.name = source.name || 'Untitled'; - - /** - * 文件体积(字节) - * @property size - * @type {uint} - * @default 0 - */ - this.size = source.size || 0; - - /** - * 文件MIMETYPE类型,与文件类型的对应关系请参考[http://t.cn/z8ZnFny](http://t.cn/z8ZnFny) - * @property type - * @type {string} - * @default 'application/octet-stream' - */ - this.type = source.type || 'application/octet-stream'; - - /** - * 文件最后修改日期 - * @property lastModifiedDate - * @type {int} - * @default 当前时间戳 - */ - this.lastModifiedDate = source.lastModifiedDate || (new Date() * 1); - - /** - * 文件ID,每个对象具有唯一ID,与文件名无关 - * @property id - * @type {string} - */ - this.id = gid(); - - /** - * 文件扩展名,通过文件名获取,例如test.png的扩展名为png - * @property ext - * @type {string} - */ - this.ext = rExt.exec( this.name ) ? RegExp.$1 : ''; - - - /** - * 状态文字说明。在不同的status语境下有不同的用途。 - * @property statusText - * @type {string} - */ - this.statusText = ''; - - // 存储文件状态,防止通过属性直接修改 - statusMap[ this.id ] = WUFile.Status.INITED; - - this.source = source; - this.loaded = 0; - - this.on( 'error', function( msg ) { - this.setStatus( WUFile.Status.ERROR, msg ); - }); - } - - $.extend( WUFile.prototype, { - - /** - * 设置状态,状态变化时会触发`change`事件。 - * @method setStatus - * @grammar setStatus( status[, statusText] ); - * @param {File.Status|String} status [文件状态值](#WebUploader:File:File.Status) - * @param {String} [statusText=''] 状态说明,常在error时使用,用http, abort,server等来标记是由于什么原因导致文件错误。 - */ - setStatus: function( status, text ) { - - var prevStatus = statusMap[ this.id ]; - - typeof text !== 'undefined' && (this.statusText = text); - - if ( status !== prevStatus ) { - statusMap[ this.id ] = status; - /** - * 文件状态变化 - * @event statuschange - */ - this.trigger( 'statuschange', status, prevStatus ); - } - - }, - - /** - * 获取文件状态 - * @return {File.Status} - * @example - 文件状态具体包括以下几种类型: - { - // 初始化 - INITED: 0, - // 已入队列 - QUEUED: 1, - // 正在上传 - PROGRESS: 2, - // 上传出错 - ERROR: 3, - // 上传成功 - COMPLETE: 4, - // 上传取消 - CANCELLED: 5 - } - */ - getStatus: function() { - return statusMap[ this.id ]; - }, - - /** - * 获取文件原始信息。 - * @return {*} - */ - getSource: function() { - return this.source; - }, - - destroy: function() { - this.off(); - delete statusMap[ this.id ]; - } - }); - - Mediator.installTo( WUFile.prototype ); - - /** - * 文件状态值,具体包括以下几种类型: - * * `inited` 初始状态 - * * `queued` 已经进入队列, 等待上传 - * * `progress` 上传中 - * * `complete` 上传完成。 - * * `error` 上传出错,可重试 - * * `interrupt` 上传中断,可续传。 - * * `invalid` 文件不合格,不能重试上传。会自动从队列中移除。 - * * `cancelled` 文件被移除。 - * @property {Object} Status - * @namespace File - * @class File - * @static - */ - WUFile.Status = { - INITED: 'inited', // 初始状态 - QUEUED: 'queued', // 已经进入队列, 等待上传 - PROGRESS: 'progress', // 上传中 - ERROR: 'error', // 上传出错,可重试 - COMPLETE: 'complete', // 上传完成。 - CANCELLED: 'cancelled', // 上传取消。 - INTERRUPT: 'interrupt', // 上传中断,可续传。 - INVALID: 'invalid' // 文件不合格,不能重试上传。 - }; - - return WUFile; - }); - - /** - * @fileOverview 文件队列 - */ - define('queue',[ - 'base', - 'mediator', - 'file' - ], function( Base, Mediator, WUFile ) { - - var $ = Base.$, - STATUS = WUFile.Status; - - /** - * 文件队列, 用来存储各个状态中的文件。 - * @class Queue - * @extends Mediator - */ - function Queue() { - - /** - * 统计文件数。 - * * `numOfQueue` 队列中的文件数。 - * * `numOfSuccess` 上传成功的文件数 - * * `numOfCancel` 被取消的文件数 - * * `numOfProgress` 正在上传中的文件数 - * * `numOfUploadFailed` 上传错误的文件数。 - * * `numOfInvalid` 无效的文件数。 - * * `numofDeleted` 被移除的文件数。 - * @property {Object} stats - */ - this.stats = { - numOfQueue: 0, - numOfSuccess: 0, - numOfCancel: 0, - numOfProgress: 0, - numOfUploadFailed: 0, - numOfInvalid: 0, - numofDeleted: 0, - numofInterrupt: 0 - }; - - // 上传队列,仅包括等待上传的文件 - this._queue = []; - - // 存储所有文件 - this._map = {}; - } - - $.extend( Queue.prototype, { - - /** - * 将新文件加入对队列尾部 - * - * @method append - * @param {File} file 文件对象 - */ - append: function( file ) { - this._queue.push( file ); - this._fileAdded( file ); - return this; - }, - - /** - * 将新文件加入对队列头部 - * - * @method prepend - * @param {File} file 文件对象 - */ - prepend: function( file ) { - this._queue.unshift( file ); - this._fileAdded( file ); - return this; - }, - - /** - * 获取文件对象 - * - * @method getFile - * @param {String} fileId 文件ID - * @return {File} - */ - getFile: function( fileId ) { - if ( typeof fileId !== 'string' ) { - return fileId; - } - return this._map[ fileId ]; - }, - - /** - * 从队列中取出一个指定状态的文件。 - * @grammar fetch( status ) => File - * @method fetch - * @param {String} status [文件状态值](#WebUploader:File:File.Status) - * @return {File} [File](#WebUploader:File) - */ - fetch: function( status ) { - var len = this._queue.length, - i, file; - - status = status || STATUS.QUEUED; - - for ( i = 0; i < len; i++ ) { - file = this._queue[ i ]; - - if ( status === file.getStatus() ) { - return file; - } - } - - return null; - }, - - /** - * 对队列进行排序,能够控制文件上传顺序。 - * @grammar sort( fn ) => undefined - * @method sort - * @param {Function} fn 排序方法 - */ - sort: function( fn ) { - if ( typeof fn === 'function' ) { - this._queue.sort( fn ); - } - }, - - /** - * 获取指定类型的文件列表, 列表中每一个成员为[File](#WebUploader:File)对象。 - * @grammar getFiles( [status1[, status2 ...]] ) => Array - * @method getFiles - * @param {String} [status] [文件状态值](#WebUploader:File:File.Status) - */ - getFiles: function() { - var sts = [].slice.call( arguments, 0 ), - ret = [], - i = 0, - len = this._queue.length, - file; - - for ( ; i < len; i++ ) { - file = this._queue[ i ]; - - if ( sts.length && !~$.inArray( file.getStatus(), sts ) ) { - continue; - } - - ret.push( file ); - } - - return ret; - }, - - /** - * 在队列中删除文件。 - * @grammar removeFile( file ) => Array - * @method removeFile - * @param {File} 文件对象。 - */ - removeFile: function( file ) { - var me = this, - existing = this._map[ file.id ]; - - if ( existing ) { - delete this._map[ file.id ]; - file.destroy(); - this.stats.numofDeleted++; - } - }, - - _fileAdded: function( file ) { - var me = this, - existing = this._map[ file.id ]; - - if ( !existing ) { - this._map[ file.id ] = file; - - file.on( 'statuschange', function( cur, pre ) { - me._onFileStatusChange( cur, pre ); - }); - } - }, - - _onFileStatusChange: function( curStatus, preStatus ) { - var stats = this.stats; - - switch ( preStatus ) { - case STATUS.PROGRESS: - stats.numOfProgress--; - break; - - case STATUS.QUEUED: - stats.numOfQueue --; - break; - - case STATUS.ERROR: - stats.numOfUploadFailed--; - break; - - case STATUS.INVALID: - stats.numOfInvalid--; - break; - - case STATUS.INTERRUPT: - stats.numofInterrupt--; - break; - } - - switch ( curStatus ) { - case STATUS.QUEUED: - stats.numOfQueue++; - break; - - case STATUS.PROGRESS: - stats.numOfProgress++; - break; - - case STATUS.ERROR: - stats.numOfUploadFailed++; - break; - - case STATUS.COMPLETE: - stats.numOfSuccess++; - break; - - case STATUS.CANCELLED: - stats.numOfCancel++; - break; - - - case STATUS.INVALID: - stats.numOfInvalid++; - break; - - case STATUS.INTERRUPT: - stats.numofInterrupt++; - break; - } - } - - }); - - Mediator.installTo( Queue.prototype ); - - return Queue; - }); - /** - * @fileOverview 队列 - */ - define('widgets/queue',[ - 'base', - 'uploader', - 'queue', - 'file', - 'lib/file', - 'runtime/client', - 'widgets/widget' - ], function( Base, Uploader, Queue, WUFile, File, RuntimeClient ) { - - var $ = Base.$, - rExt = /\.\w+$/, - Status = WUFile.Status; - - return Uploader.register({ - name: 'queue', - - init: function( opts ) { - var me = this, - deferred, len, i, item, arr, accept, runtime; - - if ( $.isPlainObject( opts.accept ) ) { - opts.accept = [ opts.accept ]; - } - - // accept中的中生成匹配正则。 - if ( opts.accept ) { - arr = []; - - for ( i = 0, len = opts.accept.length; i < len; i++ ) { - item = opts.accept[ i ].extensions; - item && arr.push( item ); - } - - if ( arr.length ) { - accept = '\\.' + arr.join(',') - .replace( /,/g, '$|\\.' ) - .replace( /\*/g, '.*' ) + '$'; - } - - me.accept = new RegExp( accept, 'i' ); - } - - me.queue = new Queue(); - me.stats = me.queue.stats; - - // 如果当前不是html5运行时,那就算了。 - // 不执行后续操作 - if ( this.request('predict-runtime-type') !== 'html5' ) { - return; - } - - // 创建一个 html5 运行时的 placeholder - // 以至于外部添加原生 File 对象的时候能正确包裹一下供 webuploader 使用。 - deferred = Base.Deferred(); - this.placeholder = runtime = new RuntimeClient('Placeholder'); - runtime.connectRuntime({ - runtimeOrder: 'html5' - }, function() { - me._ruid = runtime.getRuid(); - deferred.resolve(); - }); - return deferred.promise(); - }, - - - // 为了支持外部直接添加一个原生File对象。 - _wrapFile: function( file ) { - if ( !(file instanceof WUFile) ) { - - if ( !(file instanceof File) ) { - if ( !this._ruid ) { - throw new Error('Can\'t add external files.'); - } - file = new File( this._ruid, file ); - } - - file = new WUFile( file ); - } - - return file; - }, - - // 判断文件是否可以被加入队列 - acceptFile: function( file ) { - var invalid = !file || !file.size || this.accept && - - // 如果名字中有后缀,才做后缀白名单处理。 - rExt.exec( file.name ) && !this.accept.test( file.name ); - - return !invalid; - }, - - - /** - * @event beforeFileQueued - * @param {File} file File对象 - * @description 当文件被加入队列之前触发,此事件的handler返回值为`false`,则此文件不会被添加进入队列。 - * @for Uploader - */ - - /** - * @event fileQueued - * @param {File} file File对象 - * @description 当文件被加入队列以后触发。 - * @for Uploader - */ - - _addFile: function( file ) { - var me = this; - - file = me._wrapFile( file ); - - // 不过类型判断允许不允许,先派送 `beforeFileQueued` - if ( !me.owner.trigger( 'beforeFileQueued', file ) ) { - return; - } - - // 类型不匹配,则派送错误事件,并返回。 - if ( !me.acceptFile( file ) ) { - me.owner.trigger( 'error', 'Q_TYPE_DENIED', file ); - return; - } - - me.queue.append( file ); - me.owner.trigger( 'fileQueued', file ); - return file; - }, - - getFile: function( fileId ) { - return this.queue.getFile( fileId ); - }, - - /** - * @event filesQueued - * @param {File} files 数组,内容为原始File(lib/File)对象。 - * @description 当一批文件添加进队列以后触发。 - * @for Uploader - */ - - /** - * @property {Boolean} [auto=false] - * @namespace options - * @for Uploader - * @description 设置为 true 后,不需要手动调用上传,有文件选择即开始上传。 - * - */ - - /** - * @method addFiles - * @grammar addFiles( file ) => undefined - * @grammar addFiles( [file1, file2 ...] ) => undefined - * @param {Array of File or File} [files] Files 对象 数组 - * @description 添加文件到队列 - * @for Uploader - */ - addFile: function( files ) { - var me = this; - - if ( !files.length ) { - files = [ files ]; - } - - files = $.map( files, function( file ) { - return me._addFile( file ); - }); - - me.owner.trigger( 'filesQueued', files ); - - if ( me.options.auto ) { - setTimeout(function() { - me.request('start-upload'); - }, 20 ); - } - }, - - getStats: function() { - return this.stats; - }, - - /** - * @event fileDequeued - * @param {File} file File对象 - * @description 当文件被移除队列后触发。 - * @for Uploader - */ - - /** - * @method removeFile - * @grammar removeFile( file ) => undefined - * @grammar removeFile( id ) => undefined - * @grammar removeFile( file, true ) => undefined - * @grammar removeFile( id, true ) => undefined - * @param {File|id} file File对象或这File对象的id - * @description 移除某一文件, 默认只会标记文件状态为已取消,如果第二个参数为 `true` 则会从 queue 中移除。 - * @for Uploader - * @example - * - * $li.on('click', '.remove-this', function() { - * uploader.removeFile( file ); - * }) - */ - removeFile: function( file, remove ) { - var me = this; - - file = file.id ? file : me.queue.getFile( file ); - - this.request( 'cancel-file', file ); - - if ( remove ) { - this.queue.removeFile( file ); - } - }, - - /** - * @method getFiles - * @grammar getFiles() => Array - * @grammar getFiles( status1, status2, status... ) => Array - * @description 返回指定状态的文件集合,不传参数将返回所有状态的文件。 - * @for Uploader - * @example - * console.log( uploader.getFiles() ); // => all files - * console.log( uploader.getFiles('error') ) // => all error files. - */ - getFiles: function() { - return this.queue.getFiles.apply( this.queue, arguments ); - }, - - fetchFile: function() { - return this.queue.fetch.apply( this.queue, arguments ); - }, - - /** - * @method retry - * @grammar retry() => undefined - * @grammar retry( file ) => undefined - * @description 重试上传,重试指定文件,或者从出错的文件开始重新上传。 - * @for Uploader - * @example - * function retry() { - * uploader.retry(); - * } - */ - retry: function( file, noForceStart ) { - var me = this, - files, i, len; - - if ( file ) { - file = file.id ? file : me.queue.getFile( file ); - file.setStatus( Status.QUEUED ); - noForceStart || me.request('start-upload'); - return; - } - - files = me.queue.getFiles( Status.ERROR ); - i = 0; - len = files.length; - - for ( ; i < len; i++ ) { - file = files[ i ]; - file.setStatus( Status.QUEUED ); - } - - me.request('start-upload'); - }, - - /** - * @method sort - * @grammar sort( fn ) => undefined - * @description 排序队列中的文件,在上传之前调整可以控制上传顺序。 - * @for Uploader - */ - sortFiles: function() { - return this.queue.sort.apply( this.queue, arguments ); - }, - - /** - * @event reset - * @description 当 uploader 被重置的时候触发。 - * @for Uploader - */ - - /** - * @method reset - * @grammar reset() => undefined - * @description 重置uploader。目前只重置了队列。 - * @for Uploader - * @example - * uploader.reset(); - */ - reset: function() { - this.owner.trigger('reset'); - this.queue = new Queue(); - this.stats = this.queue.stats; - }, - - destroy: function() { - this.reset(); - this.placeholder && this.placeholder.destroy(); - } - }); - - }); - /** - * @fileOverview 添加获取Runtime相关信息的方法。 - */ - define('widgets/runtime',[ - 'uploader', - 'runtime/runtime', - 'widgets/widget' - ], function( Uploader, Runtime ) { - - Uploader.support = function() { - return Runtime.hasRuntime.apply( Runtime, arguments ); - }; - - /** - * @property {Object} [runtimeOrder=html5,flash] - * @namespace options - * @for Uploader - * @description 指定运行时启动顺序。默认会想尝试 html5 是否支持,如果支持则使用 html5, 否则则使用 flash. - * - * 可以将此值设置成 `flash`,来强制使用 flash 运行时。 - */ - - return Uploader.register({ - name: 'runtime', - - init: function() { - if ( !this.predictRuntimeType() ) { - throw Error('Runtime Error'); - } - }, - - /** - * 预测Uploader将采用哪个`Runtime` - * @grammar predictRuntimeType() => String - * @method predictRuntimeType - * @for Uploader - */ - predictRuntimeType: function() { - var orders = this.options.runtimeOrder || Runtime.orders, - type = this.type, - i, len; - - if ( !type ) { - orders = orders.split( /\s*,\s*/g ); - - for ( i = 0, len = orders.length; i < len; i++ ) { - if ( Runtime.hasRuntime( orders[ i ] ) ) { - this.type = type = orders[ i ]; - break; - } - } - } - - return type; - } - }); - }); - /** - * @fileOverview Transport - */ - define('lib/transport',[ - 'base', - 'runtime/client', - 'mediator' - ], function( Base, RuntimeClient, Mediator ) { - - var $ = Base.$; - - function Transport( opts ) { - var me = this; - - opts = me.options = $.extend( true, {}, Transport.options, opts || {} ); - RuntimeClient.call( this, 'Transport' ); - - this._blob = null; - this._formData = opts.formData || {}; - this._headers = opts.headers || {}; - - this.on( 'progress', this._timeout ); - this.on( 'load error', function() { - me.trigger( 'progress', 1 ); - clearTimeout( me._timer ); - }); - } - - Transport.options = { - server: '', - method: 'POST', - - // 跨域时,是否允许携带cookie, 只有html5 runtime才有效 - withCredentials: false, - fileVal: 'file', - timeout: 2 * 60 * 1000, // 2分钟 - formData: {}, - headers: {}, - sendAsBinary: false - }; - - $.extend( Transport.prototype, { - - // 添加Blob, 只能添加一次,最后一次有效。 - appendBlob: function( key, blob, filename ) { - var me = this, - opts = me.options; - - if ( me.getRuid() ) { - me.disconnectRuntime(); - } - - // 连接到blob归属的同一个runtime. - me.connectRuntime( blob.ruid, function() { - me.exec('init'); - }); - - me._blob = blob; - opts.fileVal = key || opts.fileVal; - opts.filename = filename || opts.filename; - }, - - // 添加其他字段 - append: function( key, value ) { - if ( typeof key === 'object' ) { - $.extend( this._formData, key ); - } else { - this._formData[ key ] = value; - } - }, - - setRequestHeader: function( key, value ) { - if ( typeof key === 'object' ) { - $.extend( this._headers, key ); - } else { - this._headers[ key ] = value; - } - }, - - send: function( method ) { - this.exec( 'send', method ); - this._timeout(); - }, - - abort: function() { - clearTimeout( this._timer ); - return this.exec('abort'); - }, - - destroy: function() { - this.trigger('destroy'); - this.off(); - this.exec('destroy'); - this.disconnectRuntime(); - }, - - getResponse: function() { - return this.exec('getResponse'); - }, - - getResponseAsJson: function() { - return this.exec('getResponseAsJson'); - }, - - getStatus: function() { - return this.exec('getStatus'); - }, - - _timeout: function() { - var me = this, - duration = me.options.timeout; - - if ( !duration ) { - return; - } - - clearTimeout( me._timer ); - me._timer = setTimeout(function() { - me.abort(); - me.trigger( 'error', 'timeout' ); - }, duration ); - } - - }); - - // 让Transport具备事件功能。 - Mediator.installTo( Transport.prototype ); - - return Transport; - }); - /** - * @fileOverview 负责文件上传相关。 - */ - define('widgets/upload',[ - 'base', - 'uploader', - 'file', - 'lib/transport', - 'widgets/widget' - ], function( Base, Uploader, WUFile, Transport ) { - - var $ = Base.$, - isPromise = Base.isPromise, - Status = WUFile.Status; - - // 添加默认配置项 - $.extend( Uploader.options, { - - - /** - * @property {Boolean} [prepareNextFile=false] - * @namespace options - * @for Uploader - * @description 是否允许在文件传输时提前把下一个文件准备好。 - * 对于一个文件的准备工作比较耗时,比如图片压缩,md5序列化。 - * 如果能提前在当前文件传输期处理,可以节省总体耗时。 - */ - prepareNextFile: false, - - /** - * @property {Boolean} [chunked=false] - * @namespace options - * @for Uploader - * @description 是否要分片处理大文件上传。 - */ - chunked: false, - - /** - * @property {Boolean} [chunkSize=5242880] - * @namespace options - * @for Uploader - * @description 如果要分片,分多大一片? 默认大小为5M. - */ - chunkSize: 5 * 1024 * 1024, - - /** - * @property {Boolean} [chunkRetry=2] - * @namespace options - * @for Uploader - * @description 如果某个分片由于网络问题出错,允许自动重传多少次? - */ - chunkRetry: 2, - - /** - * @property {Boolean} [threads=3] - * @namespace options - * @for Uploader - * @description 上传并发数。允许同时最大上传进程数。 - */ - threads: 3, - - - /** - * @property {Object} [formData={}] - * @namespace options - * @for Uploader - * @description 文件上传请求的参数表,每次发送都会发送此对象中的参数。 - */ - formData: {} - - /** - * @property {Object} [fileVal='file'] - * @namespace options - * @for Uploader - * @description 设置文件上传域的name。 - */ - - /** - * @property {Object} [method='POST'] - * @namespace options - * @for Uploader - * @description 文件上传方式,`POST`或者`GET`。 - */ - - /** - * @property {Object} [sendAsBinary=false] - * @namespace options - * @for Uploader - * @description 是否已二进制的流的方式发送文件,这样整个上传内容`php://input`都为文件内容, - * 其他参数在$_GET数组中。 - */ - }); - - // 负责将文件切片。 - function CuteFile( file, chunkSize ) { - var pending = [], - blob = file.source, - total = blob.size, - chunks = chunkSize ? Math.ceil( total / chunkSize ) : 1, - start = 0, - index = 0, - len, api; - - api = { - file: file, - - has: function() { - return !!pending.length; - }, - - shift: function() { - return pending.shift(); - }, - - unshift: function( block ) { - pending.unshift( block ); - } - }; - - while ( index < chunks ) { - len = Math.min( chunkSize, total - start ); - - pending.push({ - file: file, - start: start, - end: chunkSize ? (start + len) : total, - total: total, - chunks: chunks, - chunk: index++, - cuted: api - }); - start += len; - } - - file.blocks = pending.concat(); - file.remaning = pending.length; - - return api; - } - - Uploader.register({ - name: 'upload', - - init: function() { - var owner = this.owner, - me = this; - - this.runing = false; - this.progress = false; - - owner - .on( 'startUpload', function() { - me.progress = true; - }) - .on( 'uploadFinished', function() { - me.progress = false; - }); - - // 记录当前正在传的数据,跟threads相关 - this.pool = []; - - // 缓存分好片的文件。 - this.stack = []; - - // 缓存即将上传的文件。 - this.pending = []; - - // 跟踪还有多少分片在上传中但是没有完成上传。 - this.remaning = 0; - this.__tick = Base.bindFn( this._tick, this ); - - owner.on( 'uploadComplete', function( file ) { - - // 把其他块取消了。 - file.blocks && $.each( file.blocks, function( _, v ) { - v.transport && (v.transport.abort(), v.transport.destroy()); - delete v.transport; - }); - - delete file.blocks; - delete file.remaning; - }); - }, - - reset: function() { - this.request( 'stop-upload', true ); - this.runing = false; - this.pool = []; - this.stack = []; - this.pending = []; - this.remaning = 0; - this._trigged = false; - this._promise = null; - }, - - /** - * @event startUpload - * @description 当开始上传流程时触发。 - * @for Uploader - */ - - /** - * 开始上传。此方法可以从初始状态调用开始上传流程,也可以从暂停状态调用,继续上传流程。 - * - * 可以指定开始某一个文件。 - * @grammar upload() => undefined - * @grammar upload( file | fileId) => undefined - * @method upload - * @for Uploader - */ - startUpload: function(file) { - var me = this; - - // 移出invalid的文件 - $.each( me.request( 'get-files', Status.INVALID ), function() { - me.request( 'remove-file', this ); - }); - - // 如果指定了开始某个文件,则只开始指定文件。 - if ( file ) { - file = file.id ? file : me.request( 'get-file', file ); - - if (file.getStatus() === Status.INTERRUPT) { - $.each( me.pool, function( _, v ) { - - // 之前暂停过。 - if (v.file !== file) { - return; - } - - v.transport && v.transport.send(); - }); - - file.setStatus( Status.QUEUED ); - } else if (file.getStatus() === Status.PROGRESS) { - return; - } else { - file.setStatus( Status.QUEUED ); - } - } else { - $.each( me.request( 'get-files', [ Status.INITED ] ), function() { - this.setStatus( Status.QUEUED ); - }); - } - - if ( me.runing ) { - return; - } - - me.runing = true; - - var files = []; - - // 如果有暂停的,则续传 - $.each( me.pool, function( _, v ) { - var file = v.file; - - if ( file.getStatus() === Status.INTERRUPT ) { - files.push(file); - me._trigged = false; - v.transport && v.transport.send(); - } - }); - - var file; - while ( (file = files.shift()) ) { - file.setStatus( Status.PROGRESS ); - } - - file || $.each( me.request( 'get-files', - Status.INTERRUPT ), function() { - this.setStatus( Status.PROGRESS ); - }); - - me._trigged = false; - Base.nextTick( me.__tick ); - me.owner.trigger('startUpload'); - }, - - /** - * @event stopUpload - * @description 当开始上传流程暂停时触发。 - * @for Uploader - */ - - /** - * 暂停上传。第一个参数为是否中断上传当前正在上传的文件。 - * - * 如果第一个参数是文件,则只暂停指定文件。 - * @grammar stop() => undefined - * @grammar stop( true ) => undefined - * @grammar stop( file ) => undefined - * @method stop - * @for Uploader - */ - stopUpload: function( file, interrupt ) { - var me = this; - - if (file === true) { - interrupt = file; - file = null; - } - - if ( me.runing === false ) { - return; - } - - // 如果只是暂停某个文件。 - if ( file ) { - file = file.id ? file : me.request( 'get-file', file ); - - if ( file.getStatus() !== Status.PROGRESS && - file.getStatus() !== Status.QUEUED ) { - return; - } - - file.setStatus( Status.INTERRUPT ); - $.each( me.pool, function( _, v ) { - - // 只 abort 指定的文件。 - if (v.file !== file) { - return; - } - - v.transport && v.transport.abort(); - me._putback(v); - me._popBlock(v); - }); - - return Base.nextTick( me.__tick ); - } - - me.runing = false; - - if (this._promise && this._promise.file) { - this._promise.file.setStatus( Status.INTERRUPT ); - } - - interrupt && $.each( me.pool, function( _, v ) { - v.transport && v.transport.abort(); - v.file.setStatus( Status.INTERRUPT ); - }); - - me.owner.trigger('stopUpload'); - }, - - /** - * @method cancelFile - * @grammar cancelFile( file ) => undefined - * @grammar cancelFile( id ) => undefined - * @param {File|id} file File对象或这File对象的id - * @description 标记文件状态为已取消, 同时将中断文件传输。 - * @for Uploader - * @example - * - * $li.on('click', '.remove-this', function() { - * uploader.cancelFile( file ); - * }) - */ - cancelFile: function( file ) { - file = file.id ? file : this.request( 'get-file', file ); - - // 如果正在上传。 - file.blocks && $.each( file.blocks, function( _, v ) { - var _tr = v.transport; - - if ( _tr ) { - _tr.abort(); - _tr.destroy(); - delete v.transport; - } - }); - - file.setStatus( Status.CANCELLED ); - this.owner.trigger( 'fileDequeued', file ); - }, - - /** - * 判断`Uplaode`r是否正在上传中。 - * @grammar isInProgress() => Boolean - * @method isInProgress - * @for Uploader - */ - isInProgress: function() { - return !!this.progress; - }, - - _getStats: function() { - return this.request('get-stats'); - }, - - /** - * 掉过一个文件上传,直接标记指定文件为已上传状态。 - * @grammar skipFile( file ) => undefined - * @method skipFile - * @for Uploader - */ - skipFile: function( file, status ) { - file = file.id ? file : this.request( 'get-file', file ); - - file.setStatus( status || Status.COMPLETE ); - file.skipped = true; - - // 如果正在上传。 - file.blocks && $.each( file.blocks, function( _, v ) { - var _tr = v.transport; - - if ( _tr ) { - _tr.abort(); - _tr.destroy(); - delete v.transport; - } - }); - - this.owner.trigger( 'uploadSkip', file ); - }, - - /** - * @event uploadFinished - * @description 当所有文件上传结束时触发。 - * @for Uploader - */ - _tick: function() { - var me = this, - opts = me.options, - fn, val; - - // 上一个promise还没有结束,则等待完成后再执行。 - if ( me._promise ) { - return me._promise.always( me.__tick ); - } - - // 还有位置,且还有文件要处理的话。 - if ( me.pool.length < opts.threads && (val = me._nextBlock()) ) { - me._trigged = false; - - fn = function( val ) { - me._promise = null; - - // 有可能是reject过来的,所以要检测val的类型。 - val && val.file && me._startSend( val ); - Base.nextTick( me.__tick ); - }; - - me._promise = isPromise( val ) ? val.always( fn ) : fn( val ); - - // 没有要上传的了,且没有正在传输的了。 - } else if ( !me.remaning && !me._getStats().numOfQueue && - !me._getStats().numofInterrupt ) { - me.runing = false; - - me._trigged || Base.nextTick(function() { - me.owner.trigger('uploadFinished'); - }); - me._trigged = true; - } - }, - - _putback: function(block) { - var idx; - - block.cuted.unshift(block); - idx = this.stack.indexOf(block.cuted); - - if (!~idx) { - this.stack.unshift(block.cuted); - } - }, - - _getStack: function() { - var i = 0, - act; - - while ( (act = this.stack[ i++ ]) ) { - if ( act.has() && act.file.getStatus() === Status.PROGRESS ) { - return act; - } else if (!act.has() || - act.file.getStatus() !== Status.PROGRESS && - act.file.getStatus() !== Status.INTERRUPT ) { - - // 把已经处理完了的,或者,状态为非 progress(上传中)、 - // interupt(暂停中) 的移除。 - this.stack.splice( --i, 1 ); - } - } - - return null; - }, - - _nextBlock: function() { - var me = this, - opts = me.options, - act, next, done, preparing; - - // 如果当前文件还有没有需要传输的,则直接返回剩下的。 - if ( (act = this._getStack()) ) { - - // 是否提前准备下一个文件 - if ( opts.prepareNextFile && !me.pending.length ) { - me._prepareNextFile(); - } - - return act.shift(); - - // 否则,如果正在运行,则准备下一个文件,并等待完成后返回下个分片。 - } else if ( me.runing ) { - - // 如果缓存中有,则直接在缓存中取,没有则去queue中取。 - if ( !me.pending.length && me._getStats().numOfQueue ) { - me._prepareNextFile(); - } - - next = me.pending.shift(); - done = function( file ) { - if ( !file ) { - return null; - } - - act = CuteFile( file, opts.chunked ? opts.chunkSize : 0 ); - me.stack.push(act); - return act.shift(); - }; - - // 文件可能还在prepare中,也有可能已经完全准备好了。 - if ( isPromise( next) ) { - preparing = next.file; - next = next[ next.pipe ? 'pipe' : 'then' ]( done ); - next.file = preparing; - return next; - } - - return done( next ); - } - }, - - - /** - * @event uploadStart - * @param {File} file File对象 - * @description 某个文件开始上传前触发,一个文件只会触发一次。 - * @for Uploader - */ - _prepareNextFile: function() { - var me = this, - file = me.request('fetch-file'), - pending = me.pending, - promise; - - if ( file ) { - promise = me.request( 'before-send-file', file, function() { - - // 有可能文件被skip掉了。文件被skip掉后,状态坑定不是Queued. - if ( file.getStatus() === Status.PROGRESS || - file.getStatus() === Status.INTERRUPT ) { - return file; - } - - return me._finishFile( file ); - }); - - me.owner.trigger( 'uploadStart', file ); - file.setStatus( Status.PROGRESS ); - - promise.file = file; - - // 如果还在pending中,则替换成文件本身。 - promise.done(function() { - var idx = $.inArray( promise, pending ); - - ~idx && pending.splice( idx, 1, file ); - }); - - // befeore-send-file的钩子就有错误发生。 - promise.fail(function( reason ) { - file.setStatus( Status.ERROR, reason ); - me.owner.trigger( 'uploadError', file, reason ); - me.owner.trigger( 'uploadComplete', file ); - }); - - pending.push( promise ); - } - }, - - // 让出位置了,可以让其他分片开始上传 - _popBlock: function( block ) { - var idx = $.inArray( block, this.pool ); - - this.pool.splice( idx, 1 ); - block.file.remaning--; - this.remaning--; - }, - - // 开始上传,可以被掉过。如果promise被reject了,则表示跳过此分片。 - _startSend: function( block ) { - var me = this, - file = block.file, - promise; - - // 有可能在 before-send-file 的 promise 期间改变了文件状态。 - // 如:暂停,取消 - // 我们不能中断 promise, 但是可以在 promise 完后,不做上传操作。 - if ( file.getStatus() !== Status.PROGRESS ) { - - // 如果是中断,则还需要放回去。 - if (file.getStatus() === Status.INTERRUPT) { - me._putback(block); - } - - return; - } - - me.pool.push( block ); - me.remaning++; - - // 如果没有分片,则直接使用原始的。 - // 不会丢失content-type信息。 - block.blob = block.chunks === 1 ? file.source : - file.source.slice( block.start, block.end ); - - // hook, 每个分片发送之前可能要做些异步的事情。 - promise = me.request( 'before-send', block, function() { - - // 有可能文件已经上传出错了,所以不需要再传输了。 - if ( file.getStatus() === Status.PROGRESS ) { - me._doSend( block ); - } else { - me._popBlock( block ); - Base.nextTick( me.__tick ); - } - }); - - // 如果为fail了,则跳过此分片。 - promise.fail(function() { - if ( file.remaning === 1 ) { - me._finishFile( file ).always(function() { - block.percentage = 1; - me._popBlock( block ); - me.owner.trigger( 'uploadComplete', file ); - Base.nextTick( me.__tick ); - }); - } else { - block.percentage = 1; - me.updateFileProgress( file ); - me._popBlock( block ); - Base.nextTick( me.__tick ); - } - }); - }, - - - /** - * @event uploadBeforeSend - * @param {Object} object - * @param {Object} data 默认的上传参数,可以扩展此对象来控制上传参数。 - * @param {Object} headers 可以扩展此对象来控制上传头部。 - * @description 当某个文件的分块在发送前触发,主要用来询问是否要添加附带参数,大文件在开起分片上传的前提下此事件可能会触发多次。 - * @for Uploader - */ - - /** - * @event uploadAccept - * @param {Object} object - * @param {Object} ret 服务端的返回数据,json格式,如果服务端不是json格式,从ret._raw中取数据,自行解析。 - * @description 当某个文件上传到服务端响应后,会派送此事件来询问服务端响应是否有效。如果此事件handler返回值为`false`, 则此文件将派送`server`类型的`uploadError`事件。 - * @for Uploader - */ - - /** - * @event uploadProgress - * @param {File} file File对象 - * @param {Number} percentage 上传进度 - * @description 上传过程中触发,携带上传进度。 - * @for Uploader - */ - - - /** - * @event uploadError - * @param {File} file File对象 - * @param {String} reason 出错的code - * @description 当文件上传出错时触发。 - * @for Uploader - */ - - /** - * @event uploadSuccess - * @param {File} file File对象 - * @param {Object} response 服务端返回的数据 - * @description 当文件上传成功时触发。 - * @for Uploader - */ - - /** - * @event uploadComplete - * @param {File} [file] File对象 - * @description 不管成功或者失败,文件上传完成时触发。 - * @for Uploader - */ - - // 做上传操作。 - _doSend: function( block ) { - var me = this, - owner = me.owner, - opts = me.options, - file = block.file, - tr = new Transport( opts ), - data = $.extend({}, opts.formData ), - headers = $.extend({}, opts.headers ), - requestAccept, ret; - - block.transport = tr; - - tr.on( 'destroy', function() { - delete block.transport; - me._popBlock( block ); - Base.nextTick( me.__tick ); - }); - - // 广播上传进度。以文件为单位。 - tr.on( 'progress', function( percentage ) { - block.percentage = percentage; - me.updateFileProgress( file ); - }); - - // 用来询问,是否返回的结果是有错误的。 - requestAccept = function( reject ) { - var fn; - - ret = tr.getResponseAsJson() || {}; - ret._raw = tr.getResponse(); - fn = function( value ) { - reject = value; - }; - - // 服务端响应了,不代表成功了,询问是否响应正确。 - if ( !owner.trigger( 'uploadAccept', block, ret, fn ) ) { - reject = reject || 'server'; - } - - return reject; - }; - - // 尝试重试,然后广播文件上传出错。 - tr.on( 'error', function( type, flag ) { - block.retried = block.retried || 0; - - // 自动重试 - if ( block.chunks > 1 && ~'http,abort'.indexOf( type ) && - block.retried < opts.chunkRetry ) { - - block.retried++; - tr.send(); - - } else { - - // http status 500 ~ 600 - if ( !flag && type === 'server' ) { - type = requestAccept( type ); - } - - file.setStatus( Status.ERROR, type ); - owner.trigger( 'uploadError', file, type ); - owner.trigger( 'uploadComplete', file ); - } - }); - - // 上传成功 - tr.on( 'load', function() { - var reason; - - // 如果非预期,转向上传出错。 - if ( (reason = requestAccept()) ) { - tr.trigger( 'error', reason, true ); - return; - } - - // 全部上传完成。 - if ( file.remaning === 1 ) { - me._finishFile( file, ret ); - } else { - tr.destroy(); - } - }); - - // 配置默认的上传字段。 - data = $.extend( data, { - id: file.id, - name: file.name, - type: file.type, - lastModifiedDate: file.lastModifiedDate, - size: file.size - }); - - block.chunks > 1 && $.extend( data, { - chunks: block.chunks, - chunk: block.chunk - }); - - // 在发送之间可以添加字段什么的。。。 - // 如果默认的字段不够使用,可以通过监听此事件来扩展 - owner.trigger( 'uploadBeforeSend', block, data, headers ); - - // 开始发送。 - tr.appendBlob( opts.fileVal, block.blob, file.name ); - tr.append( data ); - tr.setRequestHeader( headers ); - tr.send(); - }, - - // 完成上传。 - _finishFile: function( file, ret, hds ) { - var owner = this.owner; - - return owner - .request( 'after-send-file', arguments, function() { - file.setStatus( Status.COMPLETE ); - owner.trigger( 'uploadSuccess', file, ret, hds ); - }) - .fail(function( reason ) { - - // 如果外部已经标记为invalid什么的,不再改状态。 - if ( file.getStatus() === Status.PROGRESS ) { - file.setStatus( Status.ERROR, reason ); - } - - owner.trigger( 'uploadError', file, reason ); - }) - .always(function() { - owner.trigger( 'uploadComplete', file ); - }); - }, - - updateFileProgress: function(file) { - var totalPercent = 0, - uploaded = 0; - - if (!file.blocks) { - return; - } - - $.each( file.blocks, function( _, v ) { - uploaded += (v.percentage || 0) * (v.end - v.start); - }); - - totalPercent = uploaded / file.size; - this.owner.trigger( 'uploadProgress', file, totalPercent || 0 ); - } - - }); - }); - /** - * @fileOverview 日志组件,主要用来收集错误信息,可以帮助 webuploader 更好的定位问题和发展。 - * - * 如果您不想要启用此功能,请在打包的时候去掉 log 模块。 - * - * 或者可以在初始化的时候通过 options.disableWidgets 属性禁用。 - * - * 如: - * WebUploader.create({ - * ... - * - * disableWidgets: 'log', - * - * ... - * }) - */ - define('widgets/log',[ - 'base', - 'uploader', - 'widgets/widget' - ], function( Base, Uploader ) { - var $ = Base.$, - logUrl = ' http://static.tieba.baidu.com/tb/pms/img/st.gif??', - product = (location.hostname || location.host || 'protected').toLowerCase(), - - // 只针对 baidu 内部产品用户做统计功能。 - enable = product && /baidu/i.exec(product), - base; - - if (!enable) { - return; - } - - base = { - dv: 3, - master: 'webuploader', - online: /test/.exec(product) ? 0 : 1, - module: '', - product: product, - type: 0 - }; - - function send(data) { - var obj = $.extend({}, base, data), - url = logUrl.replace(/^(.*)\?/, '$1' + $.param( obj )), - image = new Image(); - - image.src = url; - } - - return Uploader.register({ - name: 'log', - - init: function() { - var owner = this.owner, - count = 0, - size = 0; - - owner - .on('error', function(code) { - send({ - type: 2, - c_error_code: code - }); - }) - .on('uploadError', function(file, reason) { - send({ - type: 2, - c_error_code: 'UPLOAD_ERROR', - c_reason: '' + reason - }); - }) - .on('uploadComplete', function(file) { - count++; - size += file.size; - }). - on('uploadFinished', function() { - send({ - c_count: count, - c_size: size - }); - count = size = 0; - }); - - send({ - c_usage: 1 - }); - } - }); - }); - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/compbase',[],function() { - - function CompBase( owner, runtime ) { - - this.owner = owner; - this.options = owner.options; - - this.getRuntime = function() { - return runtime; - }; - - this.getRuid = function() { - return runtime.uid; - }; - - this.trigger = function() { - return owner.trigger.apply( owner, arguments ); - }; - } - - return CompBase; - }); - /** - * @fileOverview Html5Runtime - */ - define('runtime/html5/runtime',[ - 'base', - 'runtime/runtime', - 'runtime/compbase' - ], function( Base, Runtime, CompBase ) { - - var type = 'html5', - components = {}; - - function Html5Runtime() { - var pool = {}, - me = this, - destroy = this.destroy; - - Runtime.apply( me, arguments ); - me.type = type; - - - // 这个方法的调用者,实际上是RuntimeClient - me.exec = function( comp, fn/*, args...*/) { - var client = this, - uid = client.uid, - args = Base.slice( arguments, 2 ), - instance; - - if ( components[ comp ] ) { - instance = pool[ uid ] = pool[ uid ] || - new components[ comp ]( client, me ); - - if ( instance[ fn ] ) { - return instance[ fn ].apply( instance, args ); - } - } - }; - - me.destroy = function() { - // @todo 删除池子中的所有实例 - return destroy && destroy.apply( this, arguments ); - }; - } - - Base.inherits( Runtime, { - constructor: Html5Runtime, - - // 不需要连接其他程序,直接执行callback - init: function() { - var me = this; - setTimeout(function() { - me.trigger('ready'); - }, 1 ); - } - - }); - - // 注册Components - Html5Runtime.register = function( name, component ) { - var klass = components[ name ] = Base.inherits( CompBase, component ); - return klass; - }; - - // 注册html5运行时。 - // 只有在支持的前提下注册。 - if ( window.Blob && window.FileReader && window.DataView ) { - Runtime.addRuntime( type, Html5Runtime ); - } - - return Html5Runtime; - }); - /** - * @fileOverview Blob Html实现 - */ - define('runtime/html5/blob',[ - 'runtime/html5/runtime', - 'lib/blob' - ], function( Html5Runtime, Blob ) { - - return Html5Runtime.register( 'Blob', { - slice: function( start, end ) { - var blob = this.owner.source, - slice = blob.slice || blob.webkitSlice || blob.mozSlice; - - blob = slice.call( blob, start, end ); - - return new Blob( this.getRuid(), blob ); - } - }); - }); - /** - * @fileOverview FilePicker - */ - define('runtime/html5/filepicker',[ - 'base', - 'runtime/html5/runtime' - ], function( Base, Html5Runtime ) { - - var $ = Base.$; - - return Html5Runtime.register( 'FilePicker', { - init: function() { - var container = this.getRuntime().getContainer(), - me = this, - owner = me.owner, - opts = me.options, - label = this.label = $( document.createElement('label') ), - input = this.input = $( document.createElement('input') ), - arr, i, len, mouseHandler; - - input.attr( 'type', 'file' ); - input.attr( 'name', opts.name ); - input.addClass('webuploader-element-invisible'); - - label.on( 'click', function() { - input.trigger('click'); - }); - - label.css({ - opacity: 0, - width: '100%', - height: '100%', - display: 'block', - cursor: 'pointer', - background: '#ffffff' - }); - - if ( opts.multiple ) { - input.attr( 'multiple', 'multiple' ); - } - - // @todo Firefox不支持单独指定后缀 - if ( opts.accept && opts.accept.length > 0 ) { - arr = []; - - for ( i = 0, len = opts.accept.length; i < len; i++ ) { - arr.push( opts.accept[ i ].mimeTypes ); - } - - input.attr( 'accept', arr.join(',') ); - } - - container.append( input ); - container.append( label ); - - mouseHandler = function( e ) { - owner.trigger( e.type ); - }; - - input.on( 'change', function( e ) { - var fn = arguments.callee, - clone; - - me.files = e.target.files; - - // reset input - clone = this.cloneNode( true ); - clone.value = null; - this.parentNode.replaceChild( clone, this ); - - input.off(); - input = $( clone ).on( 'change', fn ) - .on( 'mouseenter mouseleave', mouseHandler ); - - owner.trigger('change'); - }); - - label.on( 'mouseenter mouseleave', mouseHandler ); - - }, - - - getFiles: function() { - return this.files; - }, - - destroy: function() { - this.input.off(); - this.label.off(); - } - }); - }); - /** - * Terms: - * - * Uint8Array, FileReader, BlobBuilder, atob, ArrayBuffer - * @fileOverview Image控件 - */ - define('runtime/html5/util',[ - 'base' - ], function( Base ) { - - var urlAPI = window.createObjectURL && window || - window.URL && URL.revokeObjectURL && URL || - window.webkitURL, - createObjectURL = Base.noop, - revokeObjectURL = createObjectURL; - - if ( urlAPI ) { - - // 更安全的方式调用,比如android里面就能把context改成其他的对象。 - createObjectURL = function() { - return urlAPI.createObjectURL.apply( urlAPI, arguments ); - }; - - revokeObjectURL = function() { - return urlAPI.revokeObjectURL.apply( urlAPI, arguments ); - }; - } - - return { - createObjectURL: createObjectURL, - revokeObjectURL: revokeObjectURL, - - dataURL2Blob: function( dataURI ) { - var byteStr, intArray, ab, i, mimetype, parts; - - parts = dataURI.split(','); - - if ( ~parts[ 0 ].indexOf('base64') ) { - byteStr = atob( parts[ 1 ] ); - } else { - byteStr = decodeURIComponent( parts[ 1 ] ); - } - - ab = new ArrayBuffer( byteStr.length ); - intArray = new Uint8Array( ab ); - - for ( i = 0; i < byteStr.length; i++ ) { - intArray[ i ] = byteStr.charCodeAt( i ); - } - - mimetype = parts[ 0 ].split(':')[ 1 ].split(';')[ 0 ]; - - return this.arrayBufferToBlob( ab, mimetype ); - }, - - dataURL2ArrayBuffer: function( dataURI ) { - var byteStr, intArray, i, parts; - - parts = dataURI.split(','); - - if ( ~parts[ 0 ].indexOf('base64') ) { - byteStr = atob( parts[ 1 ] ); - } else { - byteStr = decodeURIComponent( parts[ 1 ] ); - } - - intArray = new Uint8Array( byteStr.length ); - - for ( i = 0; i < byteStr.length; i++ ) { - intArray[ i ] = byteStr.charCodeAt( i ); - } - - return intArray.buffer; - }, - - arrayBufferToBlob: function( buffer, type ) { - var builder = window.BlobBuilder || window.WebKitBlobBuilder, - bb; - - // android不支持直接new Blob, 只能借助blobbuilder. - if ( builder ) { - bb = new builder(); - bb.append( buffer ); - return bb.getBlob( type ); - } - - return new Blob([ buffer ], type ? { type: type } : {} ); - }, - - // 抽出来主要是为了解决android下面canvas.toDataUrl不支持jpeg. - // 你得到的结果是png. - canvasToDataUrl: function( canvas, type, quality ) { - return canvas.toDataURL( type, quality / 100 ); - }, - - // imagemeat会复写这个方法,如果用户选择加载那个文件了的话。 - parseMeta: function( blob, callback ) { - callback( false, {}); - }, - - // imagemeat会复写这个方法,如果用户选择加载那个文件了的话。 - updateImageHead: function( data ) { - return data; - } - }; - }); - /** - * Terms: - * - * Uint8Array, FileReader, BlobBuilder, atob, ArrayBuffer - * @fileOverview Image控件 - */ - define('runtime/html5/imagemeta',[ - 'runtime/html5/util' - ], function( Util ) { - - var api; - - api = { - parsers: { - 0xffe1: [] - }, - - maxMetaDataSize: 262144, - - parse: function( blob, cb ) { - var me = this, - fr = new FileReader(); - - fr.onload = function() { - cb( false, me._parse( this.result ) ); - fr = fr.onload = fr.onerror = null; - }; - - fr.onerror = function( e ) { - cb( e.message ); - fr = fr.onload = fr.onerror = null; - }; - - blob = blob.slice( 0, me.maxMetaDataSize ); - fr.readAsArrayBuffer( blob.getSource() ); - }, - - _parse: function( buffer, noParse ) { - if ( buffer.byteLength < 6 ) { - return; - } - - var dataview = new DataView( buffer ), - offset = 2, - maxOffset = dataview.byteLength - 4, - headLength = offset, - ret = {}, - markerBytes, markerLength, parsers, i; - - if ( dataview.getUint16( 0 ) === 0xffd8 ) { - - while ( offset < maxOffset ) { - markerBytes = dataview.getUint16( offset ); - - if ( markerBytes >= 0xffe0 && markerBytes <= 0xffef || - markerBytes === 0xfffe ) { - - markerLength = dataview.getUint16( offset + 2 ) + 2; - - if ( offset + markerLength > dataview.byteLength ) { - break; - } - - parsers = api.parsers[ markerBytes ]; - - if ( !noParse && parsers ) { - for ( i = 0; i < parsers.length; i += 1 ) { - parsers[ i ].call( api, dataview, offset, - markerLength, ret ); - } - } - - offset += markerLength; - headLength = offset; - } else { - break; - } - } - - if ( headLength > 6 ) { - if ( buffer.slice ) { - ret.imageHead = buffer.slice( 2, headLength ); - } else { - // Workaround for IE10, which does not yet - // support ArrayBuffer.slice: - ret.imageHead = new Uint8Array( buffer ) - .subarray( 2, headLength ); - } - } - } - - return ret; - }, - - updateImageHead: function( buffer, head ) { - var data = this._parse( buffer, true ), - buf1, buf2, bodyoffset; - - - bodyoffset = 2; - if ( data.imageHead ) { - bodyoffset = 2 + data.imageHead.byteLength; - } - - if ( buffer.slice ) { - buf2 = buffer.slice( bodyoffset ); - } else { - buf2 = new Uint8Array( buffer ).subarray( bodyoffset ); - } - - buf1 = new Uint8Array( head.byteLength + 2 + buf2.byteLength ); - - buf1[ 0 ] = 0xFF; - buf1[ 1 ] = 0xD8; - buf1.set( new Uint8Array( head ), 2 ); - buf1.set( new Uint8Array( buf2 ), head.byteLength + 2 ); - - return buf1.buffer; - } - }; - - Util.parseMeta = function() { - return api.parse.apply( api, arguments ); - }; - - Util.updateImageHead = function() { - return api.updateImageHead.apply( api, arguments ); - }; - - return api; - }); - /** - * 代码来自于:https://github.com/blueimp/JavaScript-Load-Image - * 暂时项目中只用了orientation. - * - * 去除了 Exif Sub IFD Pointer, GPS Info IFD Pointer, Exif Thumbnail. - * @fileOverview EXIF解析 - */ - - // Sample - // ==================================== - // Make : Apple - // Model : iPhone 4S - // Orientation : 1 - // XResolution : 72 [72/1] - // YResolution : 72 [72/1] - // ResolutionUnit : 2 - // Software : QuickTime 7.7.1 - // DateTime : 2013:09:01 22:53:55 - // ExifIFDPointer : 190 - // ExposureTime : 0.058823529411764705 [1/17] - // FNumber : 2.4 [12/5] - // ExposureProgram : Normal program - // ISOSpeedRatings : 800 - // ExifVersion : 0220 - // DateTimeOriginal : 2013:09:01 22:52:51 - // DateTimeDigitized : 2013:09:01 22:52:51 - // ComponentsConfiguration : YCbCr - // ShutterSpeedValue : 4.058893515764426 - // ApertureValue : 2.5260688216892597 [4845/1918] - // BrightnessValue : -0.3126686601998395 - // MeteringMode : Pattern - // Flash : Flash did not fire, compulsory flash mode - // FocalLength : 4.28 [107/25] - // SubjectArea : [4 values] - // FlashpixVersion : 0100 - // ColorSpace : 1 - // PixelXDimension : 2448 - // PixelYDimension : 3264 - // SensingMethod : One-chip color area sensor - // ExposureMode : 0 - // WhiteBalance : Auto white balance - // FocalLengthIn35mmFilm : 35 - // SceneCaptureType : Standard - define('runtime/html5/imagemeta/exif',[ - 'base', - 'runtime/html5/imagemeta' - ], function( Base, ImageMeta ) { - - var EXIF = {}; - - EXIF.ExifMap = function() { - return this; - }; - - EXIF.ExifMap.prototype.map = { - 'Orientation': 0x0112 - }; - - EXIF.ExifMap.prototype.get = function( id ) { - return this[ id ] || this[ this.map[ id ] ]; - }; - - EXIF.exifTagTypes = { - // byte, 8-bit unsigned int: - 1: { - getValue: function( dataView, dataOffset ) { - return dataView.getUint8( dataOffset ); - }, - size: 1 - }, - - // ascii, 8-bit byte: - 2: { - getValue: function( dataView, dataOffset ) { - return String.fromCharCode( dataView.getUint8( dataOffset ) ); - }, - size: 1, - ascii: true - }, - - // short, 16 bit int: - 3: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getUint16( dataOffset, littleEndian ); - }, - size: 2 - }, - - // long, 32 bit int: - 4: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getUint32( dataOffset, littleEndian ); - }, - size: 4 - }, - - // rational = two long values, - // first is numerator, second is denominator: - 5: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getUint32( dataOffset, littleEndian ) / - dataView.getUint32( dataOffset + 4, littleEndian ); - }, - size: 8 - }, - - // slong, 32 bit signed int: - 9: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getInt32( dataOffset, littleEndian ); - }, - size: 4 - }, - - // srational, two slongs, first is numerator, second is denominator: - 10: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getInt32( dataOffset, littleEndian ) / - dataView.getInt32( dataOffset + 4, littleEndian ); - }, - size: 8 - } - }; - - // undefined, 8-bit byte, value depending on field: - EXIF.exifTagTypes[ 7 ] = EXIF.exifTagTypes[ 1 ]; - - EXIF.getExifValue = function( dataView, tiffOffset, offset, type, length, - littleEndian ) { - - var tagType = EXIF.exifTagTypes[ type ], - tagSize, dataOffset, values, i, str, c; - - if ( !tagType ) { - Base.log('Invalid Exif data: Invalid tag type.'); - return; - } - - tagSize = tagType.size * length; - - // Determine if the value is contained in the dataOffset bytes, - // or if the value at the dataOffset is a pointer to the actual data: - dataOffset = tagSize > 4 ? tiffOffset + dataView.getUint32( offset + 8, - littleEndian ) : (offset + 8); - - if ( dataOffset + tagSize > dataView.byteLength ) { - Base.log('Invalid Exif data: Invalid data offset.'); - return; - } - - if ( length === 1 ) { - return tagType.getValue( dataView, dataOffset, littleEndian ); - } - - values = []; - - for ( i = 0; i < length; i += 1 ) { - values[ i ] = tagType.getValue( dataView, - dataOffset + i * tagType.size, littleEndian ); - } - - if ( tagType.ascii ) { - str = ''; - - // Concatenate the chars: - for ( i = 0; i < values.length; i += 1 ) { - c = values[ i ]; - - // Ignore the terminating NULL byte(s): - if ( c === '\u0000' ) { - break; - } - str += c; - } - - return str; - } - return values; - }; - - EXIF.parseExifTag = function( dataView, tiffOffset, offset, littleEndian, - data ) { - - var tag = dataView.getUint16( offset, littleEndian ); - data.exif[ tag ] = EXIF.getExifValue( dataView, tiffOffset, offset, - dataView.getUint16( offset + 2, littleEndian ), // tag type - dataView.getUint32( offset + 4, littleEndian ), // tag length - littleEndian ); - }; - - EXIF.parseExifTags = function( dataView, tiffOffset, dirOffset, - littleEndian, data ) { - - var tagsNumber, dirEndOffset, i; - - if ( dirOffset + 6 > dataView.byteLength ) { - Base.log('Invalid Exif data: Invalid directory offset.'); - return; - } - - tagsNumber = dataView.getUint16( dirOffset, littleEndian ); - dirEndOffset = dirOffset + 2 + 12 * tagsNumber; - - if ( dirEndOffset + 4 > dataView.byteLength ) { - Base.log('Invalid Exif data: Invalid directory size.'); - return; - } - - for ( i = 0; i < tagsNumber; i += 1 ) { - this.parseExifTag( dataView, tiffOffset, - dirOffset + 2 + 12 * i, // tag offset - littleEndian, data ); - } - - // Return the offset to the next directory: - return dataView.getUint32( dirEndOffset, littleEndian ); - }; - - // EXIF.getExifThumbnail = function(dataView, offset, length) { - // var hexData, - // i, - // b; - // if (!length || offset + length > dataView.byteLength) { - // Base.log('Invalid Exif data: Invalid thumbnail data.'); - // return; - // } - // hexData = []; - // for (i = 0; i < length; i += 1) { - // b = dataView.getUint8(offset + i); - // hexData.push((b < 16 ? '0' : '') + b.toString(16)); - // } - // return 'data:image/jpeg,%' + hexData.join('%'); - // }; - - EXIF.parseExifData = function( dataView, offset, length, data ) { - - var tiffOffset = offset + 10, - littleEndian, dirOffset; - - // Check for the ASCII code for "Exif" (0x45786966): - if ( dataView.getUint32( offset + 4 ) !== 0x45786966 ) { - // No Exif data, might be XMP data instead - return; - } - if ( tiffOffset + 8 > dataView.byteLength ) { - Base.log('Invalid Exif data: Invalid segment size.'); - return; - } - - // Check for the two null bytes: - if ( dataView.getUint16( offset + 8 ) !== 0x0000 ) { - Base.log('Invalid Exif data: Missing byte alignment offset.'); - return; - } - - // Check the byte alignment: - switch ( dataView.getUint16( tiffOffset ) ) { - case 0x4949: - littleEndian = true; - break; - - case 0x4D4D: - littleEndian = false; - break; - - default: - Base.log('Invalid Exif data: Invalid byte alignment marker.'); - return; - } - - // Check for the TIFF tag marker (0x002A): - if ( dataView.getUint16( tiffOffset + 2, littleEndian ) !== 0x002A ) { - Base.log('Invalid Exif data: Missing TIFF marker.'); - return; - } - - // Retrieve the directory offset bytes, usually 0x00000008 or 8 decimal: - dirOffset = dataView.getUint32( tiffOffset + 4, littleEndian ); - // Create the exif object to store the tags: - data.exif = new EXIF.ExifMap(); - // Parse the tags of the main image directory and retrieve the - // offset to the next directory, usually the thumbnail directory: - dirOffset = EXIF.parseExifTags( dataView, tiffOffset, - tiffOffset + dirOffset, littleEndian, data ); - - // 尝试读取缩略图 - // if ( dirOffset ) { - // thumbnailData = {exif: {}}; - // dirOffset = EXIF.parseExifTags( - // dataView, - // tiffOffset, - // tiffOffset + dirOffset, - // littleEndian, - // thumbnailData - // ); - - // // Check for JPEG Thumbnail offset: - // if (thumbnailData.exif[0x0201]) { - // data.exif.Thumbnail = EXIF.getExifThumbnail( - // dataView, - // tiffOffset + thumbnailData.exif[0x0201], - // thumbnailData.exif[0x0202] // Thumbnail data length - // ); - // } - // } - }; - - ImageMeta.parsers[ 0xffe1 ].push( EXIF.parseExifData ); - return EXIF; - }); - /** - * @fileOverview Image - */ - define('runtime/html5/image',[ - 'base', - 'runtime/html5/runtime', - 'runtime/html5/util' - ], function( Base, Html5Runtime, Util ) { - - var BLANK = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D'; - - return Html5Runtime.register( 'Image', { - - // flag: 标记是否被修改过。 - modified: false, - - init: function() { - var me = this, - img = new Image(); - - img.onload = function() { - - me._info = { - type: me.type, - width: this.width, - height: this.height - }; - - // 读取meta信息。 - if ( !me._metas && 'image/jpeg' === me.type ) { - Util.parseMeta( me._blob, function( error, ret ) { - me._metas = ret; - me.owner.trigger('load'); - }); - } else { - me.owner.trigger('load'); - } - }; - - img.onerror = function() { - me.owner.trigger('error'); - }; - - me._img = img; - }, - - loadFromBlob: function( blob ) { - var me = this, - img = me._img; - - me._blob = blob; - me.type = blob.type; - img.src = Util.createObjectURL( blob.getSource() ); - me.owner.once( 'load', function() { - Util.revokeObjectURL( img.src ); - }); - }, - - resize: function( width, height ) { - var canvas = this._canvas || - (this._canvas = document.createElement('canvas')); - - this._resize( this._img, canvas, width, height ); - this._blob = null; // 没用了,可以删掉了。 - this.modified = true; - this.owner.trigger( 'complete', 'resize' ); - }, - - crop: function( x, y, w, h, s ) { - var cvs = this._canvas || - (this._canvas = document.createElement('canvas')), - opts = this.options, - img = this._img, - iw = img.naturalWidth, - ih = img.naturalHeight, - orientation = this.getOrientation(); - - s = s || 1; - - // todo 解决 orientation 的问题。 - // values that require 90 degree rotation - // if ( ~[ 5, 6, 7, 8 ].indexOf( orientation ) ) { - - // switch ( orientation ) { - // case 6: - // tmp = x; - // x = y; - // y = iw * s - tmp - w; - // console.log(ih * s, tmp, w) - // break; - // } - - // (w ^= h, h ^= w, w ^= h); - // } - - cvs.width = w; - cvs.height = h; - - opts.preserveHeaders || this._rotate2Orientaion( cvs, orientation ); - this._renderImageToCanvas( cvs, img, -x, -y, iw * s, ih * s ); - - this._blob = null; // 没用了,可以删掉了。 - this.modified = true; - this.owner.trigger( 'complete', 'crop' ); - }, - - getAsBlob: function( type ) { - var blob = this._blob, - opts = this.options, - canvas; - - type = type || this.type; - - // blob需要重新生成。 - if ( this.modified || this.type !== type ) { - canvas = this._canvas; - - if ( type === 'image/jpeg' ) { - - blob = Util.canvasToDataUrl( canvas, type, opts.quality ); - - if ( opts.preserveHeaders && this._metas && - this._metas.imageHead ) { - - blob = Util.dataURL2ArrayBuffer( blob ); - blob = Util.updateImageHead( blob, - this._metas.imageHead ); - blob = Util.arrayBufferToBlob( blob, type ); - return blob; - } - } else { - blob = Util.canvasToDataUrl( canvas, type ); - } - - blob = Util.dataURL2Blob( blob ); - } - - return blob; - }, - - getAsDataUrl: function( type ) { - var opts = this.options; - - type = type || this.type; - - if ( type === 'image/jpeg' ) { - return Util.canvasToDataUrl( this._canvas, type, opts.quality ); - } else { - return this._canvas.toDataURL( type ); - } - }, - - getOrientation: function() { - return this._metas && this._metas.exif && - this._metas.exif.get('Orientation') || 1; - }, - - info: function( val ) { - - // setter - if ( val ) { - this._info = val; - return this; - } - - // getter - return this._info; - }, - - meta: function( val ) { - - // setter - if ( val ) { - this._meta = val; - return this; - } - - // getter - return this._meta; - }, - - destroy: function() { - var canvas = this._canvas; - this._img.onload = null; - - if ( canvas ) { - canvas.getContext('2d') - .clearRect( 0, 0, canvas.width, canvas.height ); - canvas.width = canvas.height = 0; - this._canvas = null; - } - - // 释放内存。非常重要,否则释放不了image的内存。 - this._img.src = BLANK; - this._img = this._blob = null; - }, - - _resize: function( img, cvs, width, height ) { - var opts = this.options, - naturalWidth = img.width, - naturalHeight = img.height, - orientation = this.getOrientation(), - scale, w, h, x, y; - - // values that require 90 degree rotation - if ( ~[ 5, 6, 7, 8 ].indexOf( orientation ) ) { - - // 交换width, height的值。 - width ^= height; - height ^= width; - width ^= height; - } - - scale = Math[ opts.crop ? 'max' : 'min' ]( width / naturalWidth, - height / naturalHeight ); - - // 不允许放大。 - opts.allowMagnify || (scale = Math.min( 1, scale )); - - w = naturalWidth * scale; - h = naturalHeight * scale; - - if ( opts.crop ) { - cvs.width = width; - cvs.height = height; - } else { - cvs.width = w; - cvs.height = h; - } - - x = (cvs.width - w) / 2; - y = (cvs.height - h) / 2; - - opts.preserveHeaders || this._rotate2Orientaion( cvs, orientation ); - - this._renderImageToCanvas( cvs, img, x, y, w, h ); - }, - - _rotate2Orientaion: function( canvas, orientation ) { - var width = canvas.width, - height = canvas.height, - ctx = canvas.getContext('2d'); - - switch ( orientation ) { - case 5: - case 6: - case 7: - case 8: - canvas.width = height; - canvas.height = width; - break; - } - - switch ( orientation ) { - case 2: // horizontal flip - ctx.translate( width, 0 ); - ctx.scale( -1, 1 ); - break; - - case 3: // 180 rotate left - ctx.translate( width, height ); - ctx.rotate( Math.PI ); - break; - - case 4: // vertical flip - ctx.translate( 0, height ); - ctx.scale( 1, -1 ); - break; - - case 5: // vertical flip + 90 rotate right - ctx.rotate( 0.5 * Math.PI ); - ctx.scale( 1, -1 ); - break; - - case 6: // 90 rotate right - ctx.rotate( 0.5 * Math.PI ); - ctx.translate( 0, -height ); - break; - - case 7: // horizontal flip + 90 rotate right - ctx.rotate( 0.5 * Math.PI ); - ctx.translate( width, -height ); - ctx.scale( -1, 1 ); - break; - - case 8: // 90 rotate left - ctx.rotate( -0.5 * Math.PI ); - ctx.translate( -width, 0 ); - break; - } - }, - - // https://github.com/stomita/ios-imagefile-megapixel/ - // blob/master/src/megapix-image.js - _renderImageToCanvas: (function() { - - // 如果不是ios, 不需要这么复杂! - if ( !Base.os.ios ) { - return function( canvas ) { - var args = Base.slice( arguments, 1 ), - ctx = canvas.getContext('2d'); - - ctx.drawImage.apply( ctx, args ); - }; - } - - /** - * Detecting vertical squash in loaded image. - * Fixes a bug which squash image vertically while drawing into - * canvas for some images. - */ - function detectVerticalSquash( img, iw, ih ) { - var canvas = document.createElement('canvas'), - ctx = canvas.getContext('2d'), - sy = 0, - ey = ih, - py = ih, - data, alpha, ratio; - - - canvas.width = 1; - canvas.height = ih; - ctx.drawImage( img, 0, 0 ); - data = ctx.getImageData( 0, 0, 1, ih ).data; - - // search image edge pixel position in case - // it is squashed vertically. - while ( py > sy ) { - alpha = data[ (py - 1) * 4 + 3 ]; - - if ( alpha === 0 ) { - ey = py; - } else { - sy = py; - } - - py = (ey + sy) >> 1; - } - - ratio = (py / ih); - return (ratio === 0) ? 1 : ratio; - } - - // fix ie7 bug - // http://stackoverflow.com/questions/11929099/ - // html5-canvas-drawimage-ratio-bug-ios - if ( Base.os.ios >= 7 ) { - return function( canvas, img, x, y, w, h ) { - var iw = img.naturalWidth, - ih = img.naturalHeight, - vertSquashRatio = detectVerticalSquash( img, iw, ih ); - - return canvas.getContext('2d').drawImage( img, 0, 0, - iw * vertSquashRatio, ih * vertSquashRatio, - x, y, w, h ); - }; - } - - /** - * Detect subsampling in loaded image. - * In iOS, larger images than 2M pixels may be - * subsampled in rendering. - */ - function detectSubsampling( img ) { - var iw = img.naturalWidth, - ih = img.naturalHeight, - canvas, ctx; - - // subsampling may happen overmegapixel image - if ( iw * ih > 1024 * 1024 ) { - canvas = document.createElement('canvas'); - canvas.width = canvas.height = 1; - ctx = canvas.getContext('2d'); - ctx.drawImage( img, -iw + 1, 0 ); - - // subsampled image becomes half smaller in rendering size. - // check alpha channel value to confirm image is covering - // edge pixel or not. if alpha value is 0 - // image is not covering, hence subsampled. - return ctx.getImageData( 0, 0, 1, 1 ).data[ 3 ] === 0; - } else { - return false; - } - } - - - return function( canvas, img, x, y, width, height ) { - var iw = img.naturalWidth, - ih = img.naturalHeight, - ctx = canvas.getContext('2d'), - subsampled = detectSubsampling( img ), - doSquash = this.type === 'image/jpeg', - d = 1024, - sy = 0, - dy = 0, - tmpCanvas, tmpCtx, vertSquashRatio, dw, dh, sx, dx; - - if ( subsampled ) { - iw /= 2; - ih /= 2; - } - - ctx.save(); - tmpCanvas = document.createElement('canvas'); - tmpCanvas.width = tmpCanvas.height = d; - - tmpCtx = tmpCanvas.getContext('2d'); - vertSquashRatio = doSquash ? - detectVerticalSquash( img, iw, ih ) : 1; - - dw = Math.ceil( d * width / iw ); - dh = Math.ceil( d * height / ih / vertSquashRatio ); - - while ( sy < ih ) { - sx = 0; - dx = 0; - while ( sx < iw ) { - tmpCtx.clearRect( 0, 0, d, d ); - tmpCtx.drawImage( img, -sx, -sy ); - ctx.drawImage( tmpCanvas, 0, 0, d, d, - x + dx, y + dy, dw, dh ); - sx += d; - dx += dw; - } - sy += d; - dy += dh; - } - ctx.restore(); - tmpCanvas = tmpCtx = null; - }; - })() - }); - }); - /** - * 这个方式性能不行,但是可以解决android里面的toDataUrl的bug - * android里面toDataUrl('image/jpege')得到的结果却是png. - * - * 所以这里没辙,只能借助这个工具 - * @fileOverview jpeg encoder - */ - define('runtime/html5/jpegencoder',[], function( require, exports, module ) { - - /* - Copyright (c) 2008, Adobe Systems Incorporated - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of Adobe Systems Incorporated nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - /* - JPEG encoder ported to JavaScript and optimized by Andreas Ritter, www.bytestrom.eu, 11/2009 - - Basic GUI blocking jpeg encoder - */ - - function JPEGEncoder(quality) { - var self = this; - var fround = Math.round; - var ffloor = Math.floor; - var YTable = new Array(64); - var UVTable = new Array(64); - var fdtbl_Y = new Array(64); - var fdtbl_UV = new Array(64); - var YDC_HT; - var UVDC_HT; - var YAC_HT; - var UVAC_HT; - - var bitcode = new Array(65535); - var category = new Array(65535); - var outputfDCTQuant = new Array(64); - var DU = new Array(64); - var byteout = []; - var bytenew = 0; - var bytepos = 7; - - var YDU = new Array(64); - var UDU = new Array(64); - var VDU = new Array(64); - var clt = new Array(256); - var RGB_YUV_TABLE = new Array(2048); - var currentQuality; - - var ZigZag = [ - 0, 1, 5, 6,14,15,27,28, - 2, 4, 7,13,16,26,29,42, - 3, 8,12,17,25,30,41,43, - 9,11,18,24,31,40,44,53, - 10,19,23,32,39,45,52,54, - 20,22,33,38,46,51,55,60, - 21,34,37,47,50,56,59,61, - 35,36,48,49,57,58,62,63 - ]; - - var std_dc_luminance_nrcodes = [0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0]; - var std_dc_luminance_values = [0,1,2,3,4,5,6,7,8,9,10,11]; - var std_ac_luminance_nrcodes = [0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,0x7d]; - var std_ac_luminance_values = [ - 0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12, - 0x21,0x31,0x41,0x06,0x13,0x51,0x61,0x07, - 0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08, - 0x23,0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0, - 0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16, - 0x17,0x18,0x19,0x1a,0x25,0x26,0x27,0x28, - 0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39, - 0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49, - 0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59, - 0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69, - 0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79, - 0x7a,0x83,0x84,0x85,0x86,0x87,0x88,0x89, - 0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98, - 0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7, - 0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6, - 0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5, - 0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4, - 0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2, - 0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea, - 0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8, - 0xf9,0xfa - ]; - - var std_dc_chrominance_nrcodes = [0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0]; - var std_dc_chrominance_values = [0,1,2,3,4,5,6,7,8,9,10,11]; - var std_ac_chrominance_nrcodes = [0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,0x77]; - var std_ac_chrominance_values = [ - 0x00,0x01,0x02,0x03,0x11,0x04,0x05,0x21, - 0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71, - 0x13,0x22,0x32,0x81,0x08,0x14,0x42,0x91, - 0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0, - 0x15,0x62,0x72,0xd1,0x0a,0x16,0x24,0x34, - 0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26, - 0x27,0x28,0x29,0x2a,0x35,0x36,0x37,0x38, - 0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48, - 0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58, - 0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68, - 0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78, - 0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87, - 0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96, - 0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5, - 0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4, - 0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3, - 0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2, - 0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda, - 0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9, - 0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8, - 0xf9,0xfa - ]; - - function initQuantTables(sf){ - var YQT = [ - 16, 11, 10, 16, 24, 40, 51, 61, - 12, 12, 14, 19, 26, 58, 60, 55, - 14, 13, 16, 24, 40, 57, 69, 56, - 14, 17, 22, 29, 51, 87, 80, 62, - 18, 22, 37, 56, 68,109,103, 77, - 24, 35, 55, 64, 81,104,113, 92, - 49, 64, 78, 87,103,121,120,101, - 72, 92, 95, 98,112,100,103, 99 - ]; - - for (var i = 0; i < 64; i++) { - var t = ffloor((YQT[i]*sf+50)/100); - if (t < 1) { - t = 1; - } else if (t > 255) { - t = 255; - } - YTable[ZigZag[i]] = t; - } - var UVQT = [ - 17, 18, 24, 47, 99, 99, 99, 99, - 18, 21, 26, 66, 99, 99, 99, 99, - 24, 26, 56, 99, 99, 99, 99, 99, - 47, 66, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99 - ]; - for (var j = 0; j < 64; j++) { - var u = ffloor((UVQT[j]*sf+50)/100); - if (u < 1) { - u = 1; - } else if (u > 255) { - u = 255; - } - UVTable[ZigZag[j]] = u; - } - var aasf = [ - 1.0, 1.387039845, 1.306562965, 1.175875602, - 1.0, 0.785694958, 0.541196100, 0.275899379 - ]; - var k = 0; - for (var row = 0; row < 8; row++) - { - for (var col = 0; col < 8; col++) - { - fdtbl_Y[k] = (1.0 / (YTable [ZigZag[k]] * aasf[row] * aasf[col] * 8.0)); - fdtbl_UV[k] = (1.0 / (UVTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0)); - k++; - } - } - } - - function computeHuffmanTbl(nrcodes, std_table){ - var codevalue = 0; - var pos_in_table = 0; - var HT = new Array(); - for (var k = 1; k <= 16; k++) { - for (var j = 1; j <= nrcodes[k]; j++) { - HT[std_table[pos_in_table]] = []; - HT[std_table[pos_in_table]][0] = codevalue; - HT[std_table[pos_in_table]][1] = k; - pos_in_table++; - codevalue++; - } - codevalue*=2; - } - return HT; - } - - function initHuffmanTbl() - { - YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes,std_dc_luminance_values); - UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes,std_dc_chrominance_values); - YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes,std_ac_luminance_values); - UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes,std_ac_chrominance_values); - } - - function initCategoryNumber() - { - var nrlower = 1; - var nrupper = 2; - for (var cat = 1; cat <= 15; cat++) { - //Positive numbers - for (var nr = nrlower; nr>0] = 38470 * i; - RGB_YUV_TABLE[(i+ 512)>>0] = 7471 * i + 0x8000; - RGB_YUV_TABLE[(i+ 768)>>0] = -11059 * i; - RGB_YUV_TABLE[(i+1024)>>0] = -21709 * i; - RGB_YUV_TABLE[(i+1280)>>0] = 32768 * i + 0x807FFF; - RGB_YUV_TABLE[(i+1536)>>0] = -27439 * i; - RGB_YUV_TABLE[(i+1792)>>0] = - 5329 * i; - } - } - - // IO functions - function writeBits(bs) - { - var value = bs[0]; - var posval = bs[1]-1; - while ( posval >= 0 ) { - if (value & (1 << posval) ) { - bytenew |= (1 << bytepos); - } - posval--; - bytepos--; - if (bytepos < 0) { - if (bytenew == 0xFF) { - writeByte(0xFF); - writeByte(0); - } - else { - writeByte(bytenew); - } - bytepos=7; - bytenew=0; - } - } - } - - function writeByte(value) - { - byteout.push(clt[value]); // write char directly instead of converting later - } - - function writeWord(value) - { - writeByte((value>>8)&0xFF); - writeByte((value )&0xFF); - } - - // DCT & quantization core - function fDCTQuant(data, fdtbl) - { - var d0, d1, d2, d3, d4, d5, d6, d7; - /* Pass 1: process rows. */ - var dataOff=0; - var i; - var I8 = 8; - var I64 = 64; - for (i=0; i 0.0) ? ((fDCTQuant + 0.5)|0) : ((fDCTQuant - 0.5)|0); - //outputfDCTQuant[i] = fround(fDCTQuant); - - } - return outputfDCTQuant; - } - - function writeAPP0() - { - writeWord(0xFFE0); // marker - writeWord(16); // length - writeByte(0x4A); // J - writeByte(0x46); // F - writeByte(0x49); // I - writeByte(0x46); // F - writeByte(0); // = "JFIF",'\0' - writeByte(1); // versionhi - writeByte(1); // versionlo - writeByte(0); // xyunits - writeWord(1); // xdensity - writeWord(1); // ydensity - writeByte(0); // thumbnwidth - writeByte(0); // thumbnheight - } - - function writeSOF0(width, height) - { - writeWord(0xFFC0); // marker - writeWord(17); // length, truecolor YUV JPG - writeByte(8); // precision - writeWord(height); - writeWord(width); - writeByte(3); // nrofcomponents - writeByte(1); // IdY - writeByte(0x11); // HVY - writeByte(0); // QTY - writeByte(2); // IdU - writeByte(0x11); // HVU - writeByte(1); // QTU - writeByte(3); // IdV - writeByte(0x11); // HVV - writeByte(1); // QTV - } - - function writeDQT() - { - writeWord(0xFFDB); // marker - writeWord(132); // length - writeByte(0); - for (var i=0; i<64; i++) { - writeByte(YTable[i]); - } - writeByte(1); - for (var j=0; j<64; j++) { - writeByte(UVTable[j]); - } - } - - function writeDHT() - { - writeWord(0xFFC4); // marker - writeWord(0x01A2); // length - - writeByte(0); // HTYDCinfo - for (var i=0; i<16; i++) { - writeByte(std_dc_luminance_nrcodes[i+1]); - } - for (var j=0; j<=11; j++) { - writeByte(std_dc_luminance_values[j]); - } - - writeByte(0x10); // HTYACinfo - for (var k=0; k<16; k++) { - writeByte(std_ac_luminance_nrcodes[k+1]); - } - for (var l=0; l<=161; l++) { - writeByte(std_ac_luminance_values[l]); - } - - writeByte(1); // HTUDCinfo - for (var m=0; m<16; m++) { - writeByte(std_dc_chrominance_nrcodes[m+1]); - } - for (var n=0; n<=11; n++) { - writeByte(std_dc_chrominance_values[n]); - } - - writeByte(0x11); // HTUACinfo - for (var o=0; o<16; o++) { - writeByte(std_ac_chrominance_nrcodes[o+1]); - } - for (var p=0; p<=161; p++) { - writeByte(std_ac_chrominance_values[p]); - } - } - - function writeSOS() - { - writeWord(0xFFDA); // marker - writeWord(12); // length - writeByte(3); // nrofcomponents - writeByte(1); // IdY - writeByte(0); // HTY - writeByte(2); // IdU - writeByte(0x11); // HTU - writeByte(3); // IdV - writeByte(0x11); // HTV - writeByte(0); // Ss - writeByte(0x3f); // Se - writeByte(0); // Bf - } - - function processDU(CDU, fdtbl, DC, HTDC, HTAC){ - var EOB = HTAC[0x00]; - var M16zeroes = HTAC[0xF0]; - var pos; - var I16 = 16; - var I63 = 63; - var I64 = 64; - var DU_DCT = fDCTQuant(CDU, fdtbl); - //ZigZag reorder - for (var j=0;j0)&&(DU[end0pos]==0); end0pos--) {}; - //end0pos = first element in reverse order !=0 - if ( end0pos == 0) { - writeBits(EOB); - return DC; - } - var i = 1; - var lng; - while ( i <= end0pos ) { - var startpos = i; - for (; (DU[i]==0) && (i<=end0pos); ++i) {} - var nrzeroes = i-startpos; - if ( nrzeroes >= I16 ) { - lng = nrzeroes>>4; - for (var nrmarker=1; nrmarker <= lng; ++nrmarker) - writeBits(M16zeroes); - nrzeroes = nrzeroes&0xF; - } - pos = 32767+DU[i]; - writeBits(HTAC[(nrzeroes<<4)+category[pos]]); - writeBits(bitcode[pos]); - i++; - } - if ( end0pos != I63 ) { - writeBits(EOB); - } - return DC; - } - - function initCharLookupTable(){ - var sfcc = String.fromCharCode; - for(var i=0; i < 256; i++){ ///// ACHTUNG // 255 - clt[i] = sfcc(i); - } - } - - this.encode = function(image,quality) // image data object - { - // var time_start = new Date().getTime(); - - if(quality) setQuality(quality); - - // Initialize bit writer - byteout = new Array(); - bytenew=0; - bytepos=7; - - // Add JPEG headers - writeWord(0xFFD8); // SOI - writeAPP0(); - writeDQT(); - writeSOF0(image.width,image.height); - writeDHT(); - writeSOS(); - - - // Encode 8x8 macroblocks - var DCY=0; - var DCU=0; - var DCV=0; - - bytenew=0; - bytepos=7; - - - this.encode.displayName = "_encode_"; - - var imageData = image.data; - var width = image.width; - var height = image.height; - - var quadWidth = width*4; - var tripleWidth = width*3; - - var x, y = 0; - var r, g, b; - var start,p, col,row,pos; - while(y < height){ - x = 0; - while(x < quadWidth){ - start = quadWidth * y + x; - p = start; - col = -1; - row = 0; - - for(pos=0; pos < 64; pos++){ - row = pos >> 3;// /8 - col = ( pos & 7 ) * 4; // %8 - p = start + ( row * quadWidth ) + col; - - if(y+row >= height){ // padding bottom - p-= (quadWidth*(y+1+row-height)); - } - - if(x+col >= quadWidth){ // padding right - p-= ((x+col) - quadWidth +4) - } - - r = imageData[ p++ ]; - g = imageData[ p++ ]; - b = imageData[ p++ ]; - - - /* // calculate YUV values dynamically - YDU[pos]=((( 0.29900)*r+( 0.58700)*g+( 0.11400)*b))-128; //-0x80 - UDU[pos]=(((-0.16874)*r+(-0.33126)*g+( 0.50000)*b)); - VDU[pos]=((( 0.50000)*r+(-0.41869)*g+(-0.08131)*b)); - */ - - // use lookup table (slightly faster) - YDU[pos] = ((RGB_YUV_TABLE[r] + RGB_YUV_TABLE[(g + 256)>>0] + RGB_YUV_TABLE[(b + 512)>>0]) >> 16)-128; - UDU[pos] = ((RGB_YUV_TABLE[(r + 768)>>0] + RGB_YUV_TABLE[(g + 1024)>>0] + RGB_YUV_TABLE[(b + 1280)>>0]) >> 16)-128; - VDU[pos] = ((RGB_YUV_TABLE[(r + 1280)>>0] + RGB_YUV_TABLE[(g + 1536)>>0] + RGB_YUV_TABLE[(b + 1792)>>0]) >> 16)-128; - - } - - DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT); - DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT); - DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT); - x+=32; - } - y+=8; - } - - - //////////////////////////////////////////////////////////////// - - // Do the bit alignment of the EOI marker - if ( bytepos >= 0 ) { - var fillbits = []; - fillbits[1] = bytepos+1; - fillbits[0] = (1<<(bytepos+1))-1; - writeBits(fillbits); - } - - writeWord(0xFFD9); //EOI - - var jpegDataUri = 'data:image/jpeg;base64,' + btoa(byteout.join('')); - - byteout = []; - - // benchmarking - // var duration = new Date().getTime() - time_start; - // console.log('Encoding time: '+ currentQuality + 'ms'); - // - - return jpegDataUri - } - - function setQuality(quality){ - if (quality <= 0) { - quality = 1; - } - if (quality > 100) { - quality = 100; - } - - if(currentQuality == quality) return // don't recalc if unchanged - - var sf = 0; - if (quality < 50) { - sf = Math.floor(5000 / quality); - } else { - sf = Math.floor(200 - quality*2); - } - - initQuantTables(sf); - currentQuality = quality; - // console.log('Quality set to: '+quality +'%'); - } - - function init(){ - // var time_start = new Date().getTime(); - if(!quality) quality = 50; - // Create tables - initCharLookupTable() - initHuffmanTbl(); - initCategoryNumber(); - initRGBYUVTable(); - - setQuality(quality); - // var duration = new Date().getTime() - time_start; - // console.log('Initialization '+ duration + 'ms'); - } - - init(); - - }; - - JPEGEncoder.encode = function( data, quality ) { - var encoder = new JPEGEncoder( quality ); - - return encoder.encode( data ); - } - - return JPEGEncoder; - }); - /** - * @fileOverview Fix android canvas.toDataUrl bug. - */ - define('runtime/html5/androidpatch',[ - 'runtime/html5/util', - 'runtime/html5/jpegencoder', - 'base' - ], function( Util, encoder, Base ) { - var origin = Util.canvasToDataUrl, - supportJpeg; - - Util.canvasToDataUrl = function( canvas, type, quality ) { - var ctx, w, h, fragement, parts; - - // 非android手机直接跳过。 - if ( !Base.os.android ) { - return origin.apply( null, arguments ); - } - - // 检测是否canvas支持jpeg导出,根据数据格式来判断。 - // JPEG 前两位分别是:255, 216 - if ( type === 'image/jpeg' && typeof supportJpeg === 'undefined' ) { - fragement = origin.apply( null, arguments ); - - parts = fragement.split(','); - - if ( ~parts[ 0 ].indexOf('base64') ) { - fragement = atob( parts[ 1 ] ); - } else { - fragement = decodeURIComponent( parts[ 1 ] ); - } - - fragement = fragement.substring( 0, 2 ); - - supportJpeg = fragement.charCodeAt( 0 ) === 255 && - fragement.charCodeAt( 1 ) === 216; - } - - // 只有在android环境下才修复 - if ( type === 'image/jpeg' && !supportJpeg ) { - w = canvas.width; - h = canvas.height; - ctx = canvas.getContext('2d'); - - return encoder.encode( ctx.getImageData( 0, 0, w, h ), quality ); - } - - return origin.apply( null, arguments ); - }; - }); - /** - * @fileOverview Transport - * @todo 支持chunked传输,优势: - * 可以将大文件分成小块,挨个传输,可以提高大文件成功率,当失败的时候,也只需要重传那小部分, - * 而不需要重头再传一次。另外断点续传也需要用chunked方式。 - */ - define('runtime/html5/transport',[ - 'base', - 'runtime/html5/runtime' - ], function( Base, Html5Runtime ) { - - var noop = Base.noop, - $ = Base.$; - - return Html5Runtime.register( 'Transport', { - init: function() { - this._status = 0; - this._response = null; - }, - - send: function() { - var owner = this.owner, - opts = this.options, - xhr = this._initAjax(), - blob = owner._blob, - server = opts.server, - formData, binary, fr; - - if ( opts.sendAsBinary ) { - server += (/\?/.test( server ) ? '&' : '?') + - $.param( owner._formData ); - - binary = blob.getSource(); - } else { - formData = new FormData(); - $.each( owner._formData, function( k, v ) { - formData.append( k, v ); - }); - - formData.append( opts.fileVal, blob.getSource(), - opts.filename || owner._formData.name || '' ); - } - - if ( opts.withCredentials && 'withCredentials' in xhr ) { - xhr.open( opts.method, server, true ); - xhr.withCredentials = true; - } else { - xhr.open( opts.method, server ); - } - - this._setRequestHeader( xhr, opts.headers ); - - if ( binary ) { - // 强制设置成 content-type 为文件流。 - xhr.overrideMimeType && - xhr.overrideMimeType('application/octet-stream'); - - // android直接发送blob会导致服务端接收到的是空文件。 - // bug详情。 - // https://code.google.com/p/android/issues/detail?id=39882 - // 所以先用fileReader读取出来再通过arraybuffer的方式发送。 - if ( Base.os.android ) { - fr = new FileReader(); - - fr.onload = function() { - xhr.send( this.result ); - fr = fr.onload = null; - }; - - fr.readAsArrayBuffer( binary ); - } else { - xhr.send( binary ); - } - } else { - xhr.send( formData ); - } - }, - - getResponse: function() { - return this._response; - }, - - getResponseAsJson: function() { - return this._parseJson( this._response ); - }, - - getStatus: function() { - return this._status; - }, - - abort: function() { - var xhr = this._xhr; - - if ( xhr ) { - xhr.upload.onprogress = noop; - xhr.onreadystatechange = noop; - xhr.abort(); - - this._xhr = xhr = null; - } - }, - - destroy: function() { - this.abort(); - }, - - _initAjax: function() { - var me = this, - xhr = new XMLHttpRequest(), - opts = this.options; - - if ( opts.withCredentials && !('withCredentials' in xhr) && - typeof XDomainRequest !== 'undefined' ) { - xhr = new XDomainRequest(); - } - - xhr.upload.onprogress = function( e ) { - var percentage = 0; - - if ( e.lengthComputable ) { - percentage = e.loaded / e.total; - } - - return me.trigger( 'progress', percentage ); - }; - - xhr.onreadystatechange = function() { - - if ( xhr.readyState !== 4 ) { - return; - } - - xhr.upload.onprogress = noop; - xhr.onreadystatechange = noop; - me._xhr = null; - me._status = xhr.status; - - if ( xhr.status >= 200 && xhr.status < 300 ) { - me._response = xhr.responseText; - return me.trigger('load'); - } else if ( xhr.status >= 500 && xhr.status < 600 ) { - me._response = xhr.responseText; - return me.trigger( 'error', 'server' ); - } - - - return me.trigger( 'error', me._status ? 'http' : 'abort' ); - }; - - me._xhr = xhr; - return xhr; - }, - - _setRequestHeader: function( xhr, headers ) { - $.each( headers, function( key, val ) { - xhr.setRequestHeader( key, val ); - }); - }, - - _parseJson: function( str ) { - var json; - - try { - json = JSON.parse( str ); - } catch ( ex ) { - json = {}; - } - - return json; - } - }); - }); - define('webuploader',[ - 'base', - 'widgets/filepicker', - 'widgets/image', - 'widgets/queue', - 'widgets/runtime', - 'widgets/upload', - 'widgets/log', - 'runtime/html5/blob', - 'runtime/html5/filepicker', - 'runtime/html5/imagemeta/exif', - 'runtime/html5/image', - 'runtime/html5/androidpatch', - 'runtime/html5/transport' - ], function( Base ) { - return Base; - }); - return require('webuploader'); -}); diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.custom.min.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.custom.min.js deleted file mode 100644 index 09728105..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.custom.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* WebUploader 0.1.5 */!function(a,b){var c,d={},e=function(a,b){var c,d,e;if("string"==typeof a)return h(a);for(c=[],d=a.length,e=0;d>e;e++)c.push(h(a[e]));return b.apply(null,c)},f=function(a,b,c){2===arguments.length&&(c=b,b=null),e(b||[],function(){g(a,c,arguments)})},g=function(a,b,c){var f,g={exports:b};"function"==typeof b&&(c.length||(c=[e,g.exports,g]),f=b.apply(null,c),void 0!==f&&(g.exports=f)),d[a]=g.exports},h=function(b){var c=d[b]||a[b];if(!c)throw new Error("`"+b+"` is undefined");return c},i=function(a){var b,c,e,f,g,h;h=function(a){return a&&a.charAt(0).toUpperCase()+a.substr(1)};for(b in d)if(c=a,d.hasOwnProperty(b)){for(e=b.split("/"),g=h(e.pop());f=h(e.shift());)c[f]=c[f]||{},c=c[f];c[g]=d[b]}return a},j=function(c){return a.__dollar=c,i(b(a,f,e))};"object"==typeof module&&"object"==typeof module.exports?module.exports=j():"function"==typeof define&&define.amd?define(["jquery"],j):(c=a.WebUploader,a.WebUploader=j(),a.WebUploader.noConflict=function(){a.WebUploader=c})}(window,function(a,b,c){return b("dollar-third",[],function(){var b=a.__dollar||a.jQuery||a.Zepto;if(!b)throw new Error("jQuery or Zepto not found!");return b}),b("dollar",["dollar-third"],function(a){return a}),b("promise-builtin",["dollar"],function(a){function b(b){var c,d,e,f,g,h,i=[],j=!b&&[],k=function(a){for(h=a,c=!0,g=e||0,e=0,f=i.length,d=!0;i&&f>g;g++)i[g].apply(a[0],a[1]);d=!1,i&&(j?j.length&&k(j.shift()):i=[])},l={add:function(){if(i){var b=i.length;!function c(b){a.each(b,function(b,d){var e=a.type(d);"function"===e?i.push(d):d&&d.length&&"string"!==e&&c(d)})}(arguments),d?f=i.length:h&&(e=b,k(h))}return this},disable:function(){return i=j=h=void 0,this},lock:function(){return j=void 0,h||l.disable(),this},fireWith:function(a,b){return!i||c&&!j||(b=b||[],b=[a,b.slice?b.slice():b],d?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this}};return l}function c(d){var e=[["resolve","done",b(!0),"resolved"],["reject","fail",b(!0),"rejected"],["notify","progress",b()]],f="pending",g={state:function(){return f},always:function(){return h.done(arguments).fail(arguments),this},then:function(){var b=arguments;return c(function(c){a.each(e,function(d,e){var f=e[0],i=a.isFunction(b[d])&&b[d];h[e[1]](function(){var b;b=i&&i.apply(this,arguments),b&&a.isFunction(b.promise)?b.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===g?c.promise():this,i?[b]:arguments)})}),b=null}).promise()},promise:function(b){return null!=b?a.extend(b,g):g}},h={};return g.pipe=g.then,a.each(e,function(a,b){var c=b[2],d=b[3];g[b[1]]=c.add,d&&c.add(function(){f=d},e[1^a][2].disable,e[2][2].lock),h[b[0]]=function(){return h[b[0]+"With"](this===h?g:this,arguments),this},h[b[0]+"With"]=c.fireWith}),g.promise(h),d&&d.call(h,h),h}var d;return d={Deferred:c,isPromise:function(a){return a&&"function"==typeof a.then},when:function(b){var d,e,f,g=0,h=[].slice,i=h.call(arguments),j=i.length,k=1!==j||b&&a.isFunction(b.promise)?j:0,l=1===k?b:c(),m=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?h.call(arguments):e,c===d?l.notifyWith(b,c):--k||l.resolveWith(b,c)}};if(j>1)for(d=new Array(j),e=new Array(j),f=new Array(j);j>g;g++)i[g]&&a.isFunction(i[g].promise)?i[g].promise().done(m(g,f,i)).fail(l.reject).progress(m(g,e,d)):--k;return k||l.resolveWith(f,i),l.promise()}}}),b("promise",["promise-builtin"],function(a){return a}),b("base",["dollar","promise"],function(b,c){function d(a){return function(){return h.apply(a,arguments)}}function e(a,b){return function(){return a.apply(b,arguments)}}function f(a){var b;return Object.create?Object.create(a):(b=function(){},b.prototype=a,new b)}var g=function(){},h=Function.call;return{version:"0.1.5",$:b,Deferred:c.Deferred,isPromise:c.isPromise,when:c.when,browser:function(a){var b={},c=a.match(/WebKit\/([\d.]+)/),d=a.match(/Chrome\/([\d.]+)/)||a.match(/CriOS\/([\d.]+)/),e=a.match(/MSIE\s([\d\.]+)/)||a.match(/(?:trident)(?:.*rv:([\w.]+))?/i),f=a.match(/Firefox\/([\d.]+)/),g=a.match(/Safari\/([\d.]+)/),h=a.match(/OPR\/([\d.]+)/);return c&&(b.webkit=parseFloat(c[1])),d&&(b.chrome=parseFloat(d[1])),e&&(b.ie=parseFloat(e[1])),f&&(b.firefox=parseFloat(f[1])),g&&(b.safari=parseFloat(g[1])),h&&(b.opera=parseFloat(h[1])),b}(navigator.userAgent),os:function(a){var b={},c=a.match(/(?:Android);?[\s\/]+([\d.]+)?/),d=a.match(/(?:iPad|iPod|iPhone).*OS\s([\d_]+)/);return c&&(b.android=parseFloat(c[1])),d&&(b.ios=parseFloat(d[1].replace(/_/g,"."))),b}(navigator.userAgent),inherits:function(a,c,d){var e;return"function"==typeof c?(e=c,c=null):e=c&&c.hasOwnProperty("constructor")?c.constructor:function(){return a.apply(this,arguments)},b.extend(!0,e,a,d||{}),e.__super__=a.prototype,e.prototype=f(a.prototype),c&&b.extend(!0,e.prototype,c),e},noop:g,bindFn:e,log:function(){return a.console?e(console.log,console):g}(),nextTick:function(){return function(a){setTimeout(a,1)}}(),slice:d([].slice),guid:function(){var a=0;return function(b){for(var c=(+new Date).toString(32),d=0;5>d;d++)c+=Math.floor(65535*Math.random()).toString(32);return(b||"wu_")+c+(a++).toString(32)}}(),formatSize:function(a,b,c){var d;for(c=c||["B","K","M","G","TB"];(d=c.shift())&&a>1024;)a/=1024;return("B"===d?a:a.toFixed(b||2))+d}}}),b("mediator",["base"],function(a){function b(a,b,c,d){return f.grep(a,function(a){return!(!a||b&&a.e!==b||c&&a.cb!==c&&a.cb._cb!==c||d&&a.ctx!==d)})}function c(a,b,c){f.each((a||"").split(h),function(a,d){c(d,b)})}function d(a,b){for(var c,d=!1,e=-1,f=a.length;++e1?void(d.isPlainObject(b)&&d.isPlainObject(c[a])?d.extend(c[a],b):c[a]=b):a?c[a]:c},getStats:function(){var a=this.request("get-stats");return a?{successNum:a.numOfSuccess,progressNum:a.numOfProgress,cancelNum:a.numOfCancel,invalidNum:a.numOfInvalid,uploadFailNum:a.numOfUploadFailed,queueNum:a.numOfQueue,interruptNum:a.numofInterrupt}:{}},trigger:function(a){var c=[].slice.call(arguments,1),e=this.options,f="on"+a.substring(0,1).toUpperCase()+a.substring(1);return b.trigger.apply(this,arguments)===!1||d.isFunction(e[f])&&e[f].apply(this,c)===!1||d.isFunction(this[f])&&this[f].apply(this,c)===!1||b.trigger.apply(b,[this,a].concat(c))===!1?!1:!0},destroy:function(){this.request("destroy",arguments),this.off()},request:a.noop}),a.create=c.create=function(a){return new c(a)},a.Uploader=c,c}),b("runtime/runtime",["base","mediator"],function(a,b){function c(b){this.options=d.extend({container:document.body},b),this.uid=a.guid("rt_")}var d=a.$,e={},f=function(a){for(var b in a)if(a.hasOwnProperty(b))return b;return null};return d.extend(c.prototype,{getContainer:function(){var a,b,c=this.options;return this._container?this._container:(a=d(c.container||document.body),b=d(document.createElement("div")),b.attr("id","rt_"+this.uid),b.css({position:"absolute",top:"0px",left:"0px",width:"1px",height:"1px",overflow:"hidden"}),a.append(b),a.addClass("webuploader-container"),this._container=b,this._parent=a,b)},init:a.noop,exec:a.noop,destroy:function(){this._container&&this._container.remove(),this._parent&&this._parent.removeClass("webuploader-container"),this.off()}}),c.orders="html5,flash",c.addRuntime=function(a,b){e[a]=b},c.hasRuntime=function(a){return!!(a?e[a]:f(e))},c.create=function(a,b){var g,h;if(b=b||c.orders,d.each(b.split(/\s*,\s*/g),function(){return e[this]?(g=this,!1):void 0}),g=g||f(e),!g)throw new Error("Runtime Error");return h=new e[g](a)},b.installTo(c.prototype),c}),b("runtime/client",["base","mediator","runtime/runtime"],function(a,b,c){function d(b,d){var f,g=a.Deferred();this.uid=a.guid("client_"),this.runtimeReady=function(a){return g.done(a)},this.connectRuntime=function(b,h){if(f)throw new Error("already connected!");return g.done(h),"string"==typeof b&&e.get(b)&&(f=e.get(b)),f=f||e.get(null,d),f?(a.$.extend(f.options,b),f.__promise.then(g.resolve),f.__client++):(f=c.create(b,b.runtimeOrder),f.__promise=g.promise(),f.once("ready",g.resolve),f.init(),e.add(f),f.__client=1),d&&(f.__standalone=d),f},this.getRuntime=function(){return f},this.disconnectRuntime=function(){f&&(f.__client--,f.__client<=0&&(e.remove(f),delete f.__promise,f.destroy()),f=null)},this.exec=function(){if(f){var c=a.slice(arguments);return b&&c.unshift(b),f.exec.apply(this,c)}},this.getRuid=function(){return f&&f.uid},this.destroy=function(a){return function(){a&&a.apply(this,arguments),this.trigger("destroy"),this.off(),this.exec("destroy"),this.disconnectRuntime()}}(this.destroy)}var e;return e=function(){var a={};return{add:function(b){a[b.uid]=b},get:function(b,c){var d;if(b)return a[b];for(d in a)if(!c||!a[d].__standalone)return a[d];return null},remove:function(b){delete a[b.uid]}}}(),b.installTo(d.prototype),d}),b("lib/blob",["base","runtime/client"],function(a,b){function c(a,c){var d=this;d.source=c,d.ruid=a,this.size=c.size||0,this.type=!c.type&&this.ext&&~"jpg,jpeg,png,gif,bmp".indexOf(this.ext)?"image/"+("jpg"===this.ext?"jpeg":this.ext):c.type||"application/octet-stream",b.call(d,"Blob"),this.uid=c.uid||this.uid,a&&d.connectRuntime(a)}return a.inherits(b,{constructor:c,slice:function(a,b){return this.exec("slice",a,b)},getSource:function(){return this.source}}),c}),b("lib/file",["base","lib/blob"],function(a,b){function c(a,c){var f;this.name=c.name||"untitled"+d++,f=e.exec(c.name)?RegExp.$1.toLowerCase():"",!f&&c.type&&(f=/\/(jpg|jpeg|png|gif|bmp)$/i.exec(c.type)?RegExp.$1.toLowerCase():"",this.name+="."+f),this.ext=f,this.lastModifiedDate=c.lastModifiedDate||(new Date).toLocaleString(),b.apply(this,arguments)}var d=1,e=/\.([^.]+)$/;return a.inherits(b,c)}),b("lib/filepicker",["base","runtime/client","lib/file"],function(b,c,d){function e(a){if(a=this.options=f.extend({},e.options,a),a.container=f(a.id),!a.container.length)throw new Error("按钮指定错误");a.innerHTML=a.innerHTML||a.label||a.container.html()||"",a.button=f(a.button||document.createElement("div")),a.button.html(a.innerHTML),a.container.html(a.button),c.call(this,"FilePicker",!0)}var f=b.$;return e.options={button:null,container:null,label:null,innerHTML:null,multiple:!0,accept:null,name:"file"},b.inherits(c,{constructor:e,init:function(){var c=this,e=c.options,g=e.button;g.addClass("webuploader-pick"),c.on("all",function(a){var b;switch(a){case"mouseenter":g.addClass("webuploader-pick-hover");break;case"mouseleave":g.removeClass("webuploader-pick-hover");break;case"change":b=c.exec("getFiles"),c.trigger("select",f.map(b,function(a){return a=new d(c.getRuid(),a),a._refer=e.container,a}),e.container)}}),c.connectRuntime(e,function(){c.refresh(),c.exec("init",e),c.trigger("ready")}),this._resizeHandler=b.bindFn(this.refresh,this),f(a).on("resize",this._resizeHandler)},refresh:function(){var a=this.getRuntime().getContainer(),b=this.options.button,c=b.outerWidth?b.outerWidth():b.width(),d=b.outerHeight?b.outerHeight():b.height(),e=b.offset();c&&d&&a.css({bottom:"auto",right:"auto",width:c+"px",height:d+"px"}).offset(e)},enable:function(){var a=this.options.button;a.removeClass("webuploader-pick-disable"),this.refresh()},disable:function(){var a=this.options.button;this.getRuntime().getContainer().css({top:"-99999px"}),a.addClass("webuploader-pick-disable")},destroy:function(){var b=this.options.button;f(a).off("resize",this._resizeHandler),b.removeClass("webuploader-pick-disable webuploader-pick-hover webuploader-pick")}}),e}),b("widgets/widget",["base","uploader"],function(a,b){function c(a){if(!a)return!1;var b=a.length,c=e.type(a);return 1===a.nodeType&&b?!0:"array"===c||"function"!==c&&"string"!==c&&(0===b||"number"==typeof b&&b>0&&b-1 in a)}function d(a){this.owner=a,this.options=a.options}var e=a.$,f=b.prototype._init,g=b.prototype.destroy,h={},i=[];return e.extend(d.prototype,{init:a.noop,invoke:function(a,b){var c=this.responseMap;return c&&a in c&&c[a]in this&&e.isFunction(this[c[a]])?this[c[a]].apply(this,b):h},request:function(){return this.owner.request.apply(this.owner,arguments)}}),e.extend(b.prototype,{_init:function(){var a=this,b=a._widgets=[],c=a.options.disableWidgets||"";return e.each(i,function(d,e){(!c||!~c.indexOf(e._name))&&b.push(new e(a))}),f.apply(a,arguments)},request:function(b,d,e){var f,g,i,j,k=0,l=this._widgets,m=l&&l.length,n=[],o=[];for(d=c(d)?d:[d];m>k;k++)f=l[k],g=f.invoke(b,d),g!==h&&(a.isPromise(g)?o.push(g):n.push(g));return e||o.length?(i=a.when.apply(a,o),j=i.pipe?"pipe":"then",i[j](function(){var b=a.Deferred(),c=arguments;return 1===c.length&&(c=c[0]),setTimeout(function(){b.resolve(c)},1),b.promise()})[e?j:"done"](e||a.noop)):n[0]},destroy:function(){g.apply(this,arguments),this._widgets=null}}),b.register=d.register=function(b,c){var f,g={init:"init",destroy:"destroy",name:"anonymous"};return 1===arguments.length?(c=b,e.each(c,function(a){return"_"===a[0]||"name"===a?void("name"===a&&(g.name=c.name)):void(g[a.replace(/[A-Z]/g,"-$&").toLowerCase()]=a)})):g=e.extend(g,b),c.responseMap=g,f=a.inherits(d,c),f._name=g.name,i.push(f),f},b.unRegister=d.unRegister=function(a){if(a&&"anonymous"!==a)for(var b=i.length;b--;)i[b]._name===a&&i.splice(b,1)},d}),b("widgets/filepicker",["base","uploader","lib/filepicker","widgets/widget"],function(a,b,c){var d=a.$;return d.extend(b.options,{pick:null,accept:null}),b.register({name:"picker",init:function(a){return this.pickers=[],a.pick&&this.addBtn(a.pick)},refresh:function(){d.each(this.pickers,function(){this.refresh()})},addBtn:function(b){var e=this,f=e.options,g=f.accept,h=[];if(b)return d.isPlainObject(b)||(b={id:b}),d(b.id).each(function(){var i,j,k;k=a.Deferred(),i=d.extend({},b,{accept:d.isPlainObject(g)?[g]:g,swf:f.swf,runtimeOrder:f.runtimeOrder,id:this}),j=new c(i),j.once("ready",k.resolve),j.on("select",function(a){e.owner.request("add-file",[a])}),j.init(),e.pickers.push(j),h.push(k.promise())}),a.when.apply(a,h)},disable:function(){d.each(this.pickers,function(){this.disable()})},enable:function(){d.each(this.pickers,function(){this.enable()})},destroy:function(){d.each(this.pickers,function(){this.destroy()}),this.pickers=null}})}),b("lib/image",["base","runtime/client","lib/blob"],function(a,b,c){function d(a){this.options=e.extend({},d.options,a),b.call(this,"Image"),this.on("load",function(){this._info=this.exec("info"),this._meta=this.exec("meta")})}var e=a.$;return d.options={quality:90,crop:!1,preserveHeaders:!1,allowMagnify:!1},a.inherits(b,{constructor:d,info:function(a){return a?(this._info=a,this):this._info},meta:function(a){return a?(this._meta=a,this):this._meta},loadFromBlob:function(a){var b=this,c=a.getRuid();this.connectRuntime(c,function(){b.exec("init",b.options),b.exec("loadFromBlob",a)})},resize:function(){var b=a.slice(arguments);return this.exec.apply(this,["resize"].concat(b))},crop:function(){var b=a.slice(arguments);return this.exec.apply(this,["crop"].concat(b))},getAsDataUrl:function(a){return this.exec("getAsDataUrl",a)},getAsBlob:function(a){var b=this.exec("getAsBlob",a);return new c(this.getRuid(),b)}}),d}),b("widgets/image",["base","uploader","lib/image","widgets/widget"],function(a,b,c){var d,e=a.$;return d=function(a){var b=0,c=[],d=function(){for(var d;c.length&&a>b;)d=c.shift(),b+=d[0],d[1]()};return function(a,e,f){c.push([e,f]),a.once("destroy",function(){b-=e,setTimeout(d,1)}),setTimeout(d,1)}}(5242880),e.extend(b.options,{thumb:{width:110,height:110,quality:70,allowMagnify:!0,crop:!0,preserveHeaders:!1,type:"image/jpeg"},compress:{width:1600,height:1600,quality:90,allowMagnify:!1,crop:!1,preserveHeaders:!0}}),b.register({name:"image",makeThumb:function(a,b,f,g){var h,i;return a=this.request("get-file",a),a.type.match(/^image/)?(h=e.extend({},this.options.thumb),e.isPlainObject(f)&&(h=e.extend(h,f),f=null),f=f||h.width,g=g||h.height,i=new c(h),i.once("load",function(){a._info=a._info||i.info(),a._meta=a._meta||i.meta(),1>=f&&f>0&&(f=a._info.width*f),1>=g&&g>0&&(g=a._info.height*g),i.resize(f,g)}),i.once("complete",function(){b(!1,i.getAsDataUrl(h.type)),i.destroy()}),i.once("error",function(a){b(a||!0),i.destroy()}),void d(i,a.source.size,function(){a._info&&i.info(a._info),a._meta&&i.meta(a._meta),i.loadFromBlob(a.source)})):void b(!0)},beforeSendFile:function(b){var d,f,g=this.options.compress||this.options.resize,h=g&&g.compressSize||0,i=g&&g.noCompressIfLarger||!1;return b=this.request("get-file",b),!g||!~"image/jpeg,image/jpg".indexOf(b.type)||b.size=a&&a>0&&(a=b._info.width*a),1>=c&&c>0&&(c=b._info.height*c),d.resize(a,c)}),d.once("complete",function(){var a,c;try{a=d.getAsBlob(g.type),c=b.size,(!i||a.sizeb;b++)if(c=this._queue[b],a===c.getStatus())return c;return null},sort:function(a){"function"==typeof a&&this._queue.sort(a)},getFiles:function(){for(var a,b=[].slice.call(arguments,0),c=[],d=0,f=this._queue.length;f>d;d++)a=this._queue[d],(!b.length||~e.inArray(a.getStatus(),b))&&c.push(a);return c},removeFile:function(a){var b=this._map[a.id];b&&(delete this._map[a.id],a.destroy(),this.stats.numofDeleted++)},_fileAdded:function(a){var b=this,c=this._map[a.id];c||(this._map[a.id]=a,a.on("statuschange",function(a,c){b._onFileStatusChange(a,c)}))},_onFileStatusChange:function(a,b){var c=this.stats;switch(b){case f.PROGRESS:c.numOfProgress--;break;case f.QUEUED:c.numOfQueue--;break;case f.ERROR:c.numOfUploadFailed--;break;case f.INVALID:c.numOfInvalid--;break;case f.INTERRUPT:c.numofInterrupt--}switch(a){case f.QUEUED:c.numOfQueue++;break;case f.PROGRESS:c.numOfProgress++;break;case f.ERROR:c.numOfUploadFailed++;break;case f.COMPLETE:c.numOfSuccess++;break;case f.CANCELLED:c.numOfCancel++;break;case f.INVALID:c.numOfInvalid++;break;case f.INTERRUPT:c.numofInterrupt++}}}),b.installTo(d.prototype),d}),b("widgets/queue",["base","uploader","queue","file","lib/file","runtime/client","widgets/widget"],function(a,b,c,d,e,f){var g=a.$,h=/\.\w+$/,i=d.Status;return b.register({name:"queue",init:function(b){var d,e,h,i,j,k,l,m=this;if(g.isPlainObject(b.accept)&&(b.accept=[b.accept]),b.accept){for(j=[],h=0,e=b.accept.length;e>h;h++)i=b.accept[h].extensions,i&&j.push(i);j.length&&(k="\\."+j.join(",").replace(/,/g,"$|\\.").replace(/\*/g,".*")+"$"),m.accept=new RegExp(k,"i")}return m.queue=new c,m.stats=m.queue.stats,"html5"===this.request("predict-runtime-type")?(d=a.Deferred(),this.placeholder=l=new f("Placeholder"),l.connectRuntime({runtimeOrder:"html5"},function(){m._ruid=l.getRuid(),d.resolve()}),d.promise()):void 0},_wrapFile:function(a){if(!(a instanceof d)){if(!(a instanceof e)){if(!this._ruid)throw new Error("Can't add external files.");a=new e(this._ruid,a)}a=new d(a)}return a},acceptFile:function(a){var b=!a||!a.size||this.accept&&h.exec(a.name)&&!this.accept.test(a.name);return!b},_addFile:function(a){var b=this;return a=b._wrapFile(a),b.owner.trigger("beforeFileQueued",a)?b.acceptFile(a)?(b.queue.append(a),b.owner.trigger("fileQueued",a),a):void b.owner.trigger("error","Q_TYPE_DENIED",a):void 0},getFile:function(a){return this.queue.getFile(a)},addFile:function(a){var b=this;a.length||(a=[a]),a=g.map(a,function(a){return b._addFile(a)}),b.owner.trigger("filesQueued",a),b.options.auto&&setTimeout(function(){b.request("start-upload")},20)},getStats:function(){return this.stats},removeFile:function(a,b){var c=this;a=a.id?a:c.queue.getFile(a),this.request("cancel-file",a),b&&this.queue.removeFile(a)},getFiles:function(){return this.queue.getFiles.apply(this.queue,arguments)},fetchFile:function(){return this.queue.fetch.apply(this.queue,arguments)},retry:function(a,b){var c,d,e,f=this;if(a)return a=a.id?a:f.queue.getFile(a),a.setStatus(i.QUEUED),void(b||f.request("start-upload"));for(c=f.queue.getFiles(i.ERROR),d=0,e=c.length;e>d;d++)a=c[d],a.setStatus(i.QUEUED);f.request("start-upload")},sortFiles:function(){return this.queue.sort.apply(this.queue,arguments)},reset:function(){this.owner.trigger("reset"),this.queue=new c,this.stats=this.queue.stats},destroy:function(){this.reset(),this.placeholder&&this.placeholder.destroy()}})}),b("widgets/runtime",["uploader","runtime/runtime","widgets/widget"],function(a,b){return a.support=function(){return b.hasRuntime.apply(b,arguments)},a.register({name:"runtime",init:function(){if(!this.predictRuntimeType())throw Error("Runtime Error")},predictRuntimeType:function(){var a,c,d=this.options.runtimeOrder||b.orders,e=this.type;if(!e)for(d=d.split(/\s*,\s*/g),a=0,c=d.length;c>a;a++)if(b.hasRuntime(d[a])){this.type=e=d[a];break}return e}})}),b("lib/transport",["base","runtime/client","mediator"],function(a,b,c){function d(a){var c=this;a=c.options=e.extend(!0,{},d.options,a||{}),b.call(this,"Transport"),this._blob=null,this._formData=a.formData||{},this._headers=a.headers||{},this.on("progress",this._timeout),this.on("load error",function(){c.trigger("progress",1),clearTimeout(c._timer)})}var e=a.$;return d.options={server:"",method:"POST",withCredentials:!1,fileVal:"file",timeout:12e4,formData:{},headers:{},sendAsBinary:!1},e.extend(d.prototype,{appendBlob:function(a,b,c){var d=this,e=d.options;d.getRuid()&&d.disconnectRuntime(),d.connectRuntime(b.ruid,function(){d.exec("init")}),d._blob=b,e.fileVal=a||e.fileVal,e.filename=c||e.filename},append:function(a,b){"object"==typeof a?e.extend(this._formData,a):this._formData[a]=b},setRequestHeader:function(a,b){"object"==typeof a?e.extend(this._headers,a):this._headers[a]=b},send:function(a){this.exec("send",a),this._timeout()},abort:function(){return clearTimeout(this._timer),this.exec("abort")},destroy:function(){this.trigger("destroy"),this.off(),this.exec("destroy"),this.disconnectRuntime()},getResponse:function(){return this.exec("getResponse")},getResponseAsJson:function(){return this.exec("getResponseAsJson")},getStatus:function(){return this.exec("getStatus")},_timeout:function(){var a=this,b=a.options.timeout;b&&(clearTimeout(a._timer),a._timer=setTimeout(function(){a.abort(),a.trigger("error","timeout")},b))}}),c.installTo(d.prototype),d}),b("widgets/upload",["base","uploader","file","lib/transport","widgets/widget"],function(a,b,c,d){function e(a,b){var c,d,e=[],f=a.source,g=f.size,h=b?Math.ceil(g/b):1,i=0,j=0;for(d={file:a,has:function(){return!!e.length},shift:function(){return e.shift()},unshift:function(a){e.unshift(a)}};h>j;)c=Math.min(b,g-i),e.push({file:a,start:i,end:b?i+c:g,total:g,chunks:h,chunk:j++,cuted:d}),i+=c;return a.blocks=e.concat(),a.remaning=e.length,d}var f=a.$,g=a.isPromise,h=c.Status;f.extend(b.options,{prepareNextFile:!1,chunked:!1,chunkSize:5242880,chunkRetry:2,threads:3,formData:{}}),b.register({name:"upload",init:function(){var b=this.owner,c=this;this.runing=!1,this.progress=!1,b.on("startUpload",function(){c.progress=!0}).on("uploadFinished",function(){c.progress=!1}),this.pool=[],this.stack=[],this.pending=[],this.remaning=0,this.__tick=a.bindFn(this._tick,this),b.on("uploadComplete",function(a){a.blocks&&f.each(a.blocks,function(a,b){b.transport&&(b.transport.abort(),b.transport.destroy()),delete b.transport}),delete a.blocks,delete a.remaning})},reset:function(){this.request("stop-upload",!0),this.runing=!1,this.pool=[],this.stack=[],this.pending=[],this.remaning=0,this._trigged=!1,this._promise=null},startUpload:function(b){var c=this;if(f.each(c.request("get-files",h.INVALID),function(){c.request("remove-file",this)}),b)if(b=b.id?b:c.request("get-file",b),b.getStatus()===h.INTERRUPT)f.each(c.pool,function(a,c){c.file===b&&c.transport&&c.transport.send()}),b.setStatus(h.QUEUED);else{if(b.getStatus()===h.PROGRESS)return;b.setStatus(h.QUEUED)}else f.each(c.request("get-files",[h.INITED]),function(){this.setStatus(h.QUEUED)});if(!c.runing){c.runing=!0;var d=[];f.each(c.pool,function(a,b){var e=b.file;e.getStatus()===h.INTERRUPT&&(d.push(e),c._trigged=!1,b.transport&&b.transport.send())});for(var b;b=d.shift();)b.setStatus(h.PROGRESS);b||f.each(c.request("get-files",h.INTERRUPT),function(){this.setStatus(h.PROGRESS)}),c._trigged=!1,a.nextTick(c.__tick),c.owner.trigger("startUpload")}},stopUpload:function(b,c){var d=this;if(b===!0&&(c=b,b=null),d.runing!==!1){if(b){if(b=b.id?b:d.request("get-file",b),b.getStatus()!==h.PROGRESS&&b.getStatus()!==h.QUEUED)return;return b.setStatus(h.INTERRUPT),f.each(d.pool,function(a,c){c.file===b&&(c.transport&&c.transport.abort(),d._putback(c),d._popBlock(c))}),a.nextTick(d.__tick)}d.runing=!1,this._promise&&this._promise.file&&this._promise.file.setStatus(h.INTERRUPT),c&&f.each(d.pool,function(a,b){b.transport&&b.transport.abort(),b.file.setStatus(h.INTERRUPT)}),d.owner.trigger("stopUpload")}},cancelFile:function(a){a=a.id?a:this.request("get-file",a),a.blocks&&f.each(a.blocks,function(a,b){var c=b.transport;c&&(c.abort(),c.destroy(),delete b.transport)}),a.setStatus(h.CANCELLED),this.owner.trigger("fileDequeued",a)},isInProgress:function(){return!!this.progress},_getStats:function(){return this.request("get-stats")},skipFile:function(a,b){a=a.id?a:this.request("get-file",a),a.setStatus(b||h.COMPLETE),a.skipped=!0,a.blocks&&f.each(a.blocks,function(a,b){var c=b.transport;c&&(c.abort(),c.destroy(),delete b.transport)}),this.owner.trigger("uploadSkip",a)},_tick:function(){var b,c,d=this,e=d.options;return d._promise?d._promise.always(d.__tick):void(d.pool.length1&&~"http,abort".indexOf(a)&&b.retried1&&f.extend(m,{chunks:b.chunks,chunk:b.chunk}),i.trigger("uploadBeforeSend",b,m,n),l.appendBlob(j.fileVal,b.blob,k.name),l.append(m),l.setRequestHeader(n),l.send()},_finishFile:function(a,b,c){var d=this.owner;return d.request("after-send-file",arguments,function(){a.setStatus(h.COMPLETE),d.trigger("uploadSuccess",a,b,c) -}).fail(function(b){a.getStatus()===h.PROGRESS&&a.setStatus(h.ERROR,b),d.trigger("uploadError",a,b)}).always(function(){d.trigger("uploadComplete",a)})},updateFileProgress:function(a){var b=0,c=0;a.blocks&&(f.each(a.blocks,function(a,b){c+=(b.percentage||0)*(b.end-b.start)}),b=c/a.size,this.owner.trigger("uploadProgress",a,b||0))}})}),b("widgets/log",["base","uploader","widgets/widget"],function(a,b){function c(a){var b=e.extend({},d,a),c=f.replace(/^(.*)\?/,"$1"+e.param(b)),g=new Image;g.src=c}var d,e=a.$,f=" http://static.tieba.baidu.com/tb/pms/img/st.gif??",g=(location.hostname||location.host||"protected").toLowerCase(),h=g&&/baidu/i.exec(g);if(h)return d={dv:3,master:"webuploader",online:/test/.exec(g)?0:1,module:"",product:g,type:0},b.register({name:"log",init:function(){var a=this.owner,b=0,d=0;a.on("error",function(a){c({type:2,c_error_code:a})}).on("uploadError",function(a,b){c({type:2,c_error_code:"UPLOAD_ERROR",c_reason:""+b})}).on("uploadComplete",function(a){b++,d+=a.size}).on("uploadFinished",function(){c({c_count:b,c_size:d}),b=d=0}),c({c_usage:1})}})}),b("runtime/compbase",[],function(){function a(a,b){this.owner=a,this.options=a.options,this.getRuntime=function(){return b},this.getRuid=function(){return b.uid},this.trigger=function(){return a.trigger.apply(a,arguments)}}return a}),b("runtime/html5/runtime",["base","runtime/runtime","runtime/compbase"],function(b,c,d){function e(){var a={},d=this,e=this.destroy;c.apply(d,arguments),d.type=f,d.exec=function(c,e){var f,h=this,i=h.uid,j=b.slice(arguments,2);return g[c]&&(f=a[i]=a[i]||new g[c](h,d),f[e])?f[e].apply(f,j):void 0},d.destroy=function(){return e&&e.apply(this,arguments)}}var f="html5",g={};return b.inherits(c,{constructor:e,init:function(){var a=this;setTimeout(function(){a.trigger("ready")},1)}}),e.register=function(a,c){var e=g[a]=b.inherits(d,c);return e},a.Blob&&a.FileReader&&a.DataView&&c.addRuntime(f,e),e}),b("runtime/html5/blob",["runtime/html5/runtime","lib/blob"],function(a,b){return a.register("Blob",{slice:function(a,c){var d=this.owner.source,e=d.slice||d.webkitSlice||d.mozSlice;return d=e.call(d,a,c),new b(this.getRuid(),d)}})}),b("runtime/html5/filepicker",["base","runtime/html5/runtime"],function(a,b){var c=a.$;return b.register("FilePicker",{init:function(){var a,b,d,e,f=this.getRuntime().getContainer(),g=this,h=g.owner,i=g.options,j=this.label=c(document.createElement("label")),k=this.input=c(document.createElement("input"));if(k.attr("type","file"),k.attr("name",i.name),k.addClass("webuploader-element-invisible"),j.on("click",function(){k.trigger("click")}),j.css({opacity:0,width:"100%",height:"100%",display:"block",cursor:"pointer",background:"#ffffff"}),i.multiple&&k.attr("multiple","multiple"),i.accept&&i.accept.length>0){for(a=[],b=0,d=i.accept.length;d>b;b++)a.push(i.accept[b].mimeTypes);k.attr("accept",a.join(","))}f.append(k),f.append(j),e=function(a){h.trigger(a.type)},k.on("change",function(a){var b,d=arguments.callee;g.files=a.target.files,b=this.cloneNode(!0),b.value=null,this.parentNode.replaceChild(b,this),k.off(),k=c(b).on("change",d).on("mouseenter mouseleave",e),h.trigger("change")}),j.on("mouseenter mouseleave",e)},getFiles:function(){return this.files},destroy:function(){this.input.off(),this.label.off()}})}),b("runtime/html5/util",["base"],function(b){var c=a.createObjectURL&&a||a.URL&&URL.revokeObjectURL&&URL||a.webkitURL,d=b.noop,e=d;return c&&(d=function(){return c.createObjectURL.apply(c,arguments)},e=function(){return c.revokeObjectURL.apply(c,arguments)}),{createObjectURL:d,revokeObjectURL:e,dataURL2Blob:function(a){var b,c,d,e,f,g;for(g=a.split(","),b=~g[0].indexOf("base64")?atob(g[1]):decodeURIComponent(g[1]),d=new ArrayBuffer(b.length),c=new Uint8Array(d),e=0;ei&&(d=h.getUint16(i),d>=65504&&65519>=d||65534===d)&&(e=h.getUint16(i+2)+2,!(i+e>h.byteLength));){if(f=b.parsers[d],!c&&f)for(g=0;g6&&(l.imageHead=a.slice?a.slice(2,k):new Uint8Array(a).subarray(2,k))}return l}},updateImageHead:function(a,b){var c,d,e,f=this._parse(a,!0);return e=2,f.imageHead&&(e=2+f.imageHead.byteLength),d=a.slice?a.slice(e):new Uint8Array(a).subarray(e),c=new Uint8Array(b.byteLength+2+d.byteLength),c[0]=255,c[1]=216,c.set(new Uint8Array(b),2),c.set(new Uint8Array(d),b.byteLength+2),c.buffer}},a.parseMeta=function(){return b.parse.apply(b,arguments)},a.updateImageHead=function(){return b.updateImageHead.apply(b,arguments)},b}),b("runtime/html5/imagemeta/exif",["base","runtime/html5/imagemeta"],function(a,b){var c={};return c.ExifMap=function(){return this},c.ExifMap.prototype.map={Orientation:274},c.ExifMap.prototype.get=function(a){return this[a]||this[this.map[a]]},c.exifTagTypes={1:{getValue:function(a,b){return a.getUint8(b)},size:1},2:{getValue:function(a,b){return String.fromCharCode(a.getUint8(b))},size:1,ascii:!0},3:{getValue:function(a,b,c){return a.getUint16(b,c)},size:2},4:{getValue:function(a,b,c){return a.getUint32(b,c)},size:4},5:{getValue:function(a,b,c){return a.getUint32(b,c)/a.getUint32(b+4,c)},size:8},9:{getValue:function(a,b,c){return a.getInt32(b,c)},size:4},10:{getValue:function(a,b,c){return a.getInt32(b,c)/a.getInt32(b+4,c)},size:8}},c.exifTagTypes[7]=c.exifTagTypes[1],c.getExifValue=function(b,d,e,f,g,h){var i,j,k,l,m,n,o=c.exifTagTypes[f];if(!o)return void a.log("Invalid Exif data: Invalid tag type.");if(i=o.size*g,j=i>4?d+b.getUint32(e+8,h):e+8,j+i>b.byteLength)return void a.log("Invalid Exif data: Invalid data offset.");if(1===g)return o.getValue(b,j,h);for(k=[],l=0;g>l;l+=1)k[l]=o.getValue(b,j+l*o.size,h);if(o.ascii){for(m="",l=0;lb.byteLength)return void a.log("Invalid Exif data: Invalid directory offset.");if(g=b.getUint16(d,e),h=d+2+12*g,h+4>b.byteLength)return void a.log("Invalid Exif data: Invalid directory size.");for(i=0;g>i;i+=1)this.parseExifTag(b,c,d+2+12*i,e,f);return b.getUint32(h,e)},c.parseExifData=function(b,d,e,f){var g,h,i=d+10;if(1165519206===b.getUint32(d+4)){if(i+8>b.byteLength)return void a.log("Invalid Exif data: Invalid segment size.");if(0!==b.getUint16(d+8))return void a.log("Invalid Exif data: Missing byte alignment offset.");switch(b.getUint16(i)){case 18761:g=!0;break;case 19789:g=!1;break;default:return void a.log("Invalid Exif data: Invalid byte alignment marker.")}if(42!==b.getUint16(i+2,g))return void a.log("Invalid Exif data: Missing TIFF marker.");h=b.getUint32(i+4,g),f.exif=new c.ExifMap,h=c.parseExifTags(b,i,i+h,g,f)}},b.parsers[65505].push(c.parseExifData),c}),b("runtime/html5/image",["base","runtime/html5/runtime","runtime/html5/util"],function(a,b,c){var d="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D";return b.register("Image",{modified:!1,init:function(){var a=this,b=new Image;b.onload=function(){a._info={type:a.type,width:this.width,height:this.height},a._metas||"image/jpeg"!==a.type?a.owner.trigger("load"):c.parseMeta(a._blob,function(b,c){a._metas=c,a.owner.trigger("load")})},b.onerror=function(){a.owner.trigger("error")},a._img=b},loadFromBlob:function(a){var b=this,d=b._img;b._blob=a,b.type=a.type,d.src=c.createObjectURL(a.getSource()),b.owner.once("load",function(){c.revokeObjectURL(d.src)})},resize:function(a,b){var c=this._canvas||(this._canvas=document.createElement("canvas"));this._resize(this._img,c,a,b),this._blob=null,this.modified=!0,this.owner.trigger("complete","resize")},crop:function(a,b,c,d,e){var f=this._canvas||(this._canvas=document.createElement("canvas")),g=this.options,h=this._img,i=h.naturalWidth,j=h.naturalHeight,k=this.getOrientation();e=e||1,f.width=c,f.height=d,g.preserveHeaders||this._rotate2Orientaion(f,k),this._renderImageToCanvas(f,h,-a,-b,i*e,j*e),this._blob=null,this.modified=!0,this.owner.trigger("complete","crop")},getAsBlob:function(a){var b,d=this._blob,e=this.options;if(a=a||this.type,this.modified||this.type!==a){if(b=this._canvas,"image/jpeg"===a){if(d=c.canvasToDataUrl(b,a,e.quality),e.preserveHeaders&&this._metas&&this._metas.imageHead)return d=c.dataURL2ArrayBuffer(d),d=c.updateImageHead(d,this._metas.imageHead),d=c.arrayBufferToBlob(d,a)}else d=c.canvasToDataUrl(b,a);d=c.dataURL2Blob(d)}return d},getAsDataUrl:function(a){var b=this.options;return a=a||this.type,"image/jpeg"===a?c.canvasToDataUrl(this._canvas,a,b.quality):this._canvas.toDataURL(a)},getOrientation:function(){return this._metas&&this._metas.exif&&this._metas.exif.get("Orientation")||1},info:function(a){return a?(this._info=a,this):this._info},meta:function(a){return a?(this._meta=a,this):this._meta},destroy:function(){var a=this._canvas;this._img.onload=null,a&&(a.getContext("2d").clearRect(0,0,a.width,a.height),a.width=a.height=0,this._canvas=null),this._img.src=d,this._img=this._blob=null},_resize:function(a,b,c,d){var e,f,g,h,i,j=this.options,k=a.width,l=a.height,m=this.getOrientation();~[5,6,7,8].indexOf(m)&&(c^=d,d^=c,c^=d),e=Math[j.crop?"max":"min"](c/k,d/l),j.allowMagnify||(e=Math.min(1,e)),f=k*e,g=l*e,j.crop?(b.width=c,b.height=d):(b.width=f,b.height=g),h=(b.width-f)/2,i=(b.height-g)/2,j.preserveHeaders||this._rotate2Orientaion(b,m),this._renderImageToCanvas(b,a,h,i,f,g)},_rotate2Orientaion:function(a,b){var c=a.width,d=a.height,e=a.getContext("2d");switch(b){case 5:case 6:case 7:case 8:a.width=d,a.height=c}switch(b){case 2:e.translate(c,0),e.scale(-1,1);break;case 3:e.translate(c,d),e.rotate(Math.PI);break;case 4:e.translate(0,d),e.scale(1,-1);break;case 5:e.rotate(.5*Math.PI),e.scale(1,-1);break;case 6:e.rotate(.5*Math.PI),e.translate(0,-d);break;case 7:e.rotate(.5*Math.PI),e.translate(c,-d),e.scale(-1,1);break;case 8:e.rotate(-.5*Math.PI),e.translate(-c,0)}},_renderImageToCanvas:function(){function b(a,b,c){var d,e,f,g=document.createElement("canvas"),h=g.getContext("2d"),i=0,j=c,k=c;for(g.width=1,g.height=c,h.drawImage(a,0,0),d=h.getImageData(0,0,1,c).data;k>i;)e=d[4*(k-1)+3],0===e?j=k:i=k,k=j+i>>1;return f=k/c,0===f?1:f}function c(a){var b,c,d=a.naturalWidth,e=a.naturalHeight;return d*e>1048576?(b=document.createElement("canvas"),b.width=b.height=1,c=b.getContext("2d"),c.drawImage(a,-d+1,0),0===c.getImageData(0,0,1,1).data[3]):!1}return a.os.ios?a.os.ios>=7?function(a,c,d,e,f,g){var h=c.naturalWidth,i=c.naturalHeight,j=b(c,h,i);return a.getContext("2d").drawImage(c,0,0,h*j,i*j,d,e,f,g)}:function(a,d,e,f,g,h){var i,j,k,l,m,n,o,p=d.naturalWidth,q=d.naturalHeight,r=a.getContext("2d"),s=c(d),t="image/jpeg"===this.type,u=1024,v=0,w=0;for(s&&(p/=2,q/=2),r.save(),i=document.createElement("canvas"),i.width=i.height=u,j=i.getContext("2d"),k=t?b(d,p,q):1,l=Math.ceil(u*g/p),m=Math.ceil(u*h/q/k);q>v;){for(n=0,o=0;p>n;)j.clearRect(0,0,u,u),j.drawImage(d,-n,-v),r.drawImage(i,0,0,u,u,e+o,f+w,l,m),n+=u,o+=l;v+=u,w+=m}r.restore(),i=j=null}:function(b){var c=a.slice(arguments,1),d=b.getContext("2d");d.drawImage.apply(d,c)}}()})}),b("runtime/html5/jpegencoder",[],function(){function a(a){function b(a){for(var b=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],c=0;64>c;c++){var d=y((b[c]*a+50)/100);1>d?d=1:d>255&&(d=255),z[P[c]]=d}for(var e=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],f=0;64>f;f++){var g=y((e[f]*a+50)/100);1>g?g=1:g>255&&(g=255),A[P[f]]=g}for(var h=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],i=0,j=0;8>j;j++)for(var k=0;8>k;k++)B[i]=1/(z[P[i]]*h[j]*h[k]*8),C[i]=1/(A[P[i]]*h[j]*h[k]*8),i++}function c(a,b){for(var c=0,d=0,e=new Array,f=1;16>=f;f++){for(var g=1;g<=a[f];g++)e[b[d]]=[],e[b[d]][0]=c,e[b[d]][1]=f,d++,c++;c*=2}return e}function d(){t=c(Q,R),u=c(U,V),v=c(S,T),w=c(W,X)}function e(){for(var a=1,b=2,c=1;15>=c;c++){for(var d=a;b>d;d++)E[32767+d]=c,D[32767+d]=[],D[32767+d][1]=c,D[32767+d][0]=d;for(var e=-(b-1);-a>=e;e++)E[32767+e]=c,D[32767+e]=[],D[32767+e][1]=c,D[32767+e][0]=b-1+e;a<<=1,b<<=1}}function f(){for(var a=0;256>a;a++)O[a]=19595*a,O[a+256>>0]=38470*a,O[a+512>>0]=7471*a+32768,O[a+768>>0]=-11059*a,O[a+1024>>0]=-21709*a,O[a+1280>>0]=32768*a+8421375,O[a+1536>>0]=-27439*a,O[a+1792>>0]=-5329*a}function g(a){for(var b=a[0],c=a[1]-1;c>=0;)b&1<J&&(255==I?(h(255),h(0)):h(I),J=7,I=0)}function h(a){H.push(N[a])}function i(a){h(a>>8&255),h(255&a)}function j(a,b){var c,d,e,f,g,h,i,j,k,l=0,m=8,n=64;for(k=0;m>k;++k){c=a[l],d=a[l+1],e=a[l+2],f=a[l+3],g=a[l+4],h=a[l+5],i=a[l+6],j=a[l+7];var o=c+j,p=c-j,q=d+i,r=d-i,s=e+h,t=e-h,u=f+g,v=f-g,w=o+u,x=o-u,y=q+s,z=q-s;a[l]=w+y,a[l+4]=w-y;var A=.707106781*(z+x);a[l+2]=x+A,a[l+6]=x-A,w=v+t,y=t+r,z=r+p;var B=.382683433*(w-z),C=.5411961*w+B,D=1.306562965*z+B,E=.707106781*y,G=p+E,H=p-E;a[l+5]=H+C,a[l+3]=H-C,a[l+1]=G+D,a[l+7]=G-D,l+=8}for(l=0,k=0;m>k;++k){c=a[l],d=a[l+8],e=a[l+16],f=a[l+24],g=a[l+32],h=a[l+40],i=a[l+48],j=a[l+56];var I=c+j,J=c-j,K=d+i,L=d-i,M=e+h,N=e-h,O=f+g,P=f-g,Q=I+O,R=I-O,S=K+M,T=K-M;a[l]=Q+S,a[l+32]=Q-S;var U=.707106781*(T+R);a[l+16]=R+U,a[l+48]=R-U,Q=P+N,S=N+L,T=L+J;var V=.382683433*(Q-T),W=.5411961*Q+V,X=1.306562965*T+V,Y=.707106781*S,Z=J+Y,$=J-Y;a[l+40]=$+W,a[l+24]=$-W,a[l+8]=Z+X,a[l+56]=Z-X,l++}var _;for(k=0;n>k;++k)_=a[k]*b[k],F[k]=_>0?_+.5|0:_-.5|0;return F}function k(){i(65504),i(16),h(74),h(70),h(73),h(70),h(0),h(1),h(1),h(0),i(1),i(1),h(0),h(0)}function l(a,b){i(65472),i(17),h(8),i(b),i(a),h(3),h(1),h(17),h(0),h(2),h(17),h(1),h(3),h(17),h(1)}function m(){i(65499),i(132),h(0);for(var a=0;64>a;a++)h(z[a]);h(1);for(var b=0;64>b;b++)h(A[b])}function n(){i(65476),i(418),h(0);for(var a=0;16>a;a++)h(Q[a+1]);for(var b=0;11>=b;b++)h(R[b]);h(16);for(var c=0;16>c;c++)h(S[c+1]);for(var d=0;161>=d;d++)h(T[d]);h(1);for(var e=0;16>e;e++)h(U[e+1]);for(var f=0;11>=f;f++)h(V[f]);h(17);for(var g=0;16>g;g++)h(W[g+1]);for(var j=0;161>=j;j++)h(X[j])}function o(){i(65498),i(12),h(3),h(1),h(0),h(2),h(17),h(3),h(17),h(0),h(63),h(0)}function p(a,b,c,d,e){for(var f,h=e[0],i=e[240],k=16,l=63,m=64,n=j(a,b),o=0;m>o;++o)G[P[o]]=n[o];var p=G[0]-c;c=G[0],0==p?g(d[0]):(f=32767+p,g(d[E[f]]),g(D[f]));for(var q=63;q>0&&0==G[q];q--);if(0==q)return g(h),c;for(var r,s=1;q>=s;){for(var t=s;0==G[s]&&q>=s;++s);var u=s-t;if(u>=k){r=u>>4;for(var v=1;r>=v;++v)g(i);u=15&u}f=32767+G[s],g(e[(u<<4)+E[f]]),g(D[f]),s++}return q!=l&&g(h),c}function q(){for(var a=String.fromCharCode,b=0;256>b;b++)N[b]=a(b)}function r(a){if(0>=a&&(a=1),a>100&&(a=100),x!=a){var c=0;c=Math.floor(50>a?5e3/a:200-2*a),b(c),x=a}}function s(){a||(a=50),q(),d(),e(),f(),r(a)}var t,u,v,w,x,y=(Math.round,Math.floor),z=new Array(64),A=new Array(64),B=new Array(64),C=new Array(64),D=new Array(65535),E=new Array(65535),F=new Array(64),G=new Array(64),H=[],I=0,J=7,K=new Array(64),L=new Array(64),M=new Array(64),N=new Array(256),O=new Array(2048),P=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],Q=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],R=[0,1,2,3,4,5,6,7,8,9,10,11],S=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],T=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],U=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],V=[0,1,2,3,4,5,6,7,8,9,10,11],W=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],X=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];this.encode=function(a,b){b&&r(b),H=new Array,I=0,J=7,i(65496),k(),m(),l(a.width,a.height),n(),o();var c=0,d=0,e=0;I=0,J=7,this.encode.displayName="_encode_";for(var f,h,j,q,s,x,y,z,A,D=a.data,E=a.width,F=a.height,G=4*E,N=0;F>N;){for(f=0;G>f;){for(s=G*N+f,x=s,y=-1,z=0,A=0;64>A;A++)z=A>>3,y=4*(7&A),x=s+z*G+y,N+z>=F&&(x-=G*(N+1+z-F)),f+y>=G&&(x-=f+y-G+4),h=D[x++],j=D[x++],q=D[x++],K[A]=(O[h]+O[j+256>>0]+O[q+512>>0]>>16)-128,L[A]=(O[h+768>>0]+O[j+1024>>0]+O[q+1280>>0]>>16)-128,M[A]=(O[h+1280>>0]+O[j+1536>>0]+O[q+1792>>0]>>16)-128;c=p(K,B,c,t,v),d=p(L,C,d,u,w),e=p(M,C,e,u,w),f+=32}N+=8}if(J>=0){var P=[];P[1]=J+1,P[0]=(1<=200&&b.status<300?(a._response=b.responseText,a.trigger("load")):b.status>=500&&b.status<600?(a._response=b.responseText,a.trigger("error","server")):a.trigger("error",a._status?"http":"abort")):void 0},a._xhr=b,b},_setRequestHeader:function(a,b){d.each(b,function(b,c){a.setRequestHeader(b,c)})},_parseJson:function(a){var b;try{b=JSON.parse(a)}catch(c){b={}}return b}})}),b("webuploader",["base","widgets/filepicker","widgets/image","widgets/queue","widgets/runtime","widgets/upload","widgets/log","runtime/html5/blob","runtime/html5/filepicker","runtime/html5/imagemeta/exif","runtime/html5/image","runtime/html5/androidpatch","runtime/html5/transport"],function(a){return a}),c("webuploader")}); \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.fis.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.fis.js deleted file mode 100644 index c82ca434..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.fis.js +++ /dev/null @@ -1,8083 +0,0 @@ -/*! WebUploader 0.1.5 */ - - -var jQuery = require('example:widget/ui/jquery/jquery.js') - -return (function( root, factory ) { - var modules = {}, - - // 内部require, 简单不完全实现。 - // https://github.com/amdjs/amdjs-api/wiki/require - _require = function( deps, callback ) { - var args, len, i; - - // 如果deps不是数组,则直接返回指定module - if ( typeof deps === 'string' ) { - return getModule( deps ); - } else { - args = []; - for( len = deps.length, i = 0; i < len; i++ ) { - args.push( getModule( deps[ i ] ) ); - } - - return callback.apply( null, args ); - } - }, - - // 内部define,暂时不支持不指定id. - _define = function( id, deps, factory ) { - if ( arguments.length === 2 ) { - factory = deps; - deps = null; - } - - _require( deps || [], function() { - setModule( id, factory, arguments ); - }); - }, - - // 设置module, 兼容CommonJs写法。 - setModule = function( id, factory, args ) { - var module = { - exports: factory - }, - returned; - - if ( typeof factory === 'function' ) { - args.length || (args = [ _require, module.exports, module ]); - returned = factory.apply( null, args ); - returned !== undefined && (module.exports = returned); - } - - modules[ id ] = module.exports; - }, - - // 根据id获取module - getModule = function( id ) { - var module = modules[ id ] || root[ id ]; - - if ( !module ) { - throw new Error( '`' + id + '` is undefined' ); - } - - return module; - }, - - // 将所有modules,将路径ids装换成对象。 - exportsTo = function( obj ) { - var key, host, parts, part, last, ucFirst; - - // make the first character upper case. - ucFirst = function( str ) { - return str && (str.charAt( 0 ).toUpperCase() + str.substr( 1 )); - }; - - for ( key in modules ) { - host = obj; - - if ( !modules.hasOwnProperty( key ) ) { - continue; - } - - parts = key.split('/'); - last = ucFirst( parts.pop() ); - - while( (part = ucFirst( parts.shift() )) ) { - host[ part ] = host[ part ] || {}; - host = host[ part ]; - } - - host[ last ] = modules[ key ]; - } - - return obj; - }, - - makeExport = function( dollar ) { - root.__dollar = dollar; - - // exports every module. - return exportsTo( factory( root, _define, _require ) ); - }; - - return makeExport( jQuery ); -})( window, function( window, define, require ) { - - - /** - * @fileOverview jQuery or Zepto - */ - define('dollar-third',[],function() { - var $ = window.__dollar || window.jQuery || window.Zepto; - - if ( !$ ) { - throw new Error('jQuery or Zepto not found!'); - } - - return $; - }); - /** - * @fileOverview Dom 操作相关 - */ - define('dollar',[ - 'dollar-third' - ], function( _ ) { - return _; - }); - /** - * @fileOverview 使用jQuery的Promise - */ - define('promise-third',[ - 'dollar' - ], function( $ ) { - return { - Deferred: $.Deferred, - when: $.when, - - isPromise: function( anything ) { - return anything && typeof anything.then === 'function'; - } - }; - }); - /** - * @fileOverview Promise/A+ - */ - define('promise',[ - 'promise-third' - ], function( _ ) { - return _; - }); - /** - * @fileOverview 基础类方法。 - */ - - /** - * Web Uploader内部类的详细说明,以下提及的功能类,都可以在`WebUploader`这个变量中访问到。 - * - * As you know, Web Uploader的每个文件都是用过[AMD](https://github.com/amdjs/amdjs-api/wiki/AMD)规范中的`define`组织起来的, 每个Module都会有个module id. - * 默认module id为该文件的路径,而此路径将会转化成名字空间存放在WebUploader中。如: - * - * * module `base`:WebUploader.Base - * * module `file`: WebUploader.File - * * module `lib/dnd`: WebUploader.Lib.Dnd - * * module `runtime/html5/dnd`: WebUploader.Runtime.Html5.Dnd - * - * - * 以下文档中对类的使用可能省略掉了`WebUploader`前缀。 - * @module WebUploader - * @title WebUploader API文档 - */ - define('base',[ - 'dollar', - 'promise' - ], function( $, promise ) { - - var noop = function() {}, - call = Function.call; - - // http://jsperf.com/uncurrythis - // 反科里化 - function uncurryThis( fn ) { - return function() { - return call.apply( fn, arguments ); - }; - } - - function bindFn( fn, context ) { - return function() { - return fn.apply( context, arguments ); - }; - } - - function createObject( proto ) { - var f; - - if ( Object.create ) { - return Object.create( proto ); - } else { - f = function() {}; - f.prototype = proto; - return new f(); - } - } - - - /** - * 基础类,提供一些简单常用的方法。 - * @class Base - */ - return { - - /** - * @property {String} version 当前版本号。 - */ - version: '0.1.5', - - /** - * @property {jQuery|Zepto} $ 引用依赖的jQuery或者Zepto对象。 - */ - $: $, - - Deferred: promise.Deferred, - - isPromise: promise.isPromise, - - when: promise.when, - - /** - * @description 简单的浏览器检查结果。 - * - * * `webkit` webkit版本号,如果浏览器为非webkit内核,此属性为`undefined`。 - * * `chrome` chrome浏览器版本号,如果浏览器为chrome,此属性为`undefined`。 - * * `ie` ie浏览器版本号,如果浏览器为非ie,此属性为`undefined`。**暂不支持ie10+** - * * `firefox` firefox浏览器版本号,如果浏览器为非firefox,此属性为`undefined`。 - * * `safari` safari浏览器版本号,如果浏览器为非safari,此属性为`undefined`。 - * * `opera` opera浏览器版本号,如果浏览器为非opera,此属性为`undefined`。 - * - * @property {Object} [browser] - */ - browser: (function( ua ) { - var ret = {}, - webkit = ua.match( /WebKit\/([\d.]+)/ ), - chrome = ua.match( /Chrome\/([\d.]+)/ ) || - ua.match( /CriOS\/([\d.]+)/ ), - - ie = ua.match( /MSIE\s([\d\.]+)/ ) || - ua.match( /(?:trident)(?:.*rv:([\w.]+))?/i ), - firefox = ua.match( /Firefox\/([\d.]+)/ ), - safari = ua.match( /Safari\/([\d.]+)/ ), - opera = ua.match( /OPR\/([\d.]+)/ ); - - webkit && (ret.webkit = parseFloat( webkit[ 1 ] )); - chrome && (ret.chrome = parseFloat( chrome[ 1 ] )); - ie && (ret.ie = parseFloat( ie[ 1 ] )); - firefox && (ret.firefox = parseFloat( firefox[ 1 ] )); - safari && (ret.safari = parseFloat( safari[ 1 ] )); - opera && (ret.opera = parseFloat( opera[ 1 ] )); - - return ret; - })( navigator.userAgent ), - - /** - * @description 操作系统检查结果。 - * - * * `android` 如果在android浏览器环境下,此值为对应的android版本号,否则为`undefined`。 - * * `ios` 如果在ios浏览器环境下,此值为对应的ios版本号,否则为`undefined`。 - * @property {Object} [os] - */ - os: (function( ua ) { - var ret = {}, - - // osx = !!ua.match( /\(Macintosh\; Intel / ), - android = ua.match( /(?:Android);?[\s\/]+([\d.]+)?/ ), - ios = ua.match( /(?:iPad|iPod|iPhone).*OS\s([\d_]+)/ ); - - // osx && (ret.osx = true); - android && (ret.android = parseFloat( android[ 1 ] )); - ios && (ret.ios = parseFloat( ios[ 1 ].replace( /_/g, '.' ) )); - - return ret; - })( navigator.userAgent ), - - /** - * 实现类与类之间的继承。 - * @method inherits - * @grammar Base.inherits( super ) => child - * @grammar Base.inherits( super, protos ) => child - * @grammar Base.inherits( super, protos, statics ) => child - * @param {Class} super 父类 - * @param {Object | Function} [protos] 子类或者对象。如果对象中包含constructor,子类将是用此属性值。 - * @param {Function} [protos.constructor] 子类构造器,不指定的话将创建个临时的直接执行父类构造器的方法。 - * @param {Object} [statics] 静态属性或方法。 - * @return {Class} 返回子类。 - * @example - * function Person() { - * console.log( 'Super' ); - * } - * Person.prototype.hello = function() { - * console.log( 'hello' ); - * }; - * - * var Manager = Base.inherits( Person, { - * world: function() { - * console.log( 'World' ); - * } - * }); - * - * // 因为没有指定构造器,父类的构造器将会执行。 - * var instance = new Manager(); // => Super - * - * // 继承子父类的方法 - * instance.hello(); // => hello - * instance.world(); // => World - * - * // 子类的__super__属性指向父类 - * console.log( Manager.__super__ === Person ); // => true - */ - inherits: function( Super, protos, staticProtos ) { - var child; - - if ( typeof protos === 'function' ) { - child = protos; - protos = null; - } else if ( protos && protos.hasOwnProperty('constructor') ) { - child = protos.constructor; - } else { - child = function() { - return Super.apply( this, arguments ); - }; - } - - // 复制静态方法 - $.extend( true, child, Super, staticProtos || {} ); - - /* jshint camelcase: false */ - - // 让子类的__super__属性指向父类。 - child.__super__ = Super.prototype; - - // 构建原型,添加原型方法或属性。 - // 暂时用Object.create实现。 - child.prototype = createObject( Super.prototype ); - protos && $.extend( true, child.prototype, protos ); - - return child; - }, - - /** - * 一个不做任何事情的方法。可以用来赋值给默认的callback. - * @method noop - */ - noop: noop, - - /** - * 返回一个新的方法,此方法将已指定的`context`来执行。 - * @grammar Base.bindFn( fn, context ) => Function - * @method bindFn - * @example - * var doSomething = function() { - * console.log( this.name ); - * }, - * obj = { - * name: 'Object Name' - * }, - * aliasFn = Base.bind( doSomething, obj ); - * - * aliasFn(); // => Object Name - * - */ - bindFn: bindFn, - - /** - * 引用Console.log如果存在的话,否则引用一个[空函数noop](#WebUploader:Base.noop)。 - * @grammar Base.log( args... ) => undefined - * @method log - */ - log: (function() { - if ( window.console ) { - return bindFn( console.log, console ); - } - return noop; - })(), - - nextTick: (function() { - - return function( cb ) { - setTimeout( cb, 1 ); - }; - - // @bug 当浏览器不在当前窗口时就停了。 - // var next = window.requestAnimationFrame || - // window.webkitRequestAnimationFrame || - // window.mozRequestAnimationFrame || - // function( cb ) { - // window.setTimeout( cb, 1000 / 60 ); - // }; - - // // fix: Uncaught TypeError: Illegal invocation - // return bindFn( next, window ); - })(), - - /** - * 被[uncurrythis](http://www.2ality.com/2011/11/uncurrying-this.html)的数组slice方法。 - * 将用来将非数组对象转化成数组对象。 - * @grammar Base.slice( target, start[, end] ) => Array - * @method slice - * @example - * function doSomthing() { - * var args = Base.slice( arguments, 1 ); - * console.log( args ); - * } - * - * doSomthing( 'ignored', 'arg2', 'arg3' ); // => Array ["arg2", "arg3"] - */ - slice: uncurryThis( [].slice ), - - /** - * 生成唯一的ID - * @method guid - * @grammar Base.guid() => String - * @grammar Base.guid( prefx ) => String - */ - guid: (function() { - var counter = 0; - - return function( prefix ) { - var guid = (+new Date()).toString( 32 ), - i = 0; - - for ( ; i < 5; i++ ) { - guid += Math.floor( Math.random() * 65535 ).toString( 32 ); - } - - return (prefix || 'wu_') + guid + (counter++).toString( 32 ); - }; - })(), - - /** - * 格式化文件大小, 输出成带单位的字符串 - * @method formatSize - * @grammar Base.formatSize( size ) => String - * @grammar Base.formatSize( size, pointLength ) => String - * @grammar Base.formatSize( size, pointLength, units ) => String - * @param {Number} size 文件大小 - * @param {Number} [pointLength=2] 精确到的小数点数。 - * @param {Array} [units=[ 'B', 'K', 'M', 'G', 'TB' ]] 单位数组。从字节,到千字节,一直往上指定。如果单位数组里面只指定了到了K(千字节),同时文件大小大于M, 此方法的输出将还是显示成多少K. - * @example - * console.log( Base.formatSize( 100 ) ); // => 100B - * console.log( Base.formatSize( 1024 ) ); // => 1.00K - * console.log( Base.formatSize( 1024, 0 ) ); // => 1K - * console.log( Base.formatSize( 1024 * 1024 ) ); // => 1.00M - * console.log( Base.formatSize( 1024 * 1024 * 1024 ) ); // => 1.00G - * console.log( Base.formatSize( 1024 * 1024 * 1024, 0, ['B', 'KB', 'MB'] ) ); // => 1024MB - */ - formatSize: function( size, pointLength, units ) { - var unit; - - units = units || [ 'B', 'K', 'M', 'G', 'TB' ]; - - while ( (unit = units.shift()) && size > 1024 ) { - size = size / 1024; - } - - return (unit === 'B' ? size : size.toFixed( pointLength || 2 )) + - unit; - } - }; - }); - /** - * 事件处理类,可以独立使用,也可以扩展给对象使用。 - * @fileOverview Mediator - */ - define('mediator',[ - 'base' - ], function( Base ) { - var $ = Base.$, - slice = [].slice, - separator = /\s+/, - protos; - - // 根据条件过滤出事件handlers. - function findHandlers( arr, name, callback, context ) { - return $.grep( arr, function( handler ) { - return handler && - (!name || handler.e === name) && - (!callback || handler.cb === callback || - handler.cb._cb === callback) && - (!context || handler.ctx === context); - }); - } - - function eachEvent( events, callback, iterator ) { - // 不支持对象,只支持多个event用空格隔开 - $.each( (events || '').split( separator ), function( _, key ) { - iterator( key, callback ); - }); - } - - function triggerHanders( events, args ) { - var stoped = false, - i = -1, - len = events.length, - handler; - - while ( ++i < len ) { - handler = events[ i ]; - - if ( handler.cb.apply( handler.ctx2, args ) === false ) { - stoped = true; - break; - } - } - - return !stoped; - } - - protos = { - - /** - * 绑定事件。 - * - * `callback`方法在执行时,arguments将会来源于trigger的时候携带的参数。如 - * ```javascript - * var obj = {}; - * - * // 使得obj有事件行为 - * Mediator.installTo( obj ); - * - * obj.on( 'testa', function( arg1, arg2 ) { - * console.log( arg1, arg2 ); // => 'arg1', 'arg2' - * }); - * - * obj.trigger( 'testa', 'arg1', 'arg2' ); - * ``` - * - * 如果`callback`中,某一个方法`return false`了,则后续的其他`callback`都不会被执行到。 - * 切会影响到`trigger`方法的返回值,为`false`。 - * - * `on`还可以用来添加一个特殊事件`all`, 这样所有的事件触发都会响应到。同时此类`callback`中的arguments有一个不同处, - * 就是第一个参数为`type`,记录当前是什么事件在触发。此类`callback`的优先级比脚低,会再正常`callback`执行完后触发。 - * ```javascript - * obj.on( 'all', function( type, arg1, arg2 ) { - * console.log( type, arg1, arg2 ); // => 'testa', 'arg1', 'arg2' - * }); - * ``` - * - * @method on - * @grammar on( name, callback[, context] ) => self - * @param {String} name 事件名,支持多个事件用空格隔开 - * @param {Function} callback 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - * @class Mediator - */ - on: function( name, callback, context ) { - var me = this, - set; - - if ( !callback ) { - return this; - } - - set = this._events || (this._events = []); - - eachEvent( name, callback, function( name, callback ) { - var handler = { e: name }; - - handler.cb = callback; - handler.ctx = context; - handler.ctx2 = context || me; - handler.id = set.length; - - set.push( handler ); - }); - - return this; - }, - - /** - * 绑定事件,且当handler执行完后,自动解除绑定。 - * @method once - * @grammar once( name, callback[, context] ) => self - * @param {String} name 事件名 - * @param {Function} callback 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - */ - once: function( name, callback, context ) { - var me = this; - - if ( !callback ) { - return me; - } - - eachEvent( name, callback, function( name, callback ) { - var once = function() { - me.off( name, once ); - return callback.apply( context || me, arguments ); - }; - - once._cb = callback; - me.on( name, once, context ); - }); - - return me; - }, - - /** - * 解除事件绑定 - * @method off - * @grammar off( [name[, callback[, context] ] ] ) => self - * @param {String} [name] 事件名 - * @param {Function} [callback] 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - */ - off: function( name, cb, ctx ) { - var events = this._events; - - if ( !events ) { - return this; - } - - if ( !name && !cb && !ctx ) { - this._events = []; - return this; - } - - eachEvent( name, cb, function( name, cb ) { - $.each( findHandlers( events, name, cb, ctx ), function() { - delete events[ this.id ]; - }); - }); - - return this; - }, - - /** - * 触发事件 - * @method trigger - * @grammar trigger( name[, args...] ) => self - * @param {String} type 事件名 - * @param {*} [...] 任意参数 - * @return {Boolean} 如果handler中return false了,则返回false, 否则返回true - */ - trigger: function( type ) { - var args, events, allEvents; - - if ( !this._events || !type ) { - return this; - } - - args = slice.call( arguments, 1 ); - events = findHandlers( this._events, type ); - allEvents = findHandlers( this._events, 'all' ); - - return triggerHanders( events, args ) && - triggerHanders( allEvents, arguments ); - } - }; - - /** - * 中介者,它本身是个单例,但可以通过[installTo](#WebUploader:Mediator:installTo)方法,使任何对象具备事件行为。 - * 主要目的是负责模块与模块之间的合作,降低耦合度。 - * - * @class Mediator - */ - return $.extend({ - - /** - * 可以通过这个接口,使任何对象具备事件功能。 - * @method installTo - * @param {Object} obj 需要具备事件行为的对象。 - * @return {Object} 返回obj. - */ - installTo: function( obj ) { - return $.extend( obj, protos ); - } - - }, protos ); - }); - /** - * @fileOverview Uploader上传类 - */ - define('uploader',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$; - - /** - * 上传入口类。 - * @class Uploader - * @constructor - * @grammar new Uploader( opts ) => Uploader - * @example - * var uploader = WebUploader.Uploader({ - * swf: 'path_of_swf/Uploader.swf', - * - * // 开起分片上传。 - * chunked: true - * }); - */ - function Uploader( opts ) { - this.options = $.extend( true, {}, Uploader.options, opts ); - this._init( this.options ); - } - - // default Options - // widgets中有相应扩展 - Uploader.options = {}; - Mediator.installTo( Uploader.prototype ); - - // 批量添加纯命令式方法。 - $.each({ - upload: 'start-upload', - stop: 'stop-upload', - getFile: 'get-file', - getFiles: 'get-files', - addFile: 'add-file', - addFiles: 'add-file', - sort: 'sort-files', - removeFile: 'remove-file', - cancelFile: 'cancel-file', - skipFile: 'skip-file', - retry: 'retry', - isInProgress: 'is-in-progress', - makeThumb: 'make-thumb', - md5File: 'md5-file', - getDimension: 'get-dimension', - addButton: 'add-btn', - predictRuntimeType: 'predict-runtime-type', - refresh: 'refresh', - disable: 'disable', - enable: 'enable', - reset: 'reset' - }, function( fn, command ) { - Uploader.prototype[ fn ] = function() { - return this.request( command, arguments ); - }; - }); - - $.extend( Uploader.prototype, { - state: 'pending', - - _init: function( opts ) { - var me = this; - - me.request( 'init', opts, function() { - me.state = 'ready'; - me.trigger('ready'); - }); - }, - - /** - * 获取或者设置Uploader配置项。 - * @method option - * @grammar option( key ) => * - * @grammar option( key, val ) => self - * @example - * - * // 初始状态图片上传前不会压缩 - * var uploader = new WebUploader.Uploader({ - * compress: null; - * }); - * - * // 修改后图片上传前,尝试将图片压缩到1600 * 1600 - * uploader.option( 'compress', { - * width: 1600, - * height: 1600 - * }); - */ - option: function( key, val ) { - var opts = this.options; - - // setter - if ( arguments.length > 1 ) { - - if ( $.isPlainObject( val ) && - $.isPlainObject( opts[ key ] ) ) { - $.extend( opts[ key ], val ); - } else { - opts[ key ] = val; - } - - } else { // getter - return key ? opts[ key ] : opts; - } - }, - - /** - * 获取文件统计信息。返回一个包含一下信息的对象。 - * * `successNum` 上传成功的文件数 - * * `progressNum` 上传中的文件数 - * * `cancelNum` 被删除的文件数 - * * `invalidNum` 无效的文件数 - * * `uploadFailNum` 上传失败的文件数 - * * `queueNum` 还在队列中的文件数 - * * `interruptNum` 被暂停的文件数 - * @method getStats - * @grammar getStats() => Object - */ - getStats: function() { - // return this._mgr.getStats.apply( this._mgr, arguments ); - var stats = this.request('get-stats'); - - return stats ? { - successNum: stats.numOfSuccess, - progressNum: stats.numOfProgress, - - // who care? - // queueFailNum: 0, - cancelNum: stats.numOfCancel, - invalidNum: stats.numOfInvalid, - uploadFailNum: stats.numOfUploadFailed, - queueNum: stats.numOfQueue, - interruptNum: stats.numofInterrupt - } : {}; - }, - - // 需要重写此方法来来支持opts.onEvent和instance.onEvent的处理器 - trigger: function( type/*, args...*/ ) { - var args = [].slice.call( arguments, 1 ), - opts = this.options, - name = 'on' + type.substring( 0, 1 ).toUpperCase() + - type.substring( 1 ); - - if ( - // 调用通过on方法注册的handler. - Mediator.trigger.apply( this, arguments ) === false || - - // 调用opts.onEvent - $.isFunction( opts[ name ] ) && - opts[ name ].apply( this, args ) === false || - - // 调用this.onEvent - $.isFunction( this[ name ] ) && - this[ name ].apply( this, args ) === false || - - // 广播所有uploader的事件。 - Mediator.trigger.apply( Mediator, - [ this, type ].concat( args ) ) === false ) { - - return false; - } - - return true; - }, - - /** - * 销毁 webuploader 实例 - * @method destroy - * @grammar destroy() => undefined - */ - destroy: function() { - this.request( 'destroy', arguments ); - this.off(); - }, - - // widgets/widget.js将补充此方法的详细文档。 - request: Base.noop - }); - - /** - * 创建Uploader实例,等同于new Uploader( opts ); - * @method create - * @class Base - * @static - * @grammar Base.create( opts ) => Uploader - */ - Base.create = Uploader.create = function( opts ) { - return new Uploader( opts ); - }; - - // 暴露Uploader,可以通过它来扩展业务逻辑。 - Base.Uploader = Uploader; - - return Uploader; - }); - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/runtime',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$, - factories = {}, - - // 获取对象的第一个key - getFirstKey = function( obj ) { - for ( var key in obj ) { - if ( obj.hasOwnProperty( key ) ) { - return key; - } - } - return null; - }; - - // 接口类。 - function Runtime( options ) { - this.options = $.extend({ - container: document.body - }, options ); - this.uid = Base.guid('rt_'); - } - - $.extend( Runtime.prototype, { - - getContainer: function() { - var opts = this.options, - parent, container; - - if ( this._container ) { - return this._container; - } - - parent = $( opts.container || document.body ); - container = $( document.createElement('div') ); - - container.attr( 'id', 'rt_' + this.uid ); - container.css({ - position: 'absolute', - top: '0px', - left: '0px', - width: '1px', - height: '1px', - overflow: 'hidden' - }); - - parent.append( container ); - parent.addClass('webuploader-container'); - this._container = container; - this._parent = parent; - return container; - }, - - init: Base.noop, - exec: Base.noop, - - destroy: function() { - this._container && this._container.remove(); - this._parent && this._parent.removeClass('webuploader-container'); - this.off(); - } - }); - - Runtime.orders = 'html5,flash'; - - - /** - * 添加Runtime实现。 - * @param {String} type 类型 - * @param {Runtime} factory 具体Runtime实现。 - */ - Runtime.addRuntime = function( type, factory ) { - factories[ type ] = factory; - }; - - Runtime.hasRuntime = function( type ) { - return !!(type ? factories[ type ] : getFirstKey( factories )); - }; - - Runtime.create = function( opts, orders ) { - var type, runtime; - - orders = orders || Runtime.orders; - $.each( orders.split( /\s*,\s*/g ), function() { - if ( factories[ this ] ) { - type = this; - return false; - } - }); - - type = type || getFirstKey( factories ); - - if ( !type ) { - throw new Error('Runtime Error'); - } - - runtime = new factories[ type ]( opts ); - return runtime; - }; - - Mediator.installTo( Runtime.prototype ); - return Runtime; - }); - - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/client',[ - 'base', - 'mediator', - 'runtime/runtime' - ], function( Base, Mediator, Runtime ) { - - var cache; - - cache = (function() { - var obj = {}; - - return { - add: function( runtime ) { - obj[ runtime.uid ] = runtime; - }, - - get: function( ruid, standalone ) { - var i; - - if ( ruid ) { - return obj[ ruid ]; - } - - for ( i in obj ) { - // 有些类型不能重用,比如filepicker. - if ( standalone && obj[ i ].__standalone ) { - continue; - } - - return obj[ i ]; - } - - return null; - }, - - remove: function( runtime ) { - delete obj[ runtime.uid ]; - } - }; - })(); - - function RuntimeClient( component, standalone ) { - var deferred = Base.Deferred(), - runtime; - - this.uid = Base.guid('client_'); - - // 允许runtime没有初始化之前,注册一些方法在初始化后执行。 - this.runtimeReady = function( cb ) { - return deferred.done( cb ); - }; - - this.connectRuntime = function( opts, cb ) { - - // already connected. - if ( runtime ) { - throw new Error('already connected!'); - } - - deferred.done( cb ); - - if ( typeof opts === 'string' && cache.get( opts ) ) { - runtime = cache.get( opts ); - } - - // 像filePicker只能独立存在,不能公用。 - runtime = runtime || cache.get( null, standalone ); - - // 需要创建 - if ( !runtime ) { - runtime = Runtime.create( opts, opts.runtimeOrder ); - runtime.__promise = deferred.promise(); - runtime.once( 'ready', deferred.resolve ); - runtime.init(); - cache.add( runtime ); - runtime.__client = 1; - } else { - // 来自cache - Base.$.extend( runtime.options, opts ); - runtime.__promise.then( deferred.resolve ); - runtime.__client++; - } - - standalone && (runtime.__standalone = standalone); - return runtime; - }; - - this.getRuntime = function() { - return runtime; - }; - - this.disconnectRuntime = function() { - if ( !runtime ) { - return; - } - - runtime.__client--; - - if ( runtime.__client <= 0 ) { - cache.remove( runtime ); - delete runtime.__promise; - runtime.destroy(); - } - - runtime = null; - }; - - this.exec = function() { - if ( !runtime ) { - return; - } - - var args = Base.slice( arguments ); - component && args.unshift( component ); - - return runtime.exec.apply( this, args ); - }; - - this.getRuid = function() { - return runtime && runtime.uid; - }; - - this.destroy = (function( destroy ) { - return function() { - destroy && destroy.apply( this, arguments ); - this.trigger('destroy'); - this.off(); - this.exec('destroy'); - this.disconnectRuntime(); - }; - })( this.destroy ); - } - - Mediator.installTo( RuntimeClient.prototype ); - return RuntimeClient; - }); - /** - * @fileOverview 错误信息 - */ - define('lib/dnd',[ - 'base', - 'mediator', - 'runtime/client' - ], function( Base, Mediator, RuntimeClent ) { - - var $ = Base.$; - - function DragAndDrop( opts ) { - opts = this.options = $.extend({}, DragAndDrop.options, opts ); - - opts.container = $( opts.container ); - - if ( !opts.container.length ) { - return; - } - - RuntimeClent.call( this, 'DragAndDrop' ); - } - - DragAndDrop.options = { - accept: null, - disableGlobalDnd: false - }; - - Base.inherits( RuntimeClent, { - constructor: DragAndDrop, - - init: function() { - var me = this; - - me.connectRuntime( me.options, function() { - me.exec('init'); - me.trigger('ready'); - }); - } - }); - - Mediator.installTo( DragAndDrop.prototype ); - - return DragAndDrop; - }); - /** - * @fileOverview 组件基类。 - */ - define('widgets/widget',[ - 'base', - 'uploader' - ], function( Base, Uploader ) { - - var $ = Base.$, - _init = Uploader.prototype._init, - _destroy = Uploader.prototype.destroy, - IGNORE = {}, - widgetClass = []; - - function isArrayLike( obj ) { - if ( !obj ) { - return false; - } - - var length = obj.length, - type = $.type( obj ); - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === 'array' || type !== 'function' && type !== 'string' && - (length === 0 || typeof length === 'number' && length > 0 && - (length - 1) in obj); - } - - function Widget( uploader ) { - this.owner = uploader; - this.options = uploader.options; - } - - $.extend( Widget.prototype, { - - init: Base.noop, - - // 类Backbone的事件监听声明,监听uploader实例上的事件 - // widget直接无法监听事件,事件只能通过uploader来传递 - invoke: function( apiName, args ) { - - /* - { - 'make-thumb': 'makeThumb' - } - */ - var map = this.responseMap; - - // 如果无API响应声明则忽略 - if ( !map || !(apiName in map) || !(map[ apiName ] in this) || - !$.isFunction( this[ map[ apiName ] ] ) ) { - - return IGNORE; - } - - return this[ map[ apiName ] ].apply( this, args ); - - }, - - /** - * 发送命令。当传入`callback`或者`handler`中返回`promise`时。返回一个当所有`handler`中的promise都完成后完成的新`promise`。 - * @method request - * @grammar request( command, args ) => * | Promise - * @grammar request( command, args, callback ) => Promise - * @for Uploader - */ - request: function() { - return this.owner.request.apply( this.owner, arguments ); - } - }); - - // 扩展Uploader. - $.extend( Uploader.prototype, { - - /** - * @property {String | Array} [disableWidgets=undefined] - * @namespace options - * @for Uploader - * @description 默认所有 Uploader.register 了的 widget 都会被加载,如果禁用某一部分,请通过此 option 指定黑名单。 - */ - - // 覆写_init用来初始化widgets - _init: function() { - var me = this, - widgets = me._widgets = [], - deactives = me.options.disableWidgets || ''; - - $.each( widgetClass, function( _, klass ) { - (!deactives || !~deactives.indexOf( klass._name )) && - widgets.push( new klass( me ) ); - }); - - return _init.apply( me, arguments ); - }, - - request: function( apiName, args, callback ) { - var i = 0, - widgets = this._widgets, - len = widgets && widgets.length, - rlts = [], - dfds = [], - widget, rlt, promise, key; - - args = isArrayLike( args ) ? args : [ args ]; - - for ( ; i < len; i++ ) { - widget = widgets[ i ]; - rlt = widget.invoke( apiName, args ); - - if ( rlt !== IGNORE ) { - - // Deferred对象 - if ( Base.isPromise( rlt ) ) { - dfds.push( rlt ); - } else { - rlts.push( rlt ); - } - } - } - - // 如果有callback,则用异步方式。 - if ( callback || dfds.length ) { - promise = Base.when.apply( Base, dfds ); - key = promise.pipe ? 'pipe' : 'then'; - - // 很重要不能删除。删除了会死循环。 - // 保证执行顺序。让callback总是在下一个 tick 中执行。 - return promise[ key ](function() { - var deferred = Base.Deferred(), - args = arguments; - - if ( args.length === 1 ) { - args = args[ 0 ]; - } - - setTimeout(function() { - deferred.resolve( args ); - }, 1 ); - - return deferred.promise(); - })[ callback ? key : 'done' ]( callback || Base.noop ); - } else { - return rlts[ 0 ]; - } - }, - - destroy: function() { - _destroy.apply( this, arguments ); - this._widgets = null; - } - }); - - /** - * 添加组件 - * @grammar Uploader.register(proto); - * @grammar Uploader.register(map, proto); - * @param {object} responseMap API 名称与函数实现的映射 - * @param {object} proto 组件原型,构造函数通过 constructor 属性定义 - * @method Uploader.register - * @for Uploader - * @example - * Uploader.register({ - * 'make-thumb': 'makeThumb' - * }, { - * init: function( options ) {}, - * makeThumb: function() {} - * }); - * - * Uploader.register({ - * 'make-thumb': function() { - * - * } - * }); - */ - Uploader.register = Widget.register = function( responseMap, widgetProto ) { - var map = { init: 'init', destroy: 'destroy', name: 'anonymous' }, - klass; - - if ( arguments.length === 1 ) { - widgetProto = responseMap; - - // 自动生成 map 表。 - $.each(widgetProto, function(key) { - if ( key[0] === '_' || key === 'name' ) { - key === 'name' && (map.name = widgetProto.name); - return; - } - - map[key.replace(/[A-Z]/g, '-$&').toLowerCase()] = key; - }); - - } else { - map = $.extend( map, responseMap ); - } - - widgetProto.responseMap = map; - klass = Base.inherits( Widget, widgetProto ); - klass._name = map.name; - widgetClass.push( klass ); - - return klass; - }; - - /** - * 删除插件,只有在注册时指定了名字的才能被删除。 - * @grammar Uploader.unRegister(name); - * @param {string} name 组件名字 - * @method Uploader.unRegister - * @for Uploader - * @example - * - * Uploader.register({ - * name: 'custom', - * - * 'make-thumb': function() { - * - * } - * }); - * - * Uploader.unRegister('custom'); - */ - Uploader.unRegister = Widget.unRegister = function( name ) { - if ( !name || name === 'anonymous' ) { - return; - } - - // 删除指定的插件。 - for ( var i = widgetClass.length; i--; ) { - if ( widgetClass[i]._name === name ) { - widgetClass.splice(i, 1) - } - } - }; - - return Widget; - }); - /** - * @fileOverview DragAndDrop Widget。 - */ - define('widgets/filednd',[ - 'base', - 'uploader', - 'lib/dnd', - 'widgets/widget' - ], function( Base, Uploader, Dnd ) { - var $ = Base.$; - - Uploader.options.dnd = ''; - - /** - * @property {Selector} [dnd=undefined] 指定Drag And Drop拖拽的容器,如果不指定,则不启动。 - * @namespace options - * @for Uploader - */ - - /** - * @property {Selector} [disableGlobalDnd=false] 是否禁掉整个页面的拖拽功能,如果不禁用,图片拖进来的时候会默认被浏览器打开。 - * @namespace options - * @for Uploader - */ - - /** - * @event dndAccept - * @param {DataTransferItemList} items DataTransferItem - * @description 阻止此事件可以拒绝某些类型的文件拖入进来。目前只有 chrome 提供这样的 API,且只能通过 mime-type 验证。 - * @for Uploader - */ - return Uploader.register({ - name: 'dnd', - - init: function( opts ) { - - if ( !opts.dnd || - this.request('predict-runtime-type') !== 'html5' ) { - return; - } - - var me = this, - deferred = Base.Deferred(), - options = $.extend({}, { - disableGlobalDnd: opts.disableGlobalDnd, - container: opts.dnd, - accept: opts.accept - }), - dnd; - - this.dnd = dnd = new Dnd( options ); - - dnd.once( 'ready', deferred.resolve ); - dnd.on( 'drop', function( files ) { - me.request( 'add-file', [ files ]); - }); - - // 检测文件是否全部允许添加。 - dnd.on( 'accept', function( items ) { - return me.owner.trigger( 'dndAccept', items ); - }); - - dnd.init(); - - return deferred.promise(); - }, - - destroy: function() { - this.dnd && this.dnd.destroy(); - } - }); - }); - - /** - * @fileOverview 错误信息 - */ - define('lib/filepaste',[ - 'base', - 'mediator', - 'runtime/client' - ], function( Base, Mediator, RuntimeClent ) { - - var $ = Base.$; - - function FilePaste( opts ) { - opts = this.options = $.extend({}, opts ); - opts.container = $( opts.container || document.body ); - RuntimeClent.call( this, 'FilePaste' ); - } - - Base.inherits( RuntimeClent, { - constructor: FilePaste, - - init: function() { - var me = this; - - me.connectRuntime( me.options, function() { - me.exec('init'); - me.trigger('ready'); - }); - } - }); - - Mediator.installTo( FilePaste.prototype ); - - return FilePaste; - }); - /** - * @fileOverview 组件基类。 - */ - define('widgets/filepaste',[ - 'base', - 'uploader', - 'lib/filepaste', - 'widgets/widget' - ], function( Base, Uploader, FilePaste ) { - var $ = Base.$; - - /** - * @property {Selector} [paste=undefined] 指定监听paste事件的容器,如果不指定,不启用此功能。此功能为通过粘贴来添加截屏的图片。建议设置为`document.body`. - * @namespace options - * @for Uploader - */ - return Uploader.register({ - name: 'paste', - - init: function( opts ) { - - if ( !opts.paste || - this.request('predict-runtime-type') !== 'html5' ) { - return; - } - - var me = this, - deferred = Base.Deferred(), - options = $.extend({}, { - container: opts.paste, - accept: opts.accept - }), - paste; - - this.paste = paste = new FilePaste( options ); - - paste.once( 'ready', deferred.resolve ); - paste.on( 'paste', function( files ) { - me.owner.request( 'add-file', [ files ]); - }); - paste.init(); - - return deferred.promise(); - }, - - destroy: function() { - this.paste && this.paste.destroy(); - } - }); - }); - /** - * @fileOverview Blob - */ - define('lib/blob',[ - 'base', - 'runtime/client' - ], function( Base, RuntimeClient ) { - - function Blob( ruid, source ) { - var me = this; - - me.source = source; - me.ruid = ruid; - this.size = source.size || 0; - - // 如果没有指定 mimetype, 但是知道文件后缀。 - if ( !source.type && this.ext && - ~'jpg,jpeg,png,gif,bmp'.indexOf( this.ext ) ) { - this.type = 'image/' + (this.ext === 'jpg' ? 'jpeg' : this.ext); - } else { - this.type = source.type || 'application/octet-stream'; - } - - RuntimeClient.call( me, 'Blob' ); - this.uid = source.uid || this.uid; - - if ( ruid ) { - me.connectRuntime( ruid ); - } - } - - Base.inherits( RuntimeClient, { - constructor: Blob, - - slice: function( start, end ) { - return this.exec( 'slice', start, end ); - }, - - getSource: function() { - return this.source; - } - }); - - return Blob; - }); - /** - * 为了统一化Flash的File和HTML5的File而存在。 - * 以至于要调用Flash里面的File,也可以像调用HTML5版本的File一下。 - * @fileOverview File - */ - define('lib/file',[ - 'base', - 'lib/blob' - ], function( Base, Blob ) { - - var uid = 1, - rExt = /\.([^.]+)$/; - - function File( ruid, file ) { - var ext; - - this.name = file.name || ('untitled' + uid++); - ext = rExt.exec( file.name ) ? RegExp.$1.toLowerCase() : ''; - - // todo 支持其他类型文件的转换。 - // 如果有 mimetype, 但是文件名里面没有找出后缀规律 - if ( !ext && file.type ) { - ext = /\/(jpg|jpeg|png|gif|bmp)$/i.exec( file.type ) ? - RegExp.$1.toLowerCase() : ''; - this.name += '.' + ext; - } - - this.ext = ext; - this.lastModifiedDate = file.lastModifiedDate || - (new Date()).toLocaleString(); - - Blob.apply( this, arguments ); - } - - return Base.inherits( Blob, File ); - }); - - /** - * @fileOverview 错误信息 - */ - define('lib/filepicker',[ - 'base', - 'runtime/client', - 'lib/file' - ], function( Base, RuntimeClent, File ) { - - var $ = Base.$; - - function FilePicker( opts ) { - opts = this.options = $.extend({}, FilePicker.options, opts ); - - opts.container = $( opts.id ); - - if ( !opts.container.length ) { - throw new Error('按钮指定错误'); - } - - opts.innerHTML = opts.innerHTML || opts.label || - opts.container.html() || ''; - - opts.button = $( opts.button || document.createElement('div') ); - opts.button.html( opts.innerHTML ); - opts.container.html( opts.button ); - - RuntimeClent.call( this, 'FilePicker', true ); - } - - FilePicker.options = { - button: null, - container: null, - label: null, - innerHTML: null, - multiple: true, - accept: null, - name: 'file' - }; - - Base.inherits( RuntimeClent, { - constructor: FilePicker, - - init: function() { - var me = this, - opts = me.options, - button = opts.button; - - button.addClass('webuploader-pick'); - - me.on( 'all', function( type ) { - var files; - - switch ( type ) { - case 'mouseenter': - button.addClass('webuploader-pick-hover'); - break; - - case 'mouseleave': - button.removeClass('webuploader-pick-hover'); - break; - - case 'change': - files = me.exec('getFiles'); - me.trigger( 'select', $.map( files, function( file ) { - file = new File( me.getRuid(), file ); - - // 记录来源。 - file._refer = opts.container; - return file; - }), opts.container ); - break; - } - }); - - me.connectRuntime( opts, function() { - me.refresh(); - me.exec( 'init', opts ); - me.trigger('ready'); - }); - - this._resizeHandler = Base.bindFn( this.refresh, this ); - $( window ).on( 'resize', this._resizeHandler ); - }, - - refresh: function() { - var shimContainer = this.getRuntime().getContainer(), - button = this.options.button, - width = button.outerWidth ? - button.outerWidth() : button.width(), - - height = button.outerHeight ? - button.outerHeight() : button.height(), - - pos = button.offset(); - - width && height && shimContainer.css({ - bottom: 'auto', - right: 'auto', - width: width + 'px', - height: height + 'px' - }).offset( pos ); - }, - - enable: function() { - var btn = this.options.button; - - btn.removeClass('webuploader-pick-disable'); - this.refresh(); - }, - - disable: function() { - var btn = this.options.button; - - this.getRuntime().getContainer().css({ - top: '-99999px' - }); - - btn.addClass('webuploader-pick-disable'); - }, - - destroy: function() { - var btn = this.options.button; - $( window ).off( 'resize', this._resizeHandler ); - btn.removeClass('webuploader-pick-disable webuploader-pick-hover ' + - 'webuploader-pick'); - } - }); - - return FilePicker; - }); - - /** - * @fileOverview 文件选择相关 - */ - define('widgets/filepicker',[ - 'base', - 'uploader', - 'lib/filepicker', - 'widgets/widget' - ], function( Base, Uploader, FilePicker ) { - var $ = Base.$; - - $.extend( Uploader.options, { - - /** - * @property {Selector | Object} [pick=undefined] - * @namespace options - * @for Uploader - * @description 指定选择文件的按钮容器,不指定则不创建按钮。 - * - * * `id` {Seletor|dom} 指定选择文件的按钮容器,不指定则不创建按钮。**注意** 这里虽然写的是 id, 但是不是只支持 id, 还支持 class, 或者 dom 节点。 - * * `label` {String} 请采用 `innerHTML` 代替 - * * `innerHTML` {String} 指定按钮文字。不指定时优先从指定的容器中看是否自带文字。 - * * `multiple` {Boolean} 是否开起同时选择多个文件能力。 - */ - pick: null, - - /** - * @property {Arroy} [accept=null] - * @namespace options - * @for Uploader - * @description 指定接受哪些类型的文件。 由于目前还有ext转mimeType表,所以这里需要分开指定。 - * - * * `title` {String} 文字描述 - * * `extensions` {String} 允许的文件后缀,不带点,多个用逗号分割。 - * * `mimeTypes` {String} 多个用逗号分割。 - * - * 如: - * - * ``` - * { - * title: 'Images', - * extensions: 'gif,jpg,jpeg,bmp,png', - * mimeTypes: 'image/*' - * } - * ``` - */ - accept: null/*{ - title: 'Images', - extensions: 'gif,jpg,jpeg,bmp,png', - mimeTypes: 'image/*' - }*/ - }); - - return Uploader.register({ - name: 'picker', - - init: function( opts ) { - this.pickers = []; - return opts.pick && this.addBtn( opts.pick ); - }, - - refresh: function() { - $.each( this.pickers, function() { - this.refresh(); - }); - }, - - /** - * @method addButton - * @for Uploader - * @grammar addButton( pick ) => Promise - * @description - * 添加文件选择按钮,如果一个按钮不够,需要调用此方法来添加。参数跟[options.pick](#WebUploader:Uploader:options)一致。 - * @example - * uploader.addButton({ - * id: '#btnContainer', - * innerHTML: '选择文件' - * }); - */ - addBtn: function( pick ) { - var me = this, - opts = me.options, - accept = opts.accept, - promises = []; - - if ( !pick ) { - return; - } - - $.isPlainObject( pick ) || (pick = { - id: pick - }); - - $( pick.id ).each(function() { - var options, picker, deferred; - - deferred = Base.Deferred(); - - options = $.extend({}, pick, { - accept: $.isPlainObject( accept ) ? [ accept ] : accept, - swf: opts.swf, - runtimeOrder: opts.runtimeOrder, - id: this - }); - - picker = new FilePicker( options ); - - picker.once( 'ready', deferred.resolve ); - picker.on( 'select', function( files ) { - me.owner.request( 'add-file', [ files ]); - }); - picker.init(); - - me.pickers.push( picker ); - - promises.push( deferred.promise() ); - }); - - return Base.when.apply( Base, promises ); - }, - - disable: function() { - $.each( this.pickers, function() { - this.disable(); - }); - }, - - enable: function() { - $.each( this.pickers, function() { - this.enable(); - }); - }, - - destroy: function() { - $.each( this.pickers, function() { - this.destroy(); - }); - this.pickers = null; - } - }); - }); - /** - * @fileOverview Image - */ - define('lib/image',[ - 'base', - 'runtime/client', - 'lib/blob' - ], function( Base, RuntimeClient, Blob ) { - var $ = Base.$; - - // 构造器。 - function Image( opts ) { - this.options = $.extend({}, Image.options, opts ); - RuntimeClient.call( this, 'Image' ); - - this.on( 'load', function() { - this._info = this.exec('info'); - this._meta = this.exec('meta'); - }); - } - - // 默认选项。 - Image.options = { - - // 默认的图片处理质量 - quality: 90, - - // 是否裁剪 - crop: false, - - // 是否保留头部信息 - preserveHeaders: false, - - // 是否允许放大。 - allowMagnify: false - }; - - // 继承RuntimeClient. - Base.inherits( RuntimeClient, { - constructor: Image, - - info: function( val ) { - - // setter - if ( val ) { - this._info = val; - return this; - } - - // getter - return this._info; - }, - - meta: function( val ) { - - // setter - if ( val ) { - this._meta = val; - return this; - } - - // getter - return this._meta; - }, - - loadFromBlob: function( blob ) { - var me = this, - ruid = blob.getRuid(); - - this.connectRuntime( ruid, function() { - me.exec( 'init', me.options ); - me.exec( 'loadFromBlob', blob ); - }); - }, - - resize: function() { - var args = Base.slice( arguments ); - return this.exec.apply( this, [ 'resize' ].concat( args ) ); - }, - - crop: function() { - var args = Base.slice( arguments ); - return this.exec.apply( this, [ 'crop' ].concat( args ) ); - }, - - getAsDataUrl: function( type ) { - return this.exec( 'getAsDataUrl', type ); - }, - - getAsBlob: function( type ) { - var blob = this.exec( 'getAsBlob', type ); - - return new Blob( this.getRuid(), blob ); - } - }); - - return Image; - }); - /** - * @fileOverview 图片操作, 负责预览图片和上传前压缩图片 - */ - define('widgets/image',[ - 'base', - 'uploader', - 'lib/image', - 'widgets/widget' - ], function( Base, Uploader, Image ) { - - var $ = Base.$, - throttle; - - // 根据要处理的文件大小来节流,一次不能处理太多,会卡。 - throttle = (function( max ) { - var occupied = 0, - waiting = [], - tick = function() { - var item; - - while ( waiting.length && occupied < max ) { - item = waiting.shift(); - occupied += item[ 0 ]; - item[ 1 ](); - } - }; - - return function( emiter, size, cb ) { - waiting.push([ size, cb ]); - emiter.once( 'destroy', function() { - occupied -= size; - setTimeout( tick, 1 ); - }); - setTimeout( tick, 1 ); - }; - })( 5 * 1024 * 1024 ); - - $.extend( Uploader.options, { - - /** - * @property {Object} [thumb] - * @namespace options - * @for Uploader - * @description 配置生成缩略图的选项。 - * - * 默认为: - * - * ```javascript - * { - * width: 110, - * height: 110, - * - * // 图片质量,只有type为`image/jpeg`的时候才有效。 - * quality: 70, - * - * // 是否允许放大,如果想要生成小图的时候不失真,此选项应该设置为false. - * allowMagnify: true, - * - * // 是否允许裁剪。 - * crop: true, - * - * // 为空的话则保留原有图片格式。 - * // 否则强制转换成指定的类型。 - * type: 'image/jpeg' - * } - * ``` - */ - thumb: { - width: 110, - height: 110, - quality: 70, - allowMagnify: true, - crop: true, - preserveHeaders: false, - - // 为空的话则保留原有图片格式。 - // 否则强制转换成指定的类型。 - // IE 8下面 base64 大小不能超过 32K 否则预览失败,而非 jpeg 编码的图片很可 - // 能会超过 32k, 所以这里设置成预览的时候都是 image/jpeg - type: 'image/jpeg' - }, - - /** - * @property {Object} [compress] - * @namespace options - * @for Uploader - * @description 配置压缩的图片的选项。如果此选项为`false`, 则图片在上传前不进行压缩。 - * - * 默认为: - * - * ```javascript - * { - * width: 1600, - * height: 1600, - * - * // 图片质量,只有type为`image/jpeg`的时候才有效。 - * quality: 90, - * - * // 是否允许放大,如果想要生成小图的时候不失真,此选项应该设置为false. - * allowMagnify: false, - * - * // 是否允许裁剪。 - * crop: false, - * - * // 是否保留头部meta信息。 - * preserveHeaders: true, - * - * // 如果发现压缩后文件大小比原来还大,则使用原来图片 - * // 此属性可能会影响图片自动纠正功能 - * noCompressIfLarger: false, - * - * // 单位字节,如果图片大小小于此值,不会采用压缩。 - * compressSize: 0 - * } - * ``` - */ - compress: { - width: 1600, - height: 1600, - quality: 90, - allowMagnify: false, - crop: false, - preserveHeaders: true - } - }); - - return Uploader.register({ - - name: 'image', - - - /** - * 生成缩略图,此过程为异步,所以需要传入`callback`。 - * 通常情况在图片加入队里后调用此方法来生成预览图以增强交互效果。 - * - * 当 width 或者 height 的值介于 0 - 1 时,被当成百分比使用。 - * - * `callback`中可以接收到两个参数。 - * * 第一个为error,如果生成缩略图有错误,此error将为真。 - * * 第二个为ret, 缩略图的Data URL值。 - * - * **注意** - * Date URL在IE6/7中不支持,所以不用调用此方法了,直接显示一张暂不支持预览图片好了。 - * 也可以借助服务端,将 base64 数据传给服务端,生成一个临时文件供预览。 - * - * @method makeThumb - * @grammar makeThumb( file, callback ) => undefined - * @grammar makeThumb( file, callback, width, height ) => undefined - * @for Uploader - * @example - * - * uploader.on( 'fileQueued', function( file ) { - * var $li = ...; - * - * uploader.makeThumb( file, function( error, ret ) { - * if ( error ) { - * $li.text('预览错误'); - * } else { - * $li.append(''); - * } - * }); - * - * }); - */ - makeThumb: function( file, cb, width, height ) { - var opts, image; - - file = this.request( 'get-file', file ); - - // 只预览图片格式。 - if ( !file.type.match( /^image/ ) ) { - cb( true ); - return; - } - - opts = $.extend({}, this.options.thumb ); - - // 如果传入的是object. - if ( $.isPlainObject( width ) ) { - opts = $.extend( opts, width ); - width = null; - } - - width = width || opts.width; - height = height || opts.height; - - image = new Image( opts ); - - image.once( 'load', function() { - file._info = file._info || image.info(); - file._meta = file._meta || image.meta(); - - // 如果 width 的值介于 0 - 1 - // 说明设置的是百分比。 - if ( width <= 1 && width > 0 ) { - width = file._info.width * width; - } - - // 同样的规则应用于 height - if ( height <= 1 && height > 0 ) { - height = file._info.height * height; - } - - image.resize( width, height ); - }); - - // 当 resize 完后 - image.once( 'complete', function() { - cb( false, image.getAsDataUrl( opts.type ) ); - image.destroy(); - }); - - image.once( 'error', function( reason ) { - cb( reason || true ); - image.destroy(); - }); - - throttle( image, file.source.size, function() { - file._info && image.info( file._info ); - file._meta && image.meta( file._meta ); - image.loadFromBlob( file.source ); - }); - }, - - beforeSendFile: function( file ) { - var opts = this.options.compress || this.options.resize, - compressSize = opts && opts.compressSize || 0, - noCompressIfLarger = opts && opts.noCompressIfLarger || false, - image, deferred; - - file = this.request( 'get-file', file ); - - // 只压缩 jpeg 图片格式。 - // gif 可能会丢失针 - // bmp png 基本上尺寸都不大,且压缩比比较小。 - if ( !opts || !~'image/jpeg,image/jpg'.indexOf( file.type ) || - file.size < compressSize || - file._compressed ) { - return; - } - - opts = $.extend({}, opts ); - deferred = Base.Deferred(); - - image = new Image( opts ); - - deferred.always(function() { - image.destroy(); - image = null; - }); - image.once( 'error', deferred.reject ); - image.once( 'load', function() { - var width = opts.width, - height = opts.height; - - file._info = file._info || image.info(); - file._meta = file._meta || image.meta(); - - // 如果 width 的值介于 0 - 1 - // 说明设置的是百分比。 - if ( width <= 1 && width > 0 ) { - width = file._info.width * width; - } - - // 同样的规则应用于 height - if ( height <= 1 && height > 0 ) { - height = file._info.height * height; - } - - image.resize( width, height ); - }); - - image.once( 'complete', function() { - var blob, size; - - // 移动端 UC / qq 浏览器的无图模式下 - // ctx.getImageData 处理大图的时候会报 Exception - // INDEX_SIZE_ERR: DOM Exception 1 - try { - blob = image.getAsBlob( opts.type ); - - size = file.size; - - // 如果压缩后,比原来还大则不用压缩后的。 - if ( !noCompressIfLarger || blob.size < size ) { - // file.source.destroy && file.source.destroy(); - file.source = blob; - file.size = blob.size; - - file.trigger( 'resize', blob.size, size ); - } - - // 标记,避免重复压缩。 - file._compressed = true; - deferred.resolve(); - } catch ( e ) { - // 出错了直接继续,让其上传原始图片 - deferred.resolve(); - } - }); - - file._info && image.info( file._info ); - file._meta && image.meta( file._meta ); - - image.loadFromBlob( file.source ); - return deferred.promise(); - } - }); - }); - /** - * @fileOverview 文件属性封装 - */ - define('file',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$, - idPrefix = 'WU_FILE_', - idSuffix = 0, - rExt = /\.([^.]+)$/, - statusMap = {}; - - function gid() { - return idPrefix + idSuffix++; - } - - /** - * 文件类 - * @class File - * @constructor 构造函数 - * @grammar new File( source ) => File - * @param {Lib.File} source [lib.File](#Lib.File)实例, 此source对象是带有Runtime信息的。 - */ - function WUFile( source ) { - - /** - * 文件名,包括扩展名(后缀) - * @property name - * @type {string} - */ - this.name = source.name || 'Untitled'; - - /** - * 文件体积(字节) - * @property size - * @type {uint} - * @default 0 - */ - this.size = source.size || 0; - - /** - * 文件MIMETYPE类型,与文件类型的对应关系请参考[http://t.cn/z8ZnFny](http://t.cn/z8ZnFny) - * @property type - * @type {string} - * @default 'application/octet-stream' - */ - this.type = source.type || 'application/octet-stream'; - - /** - * 文件最后修改日期 - * @property lastModifiedDate - * @type {int} - * @default 当前时间戳 - */ - this.lastModifiedDate = source.lastModifiedDate || (new Date() * 1); - - /** - * 文件ID,每个对象具有唯一ID,与文件名无关 - * @property id - * @type {string} - */ - this.id = gid(); - - /** - * 文件扩展名,通过文件名获取,例如test.png的扩展名为png - * @property ext - * @type {string} - */ - this.ext = rExt.exec( this.name ) ? RegExp.$1 : ''; - - - /** - * 状态文字说明。在不同的status语境下有不同的用途。 - * @property statusText - * @type {string} - */ - this.statusText = ''; - - // 存储文件状态,防止通过属性直接修改 - statusMap[ this.id ] = WUFile.Status.INITED; - - this.source = source; - this.loaded = 0; - - this.on( 'error', function( msg ) { - this.setStatus( WUFile.Status.ERROR, msg ); - }); - } - - $.extend( WUFile.prototype, { - - /** - * 设置状态,状态变化时会触发`change`事件。 - * @method setStatus - * @grammar setStatus( status[, statusText] ); - * @param {File.Status|String} status [文件状态值](#WebUploader:File:File.Status) - * @param {String} [statusText=''] 状态说明,常在error时使用,用http, abort,server等来标记是由于什么原因导致文件错误。 - */ - setStatus: function( status, text ) { - - var prevStatus = statusMap[ this.id ]; - - typeof text !== 'undefined' && (this.statusText = text); - - if ( status !== prevStatus ) { - statusMap[ this.id ] = status; - /** - * 文件状态变化 - * @event statuschange - */ - this.trigger( 'statuschange', status, prevStatus ); - } - - }, - - /** - * 获取文件状态 - * @return {File.Status} - * @example - 文件状态具体包括以下几种类型: - { - // 初始化 - INITED: 0, - // 已入队列 - QUEUED: 1, - // 正在上传 - PROGRESS: 2, - // 上传出错 - ERROR: 3, - // 上传成功 - COMPLETE: 4, - // 上传取消 - CANCELLED: 5 - } - */ - getStatus: function() { - return statusMap[ this.id ]; - }, - - /** - * 获取文件原始信息。 - * @return {*} - */ - getSource: function() { - return this.source; - }, - - destroy: function() { - this.off(); - delete statusMap[ this.id ]; - } - }); - - Mediator.installTo( WUFile.prototype ); - - /** - * 文件状态值,具体包括以下几种类型: - * * `inited` 初始状态 - * * `queued` 已经进入队列, 等待上传 - * * `progress` 上传中 - * * `complete` 上传完成。 - * * `error` 上传出错,可重试 - * * `interrupt` 上传中断,可续传。 - * * `invalid` 文件不合格,不能重试上传。会自动从队列中移除。 - * * `cancelled` 文件被移除。 - * @property {Object} Status - * @namespace File - * @class File - * @static - */ - WUFile.Status = { - INITED: 'inited', // 初始状态 - QUEUED: 'queued', // 已经进入队列, 等待上传 - PROGRESS: 'progress', // 上传中 - ERROR: 'error', // 上传出错,可重试 - COMPLETE: 'complete', // 上传完成。 - CANCELLED: 'cancelled', // 上传取消。 - INTERRUPT: 'interrupt', // 上传中断,可续传。 - INVALID: 'invalid' // 文件不合格,不能重试上传。 - }; - - return WUFile; - }); - - /** - * @fileOverview 文件队列 - */ - define('queue',[ - 'base', - 'mediator', - 'file' - ], function( Base, Mediator, WUFile ) { - - var $ = Base.$, - STATUS = WUFile.Status; - - /** - * 文件队列, 用来存储各个状态中的文件。 - * @class Queue - * @extends Mediator - */ - function Queue() { - - /** - * 统计文件数。 - * * `numOfQueue` 队列中的文件数。 - * * `numOfSuccess` 上传成功的文件数 - * * `numOfCancel` 被取消的文件数 - * * `numOfProgress` 正在上传中的文件数 - * * `numOfUploadFailed` 上传错误的文件数。 - * * `numOfInvalid` 无效的文件数。 - * * `numofDeleted` 被移除的文件数。 - * @property {Object} stats - */ - this.stats = { - numOfQueue: 0, - numOfSuccess: 0, - numOfCancel: 0, - numOfProgress: 0, - numOfUploadFailed: 0, - numOfInvalid: 0, - numofDeleted: 0, - numofInterrupt: 0 - }; - - // 上传队列,仅包括等待上传的文件 - this._queue = []; - - // 存储所有文件 - this._map = {}; - } - - $.extend( Queue.prototype, { - - /** - * 将新文件加入对队列尾部 - * - * @method append - * @param {File} file 文件对象 - */ - append: function( file ) { - this._queue.push( file ); - this._fileAdded( file ); - return this; - }, - - /** - * 将新文件加入对队列头部 - * - * @method prepend - * @param {File} file 文件对象 - */ - prepend: function( file ) { - this._queue.unshift( file ); - this._fileAdded( file ); - return this; - }, - - /** - * 获取文件对象 - * - * @method getFile - * @param {String} fileId 文件ID - * @return {File} - */ - getFile: function( fileId ) { - if ( typeof fileId !== 'string' ) { - return fileId; - } - return this._map[ fileId ]; - }, - - /** - * 从队列中取出一个指定状态的文件。 - * @grammar fetch( status ) => File - * @method fetch - * @param {String} status [文件状态值](#WebUploader:File:File.Status) - * @return {File} [File](#WebUploader:File) - */ - fetch: function( status ) { - var len = this._queue.length, - i, file; - - status = status || STATUS.QUEUED; - - for ( i = 0; i < len; i++ ) { - file = this._queue[ i ]; - - if ( status === file.getStatus() ) { - return file; - } - } - - return null; - }, - - /** - * 对队列进行排序,能够控制文件上传顺序。 - * @grammar sort( fn ) => undefined - * @method sort - * @param {Function} fn 排序方法 - */ - sort: function( fn ) { - if ( typeof fn === 'function' ) { - this._queue.sort( fn ); - } - }, - - /** - * 获取指定类型的文件列表, 列表中每一个成员为[File](#WebUploader:File)对象。 - * @grammar getFiles( [status1[, status2 ...]] ) => Array - * @method getFiles - * @param {String} [status] [文件状态值](#WebUploader:File:File.Status) - */ - getFiles: function() { - var sts = [].slice.call( arguments, 0 ), - ret = [], - i = 0, - len = this._queue.length, - file; - - for ( ; i < len; i++ ) { - file = this._queue[ i ]; - - if ( sts.length && !~$.inArray( file.getStatus(), sts ) ) { - continue; - } - - ret.push( file ); - } - - return ret; - }, - - /** - * 在队列中删除文件。 - * @grammar removeFile( file ) => Array - * @method removeFile - * @param {File} 文件对象。 - */ - removeFile: function( file ) { - var me = this, - existing = this._map[ file.id ]; - - if ( existing ) { - delete this._map[ file.id ]; - file.destroy(); - this.stats.numofDeleted++; - } - }, - - _fileAdded: function( file ) { - var me = this, - existing = this._map[ file.id ]; - - if ( !existing ) { - this._map[ file.id ] = file; - - file.on( 'statuschange', function( cur, pre ) { - me._onFileStatusChange( cur, pre ); - }); - } - }, - - _onFileStatusChange: function( curStatus, preStatus ) { - var stats = this.stats; - - switch ( preStatus ) { - case STATUS.PROGRESS: - stats.numOfProgress--; - break; - - case STATUS.QUEUED: - stats.numOfQueue --; - break; - - case STATUS.ERROR: - stats.numOfUploadFailed--; - break; - - case STATUS.INVALID: - stats.numOfInvalid--; - break; - - case STATUS.INTERRUPT: - stats.numofInterrupt--; - break; - } - - switch ( curStatus ) { - case STATUS.QUEUED: - stats.numOfQueue++; - break; - - case STATUS.PROGRESS: - stats.numOfProgress++; - break; - - case STATUS.ERROR: - stats.numOfUploadFailed++; - break; - - case STATUS.COMPLETE: - stats.numOfSuccess++; - break; - - case STATUS.CANCELLED: - stats.numOfCancel++; - break; - - - case STATUS.INVALID: - stats.numOfInvalid++; - break; - - case STATUS.INTERRUPT: - stats.numofInterrupt++; - break; - } - } - - }); - - Mediator.installTo( Queue.prototype ); - - return Queue; - }); - /** - * @fileOverview 队列 - */ - define('widgets/queue',[ - 'base', - 'uploader', - 'queue', - 'file', - 'lib/file', - 'runtime/client', - 'widgets/widget' - ], function( Base, Uploader, Queue, WUFile, File, RuntimeClient ) { - - var $ = Base.$, - rExt = /\.\w+$/, - Status = WUFile.Status; - - return Uploader.register({ - name: 'queue', - - init: function( opts ) { - var me = this, - deferred, len, i, item, arr, accept, runtime; - - if ( $.isPlainObject( opts.accept ) ) { - opts.accept = [ opts.accept ]; - } - - // accept中的中生成匹配正则。 - if ( opts.accept ) { - arr = []; - - for ( i = 0, len = opts.accept.length; i < len; i++ ) { - item = opts.accept[ i ].extensions; - item && arr.push( item ); - } - - if ( arr.length ) { - accept = '\\.' + arr.join(',') - .replace( /,/g, '$|\\.' ) - .replace( /\*/g, '.*' ) + '$'; - } - - me.accept = new RegExp( accept, 'i' ); - } - - me.queue = new Queue(); - me.stats = me.queue.stats; - - // 如果当前不是html5运行时,那就算了。 - // 不执行后续操作 - if ( this.request('predict-runtime-type') !== 'html5' ) { - return; - } - - // 创建一个 html5 运行时的 placeholder - // 以至于外部添加原生 File 对象的时候能正确包裹一下供 webuploader 使用。 - deferred = Base.Deferred(); - this.placeholder = runtime = new RuntimeClient('Placeholder'); - runtime.connectRuntime({ - runtimeOrder: 'html5' - }, function() { - me._ruid = runtime.getRuid(); - deferred.resolve(); - }); - return deferred.promise(); - }, - - - // 为了支持外部直接添加一个原生File对象。 - _wrapFile: function( file ) { - if ( !(file instanceof WUFile) ) { - - if ( !(file instanceof File) ) { - if ( !this._ruid ) { - throw new Error('Can\'t add external files.'); - } - file = new File( this._ruid, file ); - } - - file = new WUFile( file ); - } - - return file; - }, - - // 判断文件是否可以被加入队列 - acceptFile: function( file ) { - var invalid = !file || !file.size || this.accept && - - // 如果名字中有后缀,才做后缀白名单处理。 - rExt.exec( file.name ) && !this.accept.test( file.name ); - - return !invalid; - }, - - - /** - * @event beforeFileQueued - * @param {File} file File对象 - * @description 当文件被加入队列之前触发,此事件的handler返回值为`false`,则此文件不会被添加进入队列。 - * @for Uploader - */ - - /** - * @event fileQueued - * @param {File} file File对象 - * @description 当文件被加入队列以后触发。 - * @for Uploader - */ - - _addFile: function( file ) { - var me = this; - - file = me._wrapFile( file ); - - // 不过类型判断允许不允许,先派送 `beforeFileQueued` - if ( !me.owner.trigger( 'beforeFileQueued', file ) ) { - return; - } - - // 类型不匹配,则派送错误事件,并返回。 - if ( !me.acceptFile( file ) ) { - me.owner.trigger( 'error', 'Q_TYPE_DENIED', file ); - return; - } - - me.queue.append( file ); - me.owner.trigger( 'fileQueued', file ); - return file; - }, - - getFile: function( fileId ) { - return this.queue.getFile( fileId ); - }, - - /** - * @event filesQueued - * @param {File} files 数组,内容为原始File(lib/File)对象。 - * @description 当一批文件添加进队列以后触发。 - * @for Uploader - */ - - /** - * @property {Boolean} [auto=false] - * @namespace options - * @for Uploader - * @description 设置为 true 后,不需要手动调用上传,有文件选择即开始上传。 - * - */ - - /** - * @method addFiles - * @grammar addFiles( file ) => undefined - * @grammar addFiles( [file1, file2 ...] ) => undefined - * @param {Array of File or File} [files] Files 对象 数组 - * @description 添加文件到队列 - * @for Uploader - */ - addFile: function( files ) { - var me = this; - - if ( !files.length ) { - files = [ files ]; - } - - files = $.map( files, function( file ) { - return me._addFile( file ); - }); - - me.owner.trigger( 'filesQueued', files ); - - if ( me.options.auto ) { - setTimeout(function() { - me.request('start-upload'); - }, 20 ); - } - }, - - getStats: function() { - return this.stats; - }, - - /** - * @event fileDequeued - * @param {File} file File对象 - * @description 当文件被移除队列后触发。 - * @for Uploader - */ - - /** - * @method removeFile - * @grammar removeFile( file ) => undefined - * @grammar removeFile( id ) => undefined - * @grammar removeFile( file, true ) => undefined - * @grammar removeFile( id, true ) => undefined - * @param {File|id} file File对象或这File对象的id - * @description 移除某一文件, 默认只会标记文件状态为已取消,如果第二个参数为 `true` 则会从 queue 中移除。 - * @for Uploader - * @example - * - * $li.on('click', '.remove-this', function() { - * uploader.removeFile( file ); - * }) - */ - removeFile: function( file, remove ) { - var me = this; - - file = file.id ? file : me.queue.getFile( file ); - - this.request( 'cancel-file', file ); - - if ( remove ) { - this.queue.removeFile( file ); - } - }, - - /** - * @method getFiles - * @grammar getFiles() => Array - * @grammar getFiles( status1, status2, status... ) => Array - * @description 返回指定状态的文件集合,不传参数将返回所有状态的文件。 - * @for Uploader - * @example - * console.log( uploader.getFiles() ); // => all files - * console.log( uploader.getFiles('error') ) // => all error files. - */ - getFiles: function() { - return this.queue.getFiles.apply( this.queue, arguments ); - }, - - fetchFile: function() { - return this.queue.fetch.apply( this.queue, arguments ); - }, - - /** - * @method retry - * @grammar retry() => undefined - * @grammar retry( file ) => undefined - * @description 重试上传,重试指定文件,或者从出错的文件开始重新上传。 - * @for Uploader - * @example - * function retry() { - * uploader.retry(); - * } - */ - retry: function( file, noForceStart ) { - var me = this, - files, i, len; - - if ( file ) { - file = file.id ? file : me.queue.getFile( file ); - file.setStatus( Status.QUEUED ); - noForceStart || me.request('start-upload'); - return; - } - - files = me.queue.getFiles( Status.ERROR ); - i = 0; - len = files.length; - - for ( ; i < len; i++ ) { - file = files[ i ]; - file.setStatus( Status.QUEUED ); - } - - me.request('start-upload'); - }, - - /** - * @method sort - * @grammar sort( fn ) => undefined - * @description 排序队列中的文件,在上传之前调整可以控制上传顺序。 - * @for Uploader - */ - sortFiles: function() { - return this.queue.sort.apply( this.queue, arguments ); - }, - - /** - * @event reset - * @description 当 uploader 被重置的时候触发。 - * @for Uploader - */ - - /** - * @method reset - * @grammar reset() => undefined - * @description 重置uploader。目前只重置了队列。 - * @for Uploader - * @example - * uploader.reset(); - */ - reset: function() { - this.owner.trigger('reset'); - this.queue = new Queue(); - this.stats = this.queue.stats; - }, - - destroy: function() { - this.reset(); - this.placeholder && this.placeholder.destroy(); - } - }); - - }); - /** - * @fileOverview 添加获取Runtime相关信息的方法。 - */ - define('widgets/runtime',[ - 'uploader', - 'runtime/runtime', - 'widgets/widget' - ], function( Uploader, Runtime ) { - - Uploader.support = function() { - return Runtime.hasRuntime.apply( Runtime, arguments ); - }; - - /** - * @property {Object} [runtimeOrder=html5,flash] - * @namespace options - * @for Uploader - * @description 指定运行时启动顺序。默认会想尝试 html5 是否支持,如果支持则使用 html5, 否则则使用 flash. - * - * 可以将此值设置成 `flash`,来强制使用 flash 运行时。 - */ - - return Uploader.register({ - name: 'runtime', - - init: function() { - if ( !this.predictRuntimeType() ) { - throw Error('Runtime Error'); - } - }, - - /** - * 预测Uploader将采用哪个`Runtime` - * @grammar predictRuntimeType() => String - * @method predictRuntimeType - * @for Uploader - */ - predictRuntimeType: function() { - var orders = this.options.runtimeOrder || Runtime.orders, - type = this.type, - i, len; - - if ( !type ) { - orders = orders.split( /\s*,\s*/g ); - - for ( i = 0, len = orders.length; i < len; i++ ) { - if ( Runtime.hasRuntime( orders[ i ] ) ) { - this.type = type = orders[ i ]; - break; - } - } - } - - return type; - } - }); - }); - /** - * @fileOverview Transport - */ - define('lib/transport',[ - 'base', - 'runtime/client', - 'mediator' - ], function( Base, RuntimeClient, Mediator ) { - - var $ = Base.$; - - function Transport( opts ) { - var me = this; - - opts = me.options = $.extend( true, {}, Transport.options, opts || {} ); - RuntimeClient.call( this, 'Transport' ); - - this._blob = null; - this._formData = opts.formData || {}; - this._headers = opts.headers || {}; - - this.on( 'progress', this._timeout ); - this.on( 'load error', function() { - me.trigger( 'progress', 1 ); - clearTimeout( me._timer ); - }); - } - - Transport.options = { - server: '', - method: 'POST', - - // 跨域时,是否允许携带cookie, 只有html5 runtime才有效 - withCredentials: false, - fileVal: 'file', - timeout: 2 * 60 * 1000, // 2分钟 - formData: {}, - headers: {}, - sendAsBinary: false - }; - - $.extend( Transport.prototype, { - - // 添加Blob, 只能添加一次,最后一次有效。 - appendBlob: function( key, blob, filename ) { - var me = this, - opts = me.options; - - if ( me.getRuid() ) { - me.disconnectRuntime(); - } - - // 连接到blob归属的同一个runtime. - me.connectRuntime( blob.ruid, function() { - me.exec('init'); - }); - - me._blob = blob; - opts.fileVal = key || opts.fileVal; - opts.filename = filename || opts.filename; - }, - - // 添加其他字段 - append: function( key, value ) { - if ( typeof key === 'object' ) { - $.extend( this._formData, key ); - } else { - this._formData[ key ] = value; - } - }, - - setRequestHeader: function( key, value ) { - if ( typeof key === 'object' ) { - $.extend( this._headers, key ); - } else { - this._headers[ key ] = value; - } - }, - - send: function( method ) { - this.exec( 'send', method ); - this._timeout(); - }, - - abort: function() { - clearTimeout( this._timer ); - return this.exec('abort'); - }, - - destroy: function() { - this.trigger('destroy'); - this.off(); - this.exec('destroy'); - this.disconnectRuntime(); - }, - - getResponse: function() { - return this.exec('getResponse'); - }, - - getResponseAsJson: function() { - return this.exec('getResponseAsJson'); - }, - - getStatus: function() { - return this.exec('getStatus'); - }, - - _timeout: function() { - var me = this, - duration = me.options.timeout; - - if ( !duration ) { - return; - } - - clearTimeout( me._timer ); - me._timer = setTimeout(function() { - me.abort(); - me.trigger( 'error', 'timeout' ); - }, duration ); - } - - }); - - // 让Transport具备事件功能。 - Mediator.installTo( Transport.prototype ); - - return Transport; - }); - /** - * @fileOverview 负责文件上传相关。 - */ - define('widgets/upload',[ - 'base', - 'uploader', - 'file', - 'lib/transport', - 'widgets/widget' - ], function( Base, Uploader, WUFile, Transport ) { - - var $ = Base.$, - isPromise = Base.isPromise, - Status = WUFile.Status; - - // 添加默认配置项 - $.extend( Uploader.options, { - - - /** - * @property {Boolean} [prepareNextFile=false] - * @namespace options - * @for Uploader - * @description 是否允许在文件传输时提前把下一个文件准备好。 - * 对于一个文件的准备工作比较耗时,比如图片压缩,md5序列化。 - * 如果能提前在当前文件传输期处理,可以节省总体耗时。 - */ - prepareNextFile: false, - - /** - * @property {Boolean} [chunked=false] - * @namespace options - * @for Uploader - * @description 是否要分片处理大文件上传。 - */ - chunked: false, - - /** - * @property {Boolean} [chunkSize=5242880] - * @namespace options - * @for Uploader - * @description 如果要分片,分多大一片? 默认大小为5M. - */ - chunkSize: 5 * 1024 * 1024, - - /** - * @property {Boolean} [chunkRetry=2] - * @namespace options - * @for Uploader - * @description 如果某个分片由于网络问题出错,允许自动重传多少次? - */ - chunkRetry: 2, - - /** - * @property {Boolean} [threads=3] - * @namespace options - * @for Uploader - * @description 上传并发数。允许同时最大上传进程数。 - */ - threads: 3, - - - /** - * @property {Object} [formData={}] - * @namespace options - * @for Uploader - * @description 文件上传请求的参数表,每次发送都会发送此对象中的参数。 - */ - formData: {} - - /** - * @property {Object} [fileVal='file'] - * @namespace options - * @for Uploader - * @description 设置文件上传域的name。 - */ - - /** - * @property {Object} [method='POST'] - * @namespace options - * @for Uploader - * @description 文件上传方式,`POST`或者`GET`。 - */ - - /** - * @property {Object} [sendAsBinary=false] - * @namespace options - * @for Uploader - * @description 是否已二进制的流的方式发送文件,这样整个上传内容`php://input`都为文件内容, - * 其他参数在$_GET数组中。 - */ - }); - - // 负责将文件切片。 - function CuteFile( file, chunkSize ) { - var pending = [], - blob = file.source, - total = blob.size, - chunks = chunkSize ? Math.ceil( total / chunkSize ) : 1, - start = 0, - index = 0, - len, api; - - api = { - file: file, - - has: function() { - return !!pending.length; - }, - - shift: function() { - return pending.shift(); - }, - - unshift: function( block ) { - pending.unshift( block ); - } - }; - - while ( index < chunks ) { - len = Math.min( chunkSize, total - start ); - - pending.push({ - file: file, - start: start, - end: chunkSize ? (start + len) : total, - total: total, - chunks: chunks, - chunk: index++, - cuted: api - }); - start += len; - } - - file.blocks = pending.concat(); - file.remaning = pending.length; - - return api; - } - - Uploader.register({ - name: 'upload', - - init: function() { - var owner = this.owner, - me = this; - - this.runing = false; - this.progress = false; - - owner - .on( 'startUpload', function() { - me.progress = true; - }) - .on( 'uploadFinished', function() { - me.progress = false; - }); - - // 记录当前正在传的数据,跟threads相关 - this.pool = []; - - // 缓存分好片的文件。 - this.stack = []; - - // 缓存即将上传的文件。 - this.pending = []; - - // 跟踪还有多少分片在上传中但是没有完成上传。 - this.remaning = 0; - this.__tick = Base.bindFn( this._tick, this ); - - owner.on( 'uploadComplete', function( file ) { - - // 把其他块取消了。 - file.blocks && $.each( file.blocks, function( _, v ) { - v.transport && (v.transport.abort(), v.transport.destroy()); - delete v.transport; - }); - - delete file.blocks; - delete file.remaning; - }); - }, - - reset: function() { - this.request( 'stop-upload', true ); - this.runing = false; - this.pool = []; - this.stack = []; - this.pending = []; - this.remaning = 0; - this._trigged = false; - this._promise = null; - }, - - /** - * @event startUpload - * @description 当开始上传流程时触发。 - * @for Uploader - */ - - /** - * 开始上传。此方法可以从初始状态调用开始上传流程,也可以从暂停状态调用,继续上传流程。 - * - * 可以指定开始某一个文件。 - * @grammar upload() => undefined - * @grammar upload( file | fileId) => undefined - * @method upload - * @for Uploader - */ - startUpload: function(file) { - var me = this; - - // 移出invalid的文件 - $.each( me.request( 'get-files', Status.INVALID ), function() { - me.request( 'remove-file', this ); - }); - - // 如果指定了开始某个文件,则只开始指定文件。 - if ( file ) { - file = file.id ? file : me.request( 'get-file', file ); - - if (file.getStatus() === Status.INTERRUPT) { - $.each( me.pool, function( _, v ) { - - // 之前暂停过。 - if (v.file !== file) { - return; - } - - v.transport && v.transport.send(); - }); - - file.setStatus( Status.QUEUED ); - } else if (file.getStatus() === Status.PROGRESS) { - return; - } else { - file.setStatus( Status.QUEUED ); - } - } else { - $.each( me.request( 'get-files', [ Status.INITED ] ), function() { - this.setStatus( Status.QUEUED ); - }); - } - - if ( me.runing ) { - return; - } - - me.runing = true; - - var files = []; - - // 如果有暂停的,则续传 - $.each( me.pool, function( _, v ) { - var file = v.file; - - if ( file.getStatus() === Status.INTERRUPT ) { - files.push(file); - me._trigged = false; - v.transport && v.transport.send(); - } - }); - - var file; - while ( (file = files.shift()) ) { - file.setStatus( Status.PROGRESS ); - } - - file || $.each( me.request( 'get-files', - Status.INTERRUPT ), function() { - this.setStatus( Status.PROGRESS ); - }); - - me._trigged = false; - Base.nextTick( me.__tick ); - me.owner.trigger('startUpload'); - }, - - /** - * @event stopUpload - * @description 当开始上传流程暂停时触发。 - * @for Uploader - */ - - /** - * 暂停上传。第一个参数为是否中断上传当前正在上传的文件。 - * - * 如果第一个参数是文件,则只暂停指定文件。 - * @grammar stop() => undefined - * @grammar stop( true ) => undefined - * @grammar stop( file ) => undefined - * @method stop - * @for Uploader - */ - stopUpload: function( file, interrupt ) { - var me = this; - - if (file === true) { - interrupt = file; - file = null; - } - - if ( me.runing === false ) { - return; - } - - // 如果只是暂停某个文件。 - if ( file ) { - file = file.id ? file : me.request( 'get-file', file ); - - if ( file.getStatus() !== Status.PROGRESS && - file.getStatus() !== Status.QUEUED ) { - return; - } - - file.setStatus( Status.INTERRUPT ); - $.each( me.pool, function( _, v ) { - - // 只 abort 指定的文件。 - if (v.file !== file) { - return; - } - - v.transport && v.transport.abort(); - me._putback(v); - me._popBlock(v); - }); - - return Base.nextTick( me.__tick ); - } - - me.runing = false; - - if (this._promise && this._promise.file) { - this._promise.file.setStatus( Status.INTERRUPT ); - } - - interrupt && $.each( me.pool, function( _, v ) { - v.transport && v.transport.abort(); - v.file.setStatus( Status.INTERRUPT ); - }); - - me.owner.trigger('stopUpload'); - }, - - /** - * @method cancelFile - * @grammar cancelFile( file ) => undefined - * @grammar cancelFile( id ) => undefined - * @param {File|id} file File对象或这File对象的id - * @description 标记文件状态为已取消, 同时将中断文件传输。 - * @for Uploader - * @example - * - * $li.on('click', '.remove-this', function() { - * uploader.cancelFile( file ); - * }) - */ - cancelFile: function( file ) { - file = file.id ? file : this.request( 'get-file', file ); - - // 如果正在上传。 - file.blocks && $.each( file.blocks, function( _, v ) { - var _tr = v.transport; - - if ( _tr ) { - _tr.abort(); - _tr.destroy(); - delete v.transport; - } - }); - - file.setStatus( Status.CANCELLED ); - this.owner.trigger( 'fileDequeued', file ); - }, - - /** - * 判断`Uplaode`r是否正在上传中。 - * @grammar isInProgress() => Boolean - * @method isInProgress - * @for Uploader - */ - isInProgress: function() { - return !!this.progress; - }, - - _getStats: function() { - return this.request('get-stats'); - }, - - /** - * 掉过一个文件上传,直接标记指定文件为已上传状态。 - * @grammar skipFile( file ) => undefined - * @method skipFile - * @for Uploader - */ - skipFile: function( file, status ) { - file = file.id ? file : this.request( 'get-file', file ); - - file.setStatus( status || Status.COMPLETE ); - file.skipped = true; - - // 如果正在上传。 - file.blocks && $.each( file.blocks, function( _, v ) { - var _tr = v.transport; - - if ( _tr ) { - _tr.abort(); - _tr.destroy(); - delete v.transport; - } - }); - - this.owner.trigger( 'uploadSkip', file ); - }, - - /** - * @event uploadFinished - * @description 当所有文件上传结束时触发。 - * @for Uploader - */ - _tick: function() { - var me = this, - opts = me.options, - fn, val; - - // 上一个promise还没有结束,则等待完成后再执行。 - if ( me._promise ) { - return me._promise.always( me.__tick ); - } - - // 还有位置,且还有文件要处理的话。 - if ( me.pool.length < opts.threads && (val = me._nextBlock()) ) { - me._trigged = false; - - fn = function( val ) { - me._promise = null; - - // 有可能是reject过来的,所以要检测val的类型。 - val && val.file && me._startSend( val ); - Base.nextTick( me.__tick ); - }; - - me._promise = isPromise( val ) ? val.always( fn ) : fn( val ); - - // 没有要上传的了,且没有正在传输的了。 - } else if ( !me.remaning && !me._getStats().numOfQueue && - !me._getStats().numofInterrupt ) { - me.runing = false; - - me._trigged || Base.nextTick(function() { - me.owner.trigger('uploadFinished'); - }); - me._trigged = true; - } - }, - - _putback: function(block) { - var idx; - - block.cuted.unshift(block); - idx = this.stack.indexOf(block.cuted); - - if (!~idx) { - this.stack.unshift(block.cuted); - } - }, - - _getStack: function() { - var i = 0, - act; - - while ( (act = this.stack[ i++ ]) ) { - if ( act.has() && act.file.getStatus() === Status.PROGRESS ) { - return act; - } else if (!act.has() || - act.file.getStatus() !== Status.PROGRESS && - act.file.getStatus() !== Status.INTERRUPT ) { - - // 把已经处理完了的,或者,状态为非 progress(上传中)、 - // interupt(暂停中) 的移除。 - this.stack.splice( --i, 1 ); - } - } - - return null; - }, - - _nextBlock: function() { - var me = this, - opts = me.options, - act, next, done, preparing; - - // 如果当前文件还有没有需要传输的,则直接返回剩下的。 - if ( (act = this._getStack()) ) { - - // 是否提前准备下一个文件 - if ( opts.prepareNextFile && !me.pending.length ) { - me._prepareNextFile(); - } - - return act.shift(); - - // 否则,如果正在运行,则准备下一个文件,并等待完成后返回下个分片。 - } else if ( me.runing ) { - - // 如果缓存中有,则直接在缓存中取,没有则去queue中取。 - if ( !me.pending.length && me._getStats().numOfQueue ) { - me._prepareNextFile(); - } - - next = me.pending.shift(); - done = function( file ) { - if ( !file ) { - return null; - } - - act = CuteFile( file, opts.chunked ? opts.chunkSize : 0 ); - me.stack.push(act); - return act.shift(); - }; - - // 文件可能还在prepare中,也有可能已经完全准备好了。 - if ( isPromise( next) ) { - preparing = next.file; - next = next[ next.pipe ? 'pipe' : 'then' ]( done ); - next.file = preparing; - return next; - } - - return done( next ); - } - }, - - - /** - * @event uploadStart - * @param {File} file File对象 - * @description 某个文件开始上传前触发,一个文件只会触发一次。 - * @for Uploader - */ - _prepareNextFile: function() { - var me = this, - file = me.request('fetch-file'), - pending = me.pending, - promise; - - if ( file ) { - promise = me.request( 'before-send-file', file, function() { - - // 有可能文件被skip掉了。文件被skip掉后,状态坑定不是Queued. - if ( file.getStatus() === Status.PROGRESS || - file.getStatus() === Status.INTERRUPT ) { - return file; - } - - return me._finishFile( file ); - }); - - me.owner.trigger( 'uploadStart', file ); - file.setStatus( Status.PROGRESS ); - - promise.file = file; - - // 如果还在pending中,则替换成文件本身。 - promise.done(function() { - var idx = $.inArray( promise, pending ); - - ~idx && pending.splice( idx, 1, file ); - }); - - // befeore-send-file的钩子就有错误发生。 - promise.fail(function( reason ) { - file.setStatus( Status.ERROR, reason ); - me.owner.trigger( 'uploadError', file, reason ); - me.owner.trigger( 'uploadComplete', file ); - }); - - pending.push( promise ); - } - }, - - // 让出位置了,可以让其他分片开始上传 - _popBlock: function( block ) { - var idx = $.inArray( block, this.pool ); - - this.pool.splice( idx, 1 ); - block.file.remaning--; - this.remaning--; - }, - - // 开始上传,可以被掉过。如果promise被reject了,则表示跳过此分片。 - _startSend: function( block ) { - var me = this, - file = block.file, - promise; - - // 有可能在 before-send-file 的 promise 期间改变了文件状态。 - // 如:暂停,取消 - // 我们不能中断 promise, 但是可以在 promise 完后,不做上传操作。 - if ( file.getStatus() !== Status.PROGRESS ) { - - // 如果是中断,则还需要放回去。 - if (file.getStatus() === Status.INTERRUPT) { - me._putback(block); - } - - return; - } - - me.pool.push( block ); - me.remaning++; - - // 如果没有分片,则直接使用原始的。 - // 不会丢失content-type信息。 - block.blob = block.chunks === 1 ? file.source : - file.source.slice( block.start, block.end ); - - // hook, 每个分片发送之前可能要做些异步的事情。 - promise = me.request( 'before-send', block, function() { - - // 有可能文件已经上传出错了,所以不需要再传输了。 - if ( file.getStatus() === Status.PROGRESS ) { - me._doSend( block ); - } else { - me._popBlock( block ); - Base.nextTick( me.__tick ); - } - }); - - // 如果为fail了,则跳过此分片。 - promise.fail(function() { - if ( file.remaning === 1 ) { - me._finishFile( file ).always(function() { - block.percentage = 1; - me._popBlock( block ); - me.owner.trigger( 'uploadComplete', file ); - Base.nextTick( me.__tick ); - }); - } else { - block.percentage = 1; - me.updateFileProgress( file ); - me._popBlock( block ); - Base.nextTick( me.__tick ); - } - }); - }, - - - /** - * @event uploadBeforeSend - * @param {Object} object - * @param {Object} data 默认的上传参数,可以扩展此对象来控制上传参数。 - * @param {Object} headers 可以扩展此对象来控制上传头部。 - * @description 当某个文件的分块在发送前触发,主要用来询问是否要添加附带参数,大文件在开起分片上传的前提下此事件可能会触发多次。 - * @for Uploader - */ - - /** - * @event uploadAccept - * @param {Object} object - * @param {Object} ret 服务端的返回数据,json格式,如果服务端不是json格式,从ret._raw中取数据,自行解析。 - * @description 当某个文件上传到服务端响应后,会派送此事件来询问服务端响应是否有效。如果此事件handler返回值为`false`, 则此文件将派送`server`类型的`uploadError`事件。 - * @for Uploader - */ - - /** - * @event uploadProgress - * @param {File} file File对象 - * @param {Number} percentage 上传进度 - * @description 上传过程中触发,携带上传进度。 - * @for Uploader - */ - - - /** - * @event uploadError - * @param {File} file File对象 - * @param {String} reason 出错的code - * @description 当文件上传出错时触发。 - * @for Uploader - */ - - /** - * @event uploadSuccess - * @param {File} file File对象 - * @param {Object} response 服务端返回的数据 - * @description 当文件上传成功时触发。 - * @for Uploader - */ - - /** - * @event uploadComplete - * @param {File} [file] File对象 - * @description 不管成功或者失败,文件上传完成时触发。 - * @for Uploader - */ - - // 做上传操作。 - _doSend: function( block ) { - var me = this, - owner = me.owner, - opts = me.options, - file = block.file, - tr = new Transport( opts ), - data = $.extend({}, opts.formData ), - headers = $.extend({}, opts.headers ), - requestAccept, ret; - - block.transport = tr; - - tr.on( 'destroy', function() { - delete block.transport; - me._popBlock( block ); - Base.nextTick( me.__tick ); - }); - - // 广播上传进度。以文件为单位。 - tr.on( 'progress', function( percentage ) { - block.percentage = percentage; - me.updateFileProgress( file ); - }); - - // 用来询问,是否返回的结果是有错误的。 - requestAccept = function( reject ) { - var fn; - - ret = tr.getResponseAsJson() || {}; - ret._raw = tr.getResponse(); - fn = function( value ) { - reject = value; - }; - - // 服务端响应了,不代表成功了,询问是否响应正确。 - if ( !owner.trigger( 'uploadAccept', block, ret, fn ) ) { - reject = reject || 'server'; - } - - return reject; - }; - - // 尝试重试,然后广播文件上传出错。 - tr.on( 'error', function( type, flag ) { - block.retried = block.retried || 0; - - // 自动重试 - if ( block.chunks > 1 && ~'http,abort'.indexOf( type ) && - block.retried < opts.chunkRetry ) { - - block.retried++; - tr.send(); - - } else { - - // http status 500 ~ 600 - if ( !flag && type === 'server' ) { - type = requestAccept( type ); - } - - file.setStatus( Status.ERROR, type ); - owner.trigger( 'uploadError', file, type ); - owner.trigger( 'uploadComplete', file ); - } - }); - - // 上传成功 - tr.on( 'load', function() { - var reason; - - // 如果非预期,转向上传出错。 - if ( (reason = requestAccept()) ) { - tr.trigger( 'error', reason, true ); - return; - } - - // 全部上传完成。 - if ( file.remaning === 1 ) { - me._finishFile( file, ret ); - } else { - tr.destroy(); - } - }); - - // 配置默认的上传字段。 - data = $.extend( data, { - id: file.id, - name: file.name, - type: file.type, - lastModifiedDate: file.lastModifiedDate, - size: file.size - }); - - block.chunks > 1 && $.extend( data, { - chunks: block.chunks, - chunk: block.chunk - }); - - // 在发送之间可以添加字段什么的。。。 - // 如果默认的字段不够使用,可以通过监听此事件来扩展 - owner.trigger( 'uploadBeforeSend', block, data, headers ); - - // 开始发送。 - tr.appendBlob( opts.fileVal, block.blob, file.name ); - tr.append( data ); - tr.setRequestHeader( headers ); - tr.send(); - }, - - // 完成上传。 - _finishFile: function( file, ret, hds ) { - var owner = this.owner; - - return owner - .request( 'after-send-file', arguments, function() { - file.setStatus( Status.COMPLETE ); - owner.trigger( 'uploadSuccess', file, ret, hds ); - }) - .fail(function( reason ) { - - // 如果外部已经标记为invalid什么的,不再改状态。 - if ( file.getStatus() === Status.PROGRESS ) { - file.setStatus( Status.ERROR, reason ); - } - - owner.trigger( 'uploadError', file, reason ); - }) - .always(function() { - owner.trigger( 'uploadComplete', file ); - }); - }, - - updateFileProgress: function(file) { - var totalPercent = 0, - uploaded = 0; - - if (!file.blocks) { - return; - } - - $.each( file.blocks, function( _, v ) { - uploaded += (v.percentage || 0) * (v.end - v.start); - }); - - totalPercent = uploaded / file.size; - this.owner.trigger( 'uploadProgress', file, totalPercent || 0 ); - } - - }); - }); - /** - * @fileOverview 各种验证,包括文件总大小是否超出、单文件是否超出和文件是否重复。 - */ - - define('widgets/validator',[ - 'base', - 'uploader', - 'file', - 'widgets/widget' - ], function( Base, Uploader, WUFile ) { - - var $ = Base.$, - validators = {}, - api; - - /** - * @event error - * @param {String} type 错误类型。 - * @description 当validate不通过时,会以派送错误事件的形式通知调用者。通过`upload.on('error', handler)`可以捕获到此类错误,目前有以下错误会在特定的情况下派送错来。 - * - * * `Q_EXCEED_NUM_LIMIT` 在设置了`fileNumLimit`且尝试给`uploader`添加的文件数量超出这个值时派送。 - * * `Q_EXCEED_SIZE_LIMIT` 在设置了`Q_EXCEED_SIZE_LIMIT`且尝试给`uploader`添加的文件总大小超出这个值时派送。 - * * `Q_TYPE_DENIED` 当文件类型不满足时触发。。 - * @for Uploader - */ - - // 暴露给外面的api - api = { - - // 添加验证器 - addValidator: function( type, cb ) { - validators[ type ] = cb; - }, - - // 移除验证器 - removeValidator: function( type ) { - delete validators[ type ]; - } - }; - - // 在Uploader初始化的时候启动Validators的初始化 - Uploader.register({ - name: 'validator', - - init: function() { - var me = this; - Base.nextTick(function() { - $.each( validators, function() { - this.call( me.owner ); - }); - }); - } - }); - - /** - * @property {int} [fileNumLimit=undefined] - * @namespace options - * @for Uploader - * @description 验证文件总数量, 超出则不允许加入队列。 - */ - api.addValidator( 'fileNumLimit', function() { - var uploader = this, - opts = uploader.options, - count = 0, - max = parseInt( opts.fileNumLimit, 10 ), - flag = true; - - if ( !max ) { - return; - } - - uploader.on( 'beforeFileQueued', function( file ) { - - if ( count >= max && flag ) { - flag = false; - this.trigger( 'error', 'Q_EXCEED_NUM_LIMIT', max, file ); - setTimeout(function() { - flag = true; - }, 1 ); - } - - return count >= max ? false : true; - }); - - uploader.on( 'fileQueued', function() { - count++; - }); - - uploader.on( 'fileDequeued', function() { - count--; - }); - - uploader.on( 'reset', function() { - count = 0; - }); - }); - - - /** - * @property {int} [fileSizeLimit=undefined] - * @namespace options - * @for Uploader - * @description 验证文件总大小是否超出限制, 超出则不允许加入队列。 - */ - api.addValidator( 'fileSizeLimit', function() { - var uploader = this, - opts = uploader.options, - count = 0, - max = parseInt( opts.fileSizeLimit, 10 ), - flag = true; - - if ( !max ) { - return; - } - - uploader.on( 'beforeFileQueued', function( file ) { - var invalid = count + file.size > max; - - if ( invalid && flag ) { - flag = false; - this.trigger( 'error', 'Q_EXCEED_SIZE_LIMIT', max, file ); - setTimeout(function() { - flag = true; - }, 1 ); - } - - return invalid ? false : true; - }); - - uploader.on( 'fileQueued', function( file ) { - count += file.size; - }); - - uploader.on( 'fileDequeued', function( file ) { - count -= file.size; - }); - - uploader.on( 'reset', function() { - count = 0; - }); - }); - - /** - * @property {int} [fileSingleSizeLimit=undefined] - * @namespace options - * @for Uploader - * @description 验证单个文件大小是否超出限制, 超出则不允许加入队列。 - */ - api.addValidator( 'fileSingleSizeLimit', function() { - var uploader = this, - opts = uploader.options, - max = opts.fileSingleSizeLimit; - - if ( !max ) { - return; - } - - uploader.on( 'beforeFileQueued', function( file ) { - - if ( file.size > max ) { - file.setStatus( WUFile.Status.INVALID, 'exceed_size' ); - this.trigger( 'error', 'F_EXCEED_SIZE', max, file ); - return false; - } - - }); - - }); - - /** - * @property {Boolean} [duplicate=undefined] - * @namespace options - * @for Uploader - * @description 去重, 根据文件名字、文件大小和最后修改时间来生成hash Key. - */ - api.addValidator( 'duplicate', function() { - var uploader = this, - opts = uploader.options, - mapping = {}; - - if ( opts.duplicate ) { - return; - } - - function hashString( str ) { - var hash = 0, - i = 0, - len = str.length, - _char; - - for ( ; i < len; i++ ) { - _char = str.charCodeAt( i ); - hash = _char + (hash << 6) + (hash << 16) - hash; - } - - return hash; - } - - uploader.on( 'beforeFileQueued', function( file ) { - var hash = file.__hash || (file.__hash = hashString( file.name + - file.size + file.lastModifiedDate )); - - // 已经重复了 - if ( mapping[ hash ] ) { - this.trigger( 'error', 'F_DUPLICATE', file ); - return false; - } - }); - - uploader.on( 'fileQueued', function( file ) { - var hash = file.__hash; - - hash && (mapping[ hash ] = true); - }); - - uploader.on( 'fileDequeued', function( file ) { - var hash = file.__hash; - - hash && (delete mapping[ hash ]); - }); - - uploader.on( 'reset', function() { - mapping = {}; - }); - }); - - return api; - }); - - /** - * @fileOverview Md5 - */ - define('lib/md5',[ - 'runtime/client', - 'mediator' - ], function( RuntimeClient, Mediator ) { - - function Md5() { - RuntimeClient.call( this, 'Md5' ); - } - - // 让 Md5 具备事件功能。 - Mediator.installTo( Md5.prototype ); - - Md5.prototype.loadFromBlob = function( blob ) { - var me = this; - - if ( me.getRuid() ) { - me.disconnectRuntime(); - } - - // 连接到blob归属的同一个runtime. - me.connectRuntime( blob.ruid, function() { - me.exec('init'); - me.exec( 'loadFromBlob', blob ); - }); - }; - - Md5.prototype.getResult = function() { - return this.exec('getResult'); - }; - - return Md5; - }); - /** - * @fileOverview 图片操作, 负责预览图片和上传前压缩图片 - */ - define('widgets/md5',[ - 'base', - 'uploader', - 'lib/md5', - 'lib/blob', - 'widgets/widget' - ], function( Base, Uploader, Md5, Blob ) { - - return Uploader.register({ - name: 'md5', - - - /** - * 计算文件 md5 值,返回一个 promise 对象,可以监听 progress 进度。 - * - * - * @method md5File - * @grammar md5File( file[, start[, end]] ) => promise - * @for Uploader - * @example - * - * uploader.on( 'fileQueued', function( file ) { - * var $li = ...; - * - * uploader.md5File( file ) - * - * // 及时显示进度 - * .progress(function(percentage) { - * console.log('Percentage:', percentage); - * }) - * - * // 完成 - * .then(function(val) { - * console.log('md5 result:', val); - * }); - * - * }); - */ - md5File: function( file, start, end ) { - var md5 = new Md5(), - deferred = Base.Deferred(), - blob = (file instanceof Blob) ? file : - this.request( 'get-file', file ).source; - - md5.on( 'progress load', function( e ) { - e = e || {}; - deferred.notify( e.total ? e.loaded / e.total : 1 ); - }); - - md5.on( 'complete', function() { - deferred.resolve( md5.getResult() ); - }); - - md5.on( 'error', function( reason ) { - deferred.reject( reason ); - }); - - if ( arguments.length > 1 ) { - start = start || 0; - end = end || 0; - start < 0 && (start = blob.size + start); - end < 0 && (end = blob.size + end); - end = Math.min( end, blob.size ); - blob = blob.slice( start, end ); - } - - md5.loadFromBlob( blob ); - - return deferred.promise(); - } - }); - }); - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/compbase',[],function() { - - function CompBase( owner, runtime ) { - - this.owner = owner; - this.options = owner.options; - - this.getRuntime = function() { - return runtime; - }; - - this.getRuid = function() { - return runtime.uid; - }; - - this.trigger = function() { - return owner.trigger.apply( owner, arguments ); - }; - } - - return CompBase; - }); - /** - * @fileOverview Html5Runtime - */ - define('runtime/html5/runtime',[ - 'base', - 'runtime/runtime', - 'runtime/compbase' - ], function( Base, Runtime, CompBase ) { - - var type = 'html5', - components = {}; - - function Html5Runtime() { - var pool = {}, - me = this, - destroy = this.destroy; - - Runtime.apply( me, arguments ); - me.type = type; - - - // 这个方法的调用者,实际上是RuntimeClient - me.exec = function( comp, fn/*, args...*/) { - var client = this, - uid = client.uid, - args = Base.slice( arguments, 2 ), - instance; - - if ( components[ comp ] ) { - instance = pool[ uid ] = pool[ uid ] || - new components[ comp ]( client, me ); - - if ( instance[ fn ] ) { - return instance[ fn ].apply( instance, args ); - } - } - }; - - me.destroy = function() { - // @todo 删除池子中的所有实例 - return destroy && destroy.apply( this, arguments ); - }; - } - - Base.inherits( Runtime, { - constructor: Html5Runtime, - - // 不需要连接其他程序,直接执行callback - init: function() { - var me = this; - setTimeout(function() { - me.trigger('ready'); - }, 1 ); - } - - }); - - // 注册Components - Html5Runtime.register = function( name, component ) { - var klass = components[ name ] = Base.inherits( CompBase, component ); - return klass; - }; - - // 注册html5运行时。 - // 只有在支持的前提下注册。 - if ( window.Blob && window.FileReader && window.DataView ) { - Runtime.addRuntime( type, Html5Runtime ); - } - - return Html5Runtime; - }); - /** - * @fileOverview Blob Html实现 - */ - define('runtime/html5/blob',[ - 'runtime/html5/runtime', - 'lib/blob' - ], function( Html5Runtime, Blob ) { - - return Html5Runtime.register( 'Blob', { - slice: function( start, end ) { - var blob = this.owner.source, - slice = blob.slice || blob.webkitSlice || blob.mozSlice; - - blob = slice.call( blob, start, end ); - - return new Blob( this.getRuid(), blob ); - } - }); - }); - /** - * @fileOverview FilePaste - */ - define('runtime/html5/dnd',[ - 'base', - 'runtime/html5/runtime', - 'lib/file' - ], function( Base, Html5Runtime, File ) { - - var $ = Base.$, - prefix = 'webuploader-dnd-'; - - return Html5Runtime.register( 'DragAndDrop', { - init: function() { - var elem = this.elem = this.options.container; - - this.dragEnterHandler = Base.bindFn( this._dragEnterHandler, this ); - this.dragOverHandler = Base.bindFn( this._dragOverHandler, this ); - this.dragLeaveHandler = Base.bindFn( this._dragLeaveHandler, this ); - this.dropHandler = Base.bindFn( this._dropHandler, this ); - this.dndOver = false; - - elem.on( 'dragenter', this.dragEnterHandler ); - elem.on( 'dragover', this.dragOverHandler ); - elem.on( 'dragleave', this.dragLeaveHandler ); - elem.on( 'drop', this.dropHandler ); - - if ( this.options.disableGlobalDnd ) { - $( document ).on( 'dragover', this.dragOverHandler ); - $( document ).on( 'drop', this.dropHandler ); - } - }, - - _dragEnterHandler: function( e ) { - var me = this, - denied = me._denied || false, - items; - - e = e.originalEvent || e; - - if ( !me.dndOver ) { - me.dndOver = true; - - // 注意只有 chrome 支持。 - items = e.dataTransfer.items; - - if ( items && items.length ) { - me._denied = denied = !me.trigger( 'accept', items ); - } - - me.elem.addClass( prefix + 'over' ); - me.elem[ denied ? 'addClass' : - 'removeClass' ]( prefix + 'denied' ); - } - - e.dataTransfer.dropEffect = denied ? 'none' : 'copy'; - - return false; - }, - - _dragOverHandler: function( e ) { - // 只处理框内的。 - var parentElem = this.elem.parent().get( 0 ); - if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) { - return false; - } - - clearTimeout( this._leaveTimer ); - this._dragEnterHandler.call( this, e ); - - return false; - }, - - _dragLeaveHandler: function() { - var me = this, - handler; - - handler = function() { - me.dndOver = false; - me.elem.removeClass( prefix + 'over ' + prefix + 'denied' ); - }; - - clearTimeout( me._leaveTimer ); - me._leaveTimer = setTimeout( handler, 100 ); - return false; - }, - - _dropHandler: function( e ) { - var me = this, - ruid = me.getRuid(), - parentElem = me.elem.parent().get( 0 ), - dataTransfer, data; - - // 只处理框内的。 - if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) { - return false; - } - - e = e.originalEvent || e; - dataTransfer = e.dataTransfer; - - // 如果是页面内拖拽,还不能处理,不阻止事件。 - // 此处 ie11 下会报参数错误, - try { - data = dataTransfer.getData('text/html'); - } catch( err ) { - } - - if ( data ) { - return; - } - - me._getTansferFiles( dataTransfer, function( results ) { - me.trigger( 'drop', $.map( results, function( file ) { - return new File( ruid, file ); - }) ); - }); - - me.dndOver = false; - me.elem.removeClass( prefix + 'over' ); - return false; - }, - - // 如果传入 callback 则去查看文件夹,否则只管当前文件夹。 - _getTansferFiles: function( dataTransfer, callback ) { - var results = [], - promises = [], - items, files, file, item, i, len, canAccessFolder; - - items = dataTransfer.items; - files = dataTransfer.files; - - canAccessFolder = !!(items && items[ 0 ].webkitGetAsEntry); - - for ( i = 0, len = files.length; i < len; i++ ) { - file = files[ i ]; - item = items && items[ i ]; - - if ( canAccessFolder && item.webkitGetAsEntry().isDirectory ) { - - promises.push( this._traverseDirectoryTree( - item.webkitGetAsEntry(), results ) ); - } else { - results.push( file ); - } - } - - Base.when.apply( Base, promises ).done(function() { - - if ( !results.length ) { - return; - } - - callback( results ); - }); - }, - - _traverseDirectoryTree: function( entry, results ) { - var deferred = Base.Deferred(), - me = this; - - if ( entry.isFile ) { - entry.file(function( file ) { - results.push( file ); - deferred.resolve(); - }); - } else if ( entry.isDirectory ) { - entry.createReader().readEntries(function( entries ) { - var len = entries.length, - promises = [], - arr = [], // 为了保证顺序。 - i; - - for ( i = 0; i < len; i++ ) { - promises.push( me._traverseDirectoryTree( - entries[ i ], arr ) ); - } - - Base.when.apply( Base, promises ).then(function() { - results.push.apply( results, arr ); - deferred.resolve(); - }, deferred.reject ); - }); - } - - return deferred.promise(); - }, - - destroy: function() { - var elem = this.elem; - - // 还没 init 就调用 destroy - if (!elem) { - return; - } - - elem.off( 'dragenter', this.dragEnterHandler ); - elem.off( 'dragover', this.dragOverHandler ); - elem.off( 'dragleave', this.dragLeaveHandler ); - elem.off( 'drop', this.dropHandler ); - - if ( this.options.disableGlobalDnd ) { - $( document ).off( 'dragover', this.dragOverHandler ); - $( document ).off( 'drop', this.dropHandler ); - } - } - }); - }); - - /** - * @fileOverview FilePaste - */ - define('runtime/html5/filepaste',[ - 'base', - 'runtime/html5/runtime', - 'lib/file' - ], function( Base, Html5Runtime, File ) { - - return Html5Runtime.register( 'FilePaste', { - init: function() { - var opts = this.options, - elem = this.elem = opts.container, - accept = '.*', - arr, i, len, item; - - // accetp的mimeTypes中生成匹配正则。 - if ( opts.accept ) { - arr = []; - - for ( i = 0, len = opts.accept.length; i < len; i++ ) { - item = opts.accept[ i ].mimeTypes; - item && arr.push( item ); - } - - if ( arr.length ) { - accept = arr.join(','); - accept = accept.replace( /,/g, '|' ).replace( /\*/g, '.*' ); - } - } - this.accept = accept = new RegExp( accept, 'i' ); - this.hander = Base.bindFn( this._pasteHander, this ); - elem.on( 'paste', this.hander ); - }, - - _pasteHander: function( e ) { - var allowed = [], - ruid = this.getRuid(), - items, item, blob, i, len; - - e = e.originalEvent || e; - items = e.clipboardData.items; - - for ( i = 0, len = items.length; i < len; i++ ) { - item = items[ i ]; - - if ( item.kind !== 'file' || !(blob = item.getAsFile()) ) { - continue; - } - - allowed.push( new File( ruid, blob ) ); - } - - if ( allowed.length ) { - // 不阻止非文件粘贴(文字粘贴)的事件冒泡 - e.preventDefault(); - e.stopPropagation(); - this.trigger( 'paste', allowed ); - } - }, - - destroy: function() { - this.elem.off( 'paste', this.hander ); - } - }); - }); - - /** - * @fileOverview FilePicker - */ - define('runtime/html5/filepicker',[ - 'base', - 'runtime/html5/runtime' - ], function( Base, Html5Runtime ) { - - var $ = Base.$; - - return Html5Runtime.register( 'FilePicker', { - init: function() { - var container = this.getRuntime().getContainer(), - me = this, - owner = me.owner, - opts = me.options, - label = this.label = $( document.createElement('label') ), - input = this.input = $( document.createElement('input') ), - arr, i, len, mouseHandler; - - input.attr( 'type', 'file' ); - input.attr( 'name', opts.name ); - input.addClass('webuploader-element-invisible'); - - label.on( 'click', function() { - input.trigger('click'); - }); - - label.css({ - opacity: 0, - width: '100%', - height: '100%', - display: 'block', - cursor: 'pointer', - background: '#ffffff' - }); - - if ( opts.multiple ) { - input.attr( 'multiple', 'multiple' ); - } - - // @todo Firefox不支持单独指定后缀 - if ( opts.accept && opts.accept.length > 0 ) { - arr = []; - - for ( i = 0, len = opts.accept.length; i < len; i++ ) { - arr.push( opts.accept[ i ].mimeTypes ); - } - - input.attr( 'accept', arr.join(',') ); - } - - container.append( input ); - container.append( label ); - - mouseHandler = function( e ) { - owner.trigger( e.type ); - }; - - input.on( 'change', function( e ) { - var fn = arguments.callee, - clone; - - me.files = e.target.files; - - // reset input - clone = this.cloneNode( true ); - clone.value = null; - this.parentNode.replaceChild( clone, this ); - - input.off(); - input = $( clone ).on( 'change', fn ) - .on( 'mouseenter mouseleave', mouseHandler ); - - owner.trigger('change'); - }); - - label.on( 'mouseenter mouseleave', mouseHandler ); - - }, - - - getFiles: function() { - return this.files; - }, - - destroy: function() { - this.input.off(); - this.label.off(); - } - }); - }); - /** - * Terms: - * - * Uint8Array, FileReader, BlobBuilder, atob, ArrayBuffer - * @fileOverview Image控件 - */ - define('runtime/html5/util',[ - 'base' - ], function( Base ) { - - var urlAPI = window.createObjectURL && window || - window.URL && URL.revokeObjectURL && URL || - window.webkitURL, - createObjectURL = Base.noop, - revokeObjectURL = createObjectURL; - - if ( urlAPI ) { - - // 更安全的方式调用,比如android里面就能把context改成其他的对象。 - createObjectURL = function() { - return urlAPI.createObjectURL.apply( urlAPI, arguments ); - }; - - revokeObjectURL = function() { - return urlAPI.revokeObjectURL.apply( urlAPI, arguments ); - }; - } - - return { - createObjectURL: createObjectURL, - revokeObjectURL: revokeObjectURL, - - dataURL2Blob: function( dataURI ) { - var byteStr, intArray, ab, i, mimetype, parts; - - parts = dataURI.split(','); - - if ( ~parts[ 0 ].indexOf('base64') ) { - byteStr = atob( parts[ 1 ] ); - } else { - byteStr = decodeURIComponent( parts[ 1 ] ); - } - - ab = new ArrayBuffer( byteStr.length ); - intArray = new Uint8Array( ab ); - - for ( i = 0; i < byteStr.length; i++ ) { - intArray[ i ] = byteStr.charCodeAt( i ); - } - - mimetype = parts[ 0 ].split(':')[ 1 ].split(';')[ 0 ]; - - return this.arrayBufferToBlob( ab, mimetype ); - }, - - dataURL2ArrayBuffer: function( dataURI ) { - var byteStr, intArray, i, parts; - - parts = dataURI.split(','); - - if ( ~parts[ 0 ].indexOf('base64') ) { - byteStr = atob( parts[ 1 ] ); - } else { - byteStr = decodeURIComponent( parts[ 1 ] ); - } - - intArray = new Uint8Array( byteStr.length ); - - for ( i = 0; i < byteStr.length; i++ ) { - intArray[ i ] = byteStr.charCodeAt( i ); - } - - return intArray.buffer; - }, - - arrayBufferToBlob: function( buffer, type ) { - var builder = window.BlobBuilder || window.WebKitBlobBuilder, - bb; - - // android不支持直接new Blob, 只能借助blobbuilder. - if ( builder ) { - bb = new builder(); - bb.append( buffer ); - return bb.getBlob( type ); - } - - return new Blob([ buffer ], type ? { type: type } : {} ); - }, - - // 抽出来主要是为了解决android下面canvas.toDataUrl不支持jpeg. - // 你得到的结果是png. - canvasToDataUrl: function( canvas, type, quality ) { - return canvas.toDataURL( type, quality / 100 ); - }, - - // imagemeat会复写这个方法,如果用户选择加载那个文件了的话。 - parseMeta: function( blob, callback ) { - callback( false, {}); - }, - - // imagemeat会复写这个方法,如果用户选择加载那个文件了的话。 - updateImageHead: function( data ) { - return data; - } - }; - }); - /** - * Terms: - * - * Uint8Array, FileReader, BlobBuilder, atob, ArrayBuffer - * @fileOverview Image控件 - */ - define('runtime/html5/imagemeta',[ - 'runtime/html5/util' - ], function( Util ) { - - var api; - - api = { - parsers: { - 0xffe1: [] - }, - - maxMetaDataSize: 262144, - - parse: function( blob, cb ) { - var me = this, - fr = new FileReader(); - - fr.onload = function() { - cb( false, me._parse( this.result ) ); - fr = fr.onload = fr.onerror = null; - }; - - fr.onerror = function( e ) { - cb( e.message ); - fr = fr.onload = fr.onerror = null; - }; - - blob = blob.slice( 0, me.maxMetaDataSize ); - fr.readAsArrayBuffer( blob.getSource() ); - }, - - _parse: function( buffer, noParse ) { - if ( buffer.byteLength < 6 ) { - return; - } - - var dataview = new DataView( buffer ), - offset = 2, - maxOffset = dataview.byteLength - 4, - headLength = offset, - ret = {}, - markerBytes, markerLength, parsers, i; - - if ( dataview.getUint16( 0 ) === 0xffd8 ) { - - while ( offset < maxOffset ) { - markerBytes = dataview.getUint16( offset ); - - if ( markerBytes >= 0xffe0 && markerBytes <= 0xffef || - markerBytes === 0xfffe ) { - - markerLength = dataview.getUint16( offset + 2 ) + 2; - - if ( offset + markerLength > dataview.byteLength ) { - break; - } - - parsers = api.parsers[ markerBytes ]; - - if ( !noParse && parsers ) { - for ( i = 0; i < parsers.length; i += 1 ) { - parsers[ i ].call( api, dataview, offset, - markerLength, ret ); - } - } - - offset += markerLength; - headLength = offset; - } else { - break; - } - } - - if ( headLength > 6 ) { - if ( buffer.slice ) { - ret.imageHead = buffer.slice( 2, headLength ); - } else { - // Workaround for IE10, which does not yet - // support ArrayBuffer.slice: - ret.imageHead = new Uint8Array( buffer ) - .subarray( 2, headLength ); - } - } - } - - return ret; - }, - - updateImageHead: function( buffer, head ) { - var data = this._parse( buffer, true ), - buf1, buf2, bodyoffset; - - - bodyoffset = 2; - if ( data.imageHead ) { - bodyoffset = 2 + data.imageHead.byteLength; - } - - if ( buffer.slice ) { - buf2 = buffer.slice( bodyoffset ); - } else { - buf2 = new Uint8Array( buffer ).subarray( bodyoffset ); - } - - buf1 = new Uint8Array( head.byteLength + 2 + buf2.byteLength ); - - buf1[ 0 ] = 0xFF; - buf1[ 1 ] = 0xD8; - buf1.set( new Uint8Array( head ), 2 ); - buf1.set( new Uint8Array( buf2 ), head.byteLength + 2 ); - - return buf1.buffer; - } - }; - - Util.parseMeta = function() { - return api.parse.apply( api, arguments ); - }; - - Util.updateImageHead = function() { - return api.updateImageHead.apply( api, arguments ); - }; - - return api; - }); - /** - * 代码来自于:https://github.com/blueimp/JavaScript-Load-Image - * 暂时项目中只用了orientation. - * - * 去除了 Exif Sub IFD Pointer, GPS Info IFD Pointer, Exif Thumbnail. - * @fileOverview EXIF解析 - */ - - // Sample - // ==================================== - // Make : Apple - // Model : iPhone 4S - // Orientation : 1 - // XResolution : 72 [72/1] - // YResolution : 72 [72/1] - // ResolutionUnit : 2 - // Software : QuickTime 7.7.1 - // DateTime : 2013:09:01 22:53:55 - // ExifIFDPointer : 190 - // ExposureTime : 0.058823529411764705 [1/17] - // FNumber : 2.4 [12/5] - // ExposureProgram : Normal program - // ISOSpeedRatings : 800 - // ExifVersion : 0220 - // DateTimeOriginal : 2013:09:01 22:52:51 - // DateTimeDigitized : 2013:09:01 22:52:51 - // ComponentsConfiguration : YCbCr - // ShutterSpeedValue : 4.058893515764426 - // ApertureValue : 2.5260688216892597 [4845/1918] - // BrightnessValue : -0.3126686601998395 - // MeteringMode : Pattern - // Flash : Flash did not fire, compulsory flash mode - // FocalLength : 4.28 [107/25] - // SubjectArea : [4 values] - // FlashpixVersion : 0100 - // ColorSpace : 1 - // PixelXDimension : 2448 - // PixelYDimension : 3264 - // SensingMethod : One-chip color area sensor - // ExposureMode : 0 - // WhiteBalance : Auto white balance - // FocalLengthIn35mmFilm : 35 - // SceneCaptureType : Standard - define('runtime/html5/imagemeta/exif',[ - 'base', - 'runtime/html5/imagemeta' - ], function( Base, ImageMeta ) { - - var EXIF = {}; - - EXIF.ExifMap = function() { - return this; - }; - - EXIF.ExifMap.prototype.map = { - 'Orientation': 0x0112 - }; - - EXIF.ExifMap.prototype.get = function( id ) { - return this[ id ] || this[ this.map[ id ] ]; - }; - - EXIF.exifTagTypes = { - // byte, 8-bit unsigned int: - 1: { - getValue: function( dataView, dataOffset ) { - return dataView.getUint8( dataOffset ); - }, - size: 1 - }, - - // ascii, 8-bit byte: - 2: { - getValue: function( dataView, dataOffset ) { - return String.fromCharCode( dataView.getUint8( dataOffset ) ); - }, - size: 1, - ascii: true - }, - - // short, 16 bit int: - 3: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getUint16( dataOffset, littleEndian ); - }, - size: 2 - }, - - // long, 32 bit int: - 4: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getUint32( dataOffset, littleEndian ); - }, - size: 4 - }, - - // rational = two long values, - // first is numerator, second is denominator: - 5: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getUint32( dataOffset, littleEndian ) / - dataView.getUint32( dataOffset + 4, littleEndian ); - }, - size: 8 - }, - - // slong, 32 bit signed int: - 9: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getInt32( dataOffset, littleEndian ); - }, - size: 4 - }, - - // srational, two slongs, first is numerator, second is denominator: - 10: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getInt32( dataOffset, littleEndian ) / - dataView.getInt32( dataOffset + 4, littleEndian ); - }, - size: 8 - } - }; - - // undefined, 8-bit byte, value depending on field: - EXIF.exifTagTypes[ 7 ] = EXIF.exifTagTypes[ 1 ]; - - EXIF.getExifValue = function( dataView, tiffOffset, offset, type, length, - littleEndian ) { - - var tagType = EXIF.exifTagTypes[ type ], - tagSize, dataOffset, values, i, str, c; - - if ( !tagType ) { - Base.log('Invalid Exif data: Invalid tag type.'); - return; - } - - tagSize = tagType.size * length; - - // Determine if the value is contained in the dataOffset bytes, - // or if the value at the dataOffset is a pointer to the actual data: - dataOffset = tagSize > 4 ? tiffOffset + dataView.getUint32( offset + 8, - littleEndian ) : (offset + 8); - - if ( dataOffset + tagSize > dataView.byteLength ) { - Base.log('Invalid Exif data: Invalid data offset.'); - return; - } - - if ( length === 1 ) { - return tagType.getValue( dataView, dataOffset, littleEndian ); - } - - values = []; - - for ( i = 0; i < length; i += 1 ) { - values[ i ] = tagType.getValue( dataView, - dataOffset + i * tagType.size, littleEndian ); - } - - if ( tagType.ascii ) { - str = ''; - - // Concatenate the chars: - for ( i = 0; i < values.length; i += 1 ) { - c = values[ i ]; - - // Ignore the terminating NULL byte(s): - if ( c === '\u0000' ) { - break; - } - str += c; - } - - return str; - } - return values; - }; - - EXIF.parseExifTag = function( dataView, tiffOffset, offset, littleEndian, - data ) { - - var tag = dataView.getUint16( offset, littleEndian ); - data.exif[ tag ] = EXIF.getExifValue( dataView, tiffOffset, offset, - dataView.getUint16( offset + 2, littleEndian ), // tag type - dataView.getUint32( offset + 4, littleEndian ), // tag length - littleEndian ); - }; - - EXIF.parseExifTags = function( dataView, tiffOffset, dirOffset, - littleEndian, data ) { - - var tagsNumber, dirEndOffset, i; - - if ( dirOffset + 6 > dataView.byteLength ) { - Base.log('Invalid Exif data: Invalid directory offset.'); - return; - } - - tagsNumber = dataView.getUint16( dirOffset, littleEndian ); - dirEndOffset = dirOffset + 2 + 12 * tagsNumber; - - if ( dirEndOffset + 4 > dataView.byteLength ) { - Base.log('Invalid Exif data: Invalid directory size.'); - return; - } - - for ( i = 0; i < tagsNumber; i += 1 ) { - this.parseExifTag( dataView, tiffOffset, - dirOffset + 2 + 12 * i, // tag offset - littleEndian, data ); - } - - // Return the offset to the next directory: - return dataView.getUint32( dirEndOffset, littleEndian ); - }; - - // EXIF.getExifThumbnail = function(dataView, offset, length) { - // var hexData, - // i, - // b; - // if (!length || offset + length > dataView.byteLength) { - // Base.log('Invalid Exif data: Invalid thumbnail data.'); - // return; - // } - // hexData = []; - // for (i = 0; i < length; i += 1) { - // b = dataView.getUint8(offset + i); - // hexData.push((b < 16 ? '0' : '') + b.toString(16)); - // } - // return 'data:image/jpeg,%' + hexData.join('%'); - // }; - - EXIF.parseExifData = function( dataView, offset, length, data ) { - - var tiffOffset = offset + 10, - littleEndian, dirOffset; - - // Check for the ASCII code for "Exif" (0x45786966): - if ( dataView.getUint32( offset + 4 ) !== 0x45786966 ) { - // No Exif data, might be XMP data instead - return; - } - if ( tiffOffset + 8 > dataView.byteLength ) { - Base.log('Invalid Exif data: Invalid segment size.'); - return; - } - - // Check for the two null bytes: - if ( dataView.getUint16( offset + 8 ) !== 0x0000 ) { - Base.log('Invalid Exif data: Missing byte alignment offset.'); - return; - } - - // Check the byte alignment: - switch ( dataView.getUint16( tiffOffset ) ) { - case 0x4949: - littleEndian = true; - break; - - case 0x4D4D: - littleEndian = false; - break; - - default: - Base.log('Invalid Exif data: Invalid byte alignment marker.'); - return; - } - - // Check for the TIFF tag marker (0x002A): - if ( dataView.getUint16( tiffOffset + 2, littleEndian ) !== 0x002A ) { - Base.log('Invalid Exif data: Missing TIFF marker.'); - return; - } - - // Retrieve the directory offset bytes, usually 0x00000008 or 8 decimal: - dirOffset = dataView.getUint32( tiffOffset + 4, littleEndian ); - // Create the exif object to store the tags: - data.exif = new EXIF.ExifMap(); - // Parse the tags of the main image directory and retrieve the - // offset to the next directory, usually the thumbnail directory: - dirOffset = EXIF.parseExifTags( dataView, tiffOffset, - tiffOffset + dirOffset, littleEndian, data ); - - // 尝试读取缩略图 - // if ( dirOffset ) { - // thumbnailData = {exif: {}}; - // dirOffset = EXIF.parseExifTags( - // dataView, - // tiffOffset, - // tiffOffset + dirOffset, - // littleEndian, - // thumbnailData - // ); - - // // Check for JPEG Thumbnail offset: - // if (thumbnailData.exif[0x0201]) { - // data.exif.Thumbnail = EXIF.getExifThumbnail( - // dataView, - // tiffOffset + thumbnailData.exif[0x0201], - // thumbnailData.exif[0x0202] // Thumbnail data length - // ); - // } - // } - }; - - ImageMeta.parsers[ 0xffe1 ].push( EXIF.parseExifData ); - return EXIF; - }); - /** - * 这个方式性能不行,但是可以解决android里面的toDataUrl的bug - * android里面toDataUrl('image/jpege')得到的结果却是png. - * - * 所以这里没辙,只能借助这个工具 - * @fileOverview jpeg encoder - */ - define('runtime/html5/jpegencoder',[], function( require, exports, module ) { - - /* - Copyright (c) 2008, Adobe Systems Incorporated - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of Adobe Systems Incorporated nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - /* - JPEG encoder ported to JavaScript and optimized by Andreas Ritter, www.bytestrom.eu, 11/2009 - - Basic GUI blocking jpeg encoder - */ - - function JPEGEncoder(quality) { - var self = this; - var fround = Math.round; - var ffloor = Math.floor; - var YTable = new Array(64); - var UVTable = new Array(64); - var fdtbl_Y = new Array(64); - var fdtbl_UV = new Array(64); - var YDC_HT; - var UVDC_HT; - var YAC_HT; - var UVAC_HT; - - var bitcode = new Array(65535); - var category = new Array(65535); - var outputfDCTQuant = new Array(64); - var DU = new Array(64); - var byteout = []; - var bytenew = 0; - var bytepos = 7; - - var YDU = new Array(64); - var UDU = new Array(64); - var VDU = new Array(64); - var clt = new Array(256); - var RGB_YUV_TABLE = new Array(2048); - var currentQuality; - - var ZigZag = [ - 0, 1, 5, 6,14,15,27,28, - 2, 4, 7,13,16,26,29,42, - 3, 8,12,17,25,30,41,43, - 9,11,18,24,31,40,44,53, - 10,19,23,32,39,45,52,54, - 20,22,33,38,46,51,55,60, - 21,34,37,47,50,56,59,61, - 35,36,48,49,57,58,62,63 - ]; - - var std_dc_luminance_nrcodes = [0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0]; - var std_dc_luminance_values = [0,1,2,3,4,5,6,7,8,9,10,11]; - var std_ac_luminance_nrcodes = [0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,0x7d]; - var std_ac_luminance_values = [ - 0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12, - 0x21,0x31,0x41,0x06,0x13,0x51,0x61,0x07, - 0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08, - 0x23,0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0, - 0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16, - 0x17,0x18,0x19,0x1a,0x25,0x26,0x27,0x28, - 0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39, - 0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49, - 0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59, - 0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69, - 0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79, - 0x7a,0x83,0x84,0x85,0x86,0x87,0x88,0x89, - 0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98, - 0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7, - 0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6, - 0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5, - 0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4, - 0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2, - 0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea, - 0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8, - 0xf9,0xfa - ]; - - var std_dc_chrominance_nrcodes = [0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0]; - var std_dc_chrominance_values = [0,1,2,3,4,5,6,7,8,9,10,11]; - var std_ac_chrominance_nrcodes = [0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,0x77]; - var std_ac_chrominance_values = [ - 0x00,0x01,0x02,0x03,0x11,0x04,0x05,0x21, - 0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71, - 0x13,0x22,0x32,0x81,0x08,0x14,0x42,0x91, - 0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0, - 0x15,0x62,0x72,0xd1,0x0a,0x16,0x24,0x34, - 0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26, - 0x27,0x28,0x29,0x2a,0x35,0x36,0x37,0x38, - 0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48, - 0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58, - 0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68, - 0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78, - 0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87, - 0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96, - 0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5, - 0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4, - 0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3, - 0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2, - 0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda, - 0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9, - 0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8, - 0xf9,0xfa - ]; - - function initQuantTables(sf){ - var YQT = [ - 16, 11, 10, 16, 24, 40, 51, 61, - 12, 12, 14, 19, 26, 58, 60, 55, - 14, 13, 16, 24, 40, 57, 69, 56, - 14, 17, 22, 29, 51, 87, 80, 62, - 18, 22, 37, 56, 68,109,103, 77, - 24, 35, 55, 64, 81,104,113, 92, - 49, 64, 78, 87,103,121,120,101, - 72, 92, 95, 98,112,100,103, 99 - ]; - - for (var i = 0; i < 64; i++) { - var t = ffloor((YQT[i]*sf+50)/100); - if (t < 1) { - t = 1; - } else if (t > 255) { - t = 255; - } - YTable[ZigZag[i]] = t; - } - var UVQT = [ - 17, 18, 24, 47, 99, 99, 99, 99, - 18, 21, 26, 66, 99, 99, 99, 99, - 24, 26, 56, 99, 99, 99, 99, 99, - 47, 66, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99 - ]; - for (var j = 0; j < 64; j++) { - var u = ffloor((UVQT[j]*sf+50)/100); - if (u < 1) { - u = 1; - } else if (u > 255) { - u = 255; - } - UVTable[ZigZag[j]] = u; - } - var aasf = [ - 1.0, 1.387039845, 1.306562965, 1.175875602, - 1.0, 0.785694958, 0.541196100, 0.275899379 - ]; - var k = 0; - for (var row = 0; row < 8; row++) - { - for (var col = 0; col < 8; col++) - { - fdtbl_Y[k] = (1.0 / (YTable [ZigZag[k]] * aasf[row] * aasf[col] * 8.0)); - fdtbl_UV[k] = (1.0 / (UVTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0)); - k++; - } - } - } - - function computeHuffmanTbl(nrcodes, std_table){ - var codevalue = 0; - var pos_in_table = 0; - var HT = new Array(); - for (var k = 1; k <= 16; k++) { - for (var j = 1; j <= nrcodes[k]; j++) { - HT[std_table[pos_in_table]] = []; - HT[std_table[pos_in_table]][0] = codevalue; - HT[std_table[pos_in_table]][1] = k; - pos_in_table++; - codevalue++; - } - codevalue*=2; - } - return HT; - } - - function initHuffmanTbl() - { - YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes,std_dc_luminance_values); - UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes,std_dc_chrominance_values); - YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes,std_ac_luminance_values); - UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes,std_ac_chrominance_values); - } - - function initCategoryNumber() - { - var nrlower = 1; - var nrupper = 2; - for (var cat = 1; cat <= 15; cat++) { - //Positive numbers - for (var nr = nrlower; nr>0] = 38470 * i; - RGB_YUV_TABLE[(i+ 512)>>0] = 7471 * i + 0x8000; - RGB_YUV_TABLE[(i+ 768)>>0] = -11059 * i; - RGB_YUV_TABLE[(i+1024)>>0] = -21709 * i; - RGB_YUV_TABLE[(i+1280)>>0] = 32768 * i + 0x807FFF; - RGB_YUV_TABLE[(i+1536)>>0] = -27439 * i; - RGB_YUV_TABLE[(i+1792)>>0] = - 5329 * i; - } - } - - // IO functions - function writeBits(bs) - { - var value = bs[0]; - var posval = bs[1]-1; - while ( posval >= 0 ) { - if (value & (1 << posval) ) { - bytenew |= (1 << bytepos); - } - posval--; - bytepos--; - if (bytepos < 0) { - if (bytenew == 0xFF) { - writeByte(0xFF); - writeByte(0); - } - else { - writeByte(bytenew); - } - bytepos=7; - bytenew=0; - } - } - } - - function writeByte(value) - { - byteout.push(clt[value]); // write char directly instead of converting later - } - - function writeWord(value) - { - writeByte((value>>8)&0xFF); - writeByte((value )&0xFF); - } - - // DCT & quantization core - function fDCTQuant(data, fdtbl) - { - var d0, d1, d2, d3, d4, d5, d6, d7; - /* Pass 1: process rows. */ - var dataOff=0; - var i; - var I8 = 8; - var I64 = 64; - for (i=0; i 0.0) ? ((fDCTQuant + 0.5)|0) : ((fDCTQuant - 0.5)|0); - //outputfDCTQuant[i] = fround(fDCTQuant); - - } - return outputfDCTQuant; - } - - function writeAPP0() - { - writeWord(0xFFE0); // marker - writeWord(16); // length - writeByte(0x4A); // J - writeByte(0x46); // F - writeByte(0x49); // I - writeByte(0x46); // F - writeByte(0); // = "JFIF",'\0' - writeByte(1); // versionhi - writeByte(1); // versionlo - writeByte(0); // xyunits - writeWord(1); // xdensity - writeWord(1); // ydensity - writeByte(0); // thumbnwidth - writeByte(0); // thumbnheight - } - - function writeSOF0(width, height) - { - writeWord(0xFFC0); // marker - writeWord(17); // length, truecolor YUV JPG - writeByte(8); // precision - writeWord(height); - writeWord(width); - writeByte(3); // nrofcomponents - writeByte(1); // IdY - writeByte(0x11); // HVY - writeByte(0); // QTY - writeByte(2); // IdU - writeByte(0x11); // HVU - writeByte(1); // QTU - writeByte(3); // IdV - writeByte(0x11); // HVV - writeByte(1); // QTV - } - - function writeDQT() - { - writeWord(0xFFDB); // marker - writeWord(132); // length - writeByte(0); - for (var i=0; i<64; i++) { - writeByte(YTable[i]); - } - writeByte(1); - for (var j=0; j<64; j++) { - writeByte(UVTable[j]); - } - } - - function writeDHT() - { - writeWord(0xFFC4); // marker - writeWord(0x01A2); // length - - writeByte(0); // HTYDCinfo - for (var i=0; i<16; i++) { - writeByte(std_dc_luminance_nrcodes[i+1]); - } - for (var j=0; j<=11; j++) { - writeByte(std_dc_luminance_values[j]); - } - - writeByte(0x10); // HTYACinfo - for (var k=0; k<16; k++) { - writeByte(std_ac_luminance_nrcodes[k+1]); - } - for (var l=0; l<=161; l++) { - writeByte(std_ac_luminance_values[l]); - } - - writeByte(1); // HTUDCinfo - for (var m=0; m<16; m++) { - writeByte(std_dc_chrominance_nrcodes[m+1]); - } - for (var n=0; n<=11; n++) { - writeByte(std_dc_chrominance_values[n]); - } - - writeByte(0x11); // HTUACinfo - for (var o=0; o<16; o++) { - writeByte(std_ac_chrominance_nrcodes[o+1]); - } - for (var p=0; p<=161; p++) { - writeByte(std_ac_chrominance_values[p]); - } - } - - function writeSOS() - { - writeWord(0xFFDA); // marker - writeWord(12); // length - writeByte(3); // nrofcomponents - writeByte(1); // IdY - writeByte(0); // HTY - writeByte(2); // IdU - writeByte(0x11); // HTU - writeByte(3); // IdV - writeByte(0x11); // HTV - writeByte(0); // Ss - writeByte(0x3f); // Se - writeByte(0); // Bf - } - - function processDU(CDU, fdtbl, DC, HTDC, HTAC){ - var EOB = HTAC[0x00]; - var M16zeroes = HTAC[0xF0]; - var pos; - var I16 = 16; - var I63 = 63; - var I64 = 64; - var DU_DCT = fDCTQuant(CDU, fdtbl); - //ZigZag reorder - for (var j=0;j0)&&(DU[end0pos]==0); end0pos--) {}; - //end0pos = first element in reverse order !=0 - if ( end0pos == 0) { - writeBits(EOB); - return DC; - } - var i = 1; - var lng; - while ( i <= end0pos ) { - var startpos = i; - for (; (DU[i]==0) && (i<=end0pos); ++i) {} - var nrzeroes = i-startpos; - if ( nrzeroes >= I16 ) { - lng = nrzeroes>>4; - for (var nrmarker=1; nrmarker <= lng; ++nrmarker) - writeBits(M16zeroes); - nrzeroes = nrzeroes&0xF; - } - pos = 32767+DU[i]; - writeBits(HTAC[(nrzeroes<<4)+category[pos]]); - writeBits(bitcode[pos]); - i++; - } - if ( end0pos != I63 ) { - writeBits(EOB); - } - return DC; - } - - function initCharLookupTable(){ - var sfcc = String.fromCharCode; - for(var i=0; i < 256; i++){ ///// ACHTUNG // 255 - clt[i] = sfcc(i); - } - } - - this.encode = function(image,quality) // image data object - { - // var time_start = new Date().getTime(); - - if(quality) setQuality(quality); - - // Initialize bit writer - byteout = new Array(); - bytenew=0; - bytepos=7; - - // Add JPEG headers - writeWord(0xFFD8); // SOI - writeAPP0(); - writeDQT(); - writeSOF0(image.width,image.height); - writeDHT(); - writeSOS(); - - - // Encode 8x8 macroblocks - var DCY=0; - var DCU=0; - var DCV=0; - - bytenew=0; - bytepos=7; - - - this.encode.displayName = "_encode_"; - - var imageData = image.data; - var width = image.width; - var height = image.height; - - var quadWidth = width*4; - var tripleWidth = width*3; - - var x, y = 0; - var r, g, b; - var start,p, col,row,pos; - while(y < height){ - x = 0; - while(x < quadWidth){ - start = quadWidth * y + x; - p = start; - col = -1; - row = 0; - - for(pos=0; pos < 64; pos++){ - row = pos >> 3;// /8 - col = ( pos & 7 ) * 4; // %8 - p = start + ( row * quadWidth ) + col; - - if(y+row >= height){ // padding bottom - p-= (quadWidth*(y+1+row-height)); - } - - if(x+col >= quadWidth){ // padding right - p-= ((x+col) - quadWidth +4) - } - - r = imageData[ p++ ]; - g = imageData[ p++ ]; - b = imageData[ p++ ]; - - - /* // calculate YUV values dynamically - YDU[pos]=((( 0.29900)*r+( 0.58700)*g+( 0.11400)*b))-128; //-0x80 - UDU[pos]=(((-0.16874)*r+(-0.33126)*g+( 0.50000)*b)); - VDU[pos]=((( 0.50000)*r+(-0.41869)*g+(-0.08131)*b)); - */ - - // use lookup table (slightly faster) - YDU[pos] = ((RGB_YUV_TABLE[r] + RGB_YUV_TABLE[(g + 256)>>0] + RGB_YUV_TABLE[(b + 512)>>0]) >> 16)-128; - UDU[pos] = ((RGB_YUV_TABLE[(r + 768)>>0] + RGB_YUV_TABLE[(g + 1024)>>0] + RGB_YUV_TABLE[(b + 1280)>>0]) >> 16)-128; - VDU[pos] = ((RGB_YUV_TABLE[(r + 1280)>>0] + RGB_YUV_TABLE[(g + 1536)>>0] + RGB_YUV_TABLE[(b + 1792)>>0]) >> 16)-128; - - } - - DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT); - DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT); - DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT); - x+=32; - } - y+=8; - } - - - //////////////////////////////////////////////////////////////// - - // Do the bit alignment of the EOI marker - if ( bytepos >= 0 ) { - var fillbits = []; - fillbits[1] = bytepos+1; - fillbits[0] = (1<<(bytepos+1))-1; - writeBits(fillbits); - } - - writeWord(0xFFD9); //EOI - - var jpegDataUri = 'data:image/jpeg;base64,' + btoa(byteout.join('')); - - byteout = []; - - // benchmarking - // var duration = new Date().getTime() - time_start; - // console.log('Encoding time: '+ currentQuality + 'ms'); - // - - return jpegDataUri - } - - function setQuality(quality){ - if (quality <= 0) { - quality = 1; - } - if (quality > 100) { - quality = 100; - } - - if(currentQuality == quality) return // don't recalc if unchanged - - var sf = 0; - if (quality < 50) { - sf = Math.floor(5000 / quality); - } else { - sf = Math.floor(200 - quality*2); - } - - initQuantTables(sf); - currentQuality = quality; - // console.log('Quality set to: '+quality +'%'); - } - - function init(){ - // var time_start = new Date().getTime(); - if(!quality) quality = 50; - // Create tables - initCharLookupTable() - initHuffmanTbl(); - initCategoryNumber(); - initRGBYUVTable(); - - setQuality(quality); - // var duration = new Date().getTime() - time_start; - // console.log('Initialization '+ duration + 'ms'); - } - - init(); - - }; - - JPEGEncoder.encode = function( data, quality ) { - var encoder = new JPEGEncoder( quality ); - - return encoder.encode( data ); - } - - return JPEGEncoder; - }); - /** - * @fileOverview Fix android canvas.toDataUrl bug. - */ - define('runtime/html5/androidpatch',[ - 'runtime/html5/util', - 'runtime/html5/jpegencoder', - 'base' - ], function( Util, encoder, Base ) { - var origin = Util.canvasToDataUrl, - supportJpeg; - - Util.canvasToDataUrl = function( canvas, type, quality ) { - var ctx, w, h, fragement, parts; - - // 非android手机直接跳过。 - if ( !Base.os.android ) { - return origin.apply( null, arguments ); - } - - // 检测是否canvas支持jpeg导出,根据数据格式来判断。 - // JPEG 前两位分别是:255, 216 - if ( type === 'image/jpeg' && typeof supportJpeg === 'undefined' ) { - fragement = origin.apply( null, arguments ); - - parts = fragement.split(','); - - if ( ~parts[ 0 ].indexOf('base64') ) { - fragement = atob( parts[ 1 ] ); - } else { - fragement = decodeURIComponent( parts[ 1 ] ); - } - - fragement = fragement.substring( 0, 2 ); - - supportJpeg = fragement.charCodeAt( 0 ) === 255 && - fragement.charCodeAt( 1 ) === 216; - } - - // 只有在android环境下才修复 - if ( type === 'image/jpeg' && !supportJpeg ) { - w = canvas.width; - h = canvas.height; - ctx = canvas.getContext('2d'); - - return encoder.encode( ctx.getImageData( 0, 0, w, h ), quality ); - } - - return origin.apply( null, arguments ); - }; - }); - /** - * @fileOverview Image - */ - define('runtime/html5/image',[ - 'base', - 'runtime/html5/runtime', - 'runtime/html5/util' - ], function( Base, Html5Runtime, Util ) { - - var BLANK = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D'; - - return Html5Runtime.register( 'Image', { - - // flag: 标记是否被修改过。 - modified: false, - - init: function() { - var me = this, - img = new Image(); - - img.onload = function() { - - me._info = { - type: me.type, - width: this.width, - height: this.height - }; - - // 读取meta信息。 - if ( !me._metas && 'image/jpeg' === me.type ) { - Util.parseMeta( me._blob, function( error, ret ) { - me._metas = ret; - me.owner.trigger('load'); - }); - } else { - me.owner.trigger('load'); - } - }; - - img.onerror = function() { - me.owner.trigger('error'); - }; - - me._img = img; - }, - - loadFromBlob: function( blob ) { - var me = this, - img = me._img; - - me._blob = blob; - me.type = blob.type; - img.src = Util.createObjectURL( blob.getSource() ); - me.owner.once( 'load', function() { - Util.revokeObjectURL( img.src ); - }); - }, - - resize: function( width, height ) { - var canvas = this._canvas || - (this._canvas = document.createElement('canvas')); - - this._resize( this._img, canvas, width, height ); - this._blob = null; // 没用了,可以删掉了。 - this.modified = true; - this.owner.trigger( 'complete', 'resize' ); - }, - - crop: function( x, y, w, h, s ) { - var cvs = this._canvas || - (this._canvas = document.createElement('canvas')), - opts = this.options, - img = this._img, - iw = img.naturalWidth, - ih = img.naturalHeight, - orientation = this.getOrientation(); - - s = s || 1; - - // todo 解决 orientation 的问题。 - // values that require 90 degree rotation - // if ( ~[ 5, 6, 7, 8 ].indexOf( orientation ) ) { - - // switch ( orientation ) { - // case 6: - // tmp = x; - // x = y; - // y = iw * s - tmp - w; - // console.log(ih * s, tmp, w) - // break; - // } - - // (w ^= h, h ^= w, w ^= h); - // } - - cvs.width = w; - cvs.height = h; - - opts.preserveHeaders || this._rotate2Orientaion( cvs, orientation ); - this._renderImageToCanvas( cvs, img, -x, -y, iw * s, ih * s ); - - this._blob = null; // 没用了,可以删掉了。 - this.modified = true; - this.owner.trigger( 'complete', 'crop' ); - }, - - getAsBlob: function( type ) { - var blob = this._blob, - opts = this.options, - canvas; - - type = type || this.type; - - // blob需要重新生成。 - if ( this.modified || this.type !== type ) { - canvas = this._canvas; - - if ( type === 'image/jpeg' ) { - - blob = Util.canvasToDataUrl( canvas, type, opts.quality ); - - if ( opts.preserveHeaders && this._metas && - this._metas.imageHead ) { - - blob = Util.dataURL2ArrayBuffer( blob ); - blob = Util.updateImageHead( blob, - this._metas.imageHead ); - blob = Util.arrayBufferToBlob( blob, type ); - return blob; - } - } else { - blob = Util.canvasToDataUrl( canvas, type ); - } - - blob = Util.dataURL2Blob( blob ); - } - - return blob; - }, - - getAsDataUrl: function( type ) { - var opts = this.options; - - type = type || this.type; - - if ( type === 'image/jpeg' ) { - return Util.canvasToDataUrl( this._canvas, type, opts.quality ); - } else { - return this._canvas.toDataURL( type ); - } - }, - - getOrientation: function() { - return this._metas && this._metas.exif && - this._metas.exif.get('Orientation') || 1; - }, - - info: function( val ) { - - // setter - if ( val ) { - this._info = val; - return this; - } - - // getter - return this._info; - }, - - meta: function( val ) { - - // setter - if ( val ) { - this._meta = val; - return this; - } - - // getter - return this._meta; - }, - - destroy: function() { - var canvas = this._canvas; - this._img.onload = null; - - if ( canvas ) { - canvas.getContext('2d') - .clearRect( 0, 0, canvas.width, canvas.height ); - canvas.width = canvas.height = 0; - this._canvas = null; - } - - // 释放内存。非常重要,否则释放不了image的内存。 - this._img.src = BLANK; - this._img = this._blob = null; - }, - - _resize: function( img, cvs, width, height ) { - var opts = this.options, - naturalWidth = img.width, - naturalHeight = img.height, - orientation = this.getOrientation(), - scale, w, h, x, y; - - // values that require 90 degree rotation - if ( ~[ 5, 6, 7, 8 ].indexOf( orientation ) ) { - - // 交换width, height的值。 - width ^= height; - height ^= width; - width ^= height; - } - - scale = Math[ opts.crop ? 'max' : 'min' ]( width / naturalWidth, - height / naturalHeight ); - - // 不允许放大。 - opts.allowMagnify || (scale = Math.min( 1, scale )); - - w = naturalWidth * scale; - h = naturalHeight * scale; - - if ( opts.crop ) { - cvs.width = width; - cvs.height = height; - } else { - cvs.width = w; - cvs.height = h; - } - - x = (cvs.width - w) / 2; - y = (cvs.height - h) / 2; - - opts.preserveHeaders || this._rotate2Orientaion( cvs, orientation ); - - this._renderImageToCanvas( cvs, img, x, y, w, h ); - }, - - _rotate2Orientaion: function( canvas, orientation ) { - var width = canvas.width, - height = canvas.height, - ctx = canvas.getContext('2d'); - - switch ( orientation ) { - case 5: - case 6: - case 7: - case 8: - canvas.width = height; - canvas.height = width; - break; - } - - switch ( orientation ) { - case 2: // horizontal flip - ctx.translate( width, 0 ); - ctx.scale( -1, 1 ); - break; - - case 3: // 180 rotate left - ctx.translate( width, height ); - ctx.rotate( Math.PI ); - break; - - case 4: // vertical flip - ctx.translate( 0, height ); - ctx.scale( 1, -1 ); - break; - - case 5: // vertical flip + 90 rotate right - ctx.rotate( 0.5 * Math.PI ); - ctx.scale( 1, -1 ); - break; - - case 6: // 90 rotate right - ctx.rotate( 0.5 * Math.PI ); - ctx.translate( 0, -height ); - break; - - case 7: // horizontal flip + 90 rotate right - ctx.rotate( 0.5 * Math.PI ); - ctx.translate( width, -height ); - ctx.scale( -1, 1 ); - break; - - case 8: // 90 rotate left - ctx.rotate( -0.5 * Math.PI ); - ctx.translate( -width, 0 ); - break; - } - }, - - // https://github.com/stomita/ios-imagefile-megapixel/ - // blob/master/src/megapix-image.js - _renderImageToCanvas: (function() { - - // 如果不是ios, 不需要这么复杂! - if ( !Base.os.ios ) { - return function( canvas ) { - var args = Base.slice( arguments, 1 ), - ctx = canvas.getContext('2d'); - - ctx.drawImage.apply( ctx, args ); - }; - } - - /** - * Detecting vertical squash in loaded image. - * Fixes a bug which squash image vertically while drawing into - * canvas for some images. - */ - function detectVerticalSquash( img, iw, ih ) { - var canvas = document.createElement('canvas'), - ctx = canvas.getContext('2d'), - sy = 0, - ey = ih, - py = ih, - data, alpha, ratio; - - - canvas.width = 1; - canvas.height = ih; - ctx.drawImage( img, 0, 0 ); - data = ctx.getImageData( 0, 0, 1, ih ).data; - - // search image edge pixel position in case - // it is squashed vertically. - while ( py > sy ) { - alpha = data[ (py - 1) * 4 + 3 ]; - - if ( alpha === 0 ) { - ey = py; - } else { - sy = py; - } - - py = (ey + sy) >> 1; - } - - ratio = (py / ih); - return (ratio === 0) ? 1 : ratio; - } - - // fix ie7 bug - // http://stackoverflow.com/questions/11929099/ - // html5-canvas-drawimage-ratio-bug-ios - if ( Base.os.ios >= 7 ) { - return function( canvas, img, x, y, w, h ) { - var iw = img.naturalWidth, - ih = img.naturalHeight, - vertSquashRatio = detectVerticalSquash( img, iw, ih ); - - return canvas.getContext('2d').drawImage( img, 0, 0, - iw * vertSquashRatio, ih * vertSquashRatio, - x, y, w, h ); - }; - } - - /** - * Detect subsampling in loaded image. - * In iOS, larger images than 2M pixels may be - * subsampled in rendering. - */ - function detectSubsampling( img ) { - var iw = img.naturalWidth, - ih = img.naturalHeight, - canvas, ctx; - - // subsampling may happen overmegapixel image - if ( iw * ih > 1024 * 1024 ) { - canvas = document.createElement('canvas'); - canvas.width = canvas.height = 1; - ctx = canvas.getContext('2d'); - ctx.drawImage( img, -iw + 1, 0 ); - - // subsampled image becomes half smaller in rendering size. - // check alpha channel value to confirm image is covering - // edge pixel or not. if alpha value is 0 - // image is not covering, hence subsampled. - return ctx.getImageData( 0, 0, 1, 1 ).data[ 3 ] === 0; - } else { - return false; - } - } - - - return function( canvas, img, x, y, width, height ) { - var iw = img.naturalWidth, - ih = img.naturalHeight, - ctx = canvas.getContext('2d'), - subsampled = detectSubsampling( img ), - doSquash = this.type === 'image/jpeg', - d = 1024, - sy = 0, - dy = 0, - tmpCanvas, tmpCtx, vertSquashRatio, dw, dh, sx, dx; - - if ( subsampled ) { - iw /= 2; - ih /= 2; - } - - ctx.save(); - tmpCanvas = document.createElement('canvas'); - tmpCanvas.width = tmpCanvas.height = d; - - tmpCtx = tmpCanvas.getContext('2d'); - vertSquashRatio = doSquash ? - detectVerticalSquash( img, iw, ih ) : 1; - - dw = Math.ceil( d * width / iw ); - dh = Math.ceil( d * height / ih / vertSquashRatio ); - - while ( sy < ih ) { - sx = 0; - dx = 0; - while ( sx < iw ) { - tmpCtx.clearRect( 0, 0, d, d ); - tmpCtx.drawImage( img, -sx, -sy ); - ctx.drawImage( tmpCanvas, 0, 0, d, d, - x + dx, y + dy, dw, dh ); - sx += d; - dx += dw; - } - sy += d; - dy += dh; - } - ctx.restore(); - tmpCanvas = tmpCtx = null; - }; - })() - }); - }); - /** - * @fileOverview Transport - * @todo 支持chunked传输,优势: - * 可以将大文件分成小块,挨个传输,可以提高大文件成功率,当失败的时候,也只需要重传那小部分, - * 而不需要重头再传一次。另外断点续传也需要用chunked方式。 - */ - define('runtime/html5/transport',[ - 'base', - 'runtime/html5/runtime' - ], function( Base, Html5Runtime ) { - - var noop = Base.noop, - $ = Base.$; - - return Html5Runtime.register( 'Transport', { - init: function() { - this._status = 0; - this._response = null; - }, - - send: function() { - var owner = this.owner, - opts = this.options, - xhr = this._initAjax(), - blob = owner._blob, - server = opts.server, - formData, binary, fr; - - if ( opts.sendAsBinary ) { - server += (/\?/.test( server ) ? '&' : '?') + - $.param( owner._formData ); - - binary = blob.getSource(); - } else { - formData = new FormData(); - $.each( owner._formData, function( k, v ) { - formData.append( k, v ); - }); - - formData.append( opts.fileVal, blob.getSource(), - opts.filename || owner._formData.name || '' ); - } - - if ( opts.withCredentials && 'withCredentials' in xhr ) { - xhr.open( opts.method, server, true ); - xhr.withCredentials = true; - } else { - xhr.open( opts.method, server ); - } - - this._setRequestHeader( xhr, opts.headers ); - - if ( binary ) { - // 强制设置成 content-type 为文件流。 - xhr.overrideMimeType && - xhr.overrideMimeType('application/octet-stream'); - - // android直接发送blob会导致服务端接收到的是空文件。 - // bug详情。 - // https://code.google.com/p/android/issues/detail?id=39882 - // 所以先用fileReader读取出来再通过arraybuffer的方式发送。 - if ( Base.os.android ) { - fr = new FileReader(); - - fr.onload = function() { - xhr.send( this.result ); - fr = fr.onload = null; - }; - - fr.readAsArrayBuffer( binary ); - } else { - xhr.send( binary ); - } - } else { - xhr.send( formData ); - } - }, - - getResponse: function() { - return this._response; - }, - - getResponseAsJson: function() { - return this._parseJson( this._response ); - }, - - getStatus: function() { - return this._status; - }, - - abort: function() { - var xhr = this._xhr; - - if ( xhr ) { - xhr.upload.onprogress = noop; - xhr.onreadystatechange = noop; - xhr.abort(); - - this._xhr = xhr = null; - } - }, - - destroy: function() { - this.abort(); - }, - - _initAjax: function() { - var me = this, - xhr = new XMLHttpRequest(), - opts = this.options; - - if ( opts.withCredentials && !('withCredentials' in xhr) && - typeof XDomainRequest !== 'undefined' ) { - xhr = new XDomainRequest(); - } - - xhr.upload.onprogress = function( e ) { - var percentage = 0; - - if ( e.lengthComputable ) { - percentage = e.loaded / e.total; - } - - return me.trigger( 'progress', percentage ); - }; - - xhr.onreadystatechange = function() { - - if ( xhr.readyState !== 4 ) { - return; - } - - xhr.upload.onprogress = noop; - xhr.onreadystatechange = noop; - me._xhr = null; - me._status = xhr.status; - - if ( xhr.status >= 200 && xhr.status < 300 ) { - me._response = xhr.responseText; - return me.trigger('load'); - } else if ( xhr.status >= 500 && xhr.status < 600 ) { - me._response = xhr.responseText; - return me.trigger( 'error', 'server' ); - } - - - return me.trigger( 'error', me._status ? 'http' : 'abort' ); - }; - - me._xhr = xhr; - return xhr; - }, - - _setRequestHeader: function( xhr, headers ) { - $.each( headers, function( key, val ) { - xhr.setRequestHeader( key, val ); - }); - }, - - _parseJson: function( str ) { - var json; - - try { - json = JSON.parse( str ); - } catch ( ex ) { - json = {}; - } - - return json; - } - }); - }); - /** - * @fileOverview Transport flash实现 - */ - define('runtime/html5/md5',[ - 'runtime/html5/runtime' - ], function( FlashRuntime ) { - - /* - * Fastest md5 implementation around (JKM md5) - * Credits: Joseph Myers - * - * @see http://www.myersdaily.org/joseph/javascript/md5-text.html - * @see http://jsperf.com/md5-shootout/7 - */ - - /* this function is much faster, - so if possible we use it. Some IEs - are the only ones I know of that - need the idiotic second function, - generated by an if clause. */ - var add32 = function (a, b) { - return (a + b) & 0xFFFFFFFF; - }, - - cmn = function (q, a, b, x, s, t) { - a = add32(add32(a, q), add32(x, t)); - return add32((a << s) | (a >>> (32 - s)), b); - }, - - ff = function (a, b, c, d, x, s, t) { - return cmn((b & c) | ((~b) & d), a, b, x, s, t); - }, - - gg = function (a, b, c, d, x, s, t) { - return cmn((b & d) | (c & (~d)), a, b, x, s, t); - }, - - hh = function (a, b, c, d, x, s, t) { - return cmn(b ^ c ^ d, a, b, x, s, t); - }, - - ii = function (a, b, c, d, x, s, t) { - return cmn(c ^ (b | (~d)), a, b, x, s, t); - }, - - md5cycle = function (x, k) { - var a = x[0], - b = x[1], - c = x[2], - d = x[3]; - - a = ff(a, b, c, d, k[0], 7, -680876936); - d = ff(d, a, b, c, k[1], 12, -389564586); - c = ff(c, d, a, b, k[2], 17, 606105819); - b = ff(b, c, d, a, k[3], 22, -1044525330); - a = ff(a, b, c, d, k[4], 7, -176418897); - d = ff(d, a, b, c, k[5], 12, 1200080426); - c = ff(c, d, a, b, k[6], 17, -1473231341); - b = ff(b, c, d, a, k[7], 22, -45705983); - a = ff(a, b, c, d, k[8], 7, 1770035416); - d = ff(d, a, b, c, k[9], 12, -1958414417); - c = ff(c, d, a, b, k[10], 17, -42063); - b = ff(b, c, d, a, k[11], 22, -1990404162); - a = ff(a, b, c, d, k[12], 7, 1804603682); - d = ff(d, a, b, c, k[13], 12, -40341101); - c = ff(c, d, a, b, k[14], 17, -1502002290); - b = ff(b, c, d, a, k[15], 22, 1236535329); - - a = gg(a, b, c, d, k[1], 5, -165796510); - d = gg(d, a, b, c, k[6], 9, -1069501632); - c = gg(c, d, a, b, k[11], 14, 643717713); - b = gg(b, c, d, a, k[0], 20, -373897302); - a = gg(a, b, c, d, k[5], 5, -701558691); - d = gg(d, a, b, c, k[10], 9, 38016083); - c = gg(c, d, a, b, k[15], 14, -660478335); - b = gg(b, c, d, a, k[4], 20, -405537848); - a = gg(a, b, c, d, k[9], 5, 568446438); - d = gg(d, a, b, c, k[14], 9, -1019803690); - c = gg(c, d, a, b, k[3], 14, -187363961); - b = gg(b, c, d, a, k[8], 20, 1163531501); - a = gg(a, b, c, d, k[13], 5, -1444681467); - d = gg(d, a, b, c, k[2], 9, -51403784); - c = gg(c, d, a, b, k[7], 14, 1735328473); - b = gg(b, c, d, a, k[12], 20, -1926607734); - - a = hh(a, b, c, d, k[5], 4, -378558); - d = hh(d, a, b, c, k[8], 11, -2022574463); - c = hh(c, d, a, b, k[11], 16, 1839030562); - b = hh(b, c, d, a, k[14], 23, -35309556); - a = hh(a, b, c, d, k[1], 4, -1530992060); - d = hh(d, a, b, c, k[4], 11, 1272893353); - c = hh(c, d, a, b, k[7], 16, -155497632); - b = hh(b, c, d, a, k[10], 23, -1094730640); - a = hh(a, b, c, d, k[13], 4, 681279174); - d = hh(d, a, b, c, k[0], 11, -358537222); - c = hh(c, d, a, b, k[3], 16, -722521979); - b = hh(b, c, d, a, k[6], 23, 76029189); - a = hh(a, b, c, d, k[9], 4, -640364487); - d = hh(d, a, b, c, k[12], 11, -421815835); - c = hh(c, d, a, b, k[15], 16, 530742520); - b = hh(b, c, d, a, k[2], 23, -995338651); - - a = ii(a, b, c, d, k[0], 6, -198630844); - d = ii(d, a, b, c, k[7], 10, 1126891415); - c = ii(c, d, a, b, k[14], 15, -1416354905); - b = ii(b, c, d, a, k[5], 21, -57434055); - a = ii(a, b, c, d, k[12], 6, 1700485571); - d = ii(d, a, b, c, k[3], 10, -1894986606); - c = ii(c, d, a, b, k[10], 15, -1051523); - b = ii(b, c, d, a, k[1], 21, -2054922799); - a = ii(a, b, c, d, k[8], 6, 1873313359); - d = ii(d, a, b, c, k[15], 10, -30611744); - c = ii(c, d, a, b, k[6], 15, -1560198380); - b = ii(b, c, d, a, k[13], 21, 1309151649); - a = ii(a, b, c, d, k[4], 6, -145523070); - d = ii(d, a, b, c, k[11], 10, -1120210379); - c = ii(c, d, a, b, k[2], 15, 718787259); - b = ii(b, c, d, a, k[9], 21, -343485551); - - x[0] = add32(a, x[0]); - x[1] = add32(b, x[1]); - x[2] = add32(c, x[2]); - x[3] = add32(d, x[3]); - }, - - /* there needs to be support for Unicode here, - * unless we pretend that we can redefine the MD-5 - * algorithm for multi-byte characters (perhaps - * by adding every four 16-bit characters and - * shortening the sum to 32 bits). Otherwise - * I suggest performing MD-5 as if every character - * was two bytes--e.g., 0040 0025 = @%--but then - * how will an ordinary MD-5 sum be matched? - * There is no way to standardize text to something - * like UTF-8 before transformation; speed cost is - * utterly prohibitive. The JavaScript standard - * itself needs to look at this: it should start - * providing access to strings as preformed UTF-8 - * 8-bit unsigned value arrays. - */ - md5blk = function (s) { - var md5blks = [], - i; /* Andy King said do it this way. */ - - for (i = 0; i < 64; i += 4) { - md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24); - } - return md5blks; - }, - - md5blk_array = function (a) { - var md5blks = [], - i; /* Andy King said do it this way. */ - - for (i = 0; i < 64; i += 4) { - md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24); - } - return md5blks; - }, - - md51 = function (s) { - var n = s.length, - state = [1732584193, -271733879, -1732584194, 271733878], - i, - length, - tail, - tmp, - lo, - hi; - - for (i = 64; i <= n; i += 64) { - md5cycle(state, md5blk(s.substring(i - 64, i))); - } - s = s.substring(i - 64); - length = s.length; - tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - for (i = 0; i < length; i += 1) { - tail[i >> 2] |= s.charCodeAt(i) << ((i % 4) << 3); - } - tail[i >> 2] |= 0x80 << ((i % 4) << 3); - if (i > 55) { - md5cycle(state, tail); - for (i = 0; i < 16; i += 1) { - tail[i] = 0; - } - } - - // Beware that the final length might not fit in 32 bits so we take care of that - tmp = n * 8; - tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/); - lo = parseInt(tmp[2], 16); - hi = parseInt(tmp[1], 16) || 0; - - tail[14] = lo; - tail[15] = hi; - - md5cycle(state, tail); - return state; - }, - - md51_array = function (a) { - var n = a.length, - state = [1732584193, -271733879, -1732584194, 271733878], - i, - length, - tail, - tmp, - lo, - hi; - - for (i = 64; i <= n; i += 64) { - md5cycle(state, md5blk_array(a.subarray(i - 64, i))); - } - - // Not sure if it is a bug, however IE10 will always produce a sub array of length 1 - // containing the last element of the parent array if the sub array specified starts - // beyond the length of the parent array - weird. - // https://connect.microsoft.com/IE/feedback/details/771452/typed-array-subarray-issue - a = (i - 64) < n ? a.subarray(i - 64) : new Uint8Array(0); - - length = a.length; - tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - for (i = 0; i < length; i += 1) { - tail[i >> 2] |= a[i] << ((i % 4) << 3); - } - - tail[i >> 2] |= 0x80 << ((i % 4) << 3); - if (i > 55) { - md5cycle(state, tail); - for (i = 0; i < 16; i += 1) { - tail[i] = 0; - } - } - - // Beware that the final length might not fit in 32 bits so we take care of that - tmp = n * 8; - tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/); - lo = parseInt(tmp[2], 16); - hi = parseInt(tmp[1], 16) || 0; - - tail[14] = lo; - tail[15] = hi; - - md5cycle(state, tail); - - return state; - }, - - hex_chr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'], - - rhex = function (n) { - var s = '', - j; - for (j = 0; j < 4; j += 1) { - s += hex_chr[(n >> (j * 8 + 4)) & 0x0F] + hex_chr[(n >> (j * 8)) & 0x0F]; - } - return s; - }, - - hex = function (x) { - var i; - for (i = 0; i < x.length; i += 1) { - x[i] = rhex(x[i]); - } - return x.join(''); - }, - - md5 = function (s) { - return hex(md51(s)); - }, - - - - //////////////////////////////////////////////////////////////////////////// - - /** - * SparkMD5 OOP implementation. - * - * Use this class to perform an incremental md5, otherwise use the - * static methods instead. - */ - SparkMD5 = function () { - // call reset to init the instance - this.reset(); - }; - - - // In some cases the fast add32 function cannot be used.. - if (md5('hello') !== '5d41402abc4b2a76b9719d911017c592') { - add32 = function (x, y) { - var lsw = (x & 0xFFFF) + (y & 0xFFFF), - msw = (x >> 16) + (y >> 16) + (lsw >> 16); - return (msw << 16) | (lsw & 0xFFFF); - }; - } - - - /** - * Appends a string. - * A conversion will be applied if an utf8 string is detected. - * - * @param {String} str The string to be appended - * - * @return {SparkMD5} The instance itself - */ - SparkMD5.prototype.append = function (str) { - // converts the string to utf8 bytes if necessary - if (/[\u0080-\uFFFF]/.test(str)) { - str = unescape(encodeURIComponent(str)); - } - - // then append as binary - this.appendBinary(str); - - return this; - }; - - /** - * Appends a binary string. - * - * @param {String} contents The binary string to be appended - * - * @return {SparkMD5} The instance itself - */ - SparkMD5.prototype.appendBinary = function (contents) { - this._buff += contents; - this._length += contents.length; - - var length = this._buff.length, - i; - - for (i = 64; i <= length; i += 64) { - md5cycle(this._state, md5blk(this._buff.substring(i - 64, i))); - } - - this._buff = this._buff.substr(i - 64); - - return this; - }; - - /** - * Finishes the incremental computation, reseting the internal state and - * returning the result. - * Use the raw parameter to obtain the raw result instead of the hex one. - * - * @param {Boolean} raw True to get the raw result, false to get the hex result - * - * @return {String|Array} The result - */ - SparkMD5.prototype.end = function (raw) { - var buff = this._buff, - length = buff.length, - i, - tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - ret; - - for (i = 0; i < length; i += 1) { - tail[i >> 2] |= buff.charCodeAt(i) << ((i % 4) << 3); - } - - this._finish(tail, length); - ret = !!raw ? this._state : hex(this._state); - - this.reset(); - - return ret; - }; - - /** - * Finish the final calculation based on the tail. - * - * @param {Array} tail The tail (will be modified) - * @param {Number} length The length of the remaining buffer - */ - SparkMD5.prototype._finish = function (tail, length) { - var i = length, - tmp, - lo, - hi; - - tail[i >> 2] |= 0x80 << ((i % 4) << 3); - if (i > 55) { - md5cycle(this._state, tail); - for (i = 0; i < 16; i += 1) { - tail[i] = 0; - } - } - - // Do the final computation based on the tail and length - // Beware that the final length may not fit in 32 bits so we take care of that - tmp = this._length * 8; - tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/); - lo = parseInt(tmp[2], 16); - hi = parseInt(tmp[1], 16) || 0; - - tail[14] = lo; - tail[15] = hi; - md5cycle(this._state, tail); - }; - - /** - * Resets the internal state of the computation. - * - * @return {SparkMD5} The instance itself - */ - SparkMD5.prototype.reset = function () { - this._buff = ""; - this._length = 0; - this._state = [1732584193, -271733879, -1732584194, 271733878]; - - return this; - }; - - /** - * Releases memory used by the incremental buffer and other aditional - * resources. If you plan to use the instance again, use reset instead. - */ - SparkMD5.prototype.destroy = function () { - delete this._state; - delete this._buff; - delete this._length; - }; - - - /** - * Performs the md5 hash on a string. - * A conversion will be applied if utf8 string is detected. - * - * @param {String} str The string - * @param {Boolean} raw True to get the raw result, false to get the hex result - * - * @return {String|Array} The result - */ - SparkMD5.hash = function (str, raw) { - // converts the string to utf8 bytes if necessary - if (/[\u0080-\uFFFF]/.test(str)) { - str = unescape(encodeURIComponent(str)); - } - - var hash = md51(str); - - return !!raw ? hash : hex(hash); - }; - - /** - * Performs the md5 hash on a binary string. - * - * @param {String} content The binary string - * @param {Boolean} raw True to get the raw result, false to get the hex result - * - * @return {String|Array} The result - */ - SparkMD5.hashBinary = function (content, raw) { - var hash = md51(content); - - return !!raw ? hash : hex(hash); - }; - - /** - * SparkMD5 OOP implementation for array buffers. - * - * Use this class to perform an incremental md5 ONLY for array buffers. - */ - SparkMD5.ArrayBuffer = function () { - // call reset to init the instance - this.reset(); - }; - - //////////////////////////////////////////////////////////////////////////// - - /** - * Appends an array buffer. - * - * @param {ArrayBuffer} arr The array to be appended - * - * @return {SparkMD5.ArrayBuffer} The instance itself - */ - SparkMD5.ArrayBuffer.prototype.append = function (arr) { - // TODO: we could avoid the concatenation here but the algorithm would be more complex - // if you find yourself needing extra performance, please make a PR. - var buff = this._concatArrayBuffer(this._buff, arr), - length = buff.length, - i; - - this._length += arr.byteLength; - - for (i = 64; i <= length; i += 64) { - md5cycle(this._state, md5blk_array(buff.subarray(i - 64, i))); - } - - // Avoids IE10 weirdness (documented above) - this._buff = (i - 64) < length ? buff.subarray(i - 64) : new Uint8Array(0); - - return this; - }; - - /** - * Finishes the incremental computation, reseting the internal state and - * returning the result. - * Use the raw parameter to obtain the raw result instead of the hex one. - * - * @param {Boolean} raw True to get the raw result, false to get the hex result - * - * @return {String|Array} The result - */ - SparkMD5.ArrayBuffer.prototype.end = function (raw) { - var buff = this._buff, - length = buff.length, - tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - i, - ret; - - for (i = 0; i < length; i += 1) { - tail[i >> 2] |= buff[i] << ((i % 4) << 3); - } - - this._finish(tail, length); - ret = !!raw ? this._state : hex(this._state); - - this.reset(); - - return ret; - }; - - SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish; - - /** - * Resets the internal state of the computation. - * - * @return {SparkMD5.ArrayBuffer} The instance itself - */ - SparkMD5.ArrayBuffer.prototype.reset = function () { - this._buff = new Uint8Array(0); - this._length = 0; - this._state = [1732584193, -271733879, -1732584194, 271733878]; - - return this; - }; - - /** - * Releases memory used by the incremental buffer and other aditional - * resources. If you plan to use the instance again, use reset instead. - */ - SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy; - - /** - * Concats two array buffers, returning a new one. - * - * @param {ArrayBuffer} first The first array buffer - * @param {ArrayBuffer} second The second array buffer - * - * @return {ArrayBuffer} The new array buffer - */ - SparkMD5.ArrayBuffer.prototype._concatArrayBuffer = function (first, second) { - var firstLength = first.length, - result = new Uint8Array(firstLength + second.byteLength); - - result.set(first); - result.set(new Uint8Array(second), firstLength); - - return result; - }; - - /** - * Performs the md5 hash on an array buffer. - * - * @param {ArrayBuffer} arr The array buffer - * @param {Boolean} raw True to get the raw result, false to get the hex result - * - * @return {String|Array} The result - */ - SparkMD5.ArrayBuffer.hash = function (arr, raw) { - var hash = md51_array(new Uint8Array(arr)); - - return !!raw ? hash : hex(hash); - }; - - return FlashRuntime.register( 'Md5', { - init: function() { - // do nothing. - }, - - loadFromBlob: function( file ) { - var blob = file.getSource(), - chunkSize = 2 * 1024 * 1024, - chunks = Math.ceil( blob.size / chunkSize ), - chunk = 0, - owner = this.owner, - spark = new SparkMD5.ArrayBuffer(), - me = this, - blobSlice = blob.mozSlice || blob.webkitSlice || blob.slice, - loadNext, fr; - - fr = new FileReader(); - - loadNext = function() { - var start, end; - - start = chunk * chunkSize; - end = Math.min( start + chunkSize, blob.size ); - - fr.onload = function( e ) { - spark.append( e.target.result ); - owner.trigger( 'progress', { - total: file.size, - loaded: end - }); - }; - - fr.onloadend = function() { - fr.onloadend = fr.onload = null; - - if ( ++chunk < chunks ) { - setTimeout( loadNext, 1 ); - } else { - setTimeout(function(){ - owner.trigger('load'); - me.result = spark.end(); - loadNext = file = blob = spark = null; - owner.trigger('complete'); - }, 50 ); - } - }; - - fr.readAsArrayBuffer( blobSlice.call( blob, start, end ) ); - }; - - loadNext(); - }, - - getResult: function() { - return this.result; - } - }); - }); - /** - * @fileOverview FlashRuntime - */ - define('runtime/flash/runtime',[ - 'base', - 'runtime/runtime', - 'runtime/compbase' - ], function( Base, Runtime, CompBase ) { - - var $ = Base.$, - type = 'flash', - components = {}; - - - function getFlashVersion() { - var version; - - try { - version = navigator.plugins[ 'Shockwave Flash' ]; - version = version.description; - } catch ( ex ) { - try { - version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash') - .GetVariable('$version'); - } catch ( ex2 ) { - version = '0.0'; - } - } - version = version.match( /\d+/g ); - return parseFloat( version[ 0 ] + '.' + version[ 1 ], 10 ); - } - - function FlashRuntime() { - var pool = {}, - clients = {}, - destroy = this.destroy, - me = this, - jsreciver = Base.guid('webuploader_'); - - Runtime.apply( me, arguments ); - me.type = type; - - - // 这个方法的调用者,实际上是RuntimeClient - me.exec = function( comp, fn/*, args...*/ ) { - var client = this, - uid = client.uid, - args = Base.slice( arguments, 2 ), - instance; - - clients[ uid ] = client; - - if ( components[ comp ] ) { - if ( !pool[ uid ] ) { - pool[ uid ] = new components[ comp ]( client, me ); - } - - instance = pool[ uid ]; - - if ( instance[ fn ] ) { - return instance[ fn ].apply( instance, args ); - } - } - - return me.flashExec.apply( client, arguments ); - }; - - function handler( evt, obj ) { - var type = evt.type || evt, - parts, uid; - - parts = type.split('::'); - uid = parts[ 0 ]; - type = parts[ 1 ]; - - // console.log.apply( console, arguments ); - - if ( type === 'Ready' && uid === me.uid ) { - me.trigger('ready'); - } else if ( clients[ uid ] ) { - clients[ uid ].trigger( type.toLowerCase(), evt, obj ); - } - - // Base.log( evt, obj ); - } - - // flash的接受器。 - window[ jsreciver ] = function() { - var args = arguments; - - // 为了能捕获得到。 - setTimeout(function() { - handler.apply( null, args ); - }, 1 ); - }; - - this.jsreciver = jsreciver; - - this.destroy = function() { - // @todo 删除池子中的所有实例 - return destroy && destroy.apply( this, arguments ); - }; - - this.flashExec = function( comp, fn ) { - var flash = me.getFlash(), - args = Base.slice( arguments, 2 ); - - return flash.exec( this.uid, comp, fn, args ); - }; - - // @todo - } - - Base.inherits( Runtime, { - constructor: FlashRuntime, - - init: function() { - var container = this.getContainer(), - opts = this.options, - html; - - // if not the minimal height, shims are not initialized - // in older browsers (e.g FF3.6, IE6,7,8, Safari 4.0,5.0, etc) - container.css({ - position: 'absolute', - top: '-8px', - left: '-8px', - width: '9px', - height: '9px', - overflow: 'hidden' - }); - - // insert flash object - html = '' + - '' + - '' + - '' + - ''; - - container.html( html ); - }, - - getFlash: function() { - if ( this._flash ) { - return this._flash; - } - - this._flash = $( '#' + this.uid ).get( 0 ); - return this._flash; - } - - }); - - FlashRuntime.register = function( name, component ) { - component = components[ name ] = Base.inherits( CompBase, $.extend({ - - // @todo fix this later - flashExec: function() { - var owner = this.owner, - runtime = this.getRuntime(); - - return runtime.flashExec.apply( owner, arguments ); - } - }, component ) ); - - return component; - }; - - if ( getFlashVersion() >= 11.4 ) { - Runtime.addRuntime( type, FlashRuntime ); - } - - return FlashRuntime; - }); - /** - * @fileOverview FilePicker - */ - define('runtime/flash/filepicker',[ - 'base', - 'runtime/flash/runtime' - ], function( Base, FlashRuntime ) { - var $ = Base.$; - - return FlashRuntime.register( 'FilePicker', { - init: function( opts ) { - var copy = $.extend({}, opts ), - len, i; - - // 修复Flash再没有设置title的情况下无法弹出flash文件选择框的bug. - len = copy.accept && copy.accept.length; - for ( i = 0; i < len; i++ ) { - if ( !copy.accept[ i ].title ) { - copy.accept[ i ].title = 'Files'; - } - } - - delete copy.button; - delete copy.id; - delete copy.container; - - this.flashExec( 'FilePicker', 'init', copy ); - }, - - destroy: function() { - this.flashExec( 'FilePicker', 'destroy' ); - } - }); - }); - /** - * @fileOverview 图片压缩 - */ - define('runtime/flash/image',[ - 'runtime/flash/runtime' - ], function( FlashRuntime ) { - - return FlashRuntime.register( 'Image', { - // init: function( options ) { - // var owner = this.owner; - - // this.flashExec( 'Image', 'init', options ); - // owner.on( 'load', function() { - // debugger; - // }); - // }, - - loadFromBlob: function( blob ) { - var owner = this.owner; - - owner.info() && this.flashExec( 'Image', 'info', owner.info() ); - owner.meta() && this.flashExec( 'Image', 'meta', owner.meta() ); - - this.flashExec( 'Image', 'loadFromBlob', blob.uid ); - } - }); - }); - /** - * @fileOverview Transport flash实现 - */ - define('runtime/flash/transport',[ - 'base', - 'runtime/flash/runtime', - 'runtime/client' - ], function( Base, FlashRuntime, RuntimeClient ) { - var $ = Base.$; - - return FlashRuntime.register( 'Transport', { - init: function() { - this._status = 0; - this._response = null; - this._responseJson = null; - }, - - send: function() { - var owner = this.owner, - opts = this.options, - xhr = this._initAjax(), - blob = owner._blob, - server = opts.server, - binary; - - xhr.connectRuntime( blob.ruid ); - - if ( opts.sendAsBinary ) { - server += (/\?/.test( server ) ? '&' : '?') + - $.param( owner._formData ); - - binary = blob.uid; - } else { - $.each( owner._formData, function( k, v ) { - xhr.exec( 'append', k, v ); - }); - - xhr.exec( 'appendBlob', opts.fileVal, blob.uid, - opts.filename || owner._formData.name || '' ); - } - - this._setRequestHeader( xhr, opts.headers ); - xhr.exec( 'send', { - method: opts.method, - url: server, - forceURLStream: opts.forceURLStream, - mimeType: 'application/octet-stream' - }, binary ); - }, - - getStatus: function() { - return this._status; - }, - - getResponse: function() { - return this._response || ''; - }, - - getResponseAsJson: function() { - return this._responseJson; - }, - - abort: function() { - var xhr = this._xhr; - - if ( xhr ) { - xhr.exec('abort'); - xhr.destroy(); - this._xhr = xhr = null; - } - }, - - destroy: function() { - this.abort(); - }, - - _initAjax: function() { - var me = this, - xhr = new RuntimeClient('XMLHttpRequest'); - - xhr.on( 'uploadprogress progress', function( e ) { - var percent = e.loaded / e.total; - percent = Math.min( 1, Math.max( 0, percent ) ); - return me.trigger( 'progress', percent ); - }); - - xhr.on( 'load', function() { - var status = xhr.exec('getStatus'), - readBody = false, - err = '', - p; - - xhr.off(); - me._xhr = null; - - if ( status >= 200 && status < 300 ) { - readBody = true; - } else if ( status >= 500 && status < 600 ) { - readBody = true; - err = 'server'; - } else { - err = 'http'; - } - - if ( readBody ) { - me._response = xhr.exec('getResponse'); - me._response = decodeURIComponent( me._response ); - - // flash 处理可能存在 bug, 没辙只能靠 js 了 - // try { - // me._responseJson = xhr.exec('getResponseAsJson'); - // } catch ( error ) { - - p = window.JSON && window.JSON.parse || function( s ) { - try { - return new Function('return ' + s).call(); - } catch ( err ) { - return {}; - } - }; - me._responseJson = me._response ? p(me._response) : {}; - - // } - } - - xhr.destroy(); - xhr = null; - - return err ? me.trigger( 'error', err ) : me.trigger('load'); - }); - - xhr.on( 'error', function() { - xhr.off(); - me._xhr = null; - me.trigger( 'error', 'http' ); - }); - - me._xhr = xhr; - return xhr; - }, - - _setRequestHeader: function( xhr, headers ) { - $.each( headers, function( key, val ) { - xhr.exec( 'setRequestHeader', key, val ); - }); - } - }); - }); - /** - * @fileOverview Blob Html实现 - */ - define('runtime/flash/blob',[ - 'runtime/flash/runtime', - 'lib/blob' - ], function( FlashRuntime, Blob ) { - - return FlashRuntime.register( 'Blob', { - slice: function( start, end ) { - var blob = this.flashExec( 'Blob', 'slice', start, end ); - - return new Blob( blob.uid, blob ); - } - }); - }); - /** - * @fileOverview Md5 flash实现 - */ - define('runtime/flash/md5',[ - 'runtime/flash/runtime' - ], function( FlashRuntime ) { - - return FlashRuntime.register( 'Md5', { - init: function() { - // do nothing. - }, - - loadFromBlob: function( blob ) { - return this.flashExec( 'Md5', 'loadFromBlob', blob.uid ); - } - }); - }); - /** - * @fileOverview 完全版本。 - */ - define('preset/all',[ - 'base', - - // widgets - 'widgets/filednd', - 'widgets/filepaste', - 'widgets/filepicker', - 'widgets/image', - 'widgets/queue', - 'widgets/runtime', - 'widgets/upload', - 'widgets/validator', - 'widgets/md5', - - // runtimes - // html5 - 'runtime/html5/blob', - 'runtime/html5/dnd', - 'runtime/html5/filepaste', - 'runtime/html5/filepicker', - 'runtime/html5/imagemeta/exif', - 'runtime/html5/androidpatch', - 'runtime/html5/image', - 'runtime/html5/transport', - 'runtime/html5/md5', - - // flash - 'runtime/flash/filepicker', - 'runtime/flash/image', - 'runtime/flash/transport', - 'runtime/flash/blob', - 'runtime/flash/md5' - ], function( Base ) { - return Base; - }); - /** - * @fileOverview 日志组件,主要用来收集错误信息,可以帮助 webuploader 更好的定位问题和发展。 - * - * 如果您不想要启用此功能,请在打包的时候去掉 log 模块。 - * - * 或者可以在初始化的时候通过 options.disableWidgets 属性禁用。 - * - * 如: - * WebUploader.create({ - * ... - * - * disableWidgets: 'log', - * - * ... - * }) - */ - define('widgets/log',[ - 'base', - 'uploader', - 'widgets/widget' - ], function( Base, Uploader ) { - var $ = Base.$, - logUrl = ' http://static.tieba.baidu.com/tb/pms/img/st.gif??', - product = (location.hostname || location.host || 'protected').toLowerCase(), - - // 只针对 baidu 内部产品用户做统计功能。 - enable = product && /baidu/i.exec(product), - base; - - if (!enable) { - return; - } - - base = { - dv: 3, - master: 'webuploader', - online: /test/.exec(product) ? 0 : 1, - module: '', - product: product, - type: 0 - }; - - function send(data) { - var obj = $.extend({}, base, data), - url = logUrl.replace(/^(.*)\?/, '$1' + $.param( obj )), - image = new Image(); - - image.src = url; - } - - return Uploader.register({ - name: 'log', - - init: function() { - var owner = this.owner, - count = 0, - size = 0; - - owner - .on('error', function(code) { - send({ - type: 2, - c_error_code: code - }); - }) - .on('uploadError', function(file, reason) { - send({ - type: 2, - c_error_code: 'UPLOAD_ERROR', - c_reason: '' + reason - }); - }) - .on('uploadComplete', function(file) { - count++; - size += file.size; - }). - on('uploadFinished', function() { - send({ - c_count: count, - c_size: size - }); - count = size = 0; - }); - - send({ - c_usage: 1 - }); - } - }); - }); - /** - * @fileOverview Uploader上传类 - */ - define('webuploader',[ - 'preset/all', - 'widgets/log' - ], function( preset ) { - return preset; - }); - - var _require = require; - return _require('webuploader'); -}); diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.flashonly.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.flashonly.js deleted file mode 100644 index 956e256b..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.flashonly.js +++ /dev/null @@ -1,4622 +0,0 @@ -/*! WebUploader 0.1.5 */ - - -/** - * @fileOverview 让内部各个部件的代码可以用[amd](https://github.com/amdjs/amdjs-api/wiki/AMD)模块定义方式组织起来。 - * - * AMD API 内部的简单不完全实现,请忽略。只有当WebUploader被合并成一个文件的时候才会引入。 - */ -(function( root, factory ) { - var modules = {}, - - // 内部require, 简单不完全实现。 - // https://github.com/amdjs/amdjs-api/wiki/require - _require = function( deps, callback ) { - var args, len, i; - - // 如果deps不是数组,则直接返回指定module - if ( typeof deps === 'string' ) { - return getModule( deps ); - } else { - args = []; - for( len = deps.length, i = 0; i < len; i++ ) { - args.push( getModule( deps[ i ] ) ); - } - - return callback.apply( null, args ); - } - }, - - // 内部define,暂时不支持不指定id. - _define = function( id, deps, factory ) { - if ( arguments.length === 2 ) { - factory = deps; - deps = null; - } - - _require( deps || [], function() { - setModule( id, factory, arguments ); - }); - }, - - // 设置module, 兼容CommonJs写法。 - setModule = function( id, factory, args ) { - var module = { - exports: factory - }, - returned; - - if ( typeof factory === 'function' ) { - args.length || (args = [ _require, module.exports, module ]); - returned = factory.apply( null, args ); - returned !== undefined && (module.exports = returned); - } - - modules[ id ] = module.exports; - }, - - // 根据id获取module - getModule = function( id ) { - var module = modules[ id ] || root[ id ]; - - if ( !module ) { - throw new Error( '`' + id + '` is undefined' ); - } - - return module; - }, - - // 将所有modules,将路径ids装换成对象。 - exportsTo = function( obj ) { - var key, host, parts, part, last, ucFirst; - - // make the first character upper case. - ucFirst = function( str ) { - return str && (str.charAt( 0 ).toUpperCase() + str.substr( 1 )); - }; - - for ( key in modules ) { - host = obj; - - if ( !modules.hasOwnProperty( key ) ) { - continue; - } - - parts = key.split('/'); - last = ucFirst( parts.pop() ); - - while( (part = ucFirst( parts.shift() )) ) { - host[ part ] = host[ part ] || {}; - host = host[ part ]; - } - - host[ last ] = modules[ key ]; - } - - return obj; - }, - - makeExport = function( dollar ) { - root.__dollar = dollar; - - // exports every module. - return exportsTo( factory( root, _define, _require ) ); - }, - - origin; - - if ( typeof module === 'object' && typeof module.exports === 'object' ) { - - // For CommonJS and CommonJS-like environments where a proper window is present, - module.exports = makeExport(); - } else if ( typeof define === 'function' && define.amd ) { - - // Allow using this built library as an AMD module - // in another project. That other project will only - // see this AMD call, not the internal modules in - // the closure below. - define([ 'jquery' ], makeExport ); - } else { - - // Browser globals case. Just assign the - // result to a property on the global. - origin = root.WebUploader; - root.WebUploader = makeExport(); - root.WebUploader.noConflict = function() { - root.WebUploader = origin; - }; - } -})( window, function( window, define, require ) { - - - /** - * @fileOverview jQuery or Zepto - */ - define('dollar-third',[],function() { - var $ = window.__dollar || window.jQuery || window.Zepto; - - if ( !$ ) { - throw new Error('jQuery or Zepto not found!'); - } - - return $; - }); - /** - * @fileOverview Dom 操作相关 - */ - define('dollar',[ - 'dollar-third' - ], function( _ ) { - return _; - }); - /** - * @fileOverview 使用jQuery的Promise - */ - define('promise-third',[ - 'dollar' - ], function( $ ) { - return { - Deferred: $.Deferred, - when: $.when, - - isPromise: function( anything ) { - return anything && typeof anything.then === 'function'; - } - }; - }); - /** - * @fileOverview Promise/A+ - */ - define('promise',[ - 'promise-third' - ], function( _ ) { - return _; - }); - /** - * @fileOverview 基础类方法。 - */ - - /** - * Web Uploader内部类的详细说明,以下提及的功能类,都可以在`WebUploader`这个变量中访问到。 - * - * As you know, Web Uploader的每个文件都是用过[AMD](https://github.com/amdjs/amdjs-api/wiki/AMD)规范中的`define`组织起来的, 每个Module都会有个module id. - * 默认module id为该文件的路径,而此路径将会转化成名字空间存放在WebUploader中。如: - * - * * module `base`:WebUploader.Base - * * module `file`: WebUploader.File - * * module `lib/dnd`: WebUploader.Lib.Dnd - * * module `runtime/html5/dnd`: WebUploader.Runtime.Html5.Dnd - * - * - * 以下文档中对类的使用可能省略掉了`WebUploader`前缀。 - * @module WebUploader - * @title WebUploader API文档 - */ - define('base',[ - 'dollar', - 'promise' - ], function( $, promise ) { - - var noop = function() {}, - call = Function.call; - - // http://jsperf.com/uncurrythis - // 反科里化 - function uncurryThis( fn ) { - return function() { - return call.apply( fn, arguments ); - }; - } - - function bindFn( fn, context ) { - return function() { - return fn.apply( context, arguments ); - }; - } - - function createObject( proto ) { - var f; - - if ( Object.create ) { - return Object.create( proto ); - } else { - f = function() {}; - f.prototype = proto; - return new f(); - } - } - - - /** - * 基础类,提供一些简单常用的方法。 - * @class Base - */ - return { - - /** - * @property {String} version 当前版本号。 - */ - version: '0.1.5', - - /** - * @property {jQuery|Zepto} $ 引用依赖的jQuery或者Zepto对象。 - */ - $: $, - - Deferred: promise.Deferred, - - isPromise: promise.isPromise, - - when: promise.when, - - /** - * @description 简单的浏览器检查结果。 - * - * * `webkit` webkit版本号,如果浏览器为非webkit内核,此属性为`undefined`。 - * * `chrome` chrome浏览器版本号,如果浏览器为chrome,此属性为`undefined`。 - * * `ie` ie浏览器版本号,如果浏览器为非ie,此属性为`undefined`。**暂不支持ie10+** - * * `firefox` firefox浏览器版本号,如果浏览器为非firefox,此属性为`undefined`。 - * * `safari` safari浏览器版本号,如果浏览器为非safari,此属性为`undefined`。 - * * `opera` opera浏览器版本号,如果浏览器为非opera,此属性为`undefined`。 - * - * @property {Object} [browser] - */ - browser: (function( ua ) { - var ret = {}, - webkit = ua.match( /WebKit\/([\d.]+)/ ), - chrome = ua.match( /Chrome\/([\d.]+)/ ) || - ua.match( /CriOS\/([\d.]+)/ ), - - ie = ua.match( /MSIE\s([\d\.]+)/ ) || - ua.match( /(?:trident)(?:.*rv:([\w.]+))?/i ), - firefox = ua.match( /Firefox\/([\d.]+)/ ), - safari = ua.match( /Safari\/([\d.]+)/ ), - opera = ua.match( /OPR\/([\d.]+)/ ); - - webkit && (ret.webkit = parseFloat( webkit[ 1 ] )); - chrome && (ret.chrome = parseFloat( chrome[ 1 ] )); - ie && (ret.ie = parseFloat( ie[ 1 ] )); - firefox && (ret.firefox = parseFloat( firefox[ 1 ] )); - safari && (ret.safari = parseFloat( safari[ 1 ] )); - opera && (ret.opera = parseFloat( opera[ 1 ] )); - - return ret; - })( navigator.userAgent ), - - /** - * @description 操作系统检查结果。 - * - * * `android` 如果在android浏览器环境下,此值为对应的android版本号,否则为`undefined`。 - * * `ios` 如果在ios浏览器环境下,此值为对应的ios版本号,否则为`undefined`。 - * @property {Object} [os] - */ - os: (function( ua ) { - var ret = {}, - - // osx = !!ua.match( /\(Macintosh\; Intel / ), - android = ua.match( /(?:Android);?[\s\/]+([\d.]+)?/ ), - ios = ua.match( /(?:iPad|iPod|iPhone).*OS\s([\d_]+)/ ); - - // osx && (ret.osx = true); - android && (ret.android = parseFloat( android[ 1 ] )); - ios && (ret.ios = parseFloat( ios[ 1 ].replace( /_/g, '.' ) )); - - return ret; - })( navigator.userAgent ), - - /** - * 实现类与类之间的继承。 - * @method inherits - * @grammar Base.inherits( super ) => child - * @grammar Base.inherits( super, protos ) => child - * @grammar Base.inherits( super, protos, statics ) => child - * @param {Class} super 父类 - * @param {Object | Function} [protos] 子类或者对象。如果对象中包含constructor,子类将是用此属性值。 - * @param {Function} [protos.constructor] 子类构造器,不指定的话将创建个临时的直接执行父类构造器的方法。 - * @param {Object} [statics] 静态属性或方法。 - * @return {Class} 返回子类。 - * @example - * function Person() { - * console.log( 'Super' ); - * } - * Person.prototype.hello = function() { - * console.log( 'hello' ); - * }; - * - * var Manager = Base.inherits( Person, { - * world: function() { - * console.log( 'World' ); - * } - * }); - * - * // 因为没有指定构造器,父类的构造器将会执行。 - * var instance = new Manager(); // => Super - * - * // 继承子父类的方法 - * instance.hello(); // => hello - * instance.world(); // => World - * - * // 子类的__super__属性指向父类 - * console.log( Manager.__super__ === Person ); // => true - */ - inherits: function( Super, protos, staticProtos ) { - var child; - - if ( typeof protos === 'function' ) { - child = protos; - protos = null; - } else if ( protos && protos.hasOwnProperty('constructor') ) { - child = protos.constructor; - } else { - child = function() { - return Super.apply( this, arguments ); - }; - } - - // 复制静态方法 - $.extend( true, child, Super, staticProtos || {} ); - - /* jshint camelcase: false */ - - // 让子类的__super__属性指向父类。 - child.__super__ = Super.prototype; - - // 构建原型,添加原型方法或属性。 - // 暂时用Object.create实现。 - child.prototype = createObject( Super.prototype ); - protos && $.extend( true, child.prototype, protos ); - - return child; - }, - - /** - * 一个不做任何事情的方法。可以用来赋值给默认的callback. - * @method noop - */ - noop: noop, - - /** - * 返回一个新的方法,此方法将已指定的`context`来执行。 - * @grammar Base.bindFn( fn, context ) => Function - * @method bindFn - * @example - * var doSomething = function() { - * console.log( this.name ); - * }, - * obj = { - * name: 'Object Name' - * }, - * aliasFn = Base.bind( doSomething, obj ); - * - * aliasFn(); // => Object Name - * - */ - bindFn: bindFn, - - /** - * 引用Console.log如果存在的话,否则引用一个[空函数noop](#WebUploader:Base.noop)。 - * @grammar Base.log( args... ) => undefined - * @method log - */ - log: (function() { - if ( window.console ) { - return bindFn( console.log, console ); - } - return noop; - })(), - - nextTick: (function() { - - return function( cb ) { - setTimeout( cb, 1 ); - }; - - // @bug 当浏览器不在当前窗口时就停了。 - // var next = window.requestAnimationFrame || - // window.webkitRequestAnimationFrame || - // window.mozRequestAnimationFrame || - // function( cb ) { - // window.setTimeout( cb, 1000 / 60 ); - // }; - - // // fix: Uncaught TypeError: Illegal invocation - // return bindFn( next, window ); - })(), - - /** - * 被[uncurrythis](http://www.2ality.com/2011/11/uncurrying-this.html)的数组slice方法。 - * 将用来将非数组对象转化成数组对象。 - * @grammar Base.slice( target, start[, end] ) => Array - * @method slice - * @example - * function doSomthing() { - * var args = Base.slice( arguments, 1 ); - * console.log( args ); - * } - * - * doSomthing( 'ignored', 'arg2', 'arg3' ); // => Array ["arg2", "arg3"] - */ - slice: uncurryThis( [].slice ), - - /** - * 生成唯一的ID - * @method guid - * @grammar Base.guid() => String - * @grammar Base.guid( prefx ) => String - */ - guid: (function() { - var counter = 0; - - return function( prefix ) { - var guid = (+new Date()).toString( 32 ), - i = 0; - - for ( ; i < 5; i++ ) { - guid += Math.floor( Math.random() * 65535 ).toString( 32 ); - } - - return (prefix || 'wu_') + guid + (counter++).toString( 32 ); - }; - })(), - - /** - * 格式化文件大小, 输出成带单位的字符串 - * @method formatSize - * @grammar Base.formatSize( size ) => String - * @grammar Base.formatSize( size, pointLength ) => String - * @grammar Base.formatSize( size, pointLength, units ) => String - * @param {Number} size 文件大小 - * @param {Number} [pointLength=2] 精确到的小数点数。 - * @param {Array} [units=[ 'B', 'K', 'M', 'G', 'TB' ]] 单位数组。从字节,到千字节,一直往上指定。如果单位数组里面只指定了到了K(千字节),同时文件大小大于M, 此方法的输出将还是显示成多少K. - * @example - * console.log( Base.formatSize( 100 ) ); // => 100B - * console.log( Base.formatSize( 1024 ) ); // => 1.00K - * console.log( Base.formatSize( 1024, 0 ) ); // => 1K - * console.log( Base.formatSize( 1024 * 1024 ) ); // => 1.00M - * console.log( Base.formatSize( 1024 * 1024 * 1024 ) ); // => 1.00G - * console.log( Base.formatSize( 1024 * 1024 * 1024, 0, ['B', 'KB', 'MB'] ) ); // => 1024MB - */ - formatSize: function( size, pointLength, units ) { - var unit; - - units = units || [ 'B', 'K', 'M', 'G', 'TB' ]; - - while ( (unit = units.shift()) && size > 1024 ) { - size = size / 1024; - } - - return (unit === 'B' ? size : size.toFixed( pointLength || 2 )) + - unit; - } - }; - }); - /** - * 事件处理类,可以独立使用,也可以扩展给对象使用。 - * @fileOverview Mediator - */ - define('mediator',[ - 'base' - ], function( Base ) { - var $ = Base.$, - slice = [].slice, - separator = /\s+/, - protos; - - // 根据条件过滤出事件handlers. - function findHandlers( arr, name, callback, context ) { - return $.grep( arr, function( handler ) { - return handler && - (!name || handler.e === name) && - (!callback || handler.cb === callback || - handler.cb._cb === callback) && - (!context || handler.ctx === context); - }); - } - - function eachEvent( events, callback, iterator ) { - // 不支持对象,只支持多个event用空格隔开 - $.each( (events || '').split( separator ), function( _, key ) { - iterator( key, callback ); - }); - } - - function triggerHanders( events, args ) { - var stoped = false, - i = -1, - len = events.length, - handler; - - while ( ++i < len ) { - handler = events[ i ]; - - if ( handler.cb.apply( handler.ctx2, args ) === false ) { - stoped = true; - break; - } - } - - return !stoped; - } - - protos = { - - /** - * 绑定事件。 - * - * `callback`方法在执行时,arguments将会来源于trigger的时候携带的参数。如 - * ```javascript - * var obj = {}; - * - * // 使得obj有事件行为 - * Mediator.installTo( obj ); - * - * obj.on( 'testa', function( arg1, arg2 ) { - * console.log( arg1, arg2 ); // => 'arg1', 'arg2' - * }); - * - * obj.trigger( 'testa', 'arg1', 'arg2' ); - * ``` - * - * 如果`callback`中,某一个方法`return false`了,则后续的其他`callback`都不会被执行到。 - * 切会影响到`trigger`方法的返回值,为`false`。 - * - * `on`还可以用来添加一个特殊事件`all`, 这样所有的事件触发都会响应到。同时此类`callback`中的arguments有一个不同处, - * 就是第一个参数为`type`,记录当前是什么事件在触发。此类`callback`的优先级比脚低,会再正常`callback`执行完后触发。 - * ```javascript - * obj.on( 'all', function( type, arg1, arg2 ) { - * console.log( type, arg1, arg2 ); // => 'testa', 'arg1', 'arg2' - * }); - * ``` - * - * @method on - * @grammar on( name, callback[, context] ) => self - * @param {String} name 事件名,支持多个事件用空格隔开 - * @param {Function} callback 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - * @class Mediator - */ - on: function( name, callback, context ) { - var me = this, - set; - - if ( !callback ) { - return this; - } - - set = this._events || (this._events = []); - - eachEvent( name, callback, function( name, callback ) { - var handler = { e: name }; - - handler.cb = callback; - handler.ctx = context; - handler.ctx2 = context || me; - handler.id = set.length; - - set.push( handler ); - }); - - return this; - }, - - /** - * 绑定事件,且当handler执行完后,自动解除绑定。 - * @method once - * @grammar once( name, callback[, context] ) => self - * @param {String} name 事件名 - * @param {Function} callback 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - */ - once: function( name, callback, context ) { - var me = this; - - if ( !callback ) { - return me; - } - - eachEvent( name, callback, function( name, callback ) { - var once = function() { - me.off( name, once ); - return callback.apply( context || me, arguments ); - }; - - once._cb = callback; - me.on( name, once, context ); - }); - - return me; - }, - - /** - * 解除事件绑定 - * @method off - * @grammar off( [name[, callback[, context] ] ] ) => self - * @param {String} [name] 事件名 - * @param {Function} [callback] 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - */ - off: function( name, cb, ctx ) { - var events = this._events; - - if ( !events ) { - return this; - } - - if ( !name && !cb && !ctx ) { - this._events = []; - return this; - } - - eachEvent( name, cb, function( name, cb ) { - $.each( findHandlers( events, name, cb, ctx ), function() { - delete events[ this.id ]; - }); - }); - - return this; - }, - - /** - * 触发事件 - * @method trigger - * @grammar trigger( name[, args...] ) => self - * @param {String} type 事件名 - * @param {*} [...] 任意参数 - * @return {Boolean} 如果handler中return false了,则返回false, 否则返回true - */ - trigger: function( type ) { - var args, events, allEvents; - - if ( !this._events || !type ) { - return this; - } - - args = slice.call( arguments, 1 ); - events = findHandlers( this._events, type ); - allEvents = findHandlers( this._events, 'all' ); - - return triggerHanders( events, args ) && - triggerHanders( allEvents, arguments ); - } - }; - - /** - * 中介者,它本身是个单例,但可以通过[installTo](#WebUploader:Mediator:installTo)方法,使任何对象具备事件行为。 - * 主要目的是负责模块与模块之间的合作,降低耦合度。 - * - * @class Mediator - */ - return $.extend({ - - /** - * 可以通过这个接口,使任何对象具备事件功能。 - * @method installTo - * @param {Object} obj 需要具备事件行为的对象。 - * @return {Object} 返回obj. - */ - installTo: function( obj ) { - return $.extend( obj, protos ); - } - - }, protos ); - }); - /** - * @fileOverview Uploader上传类 - */ - define('uploader',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$; - - /** - * 上传入口类。 - * @class Uploader - * @constructor - * @grammar new Uploader( opts ) => Uploader - * @example - * var uploader = WebUploader.Uploader({ - * swf: 'path_of_swf/Uploader.swf', - * - * // 开起分片上传。 - * chunked: true - * }); - */ - function Uploader( opts ) { - this.options = $.extend( true, {}, Uploader.options, opts ); - this._init( this.options ); - } - - // default Options - // widgets中有相应扩展 - Uploader.options = {}; - Mediator.installTo( Uploader.prototype ); - - // 批量添加纯命令式方法。 - $.each({ - upload: 'start-upload', - stop: 'stop-upload', - getFile: 'get-file', - getFiles: 'get-files', - addFile: 'add-file', - addFiles: 'add-file', - sort: 'sort-files', - removeFile: 'remove-file', - cancelFile: 'cancel-file', - skipFile: 'skip-file', - retry: 'retry', - isInProgress: 'is-in-progress', - makeThumb: 'make-thumb', - md5File: 'md5-file', - getDimension: 'get-dimension', - addButton: 'add-btn', - predictRuntimeType: 'predict-runtime-type', - refresh: 'refresh', - disable: 'disable', - enable: 'enable', - reset: 'reset' - }, function( fn, command ) { - Uploader.prototype[ fn ] = function() { - return this.request( command, arguments ); - }; - }); - - $.extend( Uploader.prototype, { - state: 'pending', - - _init: function( opts ) { - var me = this; - - me.request( 'init', opts, function() { - me.state = 'ready'; - me.trigger('ready'); - }); - }, - - /** - * 获取或者设置Uploader配置项。 - * @method option - * @grammar option( key ) => * - * @grammar option( key, val ) => self - * @example - * - * // 初始状态图片上传前不会压缩 - * var uploader = new WebUploader.Uploader({ - * compress: null; - * }); - * - * // 修改后图片上传前,尝试将图片压缩到1600 * 1600 - * uploader.option( 'compress', { - * width: 1600, - * height: 1600 - * }); - */ - option: function( key, val ) { - var opts = this.options; - - // setter - if ( arguments.length > 1 ) { - - if ( $.isPlainObject( val ) && - $.isPlainObject( opts[ key ] ) ) { - $.extend( opts[ key ], val ); - } else { - opts[ key ] = val; - } - - } else { // getter - return key ? opts[ key ] : opts; - } - }, - - /** - * 获取文件统计信息。返回一个包含一下信息的对象。 - * * `successNum` 上传成功的文件数 - * * `progressNum` 上传中的文件数 - * * `cancelNum` 被删除的文件数 - * * `invalidNum` 无效的文件数 - * * `uploadFailNum` 上传失败的文件数 - * * `queueNum` 还在队列中的文件数 - * * `interruptNum` 被暂停的文件数 - * @method getStats - * @grammar getStats() => Object - */ - getStats: function() { - // return this._mgr.getStats.apply( this._mgr, arguments ); - var stats = this.request('get-stats'); - - return stats ? { - successNum: stats.numOfSuccess, - progressNum: stats.numOfProgress, - - // who care? - // queueFailNum: 0, - cancelNum: stats.numOfCancel, - invalidNum: stats.numOfInvalid, - uploadFailNum: stats.numOfUploadFailed, - queueNum: stats.numOfQueue, - interruptNum: stats.numofInterrupt - } : {}; - }, - - // 需要重写此方法来来支持opts.onEvent和instance.onEvent的处理器 - trigger: function( type/*, args...*/ ) { - var args = [].slice.call( arguments, 1 ), - opts = this.options, - name = 'on' + type.substring( 0, 1 ).toUpperCase() + - type.substring( 1 ); - - if ( - // 调用通过on方法注册的handler. - Mediator.trigger.apply( this, arguments ) === false || - - // 调用opts.onEvent - $.isFunction( opts[ name ] ) && - opts[ name ].apply( this, args ) === false || - - // 调用this.onEvent - $.isFunction( this[ name ] ) && - this[ name ].apply( this, args ) === false || - - // 广播所有uploader的事件。 - Mediator.trigger.apply( Mediator, - [ this, type ].concat( args ) ) === false ) { - - return false; - } - - return true; - }, - - /** - * 销毁 webuploader 实例 - * @method destroy - * @grammar destroy() => undefined - */ - destroy: function() { - this.request( 'destroy', arguments ); - this.off(); - }, - - // widgets/widget.js将补充此方法的详细文档。 - request: Base.noop - }); - - /** - * 创建Uploader实例,等同于new Uploader( opts ); - * @method create - * @class Base - * @static - * @grammar Base.create( opts ) => Uploader - */ - Base.create = Uploader.create = function( opts ) { - return new Uploader( opts ); - }; - - // 暴露Uploader,可以通过它来扩展业务逻辑。 - Base.Uploader = Uploader; - - return Uploader; - }); - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/runtime',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$, - factories = {}, - - // 获取对象的第一个key - getFirstKey = function( obj ) { - for ( var key in obj ) { - if ( obj.hasOwnProperty( key ) ) { - return key; - } - } - return null; - }; - - // 接口类。 - function Runtime( options ) { - this.options = $.extend({ - container: document.body - }, options ); - this.uid = Base.guid('rt_'); - } - - $.extend( Runtime.prototype, { - - getContainer: function() { - var opts = this.options, - parent, container; - - if ( this._container ) { - return this._container; - } - - parent = $( opts.container || document.body ); - container = $( document.createElement('div') ); - - container.attr( 'id', 'rt_' + this.uid ); - container.css({ - position: 'absolute', - top: '0px', - left: '0px', - width: '1px', - height: '1px', - overflow: 'hidden' - }); - - parent.append( container ); - parent.addClass('webuploader-container'); - this._container = container; - this._parent = parent; - return container; - }, - - init: Base.noop, - exec: Base.noop, - - destroy: function() { - this._container && this._container.remove(); - this._parent && this._parent.removeClass('webuploader-container'); - this.off(); - } - }); - - Runtime.orders = 'html5,flash'; - - - /** - * 添加Runtime实现。 - * @param {String} type 类型 - * @param {Runtime} factory 具体Runtime实现。 - */ - Runtime.addRuntime = function( type, factory ) { - factories[ type ] = factory; - }; - - Runtime.hasRuntime = function( type ) { - return !!(type ? factories[ type ] : getFirstKey( factories )); - }; - - Runtime.create = function( opts, orders ) { - var type, runtime; - - orders = orders || Runtime.orders; - $.each( orders.split( /\s*,\s*/g ), function() { - if ( factories[ this ] ) { - type = this; - return false; - } - }); - - type = type || getFirstKey( factories ); - - if ( !type ) { - throw new Error('Runtime Error'); - } - - runtime = new factories[ type ]( opts ); - return runtime; - }; - - Mediator.installTo( Runtime.prototype ); - return Runtime; - }); - - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/client',[ - 'base', - 'mediator', - 'runtime/runtime' - ], function( Base, Mediator, Runtime ) { - - var cache; - - cache = (function() { - var obj = {}; - - return { - add: function( runtime ) { - obj[ runtime.uid ] = runtime; - }, - - get: function( ruid, standalone ) { - var i; - - if ( ruid ) { - return obj[ ruid ]; - } - - for ( i in obj ) { - // 有些类型不能重用,比如filepicker. - if ( standalone && obj[ i ].__standalone ) { - continue; - } - - return obj[ i ]; - } - - return null; - }, - - remove: function( runtime ) { - delete obj[ runtime.uid ]; - } - }; - })(); - - function RuntimeClient( component, standalone ) { - var deferred = Base.Deferred(), - runtime; - - this.uid = Base.guid('client_'); - - // 允许runtime没有初始化之前,注册一些方法在初始化后执行。 - this.runtimeReady = function( cb ) { - return deferred.done( cb ); - }; - - this.connectRuntime = function( opts, cb ) { - - // already connected. - if ( runtime ) { - throw new Error('already connected!'); - } - - deferred.done( cb ); - - if ( typeof opts === 'string' && cache.get( opts ) ) { - runtime = cache.get( opts ); - } - - // 像filePicker只能独立存在,不能公用。 - runtime = runtime || cache.get( null, standalone ); - - // 需要创建 - if ( !runtime ) { - runtime = Runtime.create( opts, opts.runtimeOrder ); - runtime.__promise = deferred.promise(); - runtime.once( 'ready', deferred.resolve ); - runtime.init(); - cache.add( runtime ); - runtime.__client = 1; - } else { - // 来自cache - Base.$.extend( runtime.options, opts ); - runtime.__promise.then( deferred.resolve ); - runtime.__client++; - } - - standalone && (runtime.__standalone = standalone); - return runtime; - }; - - this.getRuntime = function() { - return runtime; - }; - - this.disconnectRuntime = function() { - if ( !runtime ) { - return; - } - - runtime.__client--; - - if ( runtime.__client <= 0 ) { - cache.remove( runtime ); - delete runtime.__promise; - runtime.destroy(); - } - - runtime = null; - }; - - this.exec = function() { - if ( !runtime ) { - return; - } - - var args = Base.slice( arguments ); - component && args.unshift( component ); - - return runtime.exec.apply( this, args ); - }; - - this.getRuid = function() { - return runtime && runtime.uid; - }; - - this.destroy = (function( destroy ) { - return function() { - destroy && destroy.apply( this, arguments ); - this.trigger('destroy'); - this.off(); - this.exec('destroy'); - this.disconnectRuntime(); - }; - })( this.destroy ); - } - - Mediator.installTo( RuntimeClient.prototype ); - return RuntimeClient; - }); - /** - * @fileOverview Blob - */ - define('lib/blob',[ - 'base', - 'runtime/client' - ], function( Base, RuntimeClient ) { - - function Blob( ruid, source ) { - var me = this; - - me.source = source; - me.ruid = ruid; - this.size = source.size || 0; - - // 如果没有指定 mimetype, 但是知道文件后缀。 - if ( !source.type && this.ext && - ~'jpg,jpeg,png,gif,bmp'.indexOf( this.ext ) ) { - this.type = 'image/' + (this.ext === 'jpg' ? 'jpeg' : this.ext); - } else { - this.type = source.type || 'application/octet-stream'; - } - - RuntimeClient.call( me, 'Blob' ); - this.uid = source.uid || this.uid; - - if ( ruid ) { - me.connectRuntime( ruid ); - } - } - - Base.inherits( RuntimeClient, { - constructor: Blob, - - slice: function( start, end ) { - return this.exec( 'slice', start, end ); - }, - - getSource: function() { - return this.source; - } - }); - - return Blob; - }); - /** - * 为了统一化Flash的File和HTML5的File而存在。 - * 以至于要调用Flash里面的File,也可以像调用HTML5版本的File一下。 - * @fileOverview File - */ - define('lib/file',[ - 'base', - 'lib/blob' - ], function( Base, Blob ) { - - var uid = 1, - rExt = /\.([^.]+)$/; - - function File( ruid, file ) { - var ext; - - this.name = file.name || ('untitled' + uid++); - ext = rExt.exec( file.name ) ? RegExp.$1.toLowerCase() : ''; - - // todo 支持其他类型文件的转换。 - // 如果有 mimetype, 但是文件名里面没有找出后缀规律 - if ( !ext && file.type ) { - ext = /\/(jpg|jpeg|png|gif|bmp)$/i.exec( file.type ) ? - RegExp.$1.toLowerCase() : ''; - this.name += '.' + ext; - } - - this.ext = ext; - this.lastModifiedDate = file.lastModifiedDate || - (new Date()).toLocaleString(); - - Blob.apply( this, arguments ); - } - - return Base.inherits( Blob, File ); - }); - - /** - * @fileOverview 错误信息 - */ - define('lib/filepicker',[ - 'base', - 'runtime/client', - 'lib/file' - ], function( Base, RuntimeClent, File ) { - - var $ = Base.$; - - function FilePicker( opts ) { - opts = this.options = $.extend({}, FilePicker.options, opts ); - - opts.container = $( opts.id ); - - if ( !opts.container.length ) { - throw new Error('按钮指定错误'); - } - - opts.innerHTML = opts.innerHTML || opts.label || - opts.container.html() || ''; - - opts.button = $( opts.button || document.createElement('div') ); - opts.button.html( opts.innerHTML ); - opts.container.html( opts.button ); - - RuntimeClent.call( this, 'FilePicker', true ); - } - - FilePicker.options = { - button: null, - container: null, - label: null, - innerHTML: null, - multiple: true, - accept: null, - name: 'file' - }; - - Base.inherits( RuntimeClent, { - constructor: FilePicker, - - init: function() { - var me = this, - opts = me.options, - button = opts.button; - - button.addClass('webuploader-pick'); - - me.on( 'all', function( type ) { - var files; - - switch ( type ) { - case 'mouseenter': - button.addClass('webuploader-pick-hover'); - break; - - case 'mouseleave': - button.removeClass('webuploader-pick-hover'); - break; - - case 'change': - files = me.exec('getFiles'); - me.trigger( 'select', $.map( files, function( file ) { - file = new File( me.getRuid(), file ); - - // 记录来源。 - file._refer = opts.container; - return file; - }), opts.container ); - break; - } - }); - - me.connectRuntime( opts, function() { - me.refresh(); - me.exec( 'init', opts ); - me.trigger('ready'); - }); - - this._resizeHandler = Base.bindFn( this.refresh, this ); - $( window ).on( 'resize', this._resizeHandler ); - }, - - refresh: function() { - var shimContainer = this.getRuntime().getContainer(), - button = this.options.button, - width = button.outerWidth ? - button.outerWidth() : button.width(), - - height = button.outerHeight ? - button.outerHeight() : button.height(), - - pos = button.offset(); - - width && height && shimContainer.css({ - bottom: 'auto', - right: 'auto', - width: width + 'px', - height: height + 'px' - }).offset( pos ); - }, - - enable: function() { - var btn = this.options.button; - - btn.removeClass('webuploader-pick-disable'); - this.refresh(); - }, - - disable: function() { - var btn = this.options.button; - - this.getRuntime().getContainer().css({ - top: '-99999px' - }); - - btn.addClass('webuploader-pick-disable'); - }, - - destroy: function() { - var btn = this.options.button; - $( window ).off( 'resize', this._resizeHandler ); - btn.removeClass('webuploader-pick-disable webuploader-pick-hover ' + - 'webuploader-pick'); - } - }); - - return FilePicker; - }); - - /** - * @fileOverview 组件基类。 - */ - define('widgets/widget',[ - 'base', - 'uploader' - ], function( Base, Uploader ) { - - var $ = Base.$, - _init = Uploader.prototype._init, - _destroy = Uploader.prototype.destroy, - IGNORE = {}, - widgetClass = []; - - function isArrayLike( obj ) { - if ( !obj ) { - return false; - } - - var length = obj.length, - type = $.type( obj ); - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === 'array' || type !== 'function' && type !== 'string' && - (length === 0 || typeof length === 'number' && length > 0 && - (length - 1) in obj); - } - - function Widget( uploader ) { - this.owner = uploader; - this.options = uploader.options; - } - - $.extend( Widget.prototype, { - - init: Base.noop, - - // 类Backbone的事件监听声明,监听uploader实例上的事件 - // widget直接无法监听事件,事件只能通过uploader来传递 - invoke: function( apiName, args ) { - - /* - { - 'make-thumb': 'makeThumb' - } - */ - var map = this.responseMap; - - // 如果无API响应声明则忽略 - if ( !map || !(apiName in map) || !(map[ apiName ] in this) || - !$.isFunction( this[ map[ apiName ] ] ) ) { - - return IGNORE; - } - - return this[ map[ apiName ] ].apply( this, args ); - - }, - - /** - * 发送命令。当传入`callback`或者`handler`中返回`promise`时。返回一个当所有`handler`中的promise都完成后完成的新`promise`。 - * @method request - * @grammar request( command, args ) => * | Promise - * @grammar request( command, args, callback ) => Promise - * @for Uploader - */ - request: function() { - return this.owner.request.apply( this.owner, arguments ); - } - }); - - // 扩展Uploader. - $.extend( Uploader.prototype, { - - /** - * @property {String | Array} [disableWidgets=undefined] - * @namespace options - * @for Uploader - * @description 默认所有 Uploader.register 了的 widget 都会被加载,如果禁用某一部分,请通过此 option 指定黑名单。 - */ - - // 覆写_init用来初始化widgets - _init: function() { - var me = this, - widgets = me._widgets = [], - deactives = me.options.disableWidgets || ''; - - $.each( widgetClass, function( _, klass ) { - (!deactives || !~deactives.indexOf( klass._name )) && - widgets.push( new klass( me ) ); - }); - - return _init.apply( me, arguments ); - }, - - request: function( apiName, args, callback ) { - var i = 0, - widgets = this._widgets, - len = widgets && widgets.length, - rlts = [], - dfds = [], - widget, rlt, promise, key; - - args = isArrayLike( args ) ? args : [ args ]; - - for ( ; i < len; i++ ) { - widget = widgets[ i ]; - rlt = widget.invoke( apiName, args ); - - if ( rlt !== IGNORE ) { - - // Deferred对象 - if ( Base.isPromise( rlt ) ) { - dfds.push( rlt ); - } else { - rlts.push( rlt ); - } - } - } - - // 如果有callback,则用异步方式。 - if ( callback || dfds.length ) { - promise = Base.when.apply( Base, dfds ); - key = promise.pipe ? 'pipe' : 'then'; - - // 很重要不能删除。删除了会死循环。 - // 保证执行顺序。让callback总是在下一个 tick 中执行。 - return promise[ key ](function() { - var deferred = Base.Deferred(), - args = arguments; - - if ( args.length === 1 ) { - args = args[ 0 ]; - } - - setTimeout(function() { - deferred.resolve( args ); - }, 1 ); - - return deferred.promise(); - })[ callback ? key : 'done' ]( callback || Base.noop ); - } else { - return rlts[ 0 ]; - } - }, - - destroy: function() { - _destroy.apply( this, arguments ); - this._widgets = null; - } - }); - - /** - * 添加组件 - * @grammar Uploader.register(proto); - * @grammar Uploader.register(map, proto); - * @param {object} responseMap API 名称与函数实现的映射 - * @param {object} proto 组件原型,构造函数通过 constructor 属性定义 - * @method Uploader.register - * @for Uploader - * @example - * Uploader.register({ - * 'make-thumb': 'makeThumb' - * }, { - * init: function( options ) {}, - * makeThumb: function() {} - * }); - * - * Uploader.register({ - * 'make-thumb': function() { - * - * } - * }); - */ - Uploader.register = Widget.register = function( responseMap, widgetProto ) { - var map = { init: 'init', destroy: 'destroy', name: 'anonymous' }, - klass; - - if ( arguments.length === 1 ) { - widgetProto = responseMap; - - // 自动生成 map 表。 - $.each(widgetProto, function(key) { - if ( key[0] === '_' || key === 'name' ) { - key === 'name' && (map.name = widgetProto.name); - return; - } - - map[key.replace(/[A-Z]/g, '-$&').toLowerCase()] = key; - }); - - } else { - map = $.extend( map, responseMap ); - } - - widgetProto.responseMap = map; - klass = Base.inherits( Widget, widgetProto ); - klass._name = map.name; - widgetClass.push( klass ); - - return klass; - }; - - /** - * 删除插件,只有在注册时指定了名字的才能被删除。 - * @grammar Uploader.unRegister(name); - * @param {string} name 组件名字 - * @method Uploader.unRegister - * @for Uploader - * @example - * - * Uploader.register({ - * name: 'custom', - * - * 'make-thumb': function() { - * - * } - * }); - * - * Uploader.unRegister('custom'); - */ - Uploader.unRegister = Widget.unRegister = function( name ) { - if ( !name || name === 'anonymous' ) { - return; - } - - // 删除指定的插件。 - for ( var i = widgetClass.length; i--; ) { - if ( widgetClass[i]._name === name ) { - widgetClass.splice(i, 1) - } - } - }; - - return Widget; - }); - /** - * @fileOverview 文件选择相关 - */ - define('widgets/filepicker',[ - 'base', - 'uploader', - 'lib/filepicker', - 'widgets/widget' - ], function( Base, Uploader, FilePicker ) { - var $ = Base.$; - - $.extend( Uploader.options, { - - /** - * @property {Selector | Object} [pick=undefined] - * @namespace options - * @for Uploader - * @description 指定选择文件的按钮容器,不指定则不创建按钮。 - * - * * `id` {Seletor|dom} 指定选择文件的按钮容器,不指定则不创建按钮。**注意** 这里虽然写的是 id, 但是不是只支持 id, 还支持 class, 或者 dom 节点。 - * * `label` {String} 请采用 `innerHTML` 代替 - * * `innerHTML` {String} 指定按钮文字。不指定时优先从指定的容器中看是否自带文字。 - * * `multiple` {Boolean} 是否开起同时选择多个文件能力。 - */ - pick: null, - - /** - * @property {Arroy} [accept=null] - * @namespace options - * @for Uploader - * @description 指定接受哪些类型的文件。 由于目前还有ext转mimeType表,所以这里需要分开指定。 - * - * * `title` {String} 文字描述 - * * `extensions` {String} 允许的文件后缀,不带点,多个用逗号分割。 - * * `mimeTypes` {String} 多个用逗号分割。 - * - * 如: - * - * ``` - * { - * title: 'Images', - * extensions: 'gif,jpg,jpeg,bmp,png', - * mimeTypes: 'image/*' - * } - * ``` - */ - accept: null/*{ - title: 'Images', - extensions: 'gif,jpg,jpeg,bmp,png', - mimeTypes: 'image/*' - }*/ - }); - - return Uploader.register({ - name: 'picker', - - init: function( opts ) { - this.pickers = []; - return opts.pick && this.addBtn( opts.pick ); - }, - - refresh: function() { - $.each( this.pickers, function() { - this.refresh(); - }); - }, - - /** - * @method addButton - * @for Uploader - * @grammar addButton( pick ) => Promise - * @description - * 添加文件选择按钮,如果一个按钮不够,需要调用此方法来添加。参数跟[options.pick](#WebUploader:Uploader:options)一致。 - * @example - * uploader.addButton({ - * id: '#btnContainer', - * innerHTML: '选择文件' - * }); - */ - addBtn: function( pick ) { - var me = this, - opts = me.options, - accept = opts.accept, - promises = []; - - if ( !pick ) { - return; - } - - $.isPlainObject( pick ) || (pick = { - id: pick - }); - - $( pick.id ).each(function() { - var options, picker, deferred; - - deferred = Base.Deferred(); - - options = $.extend({}, pick, { - accept: $.isPlainObject( accept ) ? [ accept ] : accept, - swf: opts.swf, - runtimeOrder: opts.runtimeOrder, - id: this - }); - - picker = new FilePicker( options ); - - picker.once( 'ready', deferred.resolve ); - picker.on( 'select', function( files ) { - me.owner.request( 'add-file', [ files ]); - }); - picker.init(); - - me.pickers.push( picker ); - - promises.push( deferred.promise() ); - }); - - return Base.when.apply( Base, promises ); - }, - - disable: function() { - $.each( this.pickers, function() { - this.disable(); - }); - }, - - enable: function() { - $.each( this.pickers, function() { - this.enable(); - }); - }, - - destroy: function() { - $.each( this.pickers, function() { - this.destroy(); - }); - this.pickers = null; - } - }); - }); - /** - * @fileOverview Image - */ - define('lib/image',[ - 'base', - 'runtime/client', - 'lib/blob' - ], function( Base, RuntimeClient, Blob ) { - var $ = Base.$; - - // 构造器。 - function Image( opts ) { - this.options = $.extend({}, Image.options, opts ); - RuntimeClient.call( this, 'Image' ); - - this.on( 'load', function() { - this._info = this.exec('info'); - this._meta = this.exec('meta'); - }); - } - - // 默认选项。 - Image.options = { - - // 默认的图片处理质量 - quality: 90, - - // 是否裁剪 - crop: false, - - // 是否保留头部信息 - preserveHeaders: false, - - // 是否允许放大。 - allowMagnify: false - }; - - // 继承RuntimeClient. - Base.inherits( RuntimeClient, { - constructor: Image, - - info: function( val ) { - - // setter - if ( val ) { - this._info = val; - return this; - } - - // getter - return this._info; - }, - - meta: function( val ) { - - // setter - if ( val ) { - this._meta = val; - return this; - } - - // getter - return this._meta; - }, - - loadFromBlob: function( blob ) { - var me = this, - ruid = blob.getRuid(); - - this.connectRuntime( ruid, function() { - me.exec( 'init', me.options ); - me.exec( 'loadFromBlob', blob ); - }); - }, - - resize: function() { - var args = Base.slice( arguments ); - return this.exec.apply( this, [ 'resize' ].concat( args ) ); - }, - - crop: function() { - var args = Base.slice( arguments ); - return this.exec.apply( this, [ 'crop' ].concat( args ) ); - }, - - getAsDataUrl: function( type ) { - return this.exec( 'getAsDataUrl', type ); - }, - - getAsBlob: function( type ) { - var blob = this.exec( 'getAsBlob', type ); - - return new Blob( this.getRuid(), blob ); - } - }); - - return Image; - }); - /** - * @fileOverview 图片操作, 负责预览图片和上传前压缩图片 - */ - define('widgets/image',[ - 'base', - 'uploader', - 'lib/image', - 'widgets/widget' - ], function( Base, Uploader, Image ) { - - var $ = Base.$, - throttle; - - // 根据要处理的文件大小来节流,一次不能处理太多,会卡。 - throttle = (function( max ) { - var occupied = 0, - waiting = [], - tick = function() { - var item; - - while ( waiting.length && occupied < max ) { - item = waiting.shift(); - occupied += item[ 0 ]; - item[ 1 ](); - } - }; - - return function( emiter, size, cb ) { - waiting.push([ size, cb ]); - emiter.once( 'destroy', function() { - occupied -= size; - setTimeout( tick, 1 ); - }); - setTimeout( tick, 1 ); - }; - })( 5 * 1024 * 1024 ); - - $.extend( Uploader.options, { - - /** - * @property {Object} [thumb] - * @namespace options - * @for Uploader - * @description 配置生成缩略图的选项。 - * - * 默认为: - * - * ```javascript - * { - * width: 110, - * height: 110, - * - * // 图片质量,只有type为`image/jpeg`的时候才有效。 - * quality: 70, - * - * // 是否允许放大,如果想要生成小图的时候不失真,此选项应该设置为false. - * allowMagnify: true, - * - * // 是否允许裁剪。 - * crop: true, - * - * // 为空的话则保留原有图片格式。 - * // 否则强制转换成指定的类型。 - * type: 'image/jpeg' - * } - * ``` - */ - thumb: { - width: 110, - height: 110, - quality: 70, - allowMagnify: true, - crop: true, - preserveHeaders: false, - - // 为空的话则保留原有图片格式。 - // 否则强制转换成指定的类型。 - // IE 8下面 base64 大小不能超过 32K 否则预览失败,而非 jpeg 编码的图片很可 - // 能会超过 32k, 所以这里设置成预览的时候都是 image/jpeg - type: 'image/jpeg' - }, - - /** - * @property {Object} [compress] - * @namespace options - * @for Uploader - * @description 配置压缩的图片的选项。如果此选项为`false`, 则图片在上传前不进行压缩。 - * - * 默认为: - * - * ```javascript - * { - * width: 1600, - * height: 1600, - * - * // 图片质量,只有type为`image/jpeg`的时候才有效。 - * quality: 90, - * - * // 是否允许放大,如果想要生成小图的时候不失真,此选项应该设置为false. - * allowMagnify: false, - * - * // 是否允许裁剪。 - * crop: false, - * - * // 是否保留头部meta信息。 - * preserveHeaders: true, - * - * // 如果发现压缩后文件大小比原来还大,则使用原来图片 - * // 此属性可能会影响图片自动纠正功能 - * noCompressIfLarger: false, - * - * // 单位字节,如果图片大小小于此值,不会采用压缩。 - * compressSize: 0 - * } - * ``` - */ - compress: { - width: 1600, - height: 1600, - quality: 90, - allowMagnify: false, - crop: false, - preserveHeaders: true - } - }); - - return Uploader.register({ - - name: 'image', - - - /** - * 生成缩略图,此过程为异步,所以需要传入`callback`。 - * 通常情况在图片加入队里后调用此方法来生成预览图以增强交互效果。 - * - * 当 width 或者 height 的值介于 0 - 1 时,被当成百分比使用。 - * - * `callback`中可以接收到两个参数。 - * * 第一个为error,如果生成缩略图有错误,此error将为真。 - * * 第二个为ret, 缩略图的Data URL值。 - * - * **注意** - * Date URL在IE6/7中不支持,所以不用调用此方法了,直接显示一张暂不支持预览图片好了。 - * 也可以借助服务端,将 base64 数据传给服务端,生成一个临时文件供预览。 - * - * @method makeThumb - * @grammar makeThumb( file, callback ) => undefined - * @grammar makeThumb( file, callback, width, height ) => undefined - * @for Uploader - * @example - * - * uploader.on( 'fileQueued', function( file ) { - * var $li = ...; - * - * uploader.makeThumb( file, function( error, ret ) { - * if ( error ) { - * $li.text('预览错误'); - * } else { - * $li.append(''); - * } - * }); - * - * }); - */ - makeThumb: function( file, cb, width, height ) { - var opts, image; - - file = this.request( 'get-file', file ); - - // 只预览图片格式。 - if ( !file.type.match( /^image/ ) ) { - cb( true ); - return; - } - - opts = $.extend({}, this.options.thumb ); - - // 如果传入的是object. - if ( $.isPlainObject( width ) ) { - opts = $.extend( opts, width ); - width = null; - } - - width = width || opts.width; - height = height || opts.height; - - image = new Image( opts ); - - image.once( 'load', function() { - file._info = file._info || image.info(); - file._meta = file._meta || image.meta(); - - // 如果 width 的值介于 0 - 1 - // 说明设置的是百分比。 - if ( width <= 1 && width > 0 ) { - width = file._info.width * width; - } - - // 同样的规则应用于 height - if ( height <= 1 && height > 0 ) { - height = file._info.height * height; - } - - image.resize( width, height ); - }); - - // 当 resize 完后 - image.once( 'complete', function() { - cb( false, image.getAsDataUrl( opts.type ) ); - image.destroy(); - }); - - image.once( 'error', function( reason ) { - cb( reason || true ); - image.destroy(); - }); - - throttle( image, file.source.size, function() { - file._info && image.info( file._info ); - file._meta && image.meta( file._meta ); - image.loadFromBlob( file.source ); - }); - }, - - beforeSendFile: function( file ) { - var opts = this.options.compress || this.options.resize, - compressSize = opts && opts.compressSize || 0, - noCompressIfLarger = opts && opts.noCompressIfLarger || false, - image, deferred; - - file = this.request( 'get-file', file ); - - // 只压缩 jpeg 图片格式。 - // gif 可能会丢失针 - // bmp png 基本上尺寸都不大,且压缩比比较小。 - if ( !opts || !~'image/jpeg,image/jpg'.indexOf( file.type ) || - file.size < compressSize || - file._compressed ) { - return; - } - - opts = $.extend({}, opts ); - deferred = Base.Deferred(); - - image = new Image( opts ); - - deferred.always(function() { - image.destroy(); - image = null; - }); - image.once( 'error', deferred.reject ); - image.once( 'load', function() { - var width = opts.width, - height = opts.height; - - file._info = file._info || image.info(); - file._meta = file._meta || image.meta(); - - // 如果 width 的值介于 0 - 1 - // 说明设置的是百分比。 - if ( width <= 1 && width > 0 ) { - width = file._info.width * width; - } - - // 同样的规则应用于 height - if ( height <= 1 && height > 0 ) { - height = file._info.height * height; - } - - image.resize( width, height ); - }); - - image.once( 'complete', function() { - var blob, size; - - // 移动端 UC / qq 浏览器的无图模式下 - // ctx.getImageData 处理大图的时候会报 Exception - // INDEX_SIZE_ERR: DOM Exception 1 - try { - blob = image.getAsBlob( opts.type ); - - size = file.size; - - // 如果压缩后,比原来还大则不用压缩后的。 - if ( !noCompressIfLarger || blob.size < size ) { - // file.source.destroy && file.source.destroy(); - file.source = blob; - file.size = blob.size; - - file.trigger( 'resize', blob.size, size ); - } - - // 标记,避免重复压缩。 - file._compressed = true; - deferred.resolve(); - } catch ( e ) { - // 出错了直接继续,让其上传原始图片 - deferred.resolve(); - } - }); - - file._info && image.info( file._info ); - file._meta && image.meta( file._meta ); - - image.loadFromBlob( file.source ); - return deferred.promise(); - } - }); - }); - /** - * @fileOverview 文件属性封装 - */ - define('file',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$, - idPrefix = 'WU_FILE_', - idSuffix = 0, - rExt = /\.([^.]+)$/, - statusMap = {}; - - function gid() { - return idPrefix + idSuffix++; - } - - /** - * 文件类 - * @class File - * @constructor 构造函数 - * @grammar new File( source ) => File - * @param {Lib.File} source [lib.File](#Lib.File)实例, 此source对象是带有Runtime信息的。 - */ - function WUFile( source ) { - - /** - * 文件名,包括扩展名(后缀) - * @property name - * @type {string} - */ - this.name = source.name || 'Untitled'; - - /** - * 文件体积(字节) - * @property size - * @type {uint} - * @default 0 - */ - this.size = source.size || 0; - - /** - * 文件MIMETYPE类型,与文件类型的对应关系请参考[http://t.cn/z8ZnFny](http://t.cn/z8ZnFny) - * @property type - * @type {string} - * @default 'application/octet-stream' - */ - this.type = source.type || 'application/octet-stream'; - - /** - * 文件最后修改日期 - * @property lastModifiedDate - * @type {int} - * @default 当前时间戳 - */ - this.lastModifiedDate = source.lastModifiedDate || (new Date() * 1); - - /** - * 文件ID,每个对象具有唯一ID,与文件名无关 - * @property id - * @type {string} - */ - this.id = gid(); - - /** - * 文件扩展名,通过文件名获取,例如test.png的扩展名为png - * @property ext - * @type {string} - */ - this.ext = rExt.exec( this.name ) ? RegExp.$1 : ''; - - - /** - * 状态文字说明。在不同的status语境下有不同的用途。 - * @property statusText - * @type {string} - */ - this.statusText = ''; - - // 存储文件状态,防止通过属性直接修改 - statusMap[ this.id ] = WUFile.Status.INITED; - - this.source = source; - this.loaded = 0; - - this.on( 'error', function( msg ) { - this.setStatus( WUFile.Status.ERROR, msg ); - }); - } - - $.extend( WUFile.prototype, { - - /** - * 设置状态,状态变化时会触发`change`事件。 - * @method setStatus - * @grammar setStatus( status[, statusText] ); - * @param {File.Status|String} status [文件状态值](#WebUploader:File:File.Status) - * @param {String} [statusText=''] 状态说明,常在error时使用,用http, abort,server等来标记是由于什么原因导致文件错误。 - */ - setStatus: function( status, text ) { - - var prevStatus = statusMap[ this.id ]; - - typeof text !== 'undefined' && (this.statusText = text); - - if ( status !== prevStatus ) { - statusMap[ this.id ] = status; - /** - * 文件状态变化 - * @event statuschange - */ - this.trigger( 'statuschange', status, prevStatus ); - } - - }, - - /** - * 获取文件状态 - * @return {File.Status} - * @example - 文件状态具体包括以下几种类型: - { - // 初始化 - INITED: 0, - // 已入队列 - QUEUED: 1, - // 正在上传 - PROGRESS: 2, - // 上传出错 - ERROR: 3, - // 上传成功 - COMPLETE: 4, - // 上传取消 - CANCELLED: 5 - } - */ - getStatus: function() { - return statusMap[ this.id ]; - }, - - /** - * 获取文件原始信息。 - * @return {*} - */ - getSource: function() { - return this.source; - }, - - destroy: function() { - this.off(); - delete statusMap[ this.id ]; - } - }); - - Mediator.installTo( WUFile.prototype ); - - /** - * 文件状态值,具体包括以下几种类型: - * * `inited` 初始状态 - * * `queued` 已经进入队列, 等待上传 - * * `progress` 上传中 - * * `complete` 上传完成。 - * * `error` 上传出错,可重试 - * * `interrupt` 上传中断,可续传。 - * * `invalid` 文件不合格,不能重试上传。会自动从队列中移除。 - * * `cancelled` 文件被移除。 - * @property {Object} Status - * @namespace File - * @class File - * @static - */ - WUFile.Status = { - INITED: 'inited', // 初始状态 - QUEUED: 'queued', // 已经进入队列, 等待上传 - PROGRESS: 'progress', // 上传中 - ERROR: 'error', // 上传出错,可重试 - COMPLETE: 'complete', // 上传完成。 - CANCELLED: 'cancelled', // 上传取消。 - INTERRUPT: 'interrupt', // 上传中断,可续传。 - INVALID: 'invalid' // 文件不合格,不能重试上传。 - }; - - return WUFile; - }); - - /** - * @fileOverview 文件队列 - */ - define('queue',[ - 'base', - 'mediator', - 'file' - ], function( Base, Mediator, WUFile ) { - - var $ = Base.$, - STATUS = WUFile.Status; - - /** - * 文件队列, 用来存储各个状态中的文件。 - * @class Queue - * @extends Mediator - */ - function Queue() { - - /** - * 统计文件数。 - * * `numOfQueue` 队列中的文件数。 - * * `numOfSuccess` 上传成功的文件数 - * * `numOfCancel` 被取消的文件数 - * * `numOfProgress` 正在上传中的文件数 - * * `numOfUploadFailed` 上传错误的文件数。 - * * `numOfInvalid` 无效的文件数。 - * * `numofDeleted` 被移除的文件数。 - * @property {Object} stats - */ - this.stats = { - numOfQueue: 0, - numOfSuccess: 0, - numOfCancel: 0, - numOfProgress: 0, - numOfUploadFailed: 0, - numOfInvalid: 0, - numofDeleted: 0, - numofInterrupt: 0 - }; - - // 上传队列,仅包括等待上传的文件 - this._queue = []; - - // 存储所有文件 - this._map = {}; - } - - $.extend( Queue.prototype, { - - /** - * 将新文件加入对队列尾部 - * - * @method append - * @param {File} file 文件对象 - */ - append: function( file ) { - this._queue.push( file ); - this._fileAdded( file ); - return this; - }, - - /** - * 将新文件加入对队列头部 - * - * @method prepend - * @param {File} file 文件对象 - */ - prepend: function( file ) { - this._queue.unshift( file ); - this._fileAdded( file ); - return this; - }, - - /** - * 获取文件对象 - * - * @method getFile - * @param {String} fileId 文件ID - * @return {File} - */ - getFile: function( fileId ) { - if ( typeof fileId !== 'string' ) { - return fileId; - } - return this._map[ fileId ]; - }, - - /** - * 从队列中取出一个指定状态的文件。 - * @grammar fetch( status ) => File - * @method fetch - * @param {String} status [文件状态值](#WebUploader:File:File.Status) - * @return {File} [File](#WebUploader:File) - */ - fetch: function( status ) { - var len = this._queue.length, - i, file; - - status = status || STATUS.QUEUED; - - for ( i = 0; i < len; i++ ) { - file = this._queue[ i ]; - - if ( status === file.getStatus() ) { - return file; - } - } - - return null; - }, - - /** - * 对队列进行排序,能够控制文件上传顺序。 - * @grammar sort( fn ) => undefined - * @method sort - * @param {Function} fn 排序方法 - */ - sort: function( fn ) { - if ( typeof fn === 'function' ) { - this._queue.sort( fn ); - } - }, - - /** - * 获取指定类型的文件列表, 列表中每一个成员为[File](#WebUploader:File)对象。 - * @grammar getFiles( [status1[, status2 ...]] ) => Array - * @method getFiles - * @param {String} [status] [文件状态值](#WebUploader:File:File.Status) - */ - getFiles: function() { - var sts = [].slice.call( arguments, 0 ), - ret = [], - i = 0, - len = this._queue.length, - file; - - for ( ; i < len; i++ ) { - file = this._queue[ i ]; - - if ( sts.length && !~$.inArray( file.getStatus(), sts ) ) { - continue; - } - - ret.push( file ); - } - - return ret; - }, - - /** - * 在队列中删除文件。 - * @grammar removeFile( file ) => Array - * @method removeFile - * @param {File} 文件对象。 - */ - removeFile: function( file ) { - var me = this, - existing = this._map[ file.id ]; - - if ( existing ) { - delete this._map[ file.id ]; - file.destroy(); - this.stats.numofDeleted++; - } - }, - - _fileAdded: function( file ) { - var me = this, - existing = this._map[ file.id ]; - - if ( !existing ) { - this._map[ file.id ] = file; - - file.on( 'statuschange', function( cur, pre ) { - me._onFileStatusChange( cur, pre ); - }); - } - }, - - _onFileStatusChange: function( curStatus, preStatus ) { - var stats = this.stats; - - switch ( preStatus ) { - case STATUS.PROGRESS: - stats.numOfProgress--; - break; - - case STATUS.QUEUED: - stats.numOfQueue --; - break; - - case STATUS.ERROR: - stats.numOfUploadFailed--; - break; - - case STATUS.INVALID: - stats.numOfInvalid--; - break; - - case STATUS.INTERRUPT: - stats.numofInterrupt--; - break; - } - - switch ( curStatus ) { - case STATUS.QUEUED: - stats.numOfQueue++; - break; - - case STATUS.PROGRESS: - stats.numOfProgress++; - break; - - case STATUS.ERROR: - stats.numOfUploadFailed++; - break; - - case STATUS.COMPLETE: - stats.numOfSuccess++; - break; - - case STATUS.CANCELLED: - stats.numOfCancel++; - break; - - - case STATUS.INVALID: - stats.numOfInvalid++; - break; - - case STATUS.INTERRUPT: - stats.numofInterrupt++; - break; - } - } - - }); - - Mediator.installTo( Queue.prototype ); - - return Queue; - }); - /** - * @fileOverview 队列 - */ - define('widgets/queue',[ - 'base', - 'uploader', - 'queue', - 'file', - 'lib/file', - 'runtime/client', - 'widgets/widget' - ], function( Base, Uploader, Queue, WUFile, File, RuntimeClient ) { - - var $ = Base.$, - rExt = /\.\w+$/, - Status = WUFile.Status; - - return Uploader.register({ - name: 'queue', - - init: function( opts ) { - var me = this, - deferred, len, i, item, arr, accept, runtime; - - if ( $.isPlainObject( opts.accept ) ) { - opts.accept = [ opts.accept ]; - } - - // accept中的中生成匹配正则。 - if ( opts.accept ) { - arr = []; - - for ( i = 0, len = opts.accept.length; i < len; i++ ) { - item = opts.accept[ i ].extensions; - item && arr.push( item ); - } - - if ( arr.length ) { - accept = '\\.' + arr.join(',') - .replace( /,/g, '$|\\.' ) - .replace( /\*/g, '.*' ) + '$'; - } - - me.accept = new RegExp( accept, 'i' ); - } - - me.queue = new Queue(); - me.stats = me.queue.stats; - - // 如果当前不是html5运行时,那就算了。 - // 不执行后续操作 - if ( this.request('predict-runtime-type') !== 'html5' ) { - return; - } - - // 创建一个 html5 运行时的 placeholder - // 以至于外部添加原生 File 对象的时候能正确包裹一下供 webuploader 使用。 - deferred = Base.Deferred(); - this.placeholder = runtime = new RuntimeClient('Placeholder'); - runtime.connectRuntime({ - runtimeOrder: 'html5' - }, function() { - me._ruid = runtime.getRuid(); - deferred.resolve(); - }); - return deferred.promise(); - }, - - - // 为了支持外部直接添加一个原生File对象。 - _wrapFile: function( file ) { - if ( !(file instanceof WUFile) ) { - - if ( !(file instanceof File) ) { - if ( !this._ruid ) { - throw new Error('Can\'t add external files.'); - } - file = new File( this._ruid, file ); - } - - file = new WUFile( file ); - } - - return file; - }, - - // 判断文件是否可以被加入队列 - acceptFile: function( file ) { - var invalid = !file || !file.size || this.accept && - - // 如果名字中有后缀,才做后缀白名单处理。 - rExt.exec( file.name ) && !this.accept.test( file.name ); - - return !invalid; - }, - - - /** - * @event beforeFileQueued - * @param {File} file File对象 - * @description 当文件被加入队列之前触发,此事件的handler返回值为`false`,则此文件不会被添加进入队列。 - * @for Uploader - */ - - /** - * @event fileQueued - * @param {File} file File对象 - * @description 当文件被加入队列以后触发。 - * @for Uploader - */ - - _addFile: function( file ) { - var me = this; - - file = me._wrapFile( file ); - - // 不过类型判断允许不允许,先派送 `beforeFileQueued` - if ( !me.owner.trigger( 'beforeFileQueued', file ) ) { - return; - } - - // 类型不匹配,则派送错误事件,并返回。 - if ( !me.acceptFile( file ) ) { - me.owner.trigger( 'error', 'Q_TYPE_DENIED', file ); - return; - } - - me.queue.append( file ); - me.owner.trigger( 'fileQueued', file ); - return file; - }, - - getFile: function( fileId ) { - return this.queue.getFile( fileId ); - }, - - /** - * @event filesQueued - * @param {File} files 数组,内容为原始File(lib/File)对象。 - * @description 当一批文件添加进队列以后触发。 - * @for Uploader - */ - - /** - * @property {Boolean} [auto=false] - * @namespace options - * @for Uploader - * @description 设置为 true 后,不需要手动调用上传,有文件选择即开始上传。 - * - */ - - /** - * @method addFiles - * @grammar addFiles( file ) => undefined - * @grammar addFiles( [file1, file2 ...] ) => undefined - * @param {Array of File or File} [files] Files 对象 数组 - * @description 添加文件到队列 - * @for Uploader - */ - addFile: function( files ) { - var me = this; - - if ( !files.length ) { - files = [ files ]; - } - - files = $.map( files, function( file ) { - return me._addFile( file ); - }); - - me.owner.trigger( 'filesQueued', files ); - - if ( me.options.auto ) { - setTimeout(function() { - me.request('start-upload'); - }, 20 ); - } - }, - - getStats: function() { - return this.stats; - }, - - /** - * @event fileDequeued - * @param {File} file File对象 - * @description 当文件被移除队列后触发。 - * @for Uploader - */ - - /** - * @method removeFile - * @grammar removeFile( file ) => undefined - * @grammar removeFile( id ) => undefined - * @grammar removeFile( file, true ) => undefined - * @grammar removeFile( id, true ) => undefined - * @param {File|id} file File对象或这File对象的id - * @description 移除某一文件, 默认只会标记文件状态为已取消,如果第二个参数为 `true` 则会从 queue 中移除。 - * @for Uploader - * @example - * - * $li.on('click', '.remove-this', function() { - * uploader.removeFile( file ); - * }) - */ - removeFile: function( file, remove ) { - var me = this; - - file = file.id ? file : me.queue.getFile( file ); - - this.request( 'cancel-file', file ); - - if ( remove ) { - this.queue.removeFile( file ); - } - }, - - /** - * @method getFiles - * @grammar getFiles() => Array - * @grammar getFiles( status1, status2, status... ) => Array - * @description 返回指定状态的文件集合,不传参数将返回所有状态的文件。 - * @for Uploader - * @example - * console.log( uploader.getFiles() ); // => all files - * console.log( uploader.getFiles('error') ) // => all error files. - */ - getFiles: function() { - return this.queue.getFiles.apply( this.queue, arguments ); - }, - - fetchFile: function() { - return this.queue.fetch.apply( this.queue, arguments ); - }, - - /** - * @method retry - * @grammar retry() => undefined - * @grammar retry( file ) => undefined - * @description 重试上传,重试指定文件,或者从出错的文件开始重新上传。 - * @for Uploader - * @example - * function retry() { - * uploader.retry(); - * } - */ - retry: function( file, noForceStart ) { - var me = this, - files, i, len; - - if ( file ) { - file = file.id ? file : me.queue.getFile( file ); - file.setStatus( Status.QUEUED ); - noForceStart || me.request('start-upload'); - return; - } - - files = me.queue.getFiles( Status.ERROR ); - i = 0; - len = files.length; - - for ( ; i < len; i++ ) { - file = files[ i ]; - file.setStatus( Status.QUEUED ); - } - - me.request('start-upload'); - }, - - /** - * @method sort - * @grammar sort( fn ) => undefined - * @description 排序队列中的文件,在上传之前调整可以控制上传顺序。 - * @for Uploader - */ - sortFiles: function() { - return this.queue.sort.apply( this.queue, arguments ); - }, - - /** - * @event reset - * @description 当 uploader 被重置的时候触发。 - * @for Uploader - */ - - /** - * @method reset - * @grammar reset() => undefined - * @description 重置uploader。目前只重置了队列。 - * @for Uploader - * @example - * uploader.reset(); - */ - reset: function() { - this.owner.trigger('reset'); - this.queue = new Queue(); - this.stats = this.queue.stats; - }, - - destroy: function() { - this.reset(); - this.placeholder && this.placeholder.destroy(); - } - }); - - }); - /** - * @fileOverview 添加获取Runtime相关信息的方法。 - */ - define('widgets/runtime',[ - 'uploader', - 'runtime/runtime', - 'widgets/widget' - ], function( Uploader, Runtime ) { - - Uploader.support = function() { - return Runtime.hasRuntime.apply( Runtime, arguments ); - }; - - /** - * @property {Object} [runtimeOrder=html5,flash] - * @namespace options - * @for Uploader - * @description 指定运行时启动顺序。默认会想尝试 html5 是否支持,如果支持则使用 html5, 否则则使用 flash. - * - * 可以将此值设置成 `flash`,来强制使用 flash 运行时。 - */ - - return Uploader.register({ - name: 'runtime', - - init: function() { - if ( !this.predictRuntimeType() ) { - throw Error('Runtime Error'); - } - }, - - /** - * 预测Uploader将采用哪个`Runtime` - * @grammar predictRuntimeType() => String - * @method predictRuntimeType - * @for Uploader - */ - predictRuntimeType: function() { - var orders = this.options.runtimeOrder || Runtime.orders, - type = this.type, - i, len; - - if ( !type ) { - orders = orders.split( /\s*,\s*/g ); - - for ( i = 0, len = orders.length; i < len; i++ ) { - if ( Runtime.hasRuntime( orders[ i ] ) ) { - this.type = type = orders[ i ]; - break; - } - } - } - - return type; - } - }); - }); - /** - * @fileOverview Transport - */ - define('lib/transport',[ - 'base', - 'runtime/client', - 'mediator' - ], function( Base, RuntimeClient, Mediator ) { - - var $ = Base.$; - - function Transport( opts ) { - var me = this; - - opts = me.options = $.extend( true, {}, Transport.options, opts || {} ); - RuntimeClient.call( this, 'Transport' ); - - this._blob = null; - this._formData = opts.formData || {}; - this._headers = opts.headers || {}; - - this.on( 'progress', this._timeout ); - this.on( 'load error', function() { - me.trigger( 'progress', 1 ); - clearTimeout( me._timer ); - }); - } - - Transport.options = { - server: '', - method: 'POST', - - // 跨域时,是否允许携带cookie, 只有html5 runtime才有效 - withCredentials: false, - fileVal: 'file', - timeout: 2 * 60 * 1000, // 2分钟 - formData: {}, - headers: {}, - sendAsBinary: false - }; - - $.extend( Transport.prototype, { - - // 添加Blob, 只能添加一次,最后一次有效。 - appendBlob: function( key, blob, filename ) { - var me = this, - opts = me.options; - - if ( me.getRuid() ) { - me.disconnectRuntime(); - } - - // 连接到blob归属的同一个runtime. - me.connectRuntime( blob.ruid, function() { - me.exec('init'); - }); - - me._blob = blob; - opts.fileVal = key || opts.fileVal; - opts.filename = filename || opts.filename; - }, - - // 添加其他字段 - append: function( key, value ) { - if ( typeof key === 'object' ) { - $.extend( this._formData, key ); - } else { - this._formData[ key ] = value; - } - }, - - setRequestHeader: function( key, value ) { - if ( typeof key === 'object' ) { - $.extend( this._headers, key ); - } else { - this._headers[ key ] = value; - } - }, - - send: function( method ) { - this.exec( 'send', method ); - this._timeout(); - }, - - abort: function() { - clearTimeout( this._timer ); - return this.exec('abort'); - }, - - destroy: function() { - this.trigger('destroy'); - this.off(); - this.exec('destroy'); - this.disconnectRuntime(); - }, - - getResponse: function() { - return this.exec('getResponse'); - }, - - getResponseAsJson: function() { - return this.exec('getResponseAsJson'); - }, - - getStatus: function() { - return this.exec('getStatus'); - }, - - _timeout: function() { - var me = this, - duration = me.options.timeout; - - if ( !duration ) { - return; - } - - clearTimeout( me._timer ); - me._timer = setTimeout(function() { - me.abort(); - me.trigger( 'error', 'timeout' ); - }, duration ); - } - - }); - - // 让Transport具备事件功能。 - Mediator.installTo( Transport.prototype ); - - return Transport; - }); - /** - * @fileOverview 负责文件上传相关。 - */ - define('widgets/upload',[ - 'base', - 'uploader', - 'file', - 'lib/transport', - 'widgets/widget' - ], function( Base, Uploader, WUFile, Transport ) { - - var $ = Base.$, - isPromise = Base.isPromise, - Status = WUFile.Status; - - // 添加默认配置项 - $.extend( Uploader.options, { - - - /** - * @property {Boolean} [prepareNextFile=false] - * @namespace options - * @for Uploader - * @description 是否允许在文件传输时提前把下一个文件准备好。 - * 对于一个文件的准备工作比较耗时,比如图片压缩,md5序列化。 - * 如果能提前在当前文件传输期处理,可以节省总体耗时。 - */ - prepareNextFile: false, - - /** - * @property {Boolean} [chunked=false] - * @namespace options - * @for Uploader - * @description 是否要分片处理大文件上传。 - */ - chunked: false, - - /** - * @property {Boolean} [chunkSize=5242880] - * @namespace options - * @for Uploader - * @description 如果要分片,分多大一片? 默认大小为5M. - */ - chunkSize: 5 * 1024 * 1024, - - /** - * @property {Boolean} [chunkRetry=2] - * @namespace options - * @for Uploader - * @description 如果某个分片由于网络问题出错,允许自动重传多少次? - */ - chunkRetry: 2, - - /** - * @property {Boolean} [threads=3] - * @namespace options - * @for Uploader - * @description 上传并发数。允许同时最大上传进程数。 - */ - threads: 3, - - - /** - * @property {Object} [formData={}] - * @namespace options - * @for Uploader - * @description 文件上传请求的参数表,每次发送都会发送此对象中的参数。 - */ - formData: {} - - /** - * @property {Object} [fileVal='file'] - * @namespace options - * @for Uploader - * @description 设置文件上传域的name。 - */ - - /** - * @property {Object} [method='POST'] - * @namespace options - * @for Uploader - * @description 文件上传方式,`POST`或者`GET`。 - */ - - /** - * @property {Object} [sendAsBinary=false] - * @namespace options - * @for Uploader - * @description 是否已二进制的流的方式发送文件,这样整个上传内容`php://input`都为文件内容, - * 其他参数在$_GET数组中。 - */ - }); - - // 负责将文件切片。 - function CuteFile( file, chunkSize ) { - var pending = [], - blob = file.source, - total = blob.size, - chunks = chunkSize ? Math.ceil( total / chunkSize ) : 1, - start = 0, - index = 0, - len, api; - - api = { - file: file, - - has: function() { - return !!pending.length; - }, - - shift: function() { - return pending.shift(); - }, - - unshift: function( block ) { - pending.unshift( block ); - } - }; - - while ( index < chunks ) { - len = Math.min( chunkSize, total - start ); - - pending.push({ - file: file, - start: start, - end: chunkSize ? (start + len) : total, - total: total, - chunks: chunks, - chunk: index++, - cuted: api - }); - start += len; - } - - file.blocks = pending.concat(); - file.remaning = pending.length; - - return api; - } - - Uploader.register({ - name: 'upload', - - init: function() { - var owner = this.owner, - me = this; - - this.runing = false; - this.progress = false; - - owner - .on( 'startUpload', function() { - me.progress = true; - }) - .on( 'uploadFinished', function() { - me.progress = false; - }); - - // 记录当前正在传的数据,跟threads相关 - this.pool = []; - - // 缓存分好片的文件。 - this.stack = []; - - // 缓存即将上传的文件。 - this.pending = []; - - // 跟踪还有多少分片在上传中但是没有完成上传。 - this.remaning = 0; - this.__tick = Base.bindFn( this._tick, this ); - - owner.on( 'uploadComplete', function( file ) { - - // 把其他块取消了。 - file.blocks && $.each( file.blocks, function( _, v ) { - v.transport && (v.transport.abort(), v.transport.destroy()); - delete v.transport; - }); - - delete file.blocks; - delete file.remaning; - }); - }, - - reset: function() { - this.request( 'stop-upload', true ); - this.runing = false; - this.pool = []; - this.stack = []; - this.pending = []; - this.remaning = 0; - this._trigged = false; - this._promise = null; - }, - - /** - * @event startUpload - * @description 当开始上传流程时触发。 - * @for Uploader - */ - - /** - * 开始上传。此方法可以从初始状态调用开始上传流程,也可以从暂停状态调用,继续上传流程。 - * - * 可以指定开始某一个文件。 - * @grammar upload() => undefined - * @grammar upload( file | fileId) => undefined - * @method upload - * @for Uploader - */ - startUpload: function(file) { - var me = this; - - // 移出invalid的文件 - $.each( me.request( 'get-files', Status.INVALID ), function() { - me.request( 'remove-file', this ); - }); - - // 如果指定了开始某个文件,则只开始指定文件。 - if ( file ) { - file = file.id ? file : me.request( 'get-file', file ); - - if (file.getStatus() === Status.INTERRUPT) { - $.each( me.pool, function( _, v ) { - - // 之前暂停过。 - if (v.file !== file) { - return; - } - - v.transport && v.transport.send(); - }); - - file.setStatus( Status.QUEUED ); - } else if (file.getStatus() === Status.PROGRESS) { - return; - } else { - file.setStatus( Status.QUEUED ); - } - } else { - $.each( me.request( 'get-files', [ Status.INITED ] ), function() { - this.setStatus( Status.QUEUED ); - }); - } - - if ( me.runing ) { - return; - } - - me.runing = true; - - var files = []; - - // 如果有暂停的,则续传 - $.each( me.pool, function( _, v ) { - var file = v.file; - - if ( file.getStatus() === Status.INTERRUPT ) { - files.push(file); - me._trigged = false; - v.transport && v.transport.send(); - } - }); - - var file; - while ( (file = files.shift()) ) { - file.setStatus( Status.PROGRESS ); - } - - file || $.each( me.request( 'get-files', - Status.INTERRUPT ), function() { - this.setStatus( Status.PROGRESS ); - }); - - me._trigged = false; - Base.nextTick( me.__tick ); - me.owner.trigger('startUpload'); - }, - - /** - * @event stopUpload - * @description 当开始上传流程暂停时触发。 - * @for Uploader - */ - - /** - * 暂停上传。第一个参数为是否中断上传当前正在上传的文件。 - * - * 如果第一个参数是文件,则只暂停指定文件。 - * @grammar stop() => undefined - * @grammar stop( true ) => undefined - * @grammar stop( file ) => undefined - * @method stop - * @for Uploader - */ - stopUpload: function( file, interrupt ) { - var me = this; - - if (file === true) { - interrupt = file; - file = null; - } - - if ( me.runing === false ) { - return; - } - - // 如果只是暂停某个文件。 - if ( file ) { - file = file.id ? file : me.request( 'get-file', file ); - - if ( file.getStatus() !== Status.PROGRESS && - file.getStatus() !== Status.QUEUED ) { - return; - } - - file.setStatus( Status.INTERRUPT ); - $.each( me.pool, function( _, v ) { - - // 只 abort 指定的文件。 - if (v.file !== file) { - return; - } - - v.transport && v.transport.abort(); - me._putback(v); - me._popBlock(v); - }); - - return Base.nextTick( me.__tick ); - } - - me.runing = false; - - if (this._promise && this._promise.file) { - this._promise.file.setStatus( Status.INTERRUPT ); - } - - interrupt && $.each( me.pool, function( _, v ) { - v.transport && v.transport.abort(); - v.file.setStatus( Status.INTERRUPT ); - }); - - me.owner.trigger('stopUpload'); - }, - - /** - * @method cancelFile - * @grammar cancelFile( file ) => undefined - * @grammar cancelFile( id ) => undefined - * @param {File|id} file File对象或这File对象的id - * @description 标记文件状态为已取消, 同时将中断文件传输。 - * @for Uploader - * @example - * - * $li.on('click', '.remove-this', function() { - * uploader.cancelFile( file ); - * }) - */ - cancelFile: function( file ) { - file = file.id ? file : this.request( 'get-file', file ); - - // 如果正在上传。 - file.blocks && $.each( file.blocks, function( _, v ) { - var _tr = v.transport; - - if ( _tr ) { - _tr.abort(); - _tr.destroy(); - delete v.transport; - } - }); - - file.setStatus( Status.CANCELLED ); - this.owner.trigger( 'fileDequeued', file ); - }, - - /** - * 判断`Uplaode`r是否正在上传中。 - * @grammar isInProgress() => Boolean - * @method isInProgress - * @for Uploader - */ - isInProgress: function() { - return !!this.progress; - }, - - _getStats: function() { - return this.request('get-stats'); - }, - - /** - * 掉过一个文件上传,直接标记指定文件为已上传状态。 - * @grammar skipFile( file ) => undefined - * @method skipFile - * @for Uploader - */ - skipFile: function( file, status ) { - file = file.id ? file : this.request( 'get-file', file ); - - file.setStatus( status || Status.COMPLETE ); - file.skipped = true; - - // 如果正在上传。 - file.blocks && $.each( file.blocks, function( _, v ) { - var _tr = v.transport; - - if ( _tr ) { - _tr.abort(); - _tr.destroy(); - delete v.transport; - } - }); - - this.owner.trigger( 'uploadSkip', file ); - }, - - /** - * @event uploadFinished - * @description 当所有文件上传结束时触发。 - * @for Uploader - */ - _tick: function() { - var me = this, - opts = me.options, - fn, val; - - // 上一个promise还没有结束,则等待完成后再执行。 - if ( me._promise ) { - return me._promise.always( me.__tick ); - } - - // 还有位置,且还有文件要处理的话。 - if ( me.pool.length < opts.threads && (val = me._nextBlock()) ) { - me._trigged = false; - - fn = function( val ) { - me._promise = null; - - // 有可能是reject过来的,所以要检测val的类型。 - val && val.file && me._startSend( val ); - Base.nextTick( me.__tick ); - }; - - me._promise = isPromise( val ) ? val.always( fn ) : fn( val ); - - // 没有要上传的了,且没有正在传输的了。 - } else if ( !me.remaning && !me._getStats().numOfQueue && - !me._getStats().numofInterrupt ) { - me.runing = false; - - me._trigged || Base.nextTick(function() { - me.owner.trigger('uploadFinished'); - }); - me._trigged = true; - } - }, - - _putback: function(block) { - var idx; - - block.cuted.unshift(block); - idx = this.stack.indexOf(block.cuted); - - if (!~idx) { - this.stack.unshift(block.cuted); - } - }, - - _getStack: function() { - var i = 0, - act; - - while ( (act = this.stack[ i++ ]) ) { - if ( act.has() && act.file.getStatus() === Status.PROGRESS ) { - return act; - } else if (!act.has() || - act.file.getStatus() !== Status.PROGRESS && - act.file.getStatus() !== Status.INTERRUPT ) { - - // 把已经处理完了的,或者,状态为非 progress(上传中)、 - // interupt(暂停中) 的移除。 - this.stack.splice( --i, 1 ); - } - } - - return null; - }, - - _nextBlock: function() { - var me = this, - opts = me.options, - act, next, done, preparing; - - // 如果当前文件还有没有需要传输的,则直接返回剩下的。 - if ( (act = this._getStack()) ) { - - // 是否提前准备下一个文件 - if ( opts.prepareNextFile && !me.pending.length ) { - me._prepareNextFile(); - } - - return act.shift(); - - // 否则,如果正在运行,则准备下一个文件,并等待完成后返回下个分片。 - } else if ( me.runing ) { - - // 如果缓存中有,则直接在缓存中取,没有则去queue中取。 - if ( !me.pending.length && me._getStats().numOfQueue ) { - me._prepareNextFile(); - } - - next = me.pending.shift(); - done = function( file ) { - if ( !file ) { - return null; - } - - act = CuteFile( file, opts.chunked ? opts.chunkSize : 0 ); - me.stack.push(act); - return act.shift(); - }; - - // 文件可能还在prepare中,也有可能已经完全准备好了。 - if ( isPromise( next) ) { - preparing = next.file; - next = next[ next.pipe ? 'pipe' : 'then' ]( done ); - next.file = preparing; - return next; - } - - return done( next ); - } - }, - - - /** - * @event uploadStart - * @param {File} file File对象 - * @description 某个文件开始上传前触发,一个文件只会触发一次。 - * @for Uploader - */ - _prepareNextFile: function() { - var me = this, - file = me.request('fetch-file'), - pending = me.pending, - promise; - - if ( file ) { - promise = me.request( 'before-send-file', file, function() { - - // 有可能文件被skip掉了。文件被skip掉后,状态坑定不是Queued. - if ( file.getStatus() === Status.PROGRESS || - file.getStatus() === Status.INTERRUPT ) { - return file; - } - - return me._finishFile( file ); - }); - - me.owner.trigger( 'uploadStart', file ); - file.setStatus( Status.PROGRESS ); - - promise.file = file; - - // 如果还在pending中,则替换成文件本身。 - promise.done(function() { - var idx = $.inArray( promise, pending ); - - ~idx && pending.splice( idx, 1, file ); - }); - - // befeore-send-file的钩子就有错误发生。 - promise.fail(function( reason ) { - file.setStatus( Status.ERROR, reason ); - me.owner.trigger( 'uploadError', file, reason ); - me.owner.trigger( 'uploadComplete', file ); - }); - - pending.push( promise ); - } - }, - - // 让出位置了,可以让其他分片开始上传 - _popBlock: function( block ) { - var idx = $.inArray( block, this.pool ); - - this.pool.splice( idx, 1 ); - block.file.remaning--; - this.remaning--; - }, - - // 开始上传,可以被掉过。如果promise被reject了,则表示跳过此分片。 - _startSend: function( block ) { - var me = this, - file = block.file, - promise; - - // 有可能在 before-send-file 的 promise 期间改变了文件状态。 - // 如:暂停,取消 - // 我们不能中断 promise, 但是可以在 promise 完后,不做上传操作。 - if ( file.getStatus() !== Status.PROGRESS ) { - - // 如果是中断,则还需要放回去。 - if (file.getStatus() === Status.INTERRUPT) { - me._putback(block); - } - - return; - } - - me.pool.push( block ); - me.remaning++; - - // 如果没有分片,则直接使用原始的。 - // 不会丢失content-type信息。 - block.blob = block.chunks === 1 ? file.source : - file.source.slice( block.start, block.end ); - - // hook, 每个分片发送之前可能要做些异步的事情。 - promise = me.request( 'before-send', block, function() { - - // 有可能文件已经上传出错了,所以不需要再传输了。 - if ( file.getStatus() === Status.PROGRESS ) { - me._doSend( block ); - } else { - me._popBlock( block ); - Base.nextTick( me.__tick ); - } - }); - - // 如果为fail了,则跳过此分片。 - promise.fail(function() { - if ( file.remaning === 1 ) { - me._finishFile( file ).always(function() { - block.percentage = 1; - me._popBlock( block ); - me.owner.trigger( 'uploadComplete', file ); - Base.nextTick( me.__tick ); - }); - } else { - block.percentage = 1; - me.updateFileProgress( file ); - me._popBlock( block ); - Base.nextTick( me.__tick ); - } - }); - }, - - - /** - * @event uploadBeforeSend - * @param {Object} object - * @param {Object} data 默认的上传参数,可以扩展此对象来控制上传参数。 - * @param {Object} headers 可以扩展此对象来控制上传头部。 - * @description 当某个文件的分块在发送前触发,主要用来询问是否要添加附带参数,大文件在开起分片上传的前提下此事件可能会触发多次。 - * @for Uploader - */ - - /** - * @event uploadAccept - * @param {Object} object - * @param {Object} ret 服务端的返回数据,json格式,如果服务端不是json格式,从ret._raw中取数据,自行解析。 - * @description 当某个文件上传到服务端响应后,会派送此事件来询问服务端响应是否有效。如果此事件handler返回值为`false`, 则此文件将派送`server`类型的`uploadError`事件。 - * @for Uploader - */ - - /** - * @event uploadProgress - * @param {File} file File对象 - * @param {Number} percentage 上传进度 - * @description 上传过程中触发,携带上传进度。 - * @for Uploader - */ - - - /** - * @event uploadError - * @param {File} file File对象 - * @param {String} reason 出错的code - * @description 当文件上传出错时触发。 - * @for Uploader - */ - - /** - * @event uploadSuccess - * @param {File} file File对象 - * @param {Object} response 服务端返回的数据 - * @description 当文件上传成功时触发。 - * @for Uploader - */ - - /** - * @event uploadComplete - * @param {File} [file] File对象 - * @description 不管成功或者失败,文件上传完成时触发。 - * @for Uploader - */ - - // 做上传操作。 - _doSend: function( block ) { - var me = this, - owner = me.owner, - opts = me.options, - file = block.file, - tr = new Transport( opts ), - data = $.extend({}, opts.formData ), - headers = $.extend({}, opts.headers ), - requestAccept, ret; - - block.transport = tr; - - tr.on( 'destroy', function() { - delete block.transport; - me._popBlock( block ); - Base.nextTick( me.__tick ); - }); - - // 广播上传进度。以文件为单位。 - tr.on( 'progress', function( percentage ) { - block.percentage = percentage; - me.updateFileProgress( file ); - }); - - // 用来询问,是否返回的结果是有错误的。 - requestAccept = function( reject ) { - var fn; - - ret = tr.getResponseAsJson() || {}; - ret._raw = tr.getResponse(); - fn = function( value ) { - reject = value; - }; - - // 服务端响应了,不代表成功了,询问是否响应正确。 - if ( !owner.trigger( 'uploadAccept', block, ret, fn ) ) { - reject = reject || 'server'; - } - - return reject; - }; - - // 尝试重试,然后广播文件上传出错。 - tr.on( 'error', function( type, flag ) { - block.retried = block.retried || 0; - - // 自动重试 - if ( block.chunks > 1 && ~'http,abort'.indexOf( type ) && - block.retried < opts.chunkRetry ) { - - block.retried++; - tr.send(); - - } else { - - // http status 500 ~ 600 - if ( !flag && type === 'server' ) { - type = requestAccept( type ); - } - - file.setStatus( Status.ERROR, type ); - owner.trigger( 'uploadError', file, type ); - owner.trigger( 'uploadComplete', file ); - } - }); - - // 上传成功 - tr.on( 'load', function() { - var reason; - - // 如果非预期,转向上传出错。 - if ( (reason = requestAccept()) ) { - tr.trigger( 'error', reason, true ); - return; - } - - // 全部上传完成。 - if ( file.remaning === 1 ) { - me._finishFile( file, ret ); - } else { - tr.destroy(); - } - }); - - // 配置默认的上传字段。 - data = $.extend( data, { - id: file.id, - name: file.name, - type: file.type, - lastModifiedDate: file.lastModifiedDate, - size: file.size - }); - - block.chunks > 1 && $.extend( data, { - chunks: block.chunks, - chunk: block.chunk - }); - - // 在发送之间可以添加字段什么的。。。 - // 如果默认的字段不够使用,可以通过监听此事件来扩展 - owner.trigger( 'uploadBeforeSend', block, data, headers ); - - // 开始发送。 - tr.appendBlob( opts.fileVal, block.blob, file.name ); - tr.append( data ); - tr.setRequestHeader( headers ); - tr.send(); - }, - - // 完成上传。 - _finishFile: function( file, ret, hds ) { - var owner = this.owner; - - return owner - .request( 'after-send-file', arguments, function() { - file.setStatus( Status.COMPLETE ); - owner.trigger( 'uploadSuccess', file, ret, hds ); - }) - .fail(function( reason ) { - - // 如果外部已经标记为invalid什么的,不再改状态。 - if ( file.getStatus() === Status.PROGRESS ) { - file.setStatus( Status.ERROR, reason ); - } - - owner.trigger( 'uploadError', file, reason ); - }) - .always(function() { - owner.trigger( 'uploadComplete', file ); - }); - }, - - updateFileProgress: function(file) { - var totalPercent = 0, - uploaded = 0; - - if (!file.blocks) { - return; - } - - $.each( file.blocks, function( _, v ) { - uploaded += (v.percentage || 0) * (v.end - v.start); - }); - - totalPercent = uploaded / file.size; - this.owner.trigger( 'uploadProgress', file, totalPercent || 0 ); - } - - }); - }); - /** - * @fileOverview 各种验证,包括文件总大小是否超出、单文件是否超出和文件是否重复。 - */ - - define('widgets/validator',[ - 'base', - 'uploader', - 'file', - 'widgets/widget' - ], function( Base, Uploader, WUFile ) { - - var $ = Base.$, - validators = {}, - api; - - /** - * @event error - * @param {String} type 错误类型。 - * @description 当validate不通过时,会以派送错误事件的形式通知调用者。通过`upload.on('error', handler)`可以捕获到此类错误,目前有以下错误会在特定的情况下派送错来。 - * - * * `Q_EXCEED_NUM_LIMIT` 在设置了`fileNumLimit`且尝试给`uploader`添加的文件数量超出这个值时派送。 - * * `Q_EXCEED_SIZE_LIMIT` 在设置了`Q_EXCEED_SIZE_LIMIT`且尝试给`uploader`添加的文件总大小超出这个值时派送。 - * * `Q_TYPE_DENIED` 当文件类型不满足时触发。。 - * @for Uploader - */ - - // 暴露给外面的api - api = { - - // 添加验证器 - addValidator: function( type, cb ) { - validators[ type ] = cb; - }, - - // 移除验证器 - removeValidator: function( type ) { - delete validators[ type ]; - } - }; - - // 在Uploader初始化的时候启动Validators的初始化 - Uploader.register({ - name: 'validator', - - init: function() { - var me = this; - Base.nextTick(function() { - $.each( validators, function() { - this.call( me.owner ); - }); - }); - } - }); - - /** - * @property {int} [fileNumLimit=undefined] - * @namespace options - * @for Uploader - * @description 验证文件总数量, 超出则不允许加入队列。 - */ - api.addValidator( 'fileNumLimit', function() { - var uploader = this, - opts = uploader.options, - count = 0, - max = parseInt( opts.fileNumLimit, 10 ), - flag = true; - - if ( !max ) { - return; - } - - uploader.on( 'beforeFileQueued', function( file ) { - - if ( count >= max && flag ) { - flag = false; - this.trigger( 'error', 'Q_EXCEED_NUM_LIMIT', max, file ); - setTimeout(function() { - flag = true; - }, 1 ); - } - - return count >= max ? false : true; - }); - - uploader.on( 'fileQueued', function() { - count++; - }); - - uploader.on( 'fileDequeued', function() { - count--; - }); - - uploader.on( 'reset', function() { - count = 0; - }); - }); - - - /** - * @property {int} [fileSizeLimit=undefined] - * @namespace options - * @for Uploader - * @description 验证文件总大小是否超出限制, 超出则不允许加入队列。 - */ - api.addValidator( 'fileSizeLimit', function() { - var uploader = this, - opts = uploader.options, - count = 0, - max = parseInt( opts.fileSizeLimit, 10 ), - flag = true; - - if ( !max ) { - return; - } - - uploader.on( 'beforeFileQueued', function( file ) { - var invalid = count + file.size > max; - - if ( invalid && flag ) { - flag = false; - this.trigger( 'error', 'Q_EXCEED_SIZE_LIMIT', max, file ); - setTimeout(function() { - flag = true; - }, 1 ); - } - - return invalid ? false : true; - }); - - uploader.on( 'fileQueued', function( file ) { - count += file.size; - }); - - uploader.on( 'fileDequeued', function( file ) { - count -= file.size; - }); - - uploader.on( 'reset', function() { - count = 0; - }); - }); - - /** - * @property {int} [fileSingleSizeLimit=undefined] - * @namespace options - * @for Uploader - * @description 验证单个文件大小是否超出限制, 超出则不允许加入队列。 - */ - api.addValidator( 'fileSingleSizeLimit', function() { - var uploader = this, - opts = uploader.options, - max = opts.fileSingleSizeLimit; - - if ( !max ) { - return; - } - - uploader.on( 'beforeFileQueued', function( file ) { - - if ( file.size > max ) { - file.setStatus( WUFile.Status.INVALID, 'exceed_size' ); - this.trigger( 'error', 'F_EXCEED_SIZE', max, file ); - return false; - } - - }); - - }); - - /** - * @property {Boolean} [duplicate=undefined] - * @namespace options - * @for Uploader - * @description 去重, 根据文件名字、文件大小和最后修改时间来生成hash Key. - */ - api.addValidator( 'duplicate', function() { - var uploader = this, - opts = uploader.options, - mapping = {}; - - if ( opts.duplicate ) { - return; - } - - function hashString( str ) { - var hash = 0, - i = 0, - len = str.length, - _char; - - for ( ; i < len; i++ ) { - _char = str.charCodeAt( i ); - hash = _char + (hash << 6) + (hash << 16) - hash; - } - - return hash; - } - - uploader.on( 'beforeFileQueued', function( file ) { - var hash = file.__hash || (file.__hash = hashString( file.name + - file.size + file.lastModifiedDate )); - - // 已经重复了 - if ( mapping[ hash ] ) { - this.trigger( 'error', 'F_DUPLICATE', file ); - return false; - } - }); - - uploader.on( 'fileQueued', function( file ) { - var hash = file.__hash; - - hash && (mapping[ hash ] = true); - }); - - uploader.on( 'fileDequeued', function( file ) { - var hash = file.__hash; - - hash && (delete mapping[ hash ]); - }); - - uploader.on( 'reset', function() { - mapping = {}; - }); - }); - - return api; - }); - - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/compbase',[],function() { - - function CompBase( owner, runtime ) { - - this.owner = owner; - this.options = owner.options; - - this.getRuntime = function() { - return runtime; - }; - - this.getRuid = function() { - return runtime.uid; - }; - - this.trigger = function() { - return owner.trigger.apply( owner, arguments ); - }; - } - - return CompBase; - }); - /** - * @fileOverview FlashRuntime - */ - define('runtime/flash/runtime',[ - 'base', - 'runtime/runtime', - 'runtime/compbase' - ], function( Base, Runtime, CompBase ) { - - var $ = Base.$, - type = 'flash', - components = {}; - - - function getFlashVersion() { - var version; - - try { - version = navigator.plugins[ 'Shockwave Flash' ]; - version = version.description; - } catch ( ex ) { - try { - version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash') - .GetVariable('$version'); - } catch ( ex2 ) { - version = '0.0'; - } - } - version = version.match( /\d+/g ); - return parseFloat( version[ 0 ] + '.' + version[ 1 ], 10 ); - } - - function FlashRuntime() { - var pool = {}, - clients = {}, - destroy = this.destroy, - me = this, - jsreciver = Base.guid('webuploader_'); - - Runtime.apply( me, arguments ); - me.type = type; - - - // 这个方法的调用者,实际上是RuntimeClient - me.exec = function( comp, fn/*, args...*/ ) { - var client = this, - uid = client.uid, - args = Base.slice( arguments, 2 ), - instance; - - clients[ uid ] = client; - - if ( components[ comp ] ) { - if ( !pool[ uid ] ) { - pool[ uid ] = new components[ comp ]( client, me ); - } - - instance = pool[ uid ]; - - if ( instance[ fn ] ) { - return instance[ fn ].apply( instance, args ); - } - } - - return me.flashExec.apply( client, arguments ); - }; - - function handler( evt, obj ) { - var type = evt.type || evt, - parts, uid; - - parts = type.split('::'); - uid = parts[ 0 ]; - type = parts[ 1 ]; - - // console.log.apply( console, arguments ); - - if ( type === 'Ready' && uid === me.uid ) { - me.trigger('ready'); - } else if ( clients[ uid ] ) { - clients[ uid ].trigger( type.toLowerCase(), evt, obj ); - } - - // Base.log( evt, obj ); - } - - // flash的接受器。 - window[ jsreciver ] = function() { - var args = arguments; - - // 为了能捕获得到。 - setTimeout(function() { - handler.apply( null, args ); - }, 1 ); - }; - - this.jsreciver = jsreciver; - - this.destroy = function() { - // @todo 删除池子中的所有实例 - return destroy && destroy.apply( this, arguments ); - }; - - this.flashExec = function( comp, fn ) { - var flash = me.getFlash(), - args = Base.slice( arguments, 2 ); - - return flash.exec( this.uid, comp, fn, args ); - }; - - // @todo - } - - Base.inherits( Runtime, { - constructor: FlashRuntime, - - init: function() { - var container = this.getContainer(), - opts = this.options, - html; - - // if not the minimal height, shims are not initialized - // in older browsers (e.g FF3.6, IE6,7,8, Safari 4.0,5.0, etc) - container.css({ - position: 'absolute', - top: '-8px', - left: '-8px', - width: '9px', - height: '9px', - overflow: 'hidden' - }); - - // insert flash object - html = '' + - '' + - '' + - '' + - ''; - - container.html( html ); - }, - - getFlash: function() { - if ( this._flash ) { - return this._flash; - } - - this._flash = $( '#' + this.uid ).get( 0 ); - return this._flash; - } - - }); - - FlashRuntime.register = function( name, component ) { - component = components[ name ] = Base.inherits( CompBase, $.extend({ - - // @todo fix this later - flashExec: function() { - var owner = this.owner, - runtime = this.getRuntime(); - - return runtime.flashExec.apply( owner, arguments ); - } - }, component ) ); - - return component; - }; - - if ( getFlashVersion() >= 11.4 ) { - Runtime.addRuntime( type, FlashRuntime ); - } - - return FlashRuntime; - }); - /** - * @fileOverview FilePicker - */ - define('runtime/flash/filepicker',[ - 'base', - 'runtime/flash/runtime' - ], function( Base, FlashRuntime ) { - var $ = Base.$; - - return FlashRuntime.register( 'FilePicker', { - init: function( opts ) { - var copy = $.extend({}, opts ), - len, i; - - // 修复Flash再没有设置title的情况下无法弹出flash文件选择框的bug. - len = copy.accept && copy.accept.length; - for ( i = 0; i < len; i++ ) { - if ( !copy.accept[ i ].title ) { - copy.accept[ i ].title = 'Files'; - } - } - - delete copy.button; - delete copy.id; - delete copy.container; - - this.flashExec( 'FilePicker', 'init', copy ); - }, - - destroy: function() { - this.flashExec( 'FilePicker', 'destroy' ); - } - }); - }); - /** - * @fileOverview 图片压缩 - */ - define('runtime/flash/image',[ - 'runtime/flash/runtime' - ], function( FlashRuntime ) { - - return FlashRuntime.register( 'Image', { - // init: function( options ) { - // var owner = this.owner; - - // this.flashExec( 'Image', 'init', options ); - // owner.on( 'load', function() { - // debugger; - // }); - // }, - - loadFromBlob: function( blob ) { - var owner = this.owner; - - owner.info() && this.flashExec( 'Image', 'info', owner.info() ); - owner.meta() && this.flashExec( 'Image', 'meta', owner.meta() ); - - this.flashExec( 'Image', 'loadFromBlob', blob.uid ); - } - }); - }); - /** - * @fileOverview Blob Html实现 - */ - define('runtime/flash/blob',[ - 'runtime/flash/runtime', - 'lib/blob' - ], function( FlashRuntime, Blob ) { - - return FlashRuntime.register( 'Blob', { - slice: function( start, end ) { - var blob = this.flashExec( 'Blob', 'slice', start, end ); - - return new Blob( blob.uid, blob ); - } - }); - }); - /** - * @fileOverview Transport flash实现 - */ - define('runtime/flash/transport',[ - 'base', - 'runtime/flash/runtime', - 'runtime/client' - ], function( Base, FlashRuntime, RuntimeClient ) { - var $ = Base.$; - - return FlashRuntime.register( 'Transport', { - init: function() { - this._status = 0; - this._response = null; - this._responseJson = null; - }, - - send: function() { - var owner = this.owner, - opts = this.options, - xhr = this._initAjax(), - blob = owner._blob, - server = opts.server, - binary; - - xhr.connectRuntime( blob.ruid ); - - if ( opts.sendAsBinary ) { - server += (/\?/.test( server ) ? '&' : '?') + - $.param( owner._formData ); - - binary = blob.uid; - } else { - $.each( owner._formData, function( k, v ) { - xhr.exec( 'append', k, v ); - }); - - xhr.exec( 'appendBlob', opts.fileVal, blob.uid, - opts.filename || owner._formData.name || '' ); - } - - this._setRequestHeader( xhr, opts.headers ); - xhr.exec( 'send', { - method: opts.method, - url: server, - forceURLStream: opts.forceURLStream, - mimeType: 'application/octet-stream' - }, binary ); - }, - - getStatus: function() { - return this._status; - }, - - getResponse: function() { - return this._response || ''; - }, - - getResponseAsJson: function() { - return this._responseJson; - }, - - abort: function() { - var xhr = this._xhr; - - if ( xhr ) { - xhr.exec('abort'); - xhr.destroy(); - this._xhr = xhr = null; - } - }, - - destroy: function() { - this.abort(); - }, - - _initAjax: function() { - var me = this, - xhr = new RuntimeClient('XMLHttpRequest'); - - xhr.on( 'uploadprogress progress', function( e ) { - var percent = e.loaded / e.total; - percent = Math.min( 1, Math.max( 0, percent ) ); - return me.trigger( 'progress', percent ); - }); - - xhr.on( 'load', function() { - var status = xhr.exec('getStatus'), - readBody = false, - err = '', - p; - - xhr.off(); - me._xhr = null; - - if ( status >= 200 && status < 300 ) { - readBody = true; - } else if ( status >= 500 && status < 600 ) { - readBody = true; - err = 'server'; - } else { - err = 'http'; - } - - if ( readBody ) { - me._response = xhr.exec('getResponse'); - me._response = decodeURIComponent( me._response ); - - // flash 处理可能存在 bug, 没辙只能靠 js 了 - // try { - // me._responseJson = xhr.exec('getResponseAsJson'); - // } catch ( error ) { - - p = window.JSON && window.JSON.parse || function( s ) { - try { - return new Function('return ' + s).call(); - } catch ( err ) { - return {}; - } - }; - me._responseJson = me._response ? p(me._response) : {}; - - // } - } - - xhr.destroy(); - xhr = null; - - return err ? me.trigger( 'error', err ) : me.trigger('load'); - }); - - xhr.on( 'error', function() { - xhr.off(); - me._xhr = null; - me.trigger( 'error', 'http' ); - }); - - me._xhr = xhr; - return xhr; - }, - - _setRequestHeader: function( xhr, headers ) { - $.each( headers, function( key, val ) { - xhr.exec( 'setRequestHeader', key, val ); - }); - } - }); - }); - /** - * @fileOverview 只有flash实现的文件版本。 - */ - define('preset/flashonly',[ - 'base', - - // widgets - 'widgets/filepicker', - 'widgets/image', - 'widgets/queue', - 'widgets/runtime', - 'widgets/upload', - 'widgets/validator', - - // runtimes - - // flash - 'runtime/flash/filepicker', - 'runtime/flash/image', - 'runtime/flash/blob', - 'runtime/flash/transport' - ], function( Base ) { - return Base; - }); - define('webuploader',[ - 'preset/flashonly' - ], function( preset ) { - return preset; - }); - return require('webuploader'); -}); diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.flashonly.min.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.flashonly.min.js deleted file mode 100644 index 7a2c8abb..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.flashonly.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* WebUploader 0.1.5 */!function(a,b){var c,d={},e=function(a,b){var c,d,e;if("string"==typeof a)return h(a);for(c=[],d=a.length,e=0;d>e;e++)c.push(h(a[e]));return b.apply(null,c)},f=function(a,b,c){2===arguments.length&&(c=b,b=null),e(b||[],function(){g(a,c,arguments)})},g=function(a,b,c){var f,g={exports:b};"function"==typeof b&&(c.length||(c=[e,g.exports,g]),f=b.apply(null,c),void 0!==f&&(g.exports=f)),d[a]=g.exports},h=function(b){var c=d[b]||a[b];if(!c)throw new Error("`"+b+"` is undefined");return c},i=function(a){var b,c,e,f,g,h;h=function(a){return a&&a.charAt(0).toUpperCase()+a.substr(1)};for(b in d)if(c=a,d.hasOwnProperty(b)){for(e=b.split("/"),g=h(e.pop());f=h(e.shift());)c[f]=c[f]||{},c=c[f];c[g]=d[b]}return a},j=function(c){return a.__dollar=c,i(b(a,f,e))};"object"==typeof module&&"object"==typeof module.exports?module.exports=j():"function"==typeof define&&define.amd?define(["jquery"],j):(c=a.WebUploader,a.WebUploader=j(),a.WebUploader.noConflict=function(){a.WebUploader=c})}(window,function(a,b,c){return b("dollar-third",[],function(){var b=a.__dollar||a.jQuery||a.Zepto;if(!b)throw new Error("jQuery or Zepto not found!");return b}),b("dollar",["dollar-third"],function(a){return a}),b("promise-third",["dollar"],function(a){return{Deferred:a.Deferred,when:a.when,isPromise:function(a){return a&&"function"==typeof a.then}}}),b("promise",["promise-third"],function(a){return a}),b("base",["dollar","promise"],function(b,c){function d(a){return function(){return h.apply(a,arguments)}}function e(a,b){return function(){return a.apply(b,arguments)}}function f(a){var b;return Object.create?Object.create(a):(b=function(){},b.prototype=a,new b)}var g=function(){},h=Function.call;return{version:"0.1.5",$:b,Deferred:c.Deferred,isPromise:c.isPromise,when:c.when,browser:function(a){var b={},c=a.match(/WebKit\/([\d.]+)/),d=a.match(/Chrome\/([\d.]+)/)||a.match(/CriOS\/([\d.]+)/),e=a.match(/MSIE\s([\d\.]+)/)||a.match(/(?:trident)(?:.*rv:([\w.]+))?/i),f=a.match(/Firefox\/([\d.]+)/),g=a.match(/Safari\/([\d.]+)/),h=a.match(/OPR\/([\d.]+)/);return c&&(b.webkit=parseFloat(c[1])),d&&(b.chrome=parseFloat(d[1])),e&&(b.ie=parseFloat(e[1])),f&&(b.firefox=parseFloat(f[1])),g&&(b.safari=parseFloat(g[1])),h&&(b.opera=parseFloat(h[1])),b}(navigator.userAgent),os:function(a){var b={},c=a.match(/(?:Android);?[\s\/]+([\d.]+)?/),d=a.match(/(?:iPad|iPod|iPhone).*OS\s([\d_]+)/);return c&&(b.android=parseFloat(c[1])),d&&(b.ios=parseFloat(d[1].replace(/_/g,"."))),b}(navigator.userAgent),inherits:function(a,c,d){var e;return"function"==typeof c?(e=c,c=null):e=c&&c.hasOwnProperty("constructor")?c.constructor:function(){return a.apply(this,arguments)},b.extend(!0,e,a,d||{}),e.__super__=a.prototype,e.prototype=f(a.prototype),c&&b.extend(!0,e.prototype,c),e},noop:g,bindFn:e,log:function(){return a.console?e(console.log,console):g}(),nextTick:function(){return function(a){setTimeout(a,1)}}(),slice:d([].slice),guid:function(){var a=0;return function(b){for(var c=(+new Date).toString(32),d=0;5>d;d++)c+=Math.floor(65535*Math.random()).toString(32);return(b||"wu_")+c+(a++).toString(32)}}(),formatSize:function(a,b,c){var d;for(c=c||["B","K","M","G","TB"];(d=c.shift())&&a>1024;)a/=1024;return("B"===d?a:a.toFixed(b||2))+d}}}),b("mediator",["base"],function(a){function b(a,b,c,d){return f.grep(a,function(a){return!(!a||b&&a.e!==b||c&&a.cb!==c&&a.cb._cb!==c||d&&a.ctx!==d)})}function c(a,b,c){f.each((a||"").split(h),function(a,d){c(d,b)})}function d(a,b){for(var c,d=!1,e=-1,f=a.length;++e1?void(d.isPlainObject(b)&&d.isPlainObject(c[a])?d.extend(c[a],b):c[a]=b):a?c[a]:c},getStats:function(){var a=this.request("get-stats");return a?{successNum:a.numOfSuccess,progressNum:a.numOfProgress,cancelNum:a.numOfCancel,invalidNum:a.numOfInvalid,uploadFailNum:a.numOfUploadFailed,queueNum:a.numOfQueue,interruptNum:a.numofInterrupt}:{}},trigger:function(a){var c=[].slice.call(arguments,1),e=this.options,f="on"+a.substring(0,1).toUpperCase()+a.substring(1);return b.trigger.apply(this,arguments)===!1||d.isFunction(e[f])&&e[f].apply(this,c)===!1||d.isFunction(this[f])&&this[f].apply(this,c)===!1||b.trigger.apply(b,[this,a].concat(c))===!1?!1:!0},destroy:function(){this.request("destroy",arguments),this.off()},request:a.noop}),a.create=c.create=function(a){return new c(a)},a.Uploader=c,c}),b("runtime/runtime",["base","mediator"],function(a,b){function c(b){this.options=d.extend({container:document.body},b),this.uid=a.guid("rt_")}var d=a.$,e={},f=function(a){for(var b in a)if(a.hasOwnProperty(b))return b;return null};return d.extend(c.prototype,{getContainer:function(){var a,b,c=this.options;return this._container?this._container:(a=d(c.container||document.body),b=d(document.createElement("div")),b.attr("id","rt_"+this.uid),b.css({position:"absolute",top:"0px",left:"0px",width:"1px",height:"1px",overflow:"hidden"}),a.append(b),a.addClass("webuploader-container"),this._container=b,this._parent=a,b)},init:a.noop,exec:a.noop,destroy:function(){this._container&&this._container.remove(),this._parent&&this._parent.removeClass("webuploader-container"),this.off()}}),c.orders="html5,flash",c.addRuntime=function(a,b){e[a]=b},c.hasRuntime=function(a){return!!(a?e[a]:f(e))},c.create=function(a,b){var g,h;if(b=b||c.orders,d.each(b.split(/\s*,\s*/g),function(){return e[this]?(g=this,!1):void 0}),g=g||f(e),!g)throw new Error("Runtime Error");return h=new e[g](a)},b.installTo(c.prototype),c}),b("runtime/client",["base","mediator","runtime/runtime"],function(a,b,c){function d(b,d){var f,g=a.Deferred();this.uid=a.guid("client_"),this.runtimeReady=function(a){return g.done(a)},this.connectRuntime=function(b,h){if(f)throw new Error("already connected!");return g.done(h),"string"==typeof b&&e.get(b)&&(f=e.get(b)),f=f||e.get(null,d),f?(a.$.extend(f.options,b),f.__promise.then(g.resolve),f.__client++):(f=c.create(b,b.runtimeOrder),f.__promise=g.promise(),f.once("ready",g.resolve),f.init(),e.add(f),f.__client=1),d&&(f.__standalone=d),f},this.getRuntime=function(){return f},this.disconnectRuntime=function(){f&&(f.__client--,f.__client<=0&&(e.remove(f),delete f.__promise,f.destroy()),f=null)},this.exec=function(){if(f){var c=a.slice(arguments);return b&&c.unshift(b),f.exec.apply(this,c)}},this.getRuid=function(){return f&&f.uid},this.destroy=function(a){return function(){a&&a.apply(this,arguments),this.trigger("destroy"),this.off(),this.exec("destroy"),this.disconnectRuntime()}}(this.destroy)}var e;return e=function(){var a={};return{add:function(b){a[b.uid]=b},get:function(b,c){var d;if(b)return a[b];for(d in a)if(!c||!a[d].__standalone)return a[d];return null},remove:function(b){delete a[b.uid]}}}(),b.installTo(d.prototype),d}),b("lib/blob",["base","runtime/client"],function(a,b){function c(a,c){var d=this;d.source=c,d.ruid=a,this.size=c.size||0,this.type=!c.type&&this.ext&&~"jpg,jpeg,png,gif,bmp".indexOf(this.ext)?"image/"+("jpg"===this.ext?"jpeg":this.ext):c.type||"application/octet-stream",b.call(d,"Blob"),this.uid=c.uid||this.uid,a&&d.connectRuntime(a)}return a.inherits(b,{constructor:c,slice:function(a,b){return this.exec("slice",a,b)},getSource:function(){return this.source}}),c}),b("lib/file",["base","lib/blob"],function(a,b){function c(a,c){var f;this.name=c.name||"untitled"+d++,f=e.exec(c.name)?RegExp.$1.toLowerCase():"",!f&&c.type&&(f=/\/(jpg|jpeg|png|gif|bmp)$/i.exec(c.type)?RegExp.$1.toLowerCase():"",this.name+="."+f),this.ext=f,this.lastModifiedDate=c.lastModifiedDate||(new Date).toLocaleString(),b.apply(this,arguments)}var d=1,e=/\.([^.]+)$/;return a.inherits(b,c)}),b("lib/filepicker",["base","runtime/client","lib/file"],function(b,c,d){function e(a){if(a=this.options=f.extend({},e.options,a),a.container=f(a.id),!a.container.length)throw new Error("按钮指定错误");a.innerHTML=a.innerHTML||a.label||a.container.html()||"",a.button=f(a.button||document.createElement("div")),a.button.html(a.innerHTML),a.container.html(a.button),c.call(this,"FilePicker",!0)}var f=b.$;return e.options={button:null,container:null,label:null,innerHTML:null,multiple:!0,accept:null,name:"file"},b.inherits(c,{constructor:e,init:function(){var c=this,e=c.options,g=e.button;g.addClass("webuploader-pick"),c.on("all",function(a){var b;switch(a){case"mouseenter":g.addClass("webuploader-pick-hover");break;case"mouseleave":g.removeClass("webuploader-pick-hover");break;case"change":b=c.exec("getFiles"),c.trigger("select",f.map(b,function(a){return a=new d(c.getRuid(),a),a._refer=e.container,a}),e.container)}}),c.connectRuntime(e,function(){c.refresh(),c.exec("init",e),c.trigger("ready")}),this._resizeHandler=b.bindFn(this.refresh,this),f(a).on("resize",this._resizeHandler)},refresh:function(){var a=this.getRuntime().getContainer(),b=this.options.button,c=b.outerWidth?b.outerWidth():b.width(),d=b.outerHeight?b.outerHeight():b.height(),e=b.offset();c&&d&&a.css({bottom:"auto",right:"auto",width:c+"px",height:d+"px"}).offset(e)},enable:function(){var a=this.options.button;a.removeClass("webuploader-pick-disable"),this.refresh()},disable:function(){var a=this.options.button;this.getRuntime().getContainer().css({top:"-99999px"}),a.addClass("webuploader-pick-disable")},destroy:function(){var b=this.options.button;f(a).off("resize",this._resizeHandler),b.removeClass("webuploader-pick-disable webuploader-pick-hover webuploader-pick")}}),e}),b("widgets/widget",["base","uploader"],function(a,b){function c(a){if(!a)return!1;var b=a.length,c=e.type(a);return 1===a.nodeType&&b?!0:"array"===c||"function"!==c&&"string"!==c&&(0===b||"number"==typeof b&&b>0&&b-1 in a)}function d(a){this.owner=a,this.options=a.options}var e=a.$,f=b.prototype._init,g=b.prototype.destroy,h={},i=[];return e.extend(d.prototype,{init:a.noop,invoke:function(a,b){var c=this.responseMap;return c&&a in c&&c[a]in this&&e.isFunction(this[c[a]])?this[c[a]].apply(this,b):h},request:function(){return this.owner.request.apply(this.owner,arguments)}}),e.extend(b.prototype,{_init:function(){var a=this,b=a._widgets=[],c=a.options.disableWidgets||"";return e.each(i,function(d,e){(!c||!~c.indexOf(e._name))&&b.push(new e(a))}),f.apply(a,arguments)},request:function(b,d,e){var f,g,i,j,k=0,l=this._widgets,m=l&&l.length,n=[],o=[];for(d=c(d)?d:[d];m>k;k++)f=l[k],g=f.invoke(b,d),g!==h&&(a.isPromise(g)?o.push(g):n.push(g));return e||o.length?(i=a.when.apply(a,o),j=i.pipe?"pipe":"then",i[j](function(){var b=a.Deferred(),c=arguments;return 1===c.length&&(c=c[0]),setTimeout(function(){b.resolve(c)},1),b.promise()})[e?j:"done"](e||a.noop)):n[0]},destroy:function(){g.apply(this,arguments),this._widgets=null}}),b.register=d.register=function(b,c){var f,g={init:"init",destroy:"destroy",name:"anonymous"};return 1===arguments.length?(c=b,e.each(c,function(a){return"_"===a[0]||"name"===a?void("name"===a&&(g.name=c.name)):void(g[a.replace(/[A-Z]/g,"-$&").toLowerCase()]=a)})):g=e.extend(g,b),c.responseMap=g,f=a.inherits(d,c),f._name=g.name,i.push(f),f},b.unRegister=d.unRegister=function(a){if(a&&"anonymous"!==a)for(var b=i.length;b--;)i[b]._name===a&&i.splice(b,1)},d}),b("widgets/filepicker",["base","uploader","lib/filepicker","widgets/widget"],function(a,b,c){var d=a.$;return d.extend(b.options,{pick:null,accept:null}),b.register({name:"picker",init:function(a){return this.pickers=[],a.pick&&this.addBtn(a.pick)},refresh:function(){d.each(this.pickers,function(){this.refresh()})},addBtn:function(b){var e=this,f=e.options,g=f.accept,h=[];if(b)return d.isPlainObject(b)||(b={id:b}),d(b.id).each(function(){var i,j,k;k=a.Deferred(),i=d.extend({},b,{accept:d.isPlainObject(g)?[g]:g,swf:f.swf,runtimeOrder:f.runtimeOrder,id:this}),j=new c(i),j.once("ready",k.resolve),j.on("select",function(a){e.owner.request("add-file",[a])}),j.init(),e.pickers.push(j),h.push(k.promise())}),a.when.apply(a,h)},disable:function(){d.each(this.pickers,function(){this.disable()})},enable:function(){d.each(this.pickers,function(){this.enable()})},destroy:function(){d.each(this.pickers,function(){this.destroy()}),this.pickers=null}})}),b("lib/image",["base","runtime/client","lib/blob"],function(a,b,c){function d(a){this.options=e.extend({},d.options,a),b.call(this,"Image"),this.on("load",function(){this._info=this.exec("info"),this._meta=this.exec("meta")})}var e=a.$;return d.options={quality:90,crop:!1,preserveHeaders:!1,allowMagnify:!1},a.inherits(b,{constructor:d,info:function(a){return a?(this._info=a,this):this._info},meta:function(a){return a?(this._meta=a,this):this._meta},loadFromBlob:function(a){var b=this,c=a.getRuid();this.connectRuntime(c,function(){b.exec("init",b.options),b.exec("loadFromBlob",a)})},resize:function(){var b=a.slice(arguments);return this.exec.apply(this,["resize"].concat(b))},crop:function(){var b=a.slice(arguments);return this.exec.apply(this,["crop"].concat(b))},getAsDataUrl:function(a){return this.exec("getAsDataUrl",a)},getAsBlob:function(a){var b=this.exec("getAsBlob",a);return new c(this.getRuid(),b)}}),d}),b("widgets/image",["base","uploader","lib/image","widgets/widget"],function(a,b,c){var d,e=a.$;return d=function(a){var b=0,c=[],d=function(){for(var d;c.length&&a>b;)d=c.shift(),b+=d[0],d[1]()};return function(a,e,f){c.push([e,f]),a.once("destroy",function(){b-=e,setTimeout(d,1)}),setTimeout(d,1)}}(5242880),e.extend(b.options,{thumb:{width:110,height:110,quality:70,allowMagnify:!0,crop:!0,preserveHeaders:!1,type:"image/jpeg"},compress:{width:1600,height:1600,quality:90,allowMagnify:!1,crop:!1,preserveHeaders:!0}}),b.register({name:"image",makeThumb:function(a,b,f,g){var h,i;return a=this.request("get-file",a),a.type.match(/^image/)?(h=e.extend({},this.options.thumb),e.isPlainObject(f)&&(h=e.extend(h,f),f=null),f=f||h.width,g=g||h.height,i=new c(h),i.once("load",function(){a._info=a._info||i.info(),a._meta=a._meta||i.meta(),1>=f&&f>0&&(f=a._info.width*f),1>=g&&g>0&&(g=a._info.height*g),i.resize(f,g)}),i.once("complete",function(){b(!1,i.getAsDataUrl(h.type)),i.destroy()}),i.once("error",function(a){b(a||!0),i.destroy()}),void d(i,a.source.size,function(){a._info&&i.info(a._info),a._meta&&i.meta(a._meta),i.loadFromBlob(a.source)})):void b(!0)},beforeSendFile:function(b){var d,f,g=this.options.compress||this.options.resize,h=g&&g.compressSize||0,i=g&&g.noCompressIfLarger||!1;return b=this.request("get-file",b),!g||!~"image/jpeg,image/jpg".indexOf(b.type)||b.size=a&&a>0&&(a=b._info.width*a),1>=c&&c>0&&(c=b._info.height*c),d.resize(a,c)}),d.once("complete",function(){var a,c;try{a=d.getAsBlob(g.type),c=b.size,(!i||a.sizeb;b++)if(c=this._queue[b],a===c.getStatus())return c;return null},sort:function(a){"function"==typeof a&&this._queue.sort(a)},getFiles:function(){for(var a,b=[].slice.call(arguments,0),c=[],d=0,f=this._queue.length;f>d;d++)a=this._queue[d],(!b.length||~e.inArray(a.getStatus(),b))&&c.push(a);return c},removeFile:function(a){var b=this._map[a.id];b&&(delete this._map[a.id],a.destroy(),this.stats.numofDeleted++)},_fileAdded:function(a){var b=this,c=this._map[a.id];c||(this._map[a.id]=a,a.on("statuschange",function(a,c){b._onFileStatusChange(a,c)}))},_onFileStatusChange:function(a,b){var c=this.stats;switch(b){case f.PROGRESS:c.numOfProgress--;break;case f.QUEUED:c.numOfQueue--;break;case f.ERROR:c.numOfUploadFailed--;break;case f.INVALID:c.numOfInvalid--;break;case f.INTERRUPT:c.numofInterrupt--}switch(a){case f.QUEUED:c.numOfQueue++;break;case f.PROGRESS:c.numOfProgress++;break;case f.ERROR:c.numOfUploadFailed++;break;case f.COMPLETE:c.numOfSuccess++;break;case f.CANCELLED:c.numOfCancel++;break;case f.INVALID:c.numOfInvalid++;break;case f.INTERRUPT:c.numofInterrupt++}}}),b.installTo(d.prototype),d}),b("widgets/queue",["base","uploader","queue","file","lib/file","runtime/client","widgets/widget"],function(a,b,c,d,e,f){var g=a.$,h=/\.\w+$/,i=d.Status;return b.register({name:"queue",init:function(b){var d,e,h,i,j,k,l,m=this;if(g.isPlainObject(b.accept)&&(b.accept=[b.accept]),b.accept){for(j=[],h=0,e=b.accept.length;e>h;h++)i=b.accept[h].extensions,i&&j.push(i);j.length&&(k="\\."+j.join(",").replace(/,/g,"$|\\.").replace(/\*/g,".*")+"$"),m.accept=new RegExp(k,"i")}return m.queue=new c,m.stats=m.queue.stats,"html5"===this.request("predict-runtime-type")?(d=a.Deferred(),this.placeholder=l=new f("Placeholder"),l.connectRuntime({runtimeOrder:"html5"},function(){m._ruid=l.getRuid(),d.resolve()}),d.promise()):void 0},_wrapFile:function(a){if(!(a instanceof d)){if(!(a instanceof e)){if(!this._ruid)throw new Error("Can't add external files.");a=new e(this._ruid,a)}a=new d(a)}return a},acceptFile:function(a){var b=!a||!a.size||this.accept&&h.exec(a.name)&&!this.accept.test(a.name);return!b},_addFile:function(a){var b=this;return a=b._wrapFile(a),b.owner.trigger("beforeFileQueued",a)?b.acceptFile(a)?(b.queue.append(a),b.owner.trigger("fileQueued",a),a):void b.owner.trigger("error","Q_TYPE_DENIED",a):void 0},getFile:function(a){return this.queue.getFile(a)},addFile:function(a){var b=this;a.length||(a=[a]),a=g.map(a,function(a){return b._addFile(a)}),b.owner.trigger("filesQueued",a),b.options.auto&&setTimeout(function(){b.request("start-upload")},20)},getStats:function(){return this.stats},removeFile:function(a,b){var c=this;a=a.id?a:c.queue.getFile(a),this.request("cancel-file",a),b&&this.queue.removeFile(a)},getFiles:function(){return this.queue.getFiles.apply(this.queue,arguments)},fetchFile:function(){return this.queue.fetch.apply(this.queue,arguments)},retry:function(a,b){var c,d,e,f=this;if(a)return a=a.id?a:f.queue.getFile(a),a.setStatus(i.QUEUED),void(b||f.request("start-upload"));for(c=f.queue.getFiles(i.ERROR),d=0,e=c.length;e>d;d++)a=c[d],a.setStatus(i.QUEUED);f.request("start-upload")},sortFiles:function(){return this.queue.sort.apply(this.queue,arguments)},reset:function(){this.owner.trigger("reset"),this.queue=new c,this.stats=this.queue.stats},destroy:function(){this.reset(),this.placeholder&&this.placeholder.destroy()}})}),b("widgets/runtime",["uploader","runtime/runtime","widgets/widget"],function(a,b){return a.support=function(){return b.hasRuntime.apply(b,arguments)},a.register({name:"runtime",init:function(){if(!this.predictRuntimeType())throw Error("Runtime Error")},predictRuntimeType:function(){var a,c,d=this.options.runtimeOrder||b.orders,e=this.type;if(!e)for(d=d.split(/\s*,\s*/g),a=0,c=d.length;c>a;a++)if(b.hasRuntime(d[a])){this.type=e=d[a];break}return e}})}),b("lib/transport",["base","runtime/client","mediator"],function(a,b,c){function d(a){var c=this;a=c.options=e.extend(!0,{},d.options,a||{}),b.call(this,"Transport"),this._blob=null,this._formData=a.formData||{},this._headers=a.headers||{},this.on("progress",this._timeout),this.on("load error",function(){c.trigger("progress",1),clearTimeout(c._timer)})}var e=a.$;return d.options={server:"",method:"POST",withCredentials:!1,fileVal:"file",timeout:12e4,formData:{},headers:{},sendAsBinary:!1},e.extend(d.prototype,{appendBlob:function(a,b,c){var d=this,e=d.options;d.getRuid()&&d.disconnectRuntime(),d.connectRuntime(b.ruid,function(){d.exec("init")}),d._blob=b,e.fileVal=a||e.fileVal,e.filename=c||e.filename},append:function(a,b){"object"==typeof a?e.extend(this._formData,a):this._formData[a]=b},setRequestHeader:function(a,b){"object"==typeof a?e.extend(this._headers,a):this._headers[a]=b},send:function(a){this.exec("send",a),this._timeout()},abort:function(){return clearTimeout(this._timer),this.exec("abort")},destroy:function(){this.trigger("destroy"),this.off(),this.exec("destroy"),this.disconnectRuntime()},getResponse:function(){return this.exec("getResponse")},getResponseAsJson:function(){return this.exec("getResponseAsJson")},getStatus:function(){return this.exec("getStatus")},_timeout:function(){var a=this,b=a.options.timeout;b&&(clearTimeout(a._timer),a._timer=setTimeout(function(){a.abort(),a.trigger("error","timeout")},b))}}),c.installTo(d.prototype),d}),b("widgets/upload",["base","uploader","file","lib/transport","widgets/widget"],function(a,b,c,d){function e(a,b){var c,d,e=[],f=a.source,g=f.size,h=b?Math.ceil(g/b):1,i=0,j=0;for(d={file:a,has:function(){return!!e.length},shift:function(){return e.shift()},unshift:function(a){e.unshift(a)}};h>j;)c=Math.min(b,g-i),e.push({file:a,start:i,end:b?i+c:g,total:g,chunks:h,chunk:j++,cuted:d}),i+=c;return a.blocks=e.concat(),a.remaning=e.length,d}var f=a.$,g=a.isPromise,h=c.Status;f.extend(b.options,{prepareNextFile:!1,chunked:!1,chunkSize:5242880,chunkRetry:2,threads:3,formData:{}}),b.register({name:"upload",init:function(){var b=this.owner,c=this;this.runing=!1,this.progress=!1,b.on("startUpload",function(){c.progress=!0}).on("uploadFinished",function(){c.progress=!1}),this.pool=[],this.stack=[],this.pending=[],this.remaning=0,this.__tick=a.bindFn(this._tick,this),b.on("uploadComplete",function(a){a.blocks&&f.each(a.blocks,function(a,b){b.transport&&(b.transport.abort(),b.transport.destroy()),delete b.transport}),delete a.blocks,delete a.remaning})},reset:function(){this.request("stop-upload",!0),this.runing=!1,this.pool=[],this.stack=[],this.pending=[],this.remaning=0,this._trigged=!1,this._promise=null},startUpload:function(b){var c=this;if(f.each(c.request("get-files",h.INVALID),function(){c.request("remove-file",this)}),b)if(b=b.id?b:c.request("get-file",b),b.getStatus()===h.INTERRUPT)f.each(c.pool,function(a,c){c.file===b&&c.transport&&c.transport.send()}),b.setStatus(h.QUEUED);else{if(b.getStatus()===h.PROGRESS)return;b.setStatus(h.QUEUED)}else f.each(c.request("get-files",[h.INITED]),function(){this.setStatus(h.QUEUED)});if(!c.runing){c.runing=!0;var d=[];f.each(c.pool,function(a,b){var e=b.file;e.getStatus()===h.INTERRUPT&&(d.push(e),c._trigged=!1,b.transport&&b.transport.send())});for(var b;b=d.shift();)b.setStatus(h.PROGRESS);b||f.each(c.request("get-files",h.INTERRUPT),function(){this.setStatus(h.PROGRESS)}),c._trigged=!1,a.nextTick(c.__tick),c.owner.trigger("startUpload")}},stopUpload:function(b,c){var d=this;if(b===!0&&(c=b,b=null),d.runing!==!1){if(b){if(b=b.id?b:d.request("get-file",b),b.getStatus()!==h.PROGRESS&&b.getStatus()!==h.QUEUED)return;return b.setStatus(h.INTERRUPT),f.each(d.pool,function(a,c){c.file===b&&(c.transport&&c.transport.abort(),d._putback(c),d._popBlock(c))}),a.nextTick(d.__tick)}d.runing=!1,this._promise&&this._promise.file&&this._promise.file.setStatus(h.INTERRUPT),c&&f.each(d.pool,function(a,b){b.transport&&b.transport.abort(),b.file.setStatus(h.INTERRUPT)}),d.owner.trigger("stopUpload")}},cancelFile:function(a){a=a.id?a:this.request("get-file",a),a.blocks&&f.each(a.blocks,function(a,b){var c=b.transport;c&&(c.abort(),c.destroy(),delete b.transport)}),a.setStatus(h.CANCELLED),this.owner.trigger("fileDequeued",a)},isInProgress:function(){return!!this.progress},_getStats:function(){return this.request("get-stats")},skipFile:function(a,b){a=a.id?a:this.request("get-file",a),a.setStatus(b||h.COMPLETE),a.skipped=!0,a.blocks&&f.each(a.blocks,function(a,b){var c=b.transport;c&&(c.abort(),c.destroy(),delete b.transport)}),this.owner.trigger("uploadSkip",a)},_tick:function(){var b,c,d=this,e=d.options;return d._promise?d._promise.always(d.__tick):void(d.pool.length1&&~"http,abort".indexOf(a)&&b.retried1&&f.extend(m,{chunks:b.chunks,chunk:b.chunk}),i.trigger("uploadBeforeSend",b,m,n),l.appendBlob(j.fileVal,b.blob,k.name),l.append(m),l.setRequestHeader(n),l.send()},_finishFile:function(a,b,c){var d=this.owner;return d.request("after-send-file",arguments,function(){a.setStatus(h.COMPLETE),d.trigger("uploadSuccess",a,b,c)}).fail(function(b){a.getStatus()===h.PROGRESS&&a.setStatus(h.ERROR,b),d.trigger("uploadError",a,b)}).always(function(){d.trigger("uploadComplete",a)})},updateFileProgress:function(a){var b=0,c=0;a.blocks&&(f.each(a.blocks,function(a,b){c+=(b.percentage||0)*(b.end-b.start)}),b=c/a.size,this.owner.trigger("uploadProgress",a,b||0))}})}),b("widgets/validator",["base","uploader","file","widgets/widget"],function(a,b,c){var d,e=a.$,f={};return d={addValidator:function(a,b){f[a]=b},removeValidator:function(a){delete f[a]}},b.register({name:"validator",init:function(){var b=this;a.nextTick(function(){e.each(f,function(){this.call(b.owner)})})}}),d.addValidator("fileNumLimit",function(){var a=this,b=a.options,c=0,d=parseInt(b.fileNumLimit,10),e=!0;d&&(a.on("beforeFileQueued",function(a){return c>=d&&e&&(e=!1,this.trigger("error","Q_EXCEED_NUM_LIMIT",d,a),setTimeout(function(){e=!0},1)),c>=d?!1:!0}),a.on("fileQueued",function(){c++}),a.on("fileDequeued",function(){c--}),a.on("reset",function(){c=0}))}),d.addValidator("fileSizeLimit",function(){var a=this,b=a.options,c=0,d=parseInt(b.fileSizeLimit,10),e=!0;d&&(a.on("beforeFileQueued",function(a){var b=c+a.size>d;return b&&e&&(e=!1,this.trigger("error","Q_EXCEED_SIZE_LIMIT",d,a),setTimeout(function(){e=!0},1)),b?!1:!0}),a.on("fileQueued",function(a){c+=a.size}),a.on("fileDequeued",function(a){c-=a.size}),a.on("reset",function(){c=0}))}),d.addValidator("fileSingleSizeLimit",function(){var a=this,b=a.options,d=b.fileSingleSizeLimit;d&&a.on("beforeFileQueued",function(a){return a.size>d?(a.setStatus(c.Status.INVALID,"exceed_size"),this.trigger("error","F_EXCEED_SIZE",d,a),!1):void 0})}),d.addValidator("duplicate",function(){function a(a){for(var b,c=0,d=0,e=a.length;e>d;d++)b=a.charCodeAt(d),c=b+(c<<6)+(c<<16)-c;return c}var b=this,c=b.options,d={};c.duplicate||(b.on("beforeFileQueued",function(b){var c=b.__hash||(b.__hash=a(b.name+b.size+b.lastModifiedDate)); -return d[c]?(this.trigger("error","F_DUPLICATE",b),!1):void 0}),b.on("fileQueued",function(a){var b=a.__hash;b&&(d[b]=!0)}),b.on("fileDequeued",function(a){var b=a.__hash;b&&delete d[b]}),b.on("reset",function(){d={}}))}),d}),b("runtime/compbase",[],function(){function a(a,b){this.owner=a,this.options=a.options,this.getRuntime=function(){return b},this.getRuid=function(){return b.uid},this.trigger=function(){return a.trigger.apply(a,arguments)}}return a}),b("runtime/flash/runtime",["base","runtime/runtime","runtime/compbase"],function(b,c,d){function e(){var a;try{a=navigator.plugins["Shockwave Flash"],a=a.description}catch(b){try{a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")}catch(c){a="0.0"}}return a=a.match(/\d+/g),parseFloat(a[0]+"."+a[1],10)}function f(){function d(a,b){var c,d,e=a.type||a;c=e.split("::"),d=c[0],e=c[1],"Ready"===e&&d===j.uid?j.trigger("ready"):f[d]&&f[d].trigger(e.toLowerCase(),a,b)}var e={},f={},g=this.destroy,j=this,k=b.guid("webuploader_");c.apply(j,arguments),j.type=h,j.exec=function(a,c){var d,g=this,h=g.uid,k=b.slice(arguments,2);return f[h]=g,i[a]&&(e[h]||(e[h]=new i[a](g,j)),d=e[h],d[c])?d[c].apply(d,k):j.flashExec.apply(g,arguments)},a[k]=function(){var a=arguments;setTimeout(function(){d.apply(null,a)},1)},this.jsreciver=k,this.destroy=function(){return g&&g.apply(this,arguments)},this.flashExec=function(a,c){var d=j.getFlash(),e=b.slice(arguments,2);return d.exec(this.uid,a,c,e)}}var g=b.$,h="flash",i={};return b.inherits(c,{constructor:f,init:function(){var a,c=this.getContainer(),d=this.options;c.css({position:"absolute",top:"-8px",left:"-8px",width:"9px",height:"9px",overflow:"hidden"}),a='',c.html(a)},getFlash:function(){return this._flash?this._flash:(this._flash=g("#"+this.uid).get(0),this._flash)}}),f.register=function(a,c){return c=i[a]=b.inherits(d,g.extend({flashExec:function(){var a=this.owner,b=this.getRuntime();return b.flashExec.apply(a,arguments)}},c))},e()>=11.4&&c.addRuntime(h,f),f}),b("runtime/flash/filepicker",["base","runtime/flash/runtime"],function(a,b){var c=a.$;return b.register("FilePicker",{init:function(a){var b,d,e=c.extend({},a);for(b=e.accept&&e.accept.length,d=0;b>d;d++)e.accept[d].title||(e.accept[d].title="Files");delete e.button,delete e.id,delete e.container,this.flashExec("FilePicker","init",e)},destroy:function(){this.flashExec("FilePicker","destroy")}})}),b("runtime/flash/image",["runtime/flash/runtime"],function(a){return a.register("Image",{loadFromBlob:function(a){var b=this.owner;b.info()&&this.flashExec("Image","info",b.info()),b.meta()&&this.flashExec("Image","meta",b.meta()),this.flashExec("Image","loadFromBlob",a.uid)}})}),b("runtime/flash/blob",["runtime/flash/runtime","lib/blob"],function(a,b){return a.register("Blob",{slice:function(a,c){var d=this.flashExec("Blob","slice",a,c);return new b(d.uid,d)}})}),b("runtime/flash/transport",["base","runtime/flash/runtime","runtime/client"],function(b,c,d){var e=b.$;return c.register("Transport",{init:function(){this._status=0,this._response=null,this._responseJson=null},send:function(){var a,b=this.owner,c=this.options,d=this._initAjax(),f=b._blob,g=c.server;d.connectRuntime(f.ruid),c.sendAsBinary?(g+=(/\?/.test(g)?"&":"?")+e.param(b._formData),a=f.uid):(e.each(b._formData,function(a,b){d.exec("append",a,b)}),d.exec("appendBlob",c.fileVal,f.uid,c.filename||b._formData.name||"")),this._setRequestHeader(d,c.headers),d.exec("send",{method:c.method,url:g,forceURLStream:c.forceURLStream,mimeType:"application/octet-stream"},a)},getStatus:function(){return this._status},getResponse:function(){return this._response||""},getResponseAsJson:function(){return this._responseJson},abort:function(){var a=this._xhr;a&&(a.exec("abort"),a.destroy(),this._xhr=a=null)},destroy:function(){this.abort()},_initAjax:function(){var b=this,c=new d("XMLHttpRequest");return c.on("uploadprogress progress",function(a){var c=a.loaded/a.total;return c=Math.min(1,Math.max(0,c)),b.trigger("progress",c)}),c.on("load",function(){var d,e=c.exec("getStatus"),f=!1,g="";return c.off(),b._xhr=null,e>=200&&300>e?f=!0:e>=500&&600>e?(f=!0,g="server"):g="http",f&&(b._response=c.exec("getResponse"),b._response=decodeURIComponent(b._response),d=a.JSON&&a.JSON.parse||function(a){try{return new Function("return "+a).call()}catch(b){return{}}},b._responseJson=b._response?d(b._response):{}),c.destroy(),c=null,g?b.trigger("error",g):b.trigger("load")}),c.on("error",function(){c.off(),b._xhr=null,b.trigger("error","http")}),b._xhr=c,c},_setRequestHeader:function(a,b){e.each(b,function(b,c){a.exec("setRequestHeader",b,c)})}})}),b("preset/flashonly",["base","widgets/filepicker","widgets/image","widgets/queue","widgets/runtime","widgets/upload","widgets/validator","runtime/flash/filepicker","runtime/flash/image","runtime/flash/blob","runtime/flash/transport"],function(a){return a}),b("webuploader",["preset/flashonly"],function(a){return a}),c("webuploader")}); \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.html5only.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.html5only.js deleted file mode 100644 index 6c21cefa..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.html5only.js +++ /dev/null @@ -1,6030 +0,0 @@ -/*! WebUploader 0.1.5 */ - - -/** - * @fileOverview 让内部各个部件的代码可以用[amd](https://github.com/amdjs/amdjs-api/wiki/AMD)模块定义方式组织起来。 - * - * AMD API 内部的简单不完全实现,请忽略。只有当WebUploader被合并成一个文件的时候才会引入。 - */ -(function( root, factory ) { - var modules = {}, - - // 内部require, 简单不完全实现。 - // https://github.com/amdjs/amdjs-api/wiki/require - _require = function( deps, callback ) { - var args, len, i; - - // 如果deps不是数组,则直接返回指定module - if ( typeof deps === 'string' ) { - return getModule( deps ); - } else { - args = []; - for( len = deps.length, i = 0; i < len; i++ ) { - args.push( getModule( deps[ i ] ) ); - } - - return callback.apply( null, args ); - } - }, - - // 内部define,暂时不支持不指定id. - _define = function( id, deps, factory ) { - if ( arguments.length === 2 ) { - factory = deps; - deps = null; - } - - _require( deps || [], function() { - setModule( id, factory, arguments ); - }); - }, - - // 设置module, 兼容CommonJs写法。 - setModule = function( id, factory, args ) { - var module = { - exports: factory - }, - returned; - - if ( typeof factory === 'function' ) { - args.length || (args = [ _require, module.exports, module ]); - returned = factory.apply( null, args ); - returned !== undefined && (module.exports = returned); - } - - modules[ id ] = module.exports; - }, - - // 根据id获取module - getModule = function( id ) { - var module = modules[ id ] || root[ id ]; - - if ( !module ) { - throw new Error( '`' + id + '` is undefined' ); - } - - return module; - }, - - // 将所有modules,将路径ids装换成对象。 - exportsTo = function( obj ) { - var key, host, parts, part, last, ucFirst; - - // make the first character upper case. - ucFirst = function( str ) { - return str && (str.charAt( 0 ).toUpperCase() + str.substr( 1 )); - }; - - for ( key in modules ) { - host = obj; - - if ( !modules.hasOwnProperty( key ) ) { - continue; - } - - parts = key.split('/'); - last = ucFirst( parts.pop() ); - - while( (part = ucFirst( parts.shift() )) ) { - host[ part ] = host[ part ] || {}; - host = host[ part ]; - } - - host[ last ] = modules[ key ]; - } - - return obj; - }, - - makeExport = function( dollar ) { - root.__dollar = dollar; - - // exports every module. - return exportsTo( factory( root, _define, _require ) ); - }, - - origin; - - if ( typeof module === 'object' && typeof module.exports === 'object' ) { - - // For CommonJS and CommonJS-like environments where a proper window is present, - module.exports = makeExport(); - } else if ( typeof define === 'function' && define.amd ) { - - // Allow using this built library as an AMD module - // in another project. That other project will only - // see this AMD call, not the internal modules in - // the closure below. - define([ 'jquery' ], makeExport ); - } else { - - // Browser globals case. Just assign the - // result to a property on the global. - origin = root.WebUploader; - root.WebUploader = makeExport(); - root.WebUploader.noConflict = function() { - root.WebUploader = origin; - }; - } -})( window, function( window, define, require ) { - - - /** - * @fileOverview jQuery or Zepto - */ - define('dollar-third',[],function() { - var $ = window.__dollar || window.jQuery || window.Zepto; - - if ( !$ ) { - throw new Error('jQuery or Zepto not found!'); - } - - return $; - }); - /** - * @fileOverview Dom 操作相关 - */ - define('dollar',[ - 'dollar-third' - ], function( _ ) { - return _; - }); - /** - * @fileOverview 使用jQuery的Promise - */ - define('promise-third',[ - 'dollar' - ], function( $ ) { - return { - Deferred: $.Deferred, - when: $.when, - - isPromise: function( anything ) { - return anything && typeof anything.then === 'function'; - } - }; - }); - /** - * @fileOverview Promise/A+ - */ - define('promise',[ - 'promise-third' - ], function( _ ) { - return _; - }); - /** - * @fileOverview 基础类方法。 - */ - - /** - * Web Uploader内部类的详细说明,以下提及的功能类,都可以在`WebUploader`这个变量中访问到。 - * - * As you know, Web Uploader的每个文件都是用过[AMD](https://github.com/amdjs/amdjs-api/wiki/AMD)规范中的`define`组织起来的, 每个Module都会有个module id. - * 默认module id为该文件的路径,而此路径将会转化成名字空间存放在WebUploader中。如: - * - * * module `base`:WebUploader.Base - * * module `file`: WebUploader.File - * * module `lib/dnd`: WebUploader.Lib.Dnd - * * module `runtime/html5/dnd`: WebUploader.Runtime.Html5.Dnd - * - * - * 以下文档中对类的使用可能省略掉了`WebUploader`前缀。 - * @module WebUploader - * @title WebUploader API文档 - */ - define('base',[ - 'dollar', - 'promise' - ], function( $, promise ) { - - var noop = function() {}, - call = Function.call; - - // http://jsperf.com/uncurrythis - // 反科里化 - function uncurryThis( fn ) { - return function() { - return call.apply( fn, arguments ); - }; - } - - function bindFn( fn, context ) { - return function() { - return fn.apply( context, arguments ); - }; - } - - function createObject( proto ) { - var f; - - if ( Object.create ) { - return Object.create( proto ); - } else { - f = function() {}; - f.prototype = proto; - return new f(); - } - } - - - /** - * 基础类,提供一些简单常用的方法。 - * @class Base - */ - return { - - /** - * @property {String} version 当前版本号。 - */ - version: '0.1.5', - - /** - * @property {jQuery|Zepto} $ 引用依赖的jQuery或者Zepto对象。 - */ - $: $, - - Deferred: promise.Deferred, - - isPromise: promise.isPromise, - - when: promise.when, - - /** - * @description 简单的浏览器检查结果。 - * - * * `webkit` webkit版本号,如果浏览器为非webkit内核,此属性为`undefined`。 - * * `chrome` chrome浏览器版本号,如果浏览器为chrome,此属性为`undefined`。 - * * `ie` ie浏览器版本号,如果浏览器为非ie,此属性为`undefined`。**暂不支持ie10+** - * * `firefox` firefox浏览器版本号,如果浏览器为非firefox,此属性为`undefined`。 - * * `safari` safari浏览器版本号,如果浏览器为非safari,此属性为`undefined`。 - * * `opera` opera浏览器版本号,如果浏览器为非opera,此属性为`undefined`。 - * - * @property {Object} [browser] - */ - browser: (function( ua ) { - var ret = {}, - webkit = ua.match( /WebKit\/([\d.]+)/ ), - chrome = ua.match( /Chrome\/([\d.]+)/ ) || - ua.match( /CriOS\/([\d.]+)/ ), - - ie = ua.match( /MSIE\s([\d\.]+)/ ) || - ua.match( /(?:trident)(?:.*rv:([\w.]+))?/i ), - firefox = ua.match( /Firefox\/([\d.]+)/ ), - safari = ua.match( /Safari\/([\d.]+)/ ), - opera = ua.match( /OPR\/([\d.]+)/ ); - - webkit && (ret.webkit = parseFloat( webkit[ 1 ] )); - chrome && (ret.chrome = parseFloat( chrome[ 1 ] )); - ie && (ret.ie = parseFloat( ie[ 1 ] )); - firefox && (ret.firefox = parseFloat( firefox[ 1 ] )); - safari && (ret.safari = parseFloat( safari[ 1 ] )); - opera && (ret.opera = parseFloat( opera[ 1 ] )); - - return ret; - })( navigator.userAgent ), - - /** - * @description 操作系统检查结果。 - * - * * `android` 如果在android浏览器环境下,此值为对应的android版本号,否则为`undefined`。 - * * `ios` 如果在ios浏览器环境下,此值为对应的ios版本号,否则为`undefined`。 - * @property {Object} [os] - */ - os: (function( ua ) { - var ret = {}, - - // osx = !!ua.match( /\(Macintosh\; Intel / ), - android = ua.match( /(?:Android);?[\s\/]+([\d.]+)?/ ), - ios = ua.match( /(?:iPad|iPod|iPhone).*OS\s([\d_]+)/ ); - - // osx && (ret.osx = true); - android && (ret.android = parseFloat( android[ 1 ] )); - ios && (ret.ios = parseFloat( ios[ 1 ].replace( /_/g, '.' ) )); - - return ret; - })( navigator.userAgent ), - - /** - * 实现类与类之间的继承。 - * @method inherits - * @grammar Base.inherits( super ) => child - * @grammar Base.inherits( super, protos ) => child - * @grammar Base.inherits( super, protos, statics ) => child - * @param {Class} super 父类 - * @param {Object | Function} [protos] 子类或者对象。如果对象中包含constructor,子类将是用此属性值。 - * @param {Function} [protos.constructor] 子类构造器,不指定的话将创建个临时的直接执行父类构造器的方法。 - * @param {Object} [statics] 静态属性或方法。 - * @return {Class} 返回子类。 - * @example - * function Person() { - * console.log( 'Super' ); - * } - * Person.prototype.hello = function() { - * console.log( 'hello' ); - * }; - * - * var Manager = Base.inherits( Person, { - * world: function() { - * console.log( 'World' ); - * } - * }); - * - * // 因为没有指定构造器,父类的构造器将会执行。 - * var instance = new Manager(); // => Super - * - * // 继承子父类的方法 - * instance.hello(); // => hello - * instance.world(); // => World - * - * // 子类的__super__属性指向父类 - * console.log( Manager.__super__ === Person ); // => true - */ - inherits: function( Super, protos, staticProtos ) { - var child; - - if ( typeof protos === 'function' ) { - child = protos; - protos = null; - } else if ( protos && protos.hasOwnProperty('constructor') ) { - child = protos.constructor; - } else { - child = function() { - return Super.apply( this, arguments ); - }; - } - - // 复制静态方法 - $.extend( true, child, Super, staticProtos || {} ); - - /* jshint camelcase: false */ - - // 让子类的__super__属性指向父类。 - child.__super__ = Super.prototype; - - // 构建原型,添加原型方法或属性。 - // 暂时用Object.create实现。 - child.prototype = createObject( Super.prototype ); - protos && $.extend( true, child.prototype, protos ); - - return child; - }, - - /** - * 一个不做任何事情的方法。可以用来赋值给默认的callback. - * @method noop - */ - noop: noop, - - /** - * 返回一个新的方法,此方法将已指定的`context`来执行。 - * @grammar Base.bindFn( fn, context ) => Function - * @method bindFn - * @example - * var doSomething = function() { - * console.log( this.name ); - * }, - * obj = { - * name: 'Object Name' - * }, - * aliasFn = Base.bind( doSomething, obj ); - * - * aliasFn(); // => Object Name - * - */ - bindFn: bindFn, - - /** - * 引用Console.log如果存在的话,否则引用一个[空函数noop](#WebUploader:Base.noop)。 - * @grammar Base.log( args... ) => undefined - * @method log - */ - log: (function() { - if ( window.console ) { - return bindFn( console.log, console ); - } - return noop; - })(), - - nextTick: (function() { - - return function( cb ) { - setTimeout( cb, 1 ); - }; - - // @bug 当浏览器不在当前窗口时就停了。 - // var next = window.requestAnimationFrame || - // window.webkitRequestAnimationFrame || - // window.mozRequestAnimationFrame || - // function( cb ) { - // window.setTimeout( cb, 1000 / 60 ); - // }; - - // // fix: Uncaught TypeError: Illegal invocation - // return bindFn( next, window ); - })(), - - /** - * 被[uncurrythis](http://www.2ality.com/2011/11/uncurrying-this.html)的数组slice方法。 - * 将用来将非数组对象转化成数组对象。 - * @grammar Base.slice( target, start[, end] ) => Array - * @method slice - * @example - * function doSomthing() { - * var args = Base.slice( arguments, 1 ); - * console.log( args ); - * } - * - * doSomthing( 'ignored', 'arg2', 'arg3' ); // => Array ["arg2", "arg3"] - */ - slice: uncurryThis( [].slice ), - - /** - * 生成唯一的ID - * @method guid - * @grammar Base.guid() => String - * @grammar Base.guid( prefx ) => String - */ - guid: (function() { - var counter = 0; - - return function( prefix ) { - var guid = (+new Date()).toString( 32 ), - i = 0; - - for ( ; i < 5; i++ ) { - guid += Math.floor( Math.random() * 65535 ).toString( 32 ); - } - - return (prefix || 'wu_') + guid + (counter++).toString( 32 ); - }; - })(), - - /** - * 格式化文件大小, 输出成带单位的字符串 - * @method formatSize - * @grammar Base.formatSize( size ) => String - * @grammar Base.formatSize( size, pointLength ) => String - * @grammar Base.formatSize( size, pointLength, units ) => String - * @param {Number} size 文件大小 - * @param {Number} [pointLength=2] 精确到的小数点数。 - * @param {Array} [units=[ 'B', 'K', 'M', 'G', 'TB' ]] 单位数组。从字节,到千字节,一直往上指定。如果单位数组里面只指定了到了K(千字节),同时文件大小大于M, 此方法的输出将还是显示成多少K. - * @example - * console.log( Base.formatSize( 100 ) ); // => 100B - * console.log( Base.formatSize( 1024 ) ); // => 1.00K - * console.log( Base.formatSize( 1024, 0 ) ); // => 1K - * console.log( Base.formatSize( 1024 * 1024 ) ); // => 1.00M - * console.log( Base.formatSize( 1024 * 1024 * 1024 ) ); // => 1.00G - * console.log( Base.formatSize( 1024 * 1024 * 1024, 0, ['B', 'KB', 'MB'] ) ); // => 1024MB - */ - formatSize: function( size, pointLength, units ) { - var unit; - - units = units || [ 'B', 'K', 'M', 'G', 'TB' ]; - - while ( (unit = units.shift()) && size > 1024 ) { - size = size / 1024; - } - - return (unit === 'B' ? size : size.toFixed( pointLength || 2 )) + - unit; - } - }; - }); - /** - * 事件处理类,可以独立使用,也可以扩展给对象使用。 - * @fileOverview Mediator - */ - define('mediator',[ - 'base' - ], function( Base ) { - var $ = Base.$, - slice = [].slice, - separator = /\s+/, - protos; - - // 根据条件过滤出事件handlers. - function findHandlers( arr, name, callback, context ) { - return $.grep( arr, function( handler ) { - return handler && - (!name || handler.e === name) && - (!callback || handler.cb === callback || - handler.cb._cb === callback) && - (!context || handler.ctx === context); - }); - } - - function eachEvent( events, callback, iterator ) { - // 不支持对象,只支持多个event用空格隔开 - $.each( (events || '').split( separator ), function( _, key ) { - iterator( key, callback ); - }); - } - - function triggerHanders( events, args ) { - var stoped = false, - i = -1, - len = events.length, - handler; - - while ( ++i < len ) { - handler = events[ i ]; - - if ( handler.cb.apply( handler.ctx2, args ) === false ) { - stoped = true; - break; - } - } - - return !stoped; - } - - protos = { - - /** - * 绑定事件。 - * - * `callback`方法在执行时,arguments将会来源于trigger的时候携带的参数。如 - * ```javascript - * var obj = {}; - * - * // 使得obj有事件行为 - * Mediator.installTo( obj ); - * - * obj.on( 'testa', function( arg1, arg2 ) { - * console.log( arg1, arg2 ); // => 'arg1', 'arg2' - * }); - * - * obj.trigger( 'testa', 'arg1', 'arg2' ); - * ``` - * - * 如果`callback`中,某一个方法`return false`了,则后续的其他`callback`都不会被执行到。 - * 切会影响到`trigger`方法的返回值,为`false`。 - * - * `on`还可以用来添加一个特殊事件`all`, 这样所有的事件触发都会响应到。同时此类`callback`中的arguments有一个不同处, - * 就是第一个参数为`type`,记录当前是什么事件在触发。此类`callback`的优先级比脚低,会再正常`callback`执行完后触发。 - * ```javascript - * obj.on( 'all', function( type, arg1, arg2 ) { - * console.log( type, arg1, arg2 ); // => 'testa', 'arg1', 'arg2' - * }); - * ``` - * - * @method on - * @grammar on( name, callback[, context] ) => self - * @param {String} name 事件名,支持多个事件用空格隔开 - * @param {Function} callback 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - * @class Mediator - */ - on: function( name, callback, context ) { - var me = this, - set; - - if ( !callback ) { - return this; - } - - set = this._events || (this._events = []); - - eachEvent( name, callback, function( name, callback ) { - var handler = { e: name }; - - handler.cb = callback; - handler.ctx = context; - handler.ctx2 = context || me; - handler.id = set.length; - - set.push( handler ); - }); - - return this; - }, - - /** - * 绑定事件,且当handler执行完后,自动解除绑定。 - * @method once - * @grammar once( name, callback[, context] ) => self - * @param {String} name 事件名 - * @param {Function} callback 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - */ - once: function( name, callback, context ) { - var me = this; - - if ( !callback ) { - return me; - } - - eachEvent( name, callback, function( name, callback ) { - var once = function() { - me.off( name, once ); - return callback.apply( context || me, arguments ); - }; - - once._cb = callback; - me.on( name, once, context ); - }); - - return me; - }, - - /** - * 解除事件绑定 - * @method off - * @grammar off( [name[, callback[, context] ] ] ) => self - * @param {String} [name] 事件名 - * @param {Function} [callback] 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - */ - off: function( name, cb, ctx ) { - var events = this._events; - - if ( !events ) { - return this; - } - - if ( !name && !cb && !ctx ) { - this._events = []; - return this; - } - - eachEvent( name, cb, function( name, cb ) { - $.each( findHandlers( events, name, cb, ctx ), function() { - delete events[ this.id ]; - }); - }); - - return this; - }, - - /** - * 触发事件 - * @method trigger - * @grammar trigger( name[, args...] ) => self - * @param {String} type 事件名 - * @param {*} [...] 任意参数 - * @return {Boolean} 如果handler中return false了,则返回false, 否则返回true - */ - trigger: function( type ) { - var args, events, allEvents; - - if ( !this._events || !type ) { - return this; - } - - args = slice.call( arguments, 1 ); - events = findHandlers( this._events, type ); - allEvents = findHandlers( this._events, 'all' ); - - return triggerHanders( events, args ) && - triggerHanders( allEvents, arguments ); - } - }; - - /** - * 中介者,它本身是个单例,但可以通过[installTo](#WebUploader:Mediator:installTo)方法,使任何对象具备事件行为。 - * 主要目的是负责模块与模块之间的合作,降低耦合度。 - * - * @class Mediator - */ - return $.extend({ - - /** - * 可以通过这个接口,使任何对象具备事件功能。 - * @method installTo - * @param {Object} obj 需要具备事件行为的对象。 - * @return {Object} 返回obj. - */ - installTo: function( obj ) { - return $.extend( obj, protos ); - } - - }, protos ); - }); - /** - * @fileOverview Uploader上传类 - */ - define('uploader',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$; - - /** - * 上传入口类。 - * @class Uploader - * @constructor - * @grammar new Uploader( opts ) => Uploader - * @example - * var uploader = WebUploader.Uploader({ - * swf: 'path_of_swf/Uploader.swf', - * - * // 开起分片上传。 - * chunked: true - * }); - */ - function Uploader( opts ) { - this.options = $.extend( true, {}, Uploader.options, opts ); - this._init( this.options ); - } - - // default Options - // widgets中有相应扩展 - Uploader.options = {}; - Mediator.installTo( Uploader.prototype ); - - // 批量添加纯命令式方法。 - $.each({ - upload: 'start-upload', - stop: 'stop-upload', - getFile: 'get-file', - getFiles: 'get-files', - addFile: 'add-file', - addFiles: 'add-file', - sort: 'sort-files', - removeFile: 'remove-file', - cancelFile: 'cancel-file', - skipFile: 'skip-file', - retry: 'retry', - isInProgress: 'is-in-progress', - makeThumb: 'make-thumb', - md5File: 'md5-file', - getDimension: 'get-dimension', - addButton: 'add-btn', - predictRuntimeType: 'predict-runtime-type', - refresh: 'refresh', - disable: 'disable', - enable: 'enable', - reset: 'reset' - }, function( fn, command ) { - Uploader.prototype[ fn ] = function() { - return this.request( command, arguments ); - }; - }); - - $.extend( Uploader.prototype, { - state: 'pending', - - _init: function( opts ) { - var me = this; - - me.request( 'init', opts, function() { - me.state = 'ready'; - me.trigger('ready'); - }); - }, - - /** - * 获取或者设置Uploader配置项。 - * @method option - * @grammar option( key ) => * - * @grammar option( key, val ) => self - * @example - * - * // 初始状态图片上传前不会压缩 - * var uploader = new WebUploader.Uploader({ - * compress: null; - * }); - * - * // 修改后图片上传前,尝试将图片压缩到1600 * 1600 - * uploader.option( 'compress', { - * width: 1600, - * height: 1600 - * }); - */ - option: function( key, val ) { - var opts = this.options; - - // setter - if ( arguments.length > 1 ) { - - if ( $.isPlainObject( val ) && - $.isPlainObject( opts[ key ] ) ) { - $.extend( opts[ key ], val ); - } else { - opts[ key ] = val; - } - - } else { // getter - return key ? opts[ key ] : opts; - } - }, - - /** - * 获取文件统计信息。返回一个包含一下信息的对象。 - * * `successNum` 上传成功的文件数 - * * `progressNum` 上传中的文件数 - * * `cancelNum` 被删除的文件数 - * * `invalidNum` 无效的文件数 - * * `uploadFailNum` 上传失败的文件数 - * * `queueNum` 还在队列中的文件数 - * * `interruptNum` 被暂停的文件数 - * @method getStats - * @grammar getStats() => Object - */ - getStats: function() { - // return this._mgr.getStats.apply( this._mgr, arguments ); - var stats = this.request('get-stats'); - - return stats ? { - successNum: stats.numOfSuccess, - progressNum: stats.numOfProgress, - - // who care? - // queueFailNum: 0, - cancelNum: stats.numOfCancel, - invalidNum: stats.numOfInvalid, - uploadFailNum: stats.numOfUploadFailed, - queueNum: stats.numOfQueue, - interruptNum: stats.numofInterrupt - } : {}; - }, - - // 需要重写此方法来来支持opts.onEvent和instance.onEvent的处理器 - trigger: function( type/*, args...*/ ) { - var args = [].slice.call( arguments, 1 ), - opts = this.options, - name = 'on' + type.substring( 0, 1 ).toUpperCase() + - type.substring( 1 ); - - if ( - // 调用通过on方法注册的handler. - Mediator.trigger.apply( this, arguments ) === false || - - // 调用opts.onEvent - $.isFunction( opts[ name ] ) && - opts[ name ].apply( this, args ) === false || - - // 调用this.onEvent - $.isFunction( this[ name ] ) && - this[ name ].apply( this, args ) === false || - - // 广播所有uploader的事件。 - Mediator.trigger.apply( Mediator, - [ this, type ].concat( args ) ) === false ) { - - return false; - } - - return true; - }, - - /** - * 销毁 webuploader 实例 - * @method destroy - * @grammar destroy() => undefined - */ - destroy: function() { - this.request( 'destroy', arguments ); - this.off(); - }, - - // widgets/widget.js将补充此方法的详细文档。 - request: Base.noop - }); - - /** - * 创建Uploader实例,等同于new Uploader( opts ); - * @method create - * @class Base - * @static - * @grammar Base.create( opts ) => Uploader - */ - Base.create = Uploader.create = function( opts ) { - return new Uploader( opts ); - }; - - // 暴露Uploader,可以通过它来扩展业务逻辑。 - Base.Uploader = Uploader; - - return Uploader; - }); - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/runtime',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$, - factories = {}, - - // 获取对象的第一个key - getFirstKey = function( obj ) { - for ( var key in obj ) { - if ( obj.hasOwnProperty( key ) ) { - return key; - } - } - return null; - }; - - // 接口类。 - function Runtime( options ) { - this.options = $.extend({ - container: document.body - }, options ); - this.uid = Base.guid('rt_'); - } - - $.extend( Runtime.prototype, { - - getContainer: function() { - var opts = this.options, - parent, container; - - if ( this._container ) { - return this._container; - } - - parent = $( opts.container || document.body ); - container = $( document.createElement('div') ); - - container.attr( 'id', 'rt_' + this.uid ); - container.css({ - position: 'absolute', - top: '0px', - left: '0px', - width: '1px', - height: '1px', - overflow: 'hidden' - }); - - parent.append( container ); - parent.addClass('webuploader-container'); - this._container = container; - this._parent = parent; - return container; - }, - - init: Base.noop, - exec: Base.noop, - - destroy: function() { - this._container && this._container.remove(); - this._parent && this._parent.removeClass('webuploader-container'); - this.off(); - } - }); - - Runtime.orders = 'html5,flash'; - - - /** - * 添加Runtime实现。 - * @param {String} type 类型 - * @param {Runtime} factory 具体Runtime实现。 - */ - Runtime.addRuntime = function( type, factory ) { - factories[ type ] = factory; - }; - - Runtime.hasRuntime = function( type ) { - return !!(type ? factories[ type ] : getFirstKey( factories )); - }; - - Runtime.create = function( opts, orders ) { - var type, runtime; - - orders = orders || Runtime.orders; - $.each( orders.split( /\s*,\s*/g ), function() { - if ( factories[ this ] ) { - type = this; - return false; - } - }); - - type = type || getFirstKey( factories ); - - if ( !type ) { - throw new Error('Runtime Error'); - } - - runtime = new factories[ type ]( opts ); - return runtime; - }; - - Mediator.installTo( Runtime.prototype ); - return Runtime; - }); - - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/client',[ - 'base', - 'mediator', - 'runtime/runtime' - ], function( Base, Mediator, Runtime ) { - - var cache; - - cache = (function() { - var obj = {}; - - return { - add: function( runtime ) { - obj[ runtime.uid ] = runtime; - }, - - get: function( ruid, standalone ) { - var i; - - if ( ruid ) { - return obj[ ruid ]; - } - - for ( i in obj ) { - // 有些类型不能重用,比如filepicker. - if ( standalone && obj[ i ].__standalone ) { - continue; - } - - return obj[ i ]; - } - - return null; - }, - - remove: function( runtime ) { - delete obj[ runtime.uid ]; - } - }; - })(); - - function RuntimeClient( component, standalone ) { - var deferred = Base.Deferred(), - runtime; - - this.uid = Base.guid('client_'); - - // 允许runtime没有初始化之前,注册一些方法在初始化后执行。 - this.runtimeReady = function( cb ) { - return deferred.done( cb ); - }; - - this.connectRuntime = function( opts, cb ) { - - // already connected. - if ( runtime ) { - throw new Error('already connected!'); - } - - deferred.done( cb ); - - if ( typeof opts === 'string' && cache.get( opts ) ) { - runtime = cache.get( opts ); - } - - // 像filePicker只能独立存在,不能公用。 - runtime = runtime || cache.get( null, standalone ); - - // 需要创建 - if ( !runtime ) { - runtime = Runtime.create( opts, opts.runtimeOrder ); - runtime.__promise = deferred.promise(); - runtime.once( 'ready', deferred.resolve ); - runtime.init(); - cache.add( runtime ); - runtime.__client = 1; - } else { - // 来自cache - Base.$.extend( runtime.options, opts ); - runtime.__promise.then( deferred.resolve ); - runtime.__client++; - } - - standalone && (runtime.__standalone = standalone); - return runtime; - }; - - this.getRuntime = function() { - return runtime; - }; - - this.disconnectRuntime = function() { - if ( !runtime ) { - return; - } - - runtime.__client--; - - if ( runtime.__client <= 0 ) { - cache.remove( runtime ); - delete runtime.__promise; - runtime.destroy(); - } - - runtime = null; - }; - - this.exec = function() { - if ( !runtime ) { - return; - } - - var args = Base.slice( arguments ); - component && args.unshift( component ); - - return runtime.exec.apply( this, args ); - }; - - this.getRuid = function() { - return runtime && runtime.uid; - }; - - this.destroy = (function( destroy ) { - return function() { - destroy && destroy.apply( this, arguments ); - this.trigger('destroy'); - this.off(); - this.exec('destroy'); - this.disconnectRuntime(); - }; - })( this.destroy ); - } - - Mediator.installTo( RuntimeClient.prototype ); - return RuntimeClient; - }); - /** - * @fileOverview 错误信息 - */ - define('lib/dnd',[ - 'base', - 'mediator', - 'runtime/client' - ], function( Base, Mediator, RuntimeClent ) { - - var $ = Base.$; - - function DragAndDrop( opts ) { - opts = this.options = $.extend({}, DragAndDrop.options, opts ); - - opts.container = $( opts.container ); - - if ( !opts.container.length ) { - return; - } - - RuntimeClent.call( this, 'DragAndDrop' ); - } - - DragAndDrop.options = { - accept: null, - disableGlobalDnd: false - }; - - Base.inherits( RuntimeClent, { - constructor: DragAndDrop, - - init: function() { - var me = this; - - me.connectRuntime( me.options, function() { - me.exec('init'); - me.trigger('ready'); - }); - } - }); - - Mediator.installTo( DragAndDrop.prototype ); - - return DragAndDrop; - }); - /** - * @fileOverview 组件基类。 - */ - define('widgets/widget',[ - 'base', - 'uploader' - ], function( Base, Uploader ) { - - var $ = Base.$, - _init = Uploader.prototype._init, - _destroy = Uploader.prototype.destroy, - IGNORE = {}, - widgetClass = []; - - function isArrayLike( obj ) { - if ( !obj ) { - return false; - } - - var length = obj.length, - type = $.type( obj ); - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === 'array' || type !== 'function' && type !== 'string' && - (length === 0 || typeof length === 'number' && length > 0 && - (length - 1) in obj); - } - - function Widget( uploader ) { - this.owner = uploader; - this.options = uploader.options; - } - - $.extend( Widget.prototype, { - - init: Base.noop, - - // 类Backbone的事件监听声明,监听uploader实例上的事件 - // widget直接无法监听事件,事件只能通过uploader来传递 - invoke: function( apiName, args ) { - - /* - { - 'make-thumb': 'makeThumb' - } - */ - var map = this.responseMap; - - // 如果无API响应声明则忽略 - if ( !map || !(apiName in map) || !(map[ apiName ] in this) || - !$.isFunction( this[ map[ apiName ] ] ) ) { - - return IGNORE; - } - - return this[ map[ apiName ] ].apply( this, args ); - - }, - - /** - * 发送命令。当传入`callback`或者`handler`中返回`promise`时。返回一个当所有`handler`中的promise都完成后完成的新`promise`。 - * @method request - * @grammar request( command, args ) => * | Promise - * @grammar request( command, args, callback ) => Promise - * @for Uploader - */ - request: function() { - return this.owner.request.apply( this.owner, arguments ); - } - }); - - // 扩展Uploader. - $.extend( Uploader.prototype, { - - /** - * @property {String | Array} [disableWidgets=undefined] - * @namespace options - * @for Uploader - * @description 默认所有 Uploader.register 了的 widget 都会被加载,如果禁用某一部分,请通过此 option 指定黑名单。 - */ - - // 覆写_init用来初始化widgets - _init: function() { - var me = this, - widgets = me._widgets = [], - deactives = me.options.disableWidgets || ''; - - $.each( widgetClass, function( _, klass ) { - (!deactives || !~deactives.indexOf( klass._name )) && - widgets.push( new klass( me ) ); - }); - - return _init.apply( me, arguments ); - }, - - request: function( apiName, args, callback ) { - var i = 0, - widgets = this._widgets, - len = widgets && widgets.length, - rlts = [], - dfds = [], - widget, rlt, promise, key; - - args = isArrayLike( args ) ? args : [ args ]; - - for ( ; i < len; i++ ) { - widget = widgets[ i ]; - rlt = widget.invoke( apiName, args ); - - if ( rlt !== IGNORE ) { - - // Deferred对象 - if ( Base.isPromise( rlt ) ) { - dfds.push( rlt ); - } else { - rlts.push( rlt ); - } - } - } - - // 如果有callback,则用异步方式。 - if ( callback || dfds.length ) { - promise = Base.when.apply( Base, dfds ); - key = promise.pipe ? 'pipe' : 'then'; - - // 很重要不能删除。删除了会死循环。 - // 保证执行顺序。让callback总是在下一个 tick 中执行。 - return promise[ key ](function() { - var deferred = Base.Deferred(), - args = arguments; - - if ( args.length === 1 ) { - args = args[ 0 ]; - } - - setTimeout(function() { - deferred.resolve( args ); - }, 1 ); - - return deferred.promise(); - })[ callback ? key : 'done' ]( callback || Base.noop ); - } else { - return rlts[ 0 ]; - } - }, - - destroy: function() { - _destroy.apply( this, arguments ); - this._widgets = null; - } - }); - - /** - * 添加组件 - * @grammar Uploader.register(proto); - * @grammar Uploader.register(map, proto); - * @param {object} responseMap API 名称与函数实现的映射 - * @param {object} proto 组件原型,构造函数通过 constructor 属性定义 - * @method Uploader.register - * @for Uploader - * @example - * Uploader.register({ - * 'make-thumb': 'makeThumb' - * }, { - * init: function( options ) {}, - * makeThumb: function() {} - * }); - * - * Uploader.register({ - * 'make-thumb': function() { - * - * } - * }); - */ - Uploader.register = Widget.register = function( responseMap, widgetProto ) { - var map = { init: 'init', destroy: 'destroy', name: 'anonymous' }, - klass; - - if ( arguments.length === 1 ) { - widgetProto = responseMap; - - // 自动生成 map 表。 - $.each(widgetProto, function(key) { - if ( key[0] === '_' || key === 'name' ) { - key === 'name' && (map.name = widgetProto.name); - return; - } - - map[key.replace(/[A-Z]/g, '-$&').toLowerCase()] = key; - }); - - } else { - map = $.extend( map, responseMap ); - } - - widgetProto.responseMap = map; - klass = Base.inherits( Widget, widgetProto ); - klass._name = map.name; - widgetClass.push( klass ); - - return klass; - }; - - /** - * 删除插件,只有在注册时指定了名字的才能被删除。 - * @grammar Uploader.unRegister(name); - * @param {string} name 组件名字 - * @method Uploader.unRegister - * @for Uploader - * @example - * - * Uploader.register({ - * name: 'custom', - * - * 'make-thumb': function() { - * - * } - * }); - * - * Uploader.unRegister('custom'); - */ - Uploader.unRegister = Widget.unRegister = function( name ) { - if ( !name || name === 'anonymous' ) { - return; - } - - // 删除指定的插件。 - for ( var i = widgetClass.length; i--; ) { - if ( widgetClass[i]._name === name ) { - widgetClass.splice(i, 1) - } - } - }; - - return Widget; - }); - /** - * @fileOverview DragAndDrop Widget。 - */ - define('widgets/filednd',[ - 'base', - 'uploader', - 'lib/dnd', - 'widgets/widget' - ], function( Base, Uploader, Dnd ) { - var $ = Base.$; - - Uploader.options.dnd = ''; - - /** - * @property {Selector} [dnd=undefined] 指定Drag And Drop拖拽的容器,如果不指定,则不启动。 - * @namespace options - * @for Uploader - */ - - /** - * @property {Selector} [disableGlobalDnd=false] 是否禁掉整个页面的拖拽功能,如果不禁用,图片拖进来的时候会默认被浏览器打开。 - * @namespace options - * @for Uploader - */ - - /** - * @event dndAccept - * @param {DataTransferItemList} items DataTransferItem - * @description 阻止此事件可以拒绝某些类型的文件拖入进来。目前只有 chrome 提供这样的 API,且只能通过 mime-type 验证。 - * @for Uploader - */ - return Uploader.register({ - name: 'dnd', - - init: function( opts ) { - - if ( !opts.dnd || - this.request('predict-runtime-type') !== 'html5' ) { - return; - } - - var me = this, - deferred = Base.Deferred(), - options = $.extend({}, { - disableGlobalDnd: opts.disableGlobalDnd, - container: opts.dnd, - accept: opts.accept - }), - dnd; - - this.dnd = dnd = new Dnd( options ); - - dnd.once( 'ready', deferred.resolve ); - dnd.on( 'drop', function( files ) { - me.request( 'add-file', [ files ]); - }); - - // 检测文件是否全部允许添加。 - dnd.on( 'accept', function( items ) { - return me.owner.trigger( 'dndAccept', items ); - }); - - dnd.init(); - - return deferred.promise(); - }, - - destroy: function() { - this.dnd && this.dnd.destroy(); - } - }); - }); - - /** - * @fileOverview 错误信息 - */ - define('lib/filepaste',[ - 'base', - 'mediator', - 'runtime/client' - ], function( Base, Mediator, RuntimeClent ) { - - var $ = Base.$; - - function FilePaste( opts ) { - opts = this.options = $.extend({}, opts ); - opts.container = $( opts.container || document.body ); - RuntimeClent.call( this, 'FilePaste' ); - } - - Base.inherits( RuntimeClent, { - constructor: FilePaste, - - init: function() { - var me = this; - - me.connectRuntime( me.options, function() { - me.exec('init'); - me.trigger('ready'); - }); - } - }); - - Mediator.installTo( FilePaste.prototype ); - - return FilePaste; - }); - /** - * @fileOverview 组件基类。 - */ - define('widgets/filepaste',[ - 'base', - 'uploader', - 'lib/filepaste', - 'widgets/widget' - ], function( Base, Uploader, FilePaste ) { - var $ = Base.$; - - /** - * @property {Selector} [paste=undefined] 指定监听paste事件的容器,如果不指定,不启用此功能。此功能为通过粘贴来添加截屏的图片。建议设置为`document.body`. - * @namespace options - * @for Uploader - */ - return Uploader.register({ - name: 'paste', - - init: function( opts ) { - - if ( !opts.paste || - this.request('predict-runtime-type') !== 'html5' ) { - return; - } - - var me = this, - deferred = Base.Deferred(), - options = $.extend({}, { - container: opts.paste, - accept: opts.accept - }), - paste; - - this.paste = paste = new FilePaste( options ); - - paste.once( 'ready', deferred.resolve ); - paste.on( 'paste', function( files ) { - me.owner.request( 'add-file', [ files ]); - }); - paste.init(); - - return deferred.promise(); - }, - - destroy: function() { - this.paste && this.paste.destroy(); - } - }); - }); - /** - * @fileOverview Blob - */ - define('lib/blob',[ - 'base', - 'runtime/client' - ], function( Base, RuntimeClient ) { - - function Blob( ruid, source ) { - var me = this; - - me.source = source; - me.ruid = ruid; - this.size = source.size || 0; - - // 如果没有指定 mimetype, 但是知道文件后缀。 - if ( !source.type && this.ext && - ~'jpg,jpeg,png,gif,bmp'.indexOf( this.ext ) ) { - this.type = 'image/' + (this.ext === 'jpg' ? 'jpeg' : this.ext); - } else { - this.type = source.type || 'application/octet-stream'; - } - - RuntimeClient.call( me, 'Blob' ); - this.uid = source.uid || this.uid; - - if ( ruid ) { - me.connectRuntime( ruid ); - } - } - - Base.inherits( RuntimeClient, { - constructor: Blob, - - slice: function( start, end ) { - return this.exec( 'slice', start, end ); - }, - - getSource: function() { - return this.source; - } - }); - - return Blob; - }); - /** - * 为了统一化Flash的File和HTML5的File而存在。 - * 以至于要调用Flash里面的File,也可以像调用HTML5版本的File一下。 - * @fileOverview File - */ - define('lib/file',[ - 'base', - 'lib/blob' - ], function( Base, Blob ) { - - var uid = 1, - rExt = /\.([^.]+)$/; - - function File( ruid, file ) { - var ext; - - this.name = file.name || ('untitled' + uid++); - ext = rExt.exec( file.name ) ? RegExp.$1.toLowerCase() : ''; - - // todo 支持其他类型文件的转换。 - // 如果有 mimetype, 但是文件名里面没有找出后缀规律 - if ( !ext && file.type ) { - ext = /\/(jpg|jpeg|png|gif|bmp)$/i.exec( file.type ) ? - RegExp.$1.toLowerCase() : ''; - this.name += '.' + ext; - } - - this.ext = ext; - this.lastModifiedDate = file.lastModifiedDate || - (new Date()).toLocaleString(); - - Blob.apply( this, arguments ); - } - - return Base.inherits( Blob, File ); - }); - - /** - * @fileOverview 错误信息 - */ - define('lib/filepicker',[ - 'base', - 'runtime/client', - 'lib/file' - ], function( Base, RuntimeClent, File ) { - - var $ = Base.$; - - function FilePicker( opts ) { - opts = this.options = $.extend({}, FilePicker.options, opts ); - - opts.container = $( opts.id ); - - if ( !opts.container.length ) { - throw new Error('按钮指定错误'); - } - - opts.innerHTML = opts.innerHTML || opts.label || - opts.container.html() || ''; - - opts.button = $( opts.button || document.createElement('div') ); - opts.button.html( opts.innerHTML ); - opts.container.html( opts.button ); - - RuntimeClent.call( this, 'FilePicker', true ); - } - - FilePicker.options = { - button: null, - container: null, - label: null, - innerHTML: null, - multiple: true, - accept: null, - name: 'file' - }; - - Base.inherits( RuntimeClent, { - constructor: FilePicker, - - init: function() { - var me = this, - opts = me.options, - button = opts.button; - - button.addClass('webuploader-pick'); - - me.on( 'all', function( type ) { - var files; - - switch ( type ) { - case 'mouseenter': - button.addClass('webuploader-pick-hover'); - break; - - case 'mouseleave': - button.removeClass('webuploader-pick-hover'); - break; - - case 'change': - files = me.exec('getFiles'); - me.trigger( 'select', $.map( files, function( file ) { - file = new File( me.getRuid(), file ); - - // 记录来源。 - file._refer = opts.container; - return file; - }), opts.container ); - break; - } - }); - - me.connectRuntime( opts, function() { - me.refresh(); - me.exec( 'init', opts ); - me.trigger('ready'); - }); - - this._resizeHandler = Base.bindFn( this.refresh, this ); - $( window ).on( 'resize', this._resizeHandler ); - }, - - refresh: function() { - var shimContainer = this.getRuntime().getContainer(), - button = this.options.button, - width = button.outerWidth ? - button.outerWidth() : button.width(), - - height = button.outerHeight ? - button.outerHeight() : button.height(), - - pos = button.offset(); - - width && height && shimContainer.css({ - bottom: 'auto', - right: 'auto', - width: width + 'px', - height: height + 'px' - }).offset( pos ); - }, - - enable: function() { - var btn = this.options.button; - - btn.removeClass('webuploader-pick-disable'); - this.refresh(); - }, - - disable: function() { - var btn = this.options.button; - - this.getRuntime().getContainer().css({ - top: '-99999px' - }); - - btn.addClass('webuploader-pick-disable'); - }, - - destroy: function() { - var btn = this.options.button; - $( window ).off( 'resize', this._resizeHandler ); - btn.removeClass('webuploader-pick-disable webuploader-pick-hover ' + - 'webuploader-pick'); - } - }); - - return FilePicker; - }); - - /** - * @fileOverview 文件选择相关 - */ - define('widgets/filepicker',[ - 'base', - 'uploader', - 'lib/filepicker', - 'widgets/widget' - ], function( Base, Uploader, FilePicker ) { - var $ = Base.$; - - $.extend( Uploader.options, { - - /** - * @property {Selector | Object} [pick=undefined] - * @namespace options - * @for Uploader - * @description 指定选择文件的按钮容器,不指定则不创建按钮。 - * - * * `id` {Seletor|dom} 指定选择文件的按钮容器,不指定则不创建按钮。**注意** 这里虽然写的是 id, 但是不是只支持 id, 还支持 class, 或者 dom 节点。 - * * `label` {String} 请采用 `innerHTML` 代替 - * * `innerHTML` {String} 指定按钮文字。不指定时优先从指定的容器中看是否自带文字。 - * * `multiple` {Boolean} 是否开起同时选择多个文件能力。 - */ - pick: null, - - /** - * @property {Arroy} [accept=null] - * @namespace options - * @for Uploader - * @description 指定接受哪些类型的文件。 由于目前还有ext转mimeType表,所以这里需要分开指定。 - * - * * `title` {String} 文字描述 - * * `extensions` {String} 允许的文件后缀,不带点,多个用逗号分割。 - * * `mimeTypes` {String} 多个用逗号分割。 - * - * 如: - * - * ``` - * { - * title: 'Images', - * extensions: 'gif,jpg,jpeg,bmp,png', - * mimeTypes: 'image/*' - * } - * ``` - */ - accept: null/*{ - title: 'Images', - extensions: 'gif,jpg,jpeg,bmp,png', - mimeTypes: 'image/*' - }*/ - }); - - return Uploader.register({ - name: 'picker', - - init: function( opts ) { - this.pickers = []; - return opts.pick && this.addBtn( opts.pick ); - }, - - refresh: function() { - $.each( this.pickers, function() { - this.refresh(); - }); - }, - - /** - * @method addButton - * @for Uploader - * @grammar addButton( pick ) => Promise - * @description - * 添加文件选择按钮,如果一个按钮不够,需要调用此方法来添加。参数跟[options.pick](#WebUploader:Uploader:options)一致。 - * @example - * uploader.addButton({ - * id: '#btnContainer', - * innerHTML: '选择文件' - * }); - */ - addBtn: function( pick ) { - var me = this, - opts = me.options, - accept = opts.accept, - promises = []; - - if ( !pick ) { - return; - } - - $.isPlainObject( pick ) || (pick = { - id: pick - }); - - $( pick.id ).each(function() { - var options, picker, deferred; - - deferred = Base.Deferred(); - - options = $.extend({}, pick, { - accept: $.isPlainObject( accept ) ? [ accept ] : accept, - swf: opts.swf, - runtimeOrder: opts.runtimeOrder, - id: this - }); - - picker = new FilePicker( options ); - - picker.once( 'ready', deferred.resolve ); - picker.on( 'select', function( files ) { - me.owner.request( 'add-file', [ files ]); - }); - picker.init(); - - me.pickers.push( picker ); - - promises.push( deferred.promise() ); - }); - - return Base.when.apply( Base, promises ); - }, - - disable: function() { - $.each( this.pickers, function() { - this.disable(); - }); - }, - - enable: function() { - $.each( this.pickers, function() { - this.enable(); - }); - }, - - destroy: function() { - $.each( this.pickers, function() { - this.destroy(); - }); - this.pickers = null; - } - }); - }); - /** - * @fileOverview Image - */ - define('lib/image',[ - 'base', - 'runtime/client', - 'lib/blob' - ], function( Base, RuntimeClient, Blob ) { - var $ = Base.$; - - // 构造器。 - function Image( opts ) { - this.options = $.extend({}, Image.options, opts ); - RuntimeClient.call( this, 'Image' ); - - this.on( 'load', function() { - this._info = this.exec('info'); - this._meta = this.exec('meta'); - }); - } - - // 默认选项。 - Image.options = { - - // 默认的图片处理质量 - quality: 90, - - // 是否裁剪 - crop: false, - - // 是否保留头部信息 - preserveHeaders: false, - - // 是否允许放大。 - allowMagnify: false - }; - - // 继承RuntimeClient. - Base.inherits( RuntimeClient, { - constructor: Image, - - info: function( val ) { - - // setter - if ( val ) { - this._info = val; - return this; - } - - // getter - return this._info; - }, - - meta: function( val ) { - - // setter - if ( val ) { - this._meta = val; - return this; - } - - // getter - return this._meta; - }, - - loadFromBlob: function( blob ) { - var me = this, - ruid = blob.getRuid(); - - this.connectRuntime( ruid, function() { - me.exec( 'init', me.options ); - me.exec( 'loadFromBlob', blob ); - }); - }, - - resize: function() { - var args = Base.slice( arguments ); - return this.exec.apply( this, [ 'resize' ].concat( args ) ); - }, - - crop: function() { - var args = Base.slice( arguments ); - return this.exec.apply( this, [ 'crop' ].concat( args ) ); - }, - - getAsDataUrl: function( type ) { - return this.exec( 'getAsDataUrl', type ); - }, - - getAsBlob: function( type ) { - var blob = this.exec( 'getAsBlob', type ); - - return new Blob( this.getRuid(), blob ); - } - }); - - return Image; - }); - /** - * @fileOverview 图片操作, 负责预览图片和上传前压缩图片 - */ - define('widgets/image',[ - 'base', - 'uploader', - 'lib/image', - 'widgets/widget' - ], function( Base, Uploader, Image ) { - - var $ = Base.$, - throttle; - - // 根据要处理的文件大小来节流,一次不能处理太多,会卡。 - throttle = (function( max ) { - var occupied = 0, - waiting = [], - tick = function() { - var item; - - while ( waiting.length && occupied < max ) { - item = waiting.shift(); - occupied += item[ 0 ]; - item[ 1 ](); - } - }; - - return function( emiter, size, cb ) { - waiting.push([ size, cb ]); - emiter.once( 'destroy', function() { - occupied -= size; - setTimeout( tick, 1 ); - }); - setTimeout( tick, 1 ); - }; - })( 5 * 1024 * 1024 ); - - $.extend( Uploader.options, { - - /** - * @property {Object} [thumb] - * @namespace options - * @for Uploader - * @description 配置生成缩略图的选项。 - * - * 默认为: - * - * ```javascript - * { - * width: 110, - * height: 110, - * - * // 图片质量,只有type为`image/jpeg`的时候才有效。 - * quality: 70, - * - * // 是否允许放大,如果想要生成小图的时候不失真,此选项应该设置为false. - * allowMagnify: true, - * - * // 是否允许裁剪。 - * crop: true, - * - * // 为空的话则保留原有图片格式。 - * // 否则强制转换成指定的类型。 - * type: 'image/jpeg' - * } - * ``` - */ - thumb: { - width: 110, - height: 110, - quality: 70, - allowMagnify: true, - crop: true, - preserveHeaders: false, - - // 为空的话则保留原有图片格式。 - // 否则强制转换成指定的类型。 - // IE 8下面 base64 大小不能超过 32K 否则预览失败,而非 jpeg 编码的图片很可 - // 能会超过 32k, 所以这里设置成预览的时候都是 image/jpeg - type: 'image/jpeg' - }, - - /** - * @property {Object} [compress] - * @namespace options - * @for Uploader - * @description 配置压缩的图片的选项。如果此选项为`false`, 则图片在上传前不进行压缩。 - * - * 默认为: - * - * ```javascript - * { - * width: 1600, - * height: 1600, - * - * // 图片质量,只有type为`image/jpeg`的时候才有效。 - * quality: 90, - * - * // 是否允许放大,如果想要生成小图的时候不失真,此选项应该设置为false. - * allowMagnify: false, - * - * // 是否允许裁剪。 - * crop: false, - * - * // 是否保留头部meta信息。 - * preserveHeaders: true, - * - * // 如果发现压缩后文件大小比原来还大,则使用原来图片 - * // 此属性可能会影响图片自动纠正功能 - * noCompressIfLarger: false, - * - * // 单位字节,如果图片大小小于此值,不会采用压缩。 - * compressSize: 0 - * } - * ``` - */ - compress: { - width: 1600, - height: 1600, - quality: 90, - allowMagnify: false, - crop: false, - preserveHeaders: true - } - }); - - return Uploader.register({ - - name: 'image', - - - /** - * 生成缩略图,此过程为异步,所以需要传入`callback`。 - * 通常情况在图片加入队里后调用此方法来生成预览图以增强交互效果。 - * - * 当 width 或者 height 的值介于 0 - 1 时,被当成百分比使用。 - * - * `callback`中可以接收到两个参数。 - * * 第一个为error,如果生成缩略图有错误,此error将为真。 - * * 第二个为ret, 缩略图的Data URL值。 - * - * **注意** - * Date URL在IE6/7中不支持,所以不用调用此方法了,直接显示一张暂不支持预览图片好了。 - * 也可以借助服务端,将 base64 数据传给服务端,生成一个临时文件供预览。 - * - * @method makeThumb - * @grammar makeThumb( file, callback ) => undefined - * @grammar makeThumb( file, callback, width, height ) => undefined - * @for Uploader - * @example - * - * uploader.on( 'fileQueued', function( file ) { - * var $li = ...; - * - * uploader.makeThumb( file, function( error, ret ) { - * if ( error ) { - * $li.text('预览错误'); - * } else { - * $li.append(''); - * } - * }); - * - * }); - */ - makeThumb: function( file, cb, width, height ) { - var opts, image; - - file = this.request( 'get-file', file ); - - // 只预览图片格式。 - if ( !file.type.match( /^image/ ) ) { - cb( true ); - return; - } - - opts = $.extend({}, this.options.thumb ); - - // 如果传入的是object. - if ( $.isPlainObject( width ) ) { - opts = $.extend( opts, width ); - width = null; - } - - width = width || opts.width; - height = height || opts.height; - - image = new Image( opts ); - - image.once( 'load', function() { - file._info = file._info || image.info(); - file._meta = file._meta || image.meta(); - - // 如果 width 的值介于 0 - 1 - // 说明设置的是百分比。 - if ( width <= 1 && width > 0 ) { - width = file._info.width * width; - } - - // 同样的规则应用于 height - if ( height <= 1 && height > 0 ) { - height = file._info.height * height; - } - - image.resize( width, height ); - }); - - // 当 resize 完后 - image.once( 'complete', function() { - cb( false, image.getAsDataUrl( opts.type ) ); - image.destroy(); - }); - - image.once( 'error', function( reason ) { - cb( reason || true ); - image.destroy(); - }); - - throttle( image, file.source.size, function() { - file._info && image.info( file._info ); - file._meta && image.meta( file._meta ); - image.loadFromBlob( file.source ); - }); - }, - - beforeSendFile: function( file ) { - var opts = this.options.compress || this.options.resize, - compressSize = opts && opts.compressSize || 0, - noCompressIfLarger = opts && opts.noCompressIfLarger || false, - image, deferred; - - file = this.request( 'get-file', file ); - - // 只压缩 jpeg 图片格式。 - // gif 可能会丢失针 - // bmp png 基本上尺寸都不大,且压缩比比较小。 - if ( !opts || !~'image/jpeg,image/jpg'.indexOf( file.type ) || - file.size < compressSize || - file._compressed ) { - return; - } - - opts = $.extend({}, opts ); - deferred = Base.Deferred(); - - image = new Image( opts ); - - deferred.always(function() { - image.destroy(); - image = null; - }); - image.once( 'error', deferred.reject ); - image.once( 'load', function() { - var width = opts.width, - height = opts.height; - - file._info = file._info || image.info(); - file._meta = file._meta || image.meta(); - - // 如果 width 的值介于 0 - 1 - // 说明设置的是百分比。 - if ( width <= 1 && width > 0 ) { - width = file._info.width * width; - } - - // 同样的规则应用于 height - if ( height <= 1 && height > 0 ) { - height = file._info.height * height; - } - - image.resize( width, height ); - }); - - image.once( 'complete', function() { - var blob, size; - - // 移动端 UC / qq 浏览器的无图模式下 - // ctx.getImageData 处理大图的时候会报 Exception - // INDEX_SIZE_ERR: DOM Exception 1 - try { - blob = image.getAsBlob( opts.type ); - - size = file.size; - - // 如果压缩后,比原来还大则不用压缩后的。 - if ( !noCompressIfLarger || blob.size < size ) { - // file.source.destroy && file.source.destroy(); - file.source = blob; - file.size = blob.size; - - file.trigger( 'resize', blob.size, size ); - } - - // 标记,避免重复压缩。 - file._compressed = true; - deferred.resolve(); - } catch ( e ) { - // 出错了直接继续,让其上传原始图片 - deferred.resolve(); - } - }); - - file._info && image.info( file._info ); - file._meta && image.meta( file._meta ); - - image.loadFromBlob( file.source ); - return deferred.promise(); - } - }); - }); - /** - * @fileOverview 文件属性封装 - */ - define('file',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$, - idPrefix = 'WU_FILE_', - idSuffix = 0, - rExt = /\.([^.]+)$/, - statusMap = {}; - - function gid() { - return idPrefix + idSuffix++; - } - - /** - * 文件类 - * @class File - * @constructor 构造函数 - * @grammar new File( source ) => File - * @param {Lib.File} source [lib.File](#Lib.File)实例, 此source对象是带有Runtime信息的。 - */ - function WUFile( source ) { - - /** - * 文件名,包括扩展名(后缀) - * @property name - * @type {string} - */ - this.name = source.name || 'Untitled'; - - /** - * 文件体积(字节) - * @property size - * @type {uint} - * @default 0 - */ - this.size = source.size || 0; - - /** - * 文件MIMETYPE类型,与文件类型的对应关系请参考[http://t.cn/z8ZnFny](http://t.cn/z8ZnFny) - * @property type - * @type {string} - * @default 'application/octet-stream' - */ - this.type = source.type || 'application/octet-stream'; - - /** - * 文件最后修改日期 - * @property lastModifiedDate - * @type {int} - * @default 当前时间戳 - */ - this.lastModifiedDate = source.lastModifiedDate || (new Date() * 1); - - /** - * 文件ID,每个对象具有唯一ID,与文件名无关 - * @property id - * @type {string} - */ - this.id = gid(); - - /** - * 文件扩展名,通过文件名获取,例如test.png的扩展名为png - * @property ext - * @type {string} - */ - this.ext = rExt.exec( this.name ) ? RegExp.$1 : ''; - - - /** - * 状态文字说明。在不同的status语境下有不同的用途。 - * @property statusText - * @type {string} - */ - this.statusText = ''; - - // 存储文件状态,防止通过属性直接修改 - statusMap[ this.id ] = WUFile.Status.INITED; - - this.source = source; - this.loaded = 0; - - this.on( 'error', function( msg ) { - this.setStatus( WUFile.Status.ERROR, msg ); - }); - } - - $.extend( WUFile.prototype, { - - /** - * 设置状态,状态变化时会触发`change`事件。 - * @method setStatus - * @grammar setStatus( status[, statusText] ); - * @param {File.Status|String} status [文件状态值](#WebUploader:File:File.Status) - * @param {String} [statusText=''] 状态说明,常在error时使用,用http, abort,server等来标记是由于什么原因导致文件错误。 - */ - setStatus: function( status, text ) { - - var prevStatus = statusMap[ this.id ]; - - typeof text !== 'undefined' && (this.statusText = text); - - if ( status !== prevStatus ) { - statusMap[ this.id ] = status; - /** - * 文件状态变化 - * @event statuschange - */ - this.trigger( 'statuschange', status, prevStatus ); - } - - }, - - /** - * 获取文件状态 - * @return {File.Status} - * @example - 文件状态具体包括以下几种类型: - { - // 初始化 - INITED: 0, - // 已入队列 - QUEUED: 1, - // 正在上传 - PROGRESS: 2, - // 上传出错 - ERROR: 3, - // 上传成功 - COMPLETE: 4, - // 上传取消 - CANCELLED: 5 - } - */ - getStatus: function() { - return statusMap[ this.id ]; - }, - - /** - * 获取文件原始信息。 - * @return {*} - */ - getSource: function() { - return this.source; - }, - - destroy: function() { - this.off(); - delete statusMap[ this.id ]; - } - }); - - Mediator.installTo( WUFile.prototype ); - - /** - * 文件状态值,具体包括以下几种类型: - * * `inited` 初始状态 - * * `queued` 已经进入队列, 等待上传 - * * `progress` 上传中 - * * `complete` 上传完成。 - * * `error` 上传出错,可重试 - * * `interrupt` 上传中断,可续传。 - * * `invalid` 文件不合格,不能重试上传。会自动从队列中移除。 - * * `cancelled` 文件被移除。 - * @property {Object} Status - * @namespace File - * @class File - * @static - */ - WUFile.Status = { - INITED: 'inited', // 初始状态 - QUEUED: 'queued', // 已经进入队列, 等待上传 - PROGRESS: 'progress', // 上传中 - ERROR: 'error', // 上传出错,可重试 - COMPLETE: 'complete', // 上传完成。 - CANCELLED: 'cancelled', // 上传取消。 - INTERRUPT: 'interrupt', // 上传中断,可续传。 - INVALID: 'invalid' // 文件不合格,不能重试上传。 - }; - - return WUFile; - }); - - /** - * @fileOverview 文件队列 - */ - define('queue',[ - 'base', - 'mediator', - 'file' - ], function( Base, Mediator, WUFile ) { - - var $ = Base.$, - STATUS = WUFile.Status; - - /** - * 文件队列, 用来存储各个状态中的文件。 - * @class Queue - * @extends Mediator - */ - function Queue() { - - /** - * 统计文件数。 - * * `numOfQueue` 队列中的文件数。 - * * `numOfSuccess` 上传成功的文件数 - * * `numOfCancel` 被取消的文件数 - * * `numOfProgress` 正在上传中的文件数 - * * `numOfUploadFailed` 上传错误的文件数。 - * * `numOfInvalid` 无效的文件数。 - * * `numofDeleted` 被移除的文件数。 - * @property {Object} stats - */ - this.stats = { - numOfQueue: 0, - numOfSuccess: 0, - numOfCancel: 0, - numOfProgress: 0, - numOfUploadFailed: 0, - numOfInvalid: 0, - numofDeleted: 0, - numofInterrupt: 0 - }; - - // 上传队列,仅包括等待上传的文件 - this._queue = []; - - // 存储所有文件 - this._map = {}; - } - - $.extend( Queue.prototype, { - - /** - * 将新文件加入对队列尾部 - * - * @method append - * @param {File} file 文件对象 - */ - append: function( file ) { - this._queue.push( file ); - this._fileAdded( file ); - return this; - }, - - /** - * 将新文件加入对队列头部 - * - * @method prepend - * @param {File} file 文件对象 - */ - prepend: function( file ) { - this._queue.unshift( file ); - this._fileAdded( file ); - return this; - }, - - /** - * 获取文件对象 - * - * @method getFile - * @param {String} fileId 文件ID - * @return {File} - */ - getFile: function( fileId ) { - if ( typeof fileId !== 'string' ) { - return fileId; - } - return this._map[ fileId ]; - }, - - /** - * 从队列中取出一个指定状态的文件。 - * @grammar fetch( status ) => File - * @method fetch - * @param {String} status [文件状态值](#WebUploader:File:File.Status) - * @return {File} [File](#WebUploader:File) - */ - fetch: function( status ) { - var len = this._queue.length, - i, file; - - status = status || STATUS.QUEUED; - - for ( i = 0; i < len; i++ ) { - file = this._queue[ i ]; - - if ( status === file.getStatus() ) { - return file; - } - } - - return null; - }, - - /** - * 对队列进行排序,能够控制文件上传顺序。 - * @grammar sort( fn ) => undefined - * @method sort - * @param {Function} fn 排序方法 - */ - sort: function( fn ) { - if ( typeof fn === 'function' ) { - this._queue.sort( fn ); - } - }, - - /** - * 获取指定类型的文件列表, 列表中每一个成员为[File](#WebUploader:File)对象。 - * @grammar getFiles( [status1[, status2 ...]] ) => Array - * @method getFiles - * @param {String} [status] [文件状态值](#WebUploader:File:File.Status) - */ - getFiles: function() { - var sts = [].slice.call( arguments, 0 ), - ret = [], - i = 0, - len = this._queue.length, - file; - - for ( ; i < len; i++ ) { - file = this._queue[ i ]; - - if ( sts.length && !~$.inArray( file.getStatus(), sts ) ) { - continue; - } - - ret.push( file ); - } - - return ret; - }, - - /** - * 在队列中删除文件。 - * @grammar removeFile( file ) => Array - * @method removeFile - * @param {File} 文件对象。 - */ - removeFile: function( file ) { - var me = this, - existing = this._map[ file.id ]; - - if ( existing ) { - delete this._map[ file.id ]; - file.destroy(); - this.stats.numofDeleted++; - } - }, - - _fileAdded: function( file ) { - var me = this, - existing = this._map[ file.id ]; - - if ( !existing ) { - this._map[ file.id ] = file; - - file.on( 'statuschange', function( cur, pre ) { - me._onFileStatusChange( cur, pre ); - }); - } - }, - - _onFileStatusChange: function( curStatus, preStatus ) { - var stats = this.stats; - - switch ( preStatus ) { - case STATUS.PROGRESS: - stats.numOfProgress--; - break; - - case STATUS.QUEUED: - stats.numOfQueue --; - break; - - case STATUS.ERROR: - stats.numOfUploadFailed--; - break; - - case STATUS.INVALID: - stats.numOfInvalid--; - break; - - case STATUS.INTERRUPT: - stats.numofInterrupt--; - break; - } - - switch ( curStatus ) { - case STATUS.QUEUED: - stats.numOfQueue++; - break; - - case STATUS.PROGRESS: - stats.numOfProgress++; - break; - - case STATUS.ERROR: - stats.numOfUploadFailed++; - break; - - case STATUS.COMPLETE: - stats.numOfSuccess++; - break; - - case STATUS.CANCELLED: - stats.numOfCancel++; - break; - - - case STATUS.INVALID: - stats.numOfInvalid++; - break; - - case STATUS.INTERRUPT: - stats.numofInterrupt++; - break; - } - } - - }); - - Mediator.installTo( Queue.prototype ); - - return Queue; - }); - /** - * @fileOverview 队列 - */ - define('widgets/queue',[ - 'base', - 'uploader', - 'queue', - 'file', - 'lib/file', - 'runtime/client', - 'widgets/widget' - ], function( Base, Uploader, Queue, WUFile, File, RuntimeClient ) { - - var $ = Base.$, - rExt = /\.\w+$/, - Status = WUFile.Status; - - return Uploader.register({ - name: 'queue', - - init: function( opts ) { - var me = this, - deferred, len, i, item, arr, accept, runtime; - - if ( $.isPlainObject( opts.accept ) ) { - opts.accept = [ opts.accept ]; - } - - // accept中的中生成匹配正则。 - if ( opts.accept ) { - arr = []; - - for ( i = 0, len = opts.accept.length; i < len; i++ ) { - item = opts.accept[ i ].extensions; - item && arr.push( item ); - } - - if ( arr.length ) { - accept = '\\.' + arr.join(',') - .replace( /,/g, '$|\\.' ) - .replace( /\*/g, '.*' ) + '$'; - } - - me.accept = new RegExp( accept, 'i' ); - } - - me.queue = new Queue(); - me.stats = me.queue.stats; - - // 如果当前不是html5运行时,那就算了。 - // 不执行后续操作 - if ( this.request('predict-runtime-type') !== 'html5' ) { - return; - } - - // 创建一个 html5 运行时的 placeholder - // 以至于外部添加原生 File 对象的时候能正确包裹一下供 webuploader 使用。 - deferred = Base.Deferred(); - this.placeholder = runtime = new RuntimeClient('Placeholder'); - runtime.connectRuntime({ - runtimeOrder: 'html5' - }, function() { - me._ruid = runtime.getRuid(); - deferred.resolve(); - }); - return deferred.promise(); - }, - - - // 为了支持外部直接添加一个原生File对象。 - _wrapFile: function( file ) { - if ( !(file instanceof WUFile) ) { - - if ( !(file instanceof File) ) { - if ( !this._ruid ) { - throw new Error('Can\'t add external files.'); - } - file = new File( this._ruid, file ); - } - - file = new WUFile( file ); - } - - return file; - }, - - // 判断文件是否可以被加入队列 - acceptFile: function( file ) { - var invalid = !file || !file.size || this.accept && - - // 如果名字中有后缀,才做后缀白名单处理。 - rExt.exec( file.name ) && !this.accept.test( file.name ); - - return !invalid; - }, - - - /** - * @event beforeFileQueued - * @param {File} file File对象 - * @description 当文件被加入队列之前触发,此事件的handler返回值为`false`,则此文件不会被添加进入队列。 - * @for Uploader - */ - - /** - * @event fileQueued - * @param {File} file File对象 - * @description 当文件被加入队列以后触发。 - * @for Uploader - */ - - _addFile: function( file ) { - var me = this; - - file = me._wrapFile( file ); - - // 不过类型判断允许不允许,先派送 `beforeFileQueued` - if ( !me.owner.trigger( 'beforeFileQueued', file ) ) { - return; - } - - // 类型不匹配,则派送错误事件,并返回。 - if ( !me.acceptFile( file ) ) { - me.owner.trigger( 'error', 'Q_TYPE_DENIED', file ); - return; - } - - me.queue.append( file ); - me.owner.trigger( 'fileQueued', file ); - return file; - }, - - getFile: function( fileId ) { - return this.queue.getFile( fileId ); - }, - - /** - * @event filesQueued - * @param {File} files 数组,内容为原始File(lib/File)对象。 - * @description 当一批文件添加进队列以后触发。 - * @for Uploader - */ - - /** - * @property {Boolean} [auto=false] - * @namespace options - * @for Uploader - * @description 设置为 true 后,不需要手动调用上传,有文件选择即开始上传。 - * - */ - - /** - * @method addFiles - * @grammar addFiles( file ) => undefined - * @grammar addFiles( [file1, file2 ...] ) => undefined - * @param {Array of File or File} [files] Files 对象 数组 - * @description 添加文件到队列 - * @for Uploader - */ - addFile: function( files ) { - var me = this; - - if ( !files.length ) { - files = [ files ]; - } - - files = $.map( files, function( file ) { - return me._addFile( file ); - }); - - me.owner.trigger( 'filesQueued', files ); - - if ( me.options.auto ) { - setTimeout(function() { - me.request('start-upload'); - }, 20 ); - } - }, - - getStats: function() { - return this.stats; - }, - - /** - * @event fileDequeued - * @param {File} file File对象 - * @description 当文件被移除队列后触发。 - * @for Uploader - */ - - /** - * @method removeFile - * @grammar removeFile( file ) => undefined - * @grammar removeFile( id ) => undefined - * @grammar removeFile( file, true ) => undefined - * @grammar removeFile( id, true ) => undefined - * @param {File|id} file File对象或这File对象的id - * @description 移除某一文件, 默认只会标记文件状态为已取消,如果第二个参数为 `true` 则会从 queue 中移除。 - * @for Uploader - * @example - * - * $li.on('click', '.remove-this', function() { - * uploader.removeFile( file ); - * }) - */ - removeFile: function( file, remove ) { - var me = this; - - file = file.id ? file : me.queue.getFile( file ); - - this.request( 'cancel-file', file ); - - if ( remove ) { - this.queue.removeFile( file ); - } - }, - - /** - * @method getFiles - * @grammar getFiles() => Array - * @grammar getFiles( status1, status2, status... ) => Array - * @description 返回指定状态的文件集合,不传参数将返回所有状态的文件。 - * @for Uploader - * @example - * console.log( uploader.getFiles() ); // => all files - * console.log( uploader.getFiles('error') ) // => all error files. - */ - getFiles: function() { - return this.queue.getFiles.apply( this.queue, arguments ); - }, - - fetchFile: function() { - return this.queue.fetch.apply( this.queue, arguments ); - }, - - /** - * @method retry - * @grammar retry() => undefined - * @grammar retry( file ) => undefined - * @description 重试上传,重试指定文件,或者从出错的文件开始重新上传。 - * @for Uploader - * @example - * function retry() { - * uploader.retry(); - * } - */ - retry: function( file, noForceStart ) { - var me = this, - files, i, len; - - if ( file ) { - file = file.id ? file : me.queue.getFile( file ); - file.setStatus( Status.QUEUED ); - noForceStart || me.request('start-upload'); - return; - } - - files = me.queue.getFiles( Status.ERROR ); - i = 0; - len = files.length; - - for ( ; i < len; i++ ) { - file = files[ i ]; - file.setStatus( Status.QUEUED ); - } - - me.request('start-upload'); - }, - - /** - * @method sort - * @grammar sort( fn ) => undefined - * @description 排序队列中的文件,在上传之前调整可以控制上传顺序。 - * @for Uploader - */ - sortFiles: function() { - return this.queue.sort.apply( this.queue, arguments ); - }, - - /** - * @event reset - * @description 当 uploader 被重置的时候触发。 - * @for Uploader - */ - - /** - * @method reset - * @grammar reset() => undefined - * @description 重置uploader。目前只重置了队列。 - * @for Uploader - * @example - * uploader.reset(); - */ - reset: function() { - this.owner.trigger('reset'); - this.queue = new Queue(); - this.stats = this.queue.stats; - }, - - destroy: function() { - this.reset(); - this.placeholder && this.placeholder.destroy(); - } - }); - - }); - /** - * @fileOverview 添加获取Runtime相关信息的方法。 - */ - define('widgets/runtime',[ - 'uploader', - 'runtime/runtime', - 'widgets/widget' - ], function( Uploader, Runtime ) { - - Uploader.support = function() { - return Runtime.hasRuntime.apply( Runtime, arguments ); - }; - - /** - * @property {Object} [runtimeOrder=html5,flash] - * @namespace options - * @for Uploader - * @description 指定运行时启动顺序。默认会想尝试 html5 是否支持,如果支持则使用 html5, 否则则使用 flash. - * - * 可以将此值设置成 `flash`,来强制使用 flash 运行时。 - */ - - return Uploader.register({ - name: 'runtime', - - init: function() { - if ( !this.predictRuntimeType() ) { - throw Error('Runtime Error'); - } - }, - - /** - * 预测Uploader将采用哪个`Runtime` - * @grammar predictRuntimeType() => String - * @method predictRuntimeType - * @for Uploader - */ - predictRuntimeType: function() { - var orders = this.options.runtimeOrder || Runtime.orders, - type = this.type, - i, len; - - if ( !type ) { - orders = orders.split( /\s*,\s*/g ); - - for ( i = 0, len = orders.length; i < len; i++ ) { - if ( Runtime.hasRuntime( orders[ i ] ) ) { - this.type = type = orders[ i ]; - break; - } - } - } - - return type; - } - }); - }); - /** - * @fileOverview Transport - */ - define('lib/transport',[ - 'base', - 'runtime/client', - 'mediator' - ], function( Base, RuntimeClient, Mediator ) { - - var $ = Base.$; - - function Transport( opts ) { - var me = this; - - opts = me.options = $.extend( true, {}, Transport.options, opts || {} ); - RuntimeClient.call( this, 'Transport' ); - - this._blob = null; - this._formData = opts.formData || {}; - this._headers = opts.headers || {}; - - this.on( 'progress', this._timeout ); - this.on( 'load error', function() { - me.trigger( 'progress', 1 ); - clearTimeout( me._timer ); - }); - } - - Transport.options = { - server: '', - method: 'POST', - - // 跨域时,是否允许携带cookie, 只有html5 runtime才有效 - withCredentials: false, - fileVal: 'file', - timeout: 2 * 60 * 1000, // 2分钟 - formData: {}, - headers: {}, - sendAsBinary: false - }; - - $.extend( Transport.prototype, { - - // 添加Blob, 只能添加一次,最后一次有效。 - appendBlob: function( key, blob, filename ) { - var me = this, - opts = me.options; - - if ( me.getRuid() ) { - me.disconnectRuntime(); - } - - // 连接到blob归属的同一个runtime. - me.connectRuntime( blob.ruid, function() { - me.exec('init'); - }); - - me._blob = blob; - opts.fileVal = key || opts.fileVal; - opts.filename = filename || opts.filename; - }, - - // 添加其他字段 - append: function( key, value ) { - if ( typeof key === 'object' ) { - $.extend( this._formData, key ); - } else { - this._formData[ key ] = value; - } - }, - - setRequestHeader: function( key, value ) { - if ( typeof key === 'object' ) { - $.extend( this._headers, key ); - } else { - this._headers[ key ] = value; - } - }, - - send: function( method ) { - this.exec( 'send', method ); - this._timeout(); - }, - - abort: function() { - clearTimeout( this._timer ); - return this.exec('abort'); - }, - - destroy: function() { - this.trigger('destroy'); - this.off(); - this.exec('destroy'); - this.disconnectRuntime(); - }, - - getResponse: function() { - return this.exec('getResponse'); - }, - - getResponseAsJson: function() { - return this.exec('getResponseAsJson'); - }, - - getStatus: function() { - return this.exec('getStatus'); - }, - - _timeout: function() { - var me = this, - duration = me.options.timeout; - - if ( !duration ) { - return; - } - - clearTimeout( me._timer ); - me._timer = setTimeout(function() { - me.abort(); - me.trigger( 'error', 'timeout' ); - }, duration ); - } - - }); - - // 让Transport具备事件功能。 - Mediator.installTo( Transport.prototype ); - - return Transport; - }); - /** - * @fileOverview 负责文件上传相关。 - */ - define('widgets/upload',[ - 'base', - 'uploader', - 'file', - 'lib/transport', - 'widgets/widget' - ], function( Base, Uploader, WUFile, Transport ) { - - var $ = Base.$, - isPromise = Base.isPromise, - Status = WUFile.Status; - - // 添加默认配置项 - $.extend( Uploader.options, { - - - /** - * @property {Boolean} [prepareNextFile=false] - * @namespace options - * @for Uploader - * @description 是否允许在文件传输时提前把下一个文件准备好。 - * 对于一个文件的准备工作比较耗时,比如图片压缩,md5序列化。 - * 如果能提前在当前文件传输期处理,可以节省总体耗时。 - */ - prepareNextFile: false, - - /** - * @property {Boolean} [chunked=false] - * @namespace options - * @for Uploader - * @description 是否要分片处理大文件上传。 - */ - chunked: false, - - /** - * @property {Boolean} [chunkSize=5242880] - * @namespace options - * @for Uploader - * @description 如果要分片,分多大一片? 默认大小为5M. - */ - chunkSize: 5 * 1024 * 1024, - - /** - * @property {Boolean} [chunkRetry=2] - * @namespace options - * @for Uploader - * @description 如果某个分片由于网络问题出错,允许自动重传多少次? - */ - chunkRetry: 2, - - /** - * @property {Boolean} [threads=3] - * @namespace options - * @for Uploader - * @description 上传并发数。允许同时最大上传进程数。 - */ - threads: 3, - - - /** - * @property {Object} [formData={}] - * @namespace options - * @for Uploader - * @description 文件上传请求的参数表,每次发送都会发送此对象中的参数。 - */ - formData: {} - - /** - * @property {Object} [fileVal='file'] - * @namespace options - * @for Uploader - * @description 设置文件上传域的name。 - */ - - /** - * @property {Object} [method='POST'] - * @namespace options - * @for Uploader - * @description 文件上传方式,`POST`或者`GET`。 - */ - - /** - * @property {Object} [sendAsBinary=false] - * @namespace options - * @for Uploader - * @description 是否已二进制的流的方式发送文件,这样整个上传内容`php://input`都为文件内容, - * 其他参数在$_GET数组中。 - */ - }); - - // 负责将文件切片。 - function CuteFile( file, chunkSize ) { - var pending = [], - blob = file.source, - total = blob.size, - chunks = chunkSize ? Math.ceil( total / chunkSize ) : 1, - start = 0, - index = 0, - len, api; - - api = { - file: file, - - has: function() { - return !!pending.length; - }, - - shift: function() { - return pending.shift(); - }, - - unshift: function( block ) { - pending.unshift( block ); - } - }; - - while ( index < chunks ) { - len = Math.min( chunkSize, total - start ); - - pending.push({ - file: file, - start: start, - end: chunkSize ? (start + len) : total, - total: total, - chunks: chunks, - chunk: index++, - cuted: api - }); - start += len; - } - - file.blocks = pending.concat(); - file.remaning = pending.length; - - return api; - } - - Uploader.register({ - name: 'upload', - - init: function() { - var owner = this.owner, - me = this; - - this.runing = false; - this.progress = false; - - owner - .on( 'startUpload', function() { - me.progress = true; - }) - .on( 'uploadFinished', function() { - me.progress = false; - }); - - // 记录当前正在传的数据,跟threads相关 - this.pool = []; - - // 缓存分好片的文件。 - this.stack = []; - - // 缓存即将上传的文件。 - this.pending = []; - - // 跟踪还有多少分片在上传中但是没有完成上传。 - this.remaning = 0; - this.__tick = Base.bindFn( this._tick, this ); - - owner.on( 'uploadComplete', function( file ) { - - // 把其他块取消了。 - file.blocks && $.each( file.blocks, function( _, v ) { - v.transport && (v.transport.abort(), v.transport.destroy()); - delete v.transport; - }); - - delete file.blocks; - delete file.remaning; - }); - }, - - reset: function() { - this.request( 'stop-upload', true ); - this.runing = false; - this.pool = []; - this.stack = []; - this.pending = []; - this.remaning = 0; - this._trigged = false; - this._promise = null; - }, - - /** - * @event startUpload - * @description 当开始上传流程时触发。 - * @for Uploader - */ - - /** - * 开始上传。此方法可以从初始状态调用开始上传流程,也可以从暂停状态调用,继续上传流程。 - * - * 可以指定开始某一个文件。 - * @grammar upload() => undefined - * @grammar upload( file | fileId) => undefined - * @method upload - * @for Uploader - */ - startUpload: function(file) { - var me = this; - - // 移出invalid的文件 - $.each( me.request( 'get-files', Status.INVALID ), function() { - me.request( 'remove-file', this ); - }); - - // 如果指定了开始某个文件,则只开始指定文件。 - if ( file ) { - file = file.id ? file : me.request( 'get-file', file ); - - if (file.getStatus() === Status.INTERRUPT) { - $.each( me.pool, function( _, v ) { - - // 之前暂停过。 - if (v.file !== file) { - return; - } - - v.transport && v.transport.send(); - }); - - file.setStatus( Status.QUEUED ); - } else if (file.getStatus() === Status.PROGRESS) { - return; - } else { - file.setStatus( Status.QUEUED ); - } - } else { - $.each( me.request( 'get-files', [ Status.INITED ] ), function() { - this.setStatus( Status.QUEUED ); - }); - } - - if ( me.runing ) { - return; - } - - me.runing = true; - - var files = []; - - // 如果有暂停的,则续传 - $.each( me.pool, function( _, v ) { - var file = v.file; - - if ( file.getStatus() === Status.INTERRUPT ) { - files.push(file); - me._trigged = false; - v.transport && v.transport.send(); - } - }); - - var file; - while ( (file = files.shift()) ) { - file.setStatus( Status.PROGRESS ); - } - - file || $.each( me.request( 'get-files', - Status.INTERRUPT ), function() { - this.setStatus( Status.PROGRESS ); - }); - - me._trigged = false; - Base.nextTick( me.__tick ); - me.owner.trigger('startUpload'); - }, - - /** - * @event stopUpload - * @description 当开始上传流程暂停时触发。 - * @for Uploader - */ - - /** - * 暂停上传。第一个参数为是否中断上传当前正在上传的文件。 - * - * 如果第一个参数是文件,则只暂停指定文件。 - * @grammar stop() => undefined - * @grammar stop( true ) => undefined - * @grammar stop( file ) => undefined - * @method stop - * @for Uploader - */ - stopUpload: function( file, interrupt ) { - var me = this; - - if (file === true) { - interrupt = file; - file = null; - } - - if ( me.runing === false ) { - return; - } - - // 如果只是暂停某个文件。 - if ( file ) { - file = file.id ? file : me.request( 'get-file', file ); - - if ( file.getStatus() !== Status.PROGRESS && - file.getStatus() !== Status.QUEUED ) { - return; - } - - file.setStatus( Status.INTERRUPT ); - $.each( me.pool, function( _, v ) { - - // 只 abort 指定的文件。 - if (v.file !== file) { - return; - } - - v.transport && v.transport.abort(); - me._putback(v); - me._popBlock(v); - }); - - return Base.nextTick( me.__tick ); - } - - me.runing = false; - - if (this._promise && this._promise.file) { - this._promise.file.setStatus( Status.INTERRUPT ); - } - - interrupt && $.each( me.pool, function( _, v ) { - v.transport && v.transport.abort(); - v.file.setStatus( Status.INTERRUPT ); - }); - - me.owner.trigger('stopUpload'); - }, - - /** - * @method cancelFile - * @grammar cancelFile( file ) => undefined - * @grammar cancelFile( id ) => undefined - * @param {File|id} file File对象或这File对象的id - * @description 标记文件状态为已取消, 同时将中断文件传输。 - * @for Uploader - * @example - * - * $li.on('click', '.remove-this', function() { - * uploader.cancelFile( file ); - * }) - */ - cancelFile: function( file ) { - file = file.id ? file : this.request( 'get-file', file ); - - // 如果正在上传。 - file.blocks && $.each( file.blocks, function( _, v ) { - var _tr = v.transport; - - if ( _tr ) { - _tr.abort(); - _tr.destroy(); - delete v.transport; - } - }); - - file.setStatus( Status.CANCELLED ); - this.owner.trigger( 'fileDequeued', file ); - }, - - /** - * 判断`Uplaode`r是否正在上传中。 - * @grammar isInProgress() => Boolean - * @method isInProgress - * @for Uploader - */ - isInProgress: function() { - return !!this.progress; - }, - - _getStats: function() { - return this.request('get-stats'); - }, - - /** - * 掉过一个文件上传,直接标记指定文件为已上传状态。 - * @grammar skipFile( file ) => undefined - * @method skipFile - * @for Uploader - */ - skipFile: function( file, status ) { - file = file.id ? file : this.request( 'get-file', file ); - - file.setStatus( status || Status.COMPLETE ); - file.skipped = true; - - // 如果正在上传。 - file.blocks && $.each( file.blocks, function( _, v ) { - var _tr = v.transport; - - if ( _tr ) { - _tr.abort(); - _tr.destroy(); - delete v.transport; - } - }); - - this.owner.trigger( 'uploadSkip', file ); - }, - - /** - * @event uploadFinished - * @description 当所有文件上传结束时触发。 - * @for Uploader - */ - _tick: function() { - var me = this, - opts = me.options, - fn, val; - - // 上一个promise还没有结束,则等待完成后再执行。 - if ( me._promise ) { - return me._promise.always( me.__tick ); - } - - // 还有位置,且还有文件要处理的话。 - if ( me.pool.length < opts.threads && (val = me._nextBlock()) ) { - me._trigged = false; - - fn = function( val ) { - me._promise = null; - - // 有可能是reject过来的,所以要检测val的类型。 - val && val.file && me._startSend( val ); - Base.nextTick( me.__tick ); - }; - - me._promise = isPromise( val ) ? val.always( fn ) : fn( val ); - - // 没有要上传的了,且没有正在传输的了。 - } else if ( !me.remaning && !me._getStats().numOfQueue && - !me._getStats().numofInterrupt ) { - me.runing = false; - - me._trigged || Base.nextTick(function() { - me.owner.trigger('uploadFinished'); - }); - me._trigged = true; - } - }, - - _putback: function(block) { - var idx; - - block.cuted.unshift(block); - idx = this.stack.indexOf(block.cuted); - - if (!~idx) { - this.stack.unshift(block.cuted); - } - }, - - _getStack: function() { - var i = 0, - act; - - while ( (act = this.stack[ i++ ]) ) { - if ( act.has() && act.file.getStatus() === Status.PROGRESS ) { - return act; - } else if (!act.has() || - act.file.getStatus() !== Status.PROGRESS && - act.file.getStatus() !== Status.INTERRUPT ) { - - // 把已经处理完了的,或者,状态为非 progress(上传中)、 - // interupt(暂停中) 的移除。 - this.stack.splice( --i, 1 ); - } - } - - return null; - }, - - _nextBlock: function() { - var me = this, - opts = me.options, - act, next, done, preparing; - - // 如果当前文件还有没有需要传输的,则直接返回剩下的。 - if ( (act = this._getStack()) ) { - - // 是否提前准备下一个文件 - if ( opts.prepareNextFile && !me.pending.length ) { - me._prepareNextFile(); - } - - return act.shift(); - - // 否则,如果正在运行,则准备下一个文件,并等待完成后返回下个分片。 - } else if ( me.runing ) { - - // 如果缓存中有,则直接在缓存中取,没有则去queue中取。 - if ( !me.pending.length && me._getStats().numOfQueue ) { - me._prepareNextFile(); - } - - next = me.pending.shift(); - done = function( file ) { - if ( !file ) { - return null; - } - - act = CuteFile( file, opts.chunked ? opts.chunkSize : 0 ); - me.stack.push(act); - return act.shift(); - }; - - // 文件可能还在prepare中,也有可能已经完全准备好了。 - if ( isPromise( next) ) { - preparing = next.file; - next = next[ next.pipe ? 'pipe' : 'then' ]( done ); - next.file = preparing; - return next; - } - - return done( next ); - } - }, - - - /** - * @event uploadStart - * @param {File} file File对象 - * @description 某个文件开始上传前触发,一个文件只会触发一次。 - * @for Uploader - */ - _prepareNextFile: function() { - var me = this, - file = me.request('fetch-file'), - pending = me.pending, - promise; - - if ( file ) { - promise = me.request( 'before-send-file', file, function() { - - // 有可能文件被skip掉了。文件被skip掉后,状态坑定不是Queued. - if ( file.getStatus() === Status.PROGRESS || - file.getStatus() === Status.INTERRUPT ) { - return file; - } - - return me._finishFile( file ); - }); - - me.owner.trigger( 'uploadStart', file ); - file.setStatus( Status.PROGRESS ); - - promise.file = file; - - // 如果还在pending中,则替换成文件本身。 - promise.done(function() { - var idx = $.inArray( promise, pending ); - - ~idx && pending.splice( idx, 1, file ); - }); - - // befeore-send-file的钩子就有错误发生。 - promise.fail(function( reason ) { - file.setStatus( Status.ERROR, reason ); - me.owner.trigger( 'uploadError', file, reason ); - me.owner.trigger( 'uploadComplete', file ); - }); - - pending.push( promise ); - } - }, - - // 让出位置了,可以让其他分片开始上传 - _popBlock: function( block ) { - var idx = $.inArray( block, this.pool ); - - this.pool.splice( idx, 1 ); - block.file.remaning--; - this.remaning--; - }, - - // 开始上传,可以被掉过。如果promise被reject了,则表示跳过此分片。 - _startSend: function( block ) { - var me = this, - file = block.file, - promise; - - // 有可能在 before-send-file 的 promise 期间改变了文件状态。 - // 如:暂停,取消 - // 我们不能中断 promise, 但是可以在 promise 完后,不做上传操作。 - if ( file.getStatus() !== Status.PROGRESS ) { - - // 如果是中断,则还需要放回去。 - if (file.getStatus() === Status.INTERRUPT) { - me._putback(block); - } - - return; - } - - me.pool.push( block ); - me.remaning++; - - // 如果没有分片,则直接使用原始的。 - // 不会丢失content-type信息。 - block.blob = block.chunks === 1 ? file.source : - file.source.slice( block.start, block.end ); - - // hook, 每个分片发送之前可能要做些异步的事情。 - promise = me.request( 'before-send', block, function() { - - // 有可能文件已经上传出错了,所以不需要再传输了。 - if ( file.getStatus() === Status.PROGRESS ) { - me._doSend( block ); - } else { - me._popBlock( block ); - Base.nextTick( me.__tick ); - } - }); - - // 如果为fail了,则跳过此分片。 - promise.fail(function() { - if ( file.remaning === 1 ) { - me._finishFile( file ).always(function() { - block.percentage = 1; - me._popBlock( block ); - me.owner.trigger( 'uploadComplete', file ); - Base.nextTick( me.__tick ); - }); - } else { - block.percentage = 1; - me.updateFileProgress( file ); - me._popBlock( block ); - Base.nextTick( me.__tick ); - } - }); - }, - - - /** - * @event uploadBeforeSend - * @param {Object} object - * @param {Object} data 默认的上传参数,可以扩展此对象来控制上传参数。 - * @param {Object} headers 可以扩展此对象来控制上传头部。 - * @description 当某个文件的分块在发送前触发,主要用来询问是否要添加附带参数,大文件在开起分片上传的前提下此事件可能会触发多次。 - * @for Uploader - */ - - /** - * @event uploadAccept - * @param {Object} object - * @param {Object} ret 服务端的返回数据,json格式,如果服务端不是json格式,从ret._raw中取数据,自行解析。 - * @description 当某个文件上传到服务端响应后,会派送此事件来询问服务端响应是否有效。如果此事件handler返回值为`false`, 则此文件将派送`server`类型的`uploadError`事件。 - * @for Uploader - */ - - /** - * @event uploadProgress - * @param {File} file File对象 - * @param {Number} percentage 上传进度 - * @description 上传过程中触发,携带上传进度。 - * @for Uploader - */ - - - /** - * @event uploadError - * @param {File} file File对象 - * @param {String} reason 出错的code - * @description 当文件上传出错时触发。 - * @for Uploader - */ - - /** - * @event uploadSuccess - * @param {File} file File对象 - * @param {Object} response 服务端返回的数据 - * @description 当文件上传成功时触发。 - * @for Uploader - */ - - /** - * @event uploadComplete - * @param {File} [file] File对象 - * @description 不管成功或者失败,文件上传完成时触发。 - * @for Uploader - */ - - // 做上传操作。 - _doSend: function( block ) { - var me = this, - owner = me.owner, - opts = me.options, - file = block.file, - tr = new Transport( opts ), - data = $.extend({}, opts.formData ), - headers = $.extend({}, opts.headers ), - requestAccept, ret; - - block.transport = tr; - - tr.on( 'destroy', function() { - delete block.transport; - me._popBlock( block ); - Base.nextTick( me.__tick ); - }); - - // 广播上传进度。以文件为单位。 - tr.on( 'progress', function( percentage ) { - block.percentage = percentage; - me.updateFileProgress( file ); - }); - - // 用来询问,是否返回的结果是有错误的。 - requestAccept = function( reject ) { - var fn; - - ret = tr.getResponseAsJson() || {}; - ret._raw = tr.getResponse(); - fn = function( value ) { - reject = value; - }; - - // 服务端响应了,不代表成功了,询问是否响应正确。 - if ( !owner.trigger( 'uploadAccept', block, ret, fn ) ) { - reject = reject || 'server'; - } - - return reject; - }; - - // 尝试重试,然后广播文件上传出错。 - tr.on( 'error', function( type, flag ) { - block.retried = block.retried || 0; - - // 自动重试 - if ( block.chunks > 1 && ~'http,abort'.indexOf( type ) && - block.retried < opts.chunkRetry ) { - - block.retried++; - tr.send(); - - } else { - - // http status 500 ~ 600 - if ( !flag && type === 'server' ) { - type = requestAccept( type ); - } - - file.setStatus( Status.ERROR, type ); - owner.trigger( 'uploadError', file, type ); - owner.trigger( 'uploadComplete', file ); - } - }); - - // 上传成功 - tr.on( 'load', function() { - var reason; - - // 如果非预期,转向上传出错。 - if ( (reason = requestAccept()) ) { - tr.trigger( 'error', reason, true ); - return; - } - - // 全部上传完成。 - if ( file.remaning === 1 ) { - me._finishFile( file, ret ); - } else { - tr.destroy(); - } - }); - - // 配置默认的上传字段。 - data = $.extend( data, { - id: file.id, - name: file.name, - type: file.type, - lastModifiedDate: file.lastModifiedDate, - size: file.size - }); - - block.chunks > 1 && $.extend( data, { - chunks: block.chunks, - chunk: block.chunk - }); - - // 在发送之间可以添加字段什么的。。。 - // 如果默认的字段不够使用,可以通过监听此事件来扩展 - owner.trigger( 'uploadBeforeSend', block, data, headers ); - - // 开始发送。 - tr.appendBlob( opts.fileVal, block.blob, file.name ); - tr.append( data ); - tr.setRequestHeader( headers ); - tr.send(); - }, - - // 完成上传。 - _finishFile: function( file, ret, hds ) { - var owner = this.owner; - - return owner - .request( 'after-send-file', arguments, function() { - file.setStatus( Status.COMPLETE ); - owner.trigger( 'uploadSuccess', file, ret, hds ); - }) - .fail(function( reason ) { - - // 如果外部已经标记为invalid什么的,不再改状态。 - if ( file.getStatus() === Status.PROGRESS ) { - file.setStatus( Status.ERROR, reason ); - } - - owner.trigger( 'uploadError', file, reason ); - }) - .always(function() { - owner.trigger( 'uploadComplete', file ); - }); - }, - - updateFileProgress: function(file) { - var totalPercent = 0, - uploaded = 0; - - if (!file.blocks) { - return; - } - - $.each( file.blocks, function( _, v ) { - uploaded += (v.percentage || 0) * (v.end - v.start); - }); - - totalPercent = uploaded / file.size; - this.owner.trigger( 'uploadProgress', file, totalPercent || 0 ); - } - - }); - }); - /** - * @fileOverview 各种验证,包括文件总大小是否超出、单文件是否超出和文件是否重复。 - */ - - define('widgets/validator',[ - 'base', - 'uploader', - 'file', - 'widgets/widget' - ], function( Base, Uploader, WUFile ) { - - var $ = Base.$, - validators = {}, - api; - - /** - * @event error - * @param {String} type 错误类型。 - * @description 当validate不通过时,会以派送错误事件的形式通知调用者。通过`upload.on('error', handler)`可以捕获到此类错误,目前有以下错误会在特定的情况下派送错来。 - * - * * `Q_EXCEED_NUM_LIMIT` 在设置了`fileNumLimit`且尝试给`uploader`添加的文件数量超出这个值时派送。 - * * `Q_EXCEED_SIZE_LIMIT` 在设置了`Q_EXCEED_SIZE_LIMIT`且尝试给`uploader`添加的文件总大小超出这个值时派送。 - * * `Q_TYPE_DENIED` 当文件类型不满足时触发。。 - * @for Uploader - */ - - // 暴露给外面的api - api = { - - // 添加验证器 - addValidator: function( type, cb ) { - validators[ type ] = cb; - }, - - // 移除验证器 - removeValidator: function( type ) { - delete validators[ type ]; - } - }; - - // 在Uploader初始化的时候启动Validators的初始化 - Uploader.register({ - name: 'validator', - - init: function() { - var me = this; - Base.nextTick(function() { - $.each( validators, function() { - this.call( me.owner ); - }); - }); - } - }); - - /** - * @property {int} [fileNumLimit=undefined] - * @namespace options - * @for Uploader - * @description 验证文件总数量, 超出则不允许加入队列。 - */ - api.addValidator( 'fileNumLimit', function() { - var uploader = this, - opts = uploader.options, - count = 0, - max = parseInt( opts.fileNumLimit, 10 ), - flag = true; - - if ( !max ) { - return; - } - - uploader.on( 'beforeFileQueued', function( file ) { - - if ( count >= max && flag ) { - flag = false; - this.trigger( 'error', 'Q_EXCEED_NUM_LIMIT', max, file ); - setTimeout(function() { - flag = true; - }, 1 ); - } - - return count >= max ? false : true; - }); - - uploader.on( 'fileQueued', function() { - count++; - }); - - uploader.on( 'fileDequeued', function() { - count--; - }); - - uploader.on( 'reset', function() { - count = 0; - }); - }); - - - /** - * @property {int} [fileSizeLimit=undefined] - * @namespace options - * @for Uploader - * @description 验证文件总大小是否超出限制, 超出则不允许加入队列。 - */ - api.addValidator( 'fileSizeLimit', function() { - var uploader = this, - opts = uploader.options, - count = 0, - max = parseInt( opts.fileSizeLimit, 10 ), - flag = true; - - if ( !max ) { - return; - } - - uploader.on( 'beforeFileQueued', function( file ) { - var invalid = count + file.size > max; - - if ( invalid && flag ) { - flag = false; - this.trigger( 'error', 'Q_EXCEED_SIZE_LIMIT', max, file ); - setTimeout(function() { - flag = true; - }, 1 ); - } - - return invalid ? false : true; - }); - - uploader.on( 'fileQueued', function( file ) { - count += file.size; - }); - - uploader.on( 'fileDequeued', function( file ) { - count -= file.size; - }); - - uploader.on( 'reset', function() { - count = 0; - }); - }); - - /** - * @property {int} [fileSingleSizeLimit=undefined] - * @namespace options - * @for Uploader - * @description 验证单个文件大小是否超出限制, 超出则不允许加入队列。 - */ - api.addValidator( 'fileSingleSizeLimit', function() { - var uploader = this, - opts = uploader.options, - max = opts.fileSingleSizeLimit; - - if ( !max ) { - return; - } - - uploader.on( 'beforeFileQueued', function( file ) { - - if ( file.size > max ) { - file.setStatus( WUFile.Status.INVALID, 'exceed_size' ); - this.trigger( 'error', 'F_EXCEED_SIZE', max, file ); - return false; - } - - }); - - }); - - /** - * @property {Boolean} [duplicate=undefined] - * @namespace options - * @for Uploader - * @description 去重, 根据文件名字、文件大小和最后修改时间来生成hash Key. - */ - api.addValidator( 'duplicate', function() { - var uploader = this, - opts = uploader.options, - mapping = {}; - - if ( opts.duplicate ) { - return; - } - - function hashString( str ) { - var hash = 0, - i = 0, - len = str.length, - _char; - - for ( ; i < len; i++ ) { - _char = str.charCodeAt( i ); - hash = _char + (hash << 6) + (hash << 16) - hash; - } - - return hash; - } - - uploader.on( 'beforeFileQueued', function( file ) { - var hash = file.__hash || (file.__hash = hashString( file.name + - file.size + file.lastModifiedDate )); - - // 已经重复了 - if ( mapping[ hash ] ) { - this.trigger( 'error', 'F_DUPLICATE', file ); - return false; - } - }); - - uploader.on( 'fileQueued', function( file ) { - var hash = file.__hash; - - hash && (mapping[ hash ] = true); - }); - - uploader.on( 'fileDequeued', function( file ) { - var hash = file.__hash; - - hash && (delete mapping[ hash ]); - }); - - uploader.on( 'reset', function() { - mapping = {}; - }); - }); - - return api; - }); - - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/compbase',[],function() { - - function CompBase( owner, runtime ) { - - this.owner = owner; - this.options = owner.options; - - this.getRuntime = function() { - return runtime; - }; - - this.getRuid = function() { - return runtime.uid; - }; - - this.trigger = function() { - return owner.trigger.apply( owner, arguments ); - }; - } - - return CompBase; - }); - /** - * @fileOverview Html5Runtime - */ - define('runtime/html5/runtime',[ - 'base', - 'runtime/runtime', - 'runtime/compbase' - ], function( Base, Runtime, CompBase ) { - - var type = 'html5', - components = {}; - - function Html5Runtime() { - var pool = {}, - me = this, - destroy = this.destroy; - - Runtime.apply( me, arguments ); - me.type = type; - - - // 这个方法的调用者,实际上是RuntimeClient - me.exec = function( comp, fn/*, args...*/) { - var client = this, - uid = client.uid, - args = Base.slice( arguments, 2 ), - instance; - - if ( components[ comp ] ) { - instance = pool[ uid ] = pool[ uid ] || - new components[ comp ]( client, me ); - - if ( instance[ fn ] ) { - return instance[ fn ].apply( instance, args ); - } - } - }; - - me.destroy = function() { - // @todo 删除池子中的所有实例 - return destroy && destroy.apply( this, arguments ); - }; - } - - Base.inherits( Runtime, { - constructor: Html5Runtime, - - // 不需要连接其他程序,直接执行callback - init: function() { - var me = this; - setTimeout(function() { - me.trigger('ready'); - }, 1 ); - } - - }); - - // 注册Components - Html5Runtime.register = function( name, component ) { - var klass = components[ name ] = Base.inherits( CompBase, component ); - return klass; - }; - - // 注册html5运行时。 - // 只有在支持的前提下注册。 - if ( window.Blob && window.FileReader && window.DataView ) { - Runtime.addRuntime( type, Html5Runtime ); - } - - return Html5Runtime; - }); - /** - * @fileOverview Blob Html实现 - */ - define('runtime/html5/blob',[ - 'runtime/html5/runtime', - 'lib/blob' - ], function( Html5Runtime, Blob ) { - - return Html5Runtime.register( 'Blob', { - slice: function( start, end ) { - var blob = this.owner.source, - slice = blob.slice || blob.webkitSlice || blob.mozSlice; - - blob = slice.call( blob, start, end ); - - return new Blob( this.getRuid(), blob ); - } - }); - }); - /** - * @fileOverview FilePaste - */ - define('runtime/html5/dnd',[ - 'base', - 'runtime/html5/runtime', - 'lib/file' - ], function( Base, Html5Runtime, File ) { - - var $ = Base.$, - prefix = 'webuploader-dnd-'; - - return Html5Runtime.register( 'DragAndDrop', { - init: function() { - var elem = this.elem = this.options.container; - - this.dragEnterHandler = Base.bindFn( this._dragEnterHandler, this ); - this.dragOverHandler = Base.bindFn( this._dragOverHandler, this ); - this.dragLeaveHandler = Base.bindFn( this._dragLeaveHandler, this ); - this.dropHandler = Base.bindFn( this._dropHandler, this ); - this.dndOver = false; - - elem.on( 'dragenter', this.dragEnterHandler ); - elem.on( 'dragover', this.dragOverHandler ); - elem.on( 'dragleave', this.dragLeaveHandler ); - elem.on( 'drop', this.dropHandler ); - - if ( this.options.disableGlobalDnd ) { - $( document ).on( 'dragover', this.dragOverHandler ); - $( document ).on( 'drop', this.dropHandler ); - } - }, - - _dragEnterHandler: function( e ) { - var me = this, - denied = me._denied || false, - items; - - e = e.originalEvent || e; - - if ( !me.dndOver ) { - me.dndOver = true; - - // 注意只有 chrome 支持。 - items = e.dataTransfer.items; - - if ( items && items.length ) { - me._denied = denied = !me.trigger( 'accept', items ); - } - - me.elem.addClass( prefix + 'over' ); - me.elem[ denied ? 'addClass' : - 'removeClass' ]( prefix + 'denied' ); - } - - e.dataTransfer.dropEffect = denied ? 'none' : 'copy'; - - return false; - }, - - _dragOverHandler: function( e ) { - // 只处理框内的。 - var parentElem = this.elem.parent().get( 0 ); - if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) { - return false; - } - - clearTimeout( this._leaveTimer ); - this._dragEnterHandler.call( this, e ); - - return false; - }, - - _dragLeaveHandler: function() { - var me = this, - handler; - - handler = function() { - me.dndOver = false; - me.elem.removeClass( prefix + 'over ' + prefix + 'denied' ); - }; - - clearTimeout( me._leaveTimer ); - me._leaveTimer = setTimeout( handler, 100 ); - return false; - }, - - _dropHandler: function( e ) { - var me = this, - ruid = me.getRuid(), - parentElem = me.elem.parent().get( 0 ), - dataTransfer, data; - - // 只处理框内的。 - if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) { - return false; - } - - e = e.originalEvent || e; - dataTransfer = e.dataTransfer; - - // 如果是页面内拖拽,还不能处理,不阻止事件。 - // 此处 ie11 下会报参数错误, - try { - data = dataTransfer.getData('text/html'); - } catch( err ) { - } - - if ( data ) { - return; - } - - me._getTansferFiles( dataTransfer, function( results ) { - me.trigger( 'drop', $.map( results, function( file ) { - return new File( ruid, file ); - }) ); - }); - - me.dndOver = false; - me.elem.removeClass( prefix + 'over' ); - return false; - }, - - // 如果传入 callback 则去查看文件夹,否则只管当前文件夹。 - _getTansferFiles: function( dataTransfer, callback ) { - var results = [], - promises = [], - items, files, file, item, i, len, canAccessFolder; - - items = dataTransfer.items; - files = dataTransfer.files; - - canAccessFolder = !!(items && items[ 0 ].webkitGetAsEntry); - - for ( i = 0, len = files.length; i < len; i++ ) { - file = files[ i ]; - item = items && items[ i ]; - - if ( canAccessFolder && item.webkitGetAsEntry().isDirectory ) { - - promises.push( this._traverseDirectoryTree( - item.webkitGetAsEntry(), results ) ); - } else { - results.push( file ); - } - } - - Base.when.apply( Base, promises ).done(function() { - - if ( !results.length ) { - return; - } - - callback( results ); - }); - }, - - _traverseDirectoryTree: function( entry, results ) { - var deferred = Base.Deferred(), - me = this; - - if ( entry.isFile ) { - entry.file(function( file ) { - results.push( file ); - deferred.resolve(); - }); - } else if ( entry.isDirectory ) { - entry.createReader().readEntries(function( entries ) { - var len = entries.length, - promises = [], - arr = [], // 为了保证顺序。 - i; - - for ( i = 0; i < len; i++ ) { - promises.push( me._traverseDirectoryTree( - entries[ i ], arr ) ); - } - - Base.when.apply( Base, promises ).then(function() { - results.push.apply( results, arr ); - deferred.resolve(); - }, deferred.reject ); - }); - } - - return deferred.promise(); - }, - - destroy: function() { - var elem = this.elem; - - // 还没 init 就调用 destroy - if (!elem) { - return; - } - - elem.off( 'dragenter', this.dragEnterHandler ); - elem.off( 'dragover', this.dragOverHandler ); - elem.off( 'dragleave', this.dragLeaveHandler ); - elem.off( 'drop', this.dropHandler ); - - if ( this.options.disableGlobalDnd ) { - $( document ).off( 'dragover', this.dragOverHandler ); - $( document ).off( 'drop', this.dropHandler ); - } - } - }); - }); - - /** - * @fileOverview FilePaste - */ - define('runtime/html5/filepaste',[ - 'base', - 'runtime/html5/runtime', - 'lib/file' - ], function( Base, Html5Runtime, File ) { - - return Html5Runtime.register( 'FilePaste', { - init: function() { - var opts = this.options, - elem = this.elem = opts.container, - accept = '.*', - arr, i, len, item; - - // accetp的mimeTypes中生成匹配正则。 - if ( opts.accept ) { - arr = []; - - for ( i = 0, len = opts.accept.length; i < len; i++ ) { - item = opts.accept[ i ].mimeTypes; - item && arr.push( item ); - } - - if ( arr.length ) { - accept = arr.join(','); - accept = accept.replace( /,/g, '|' ).replace( /\*/g, '.*' ); - } - } - this.accept = accept = new RegExp( accept, 'i' ); - this.hander = Base.bindFn( this._pasteHander, this ); - elem.on( 'paste', this.hander ); - }, - - _pasteHander: function( e ) { - var allowed = [], - ruid = this.getRuid(), - items, item, blob, i, len; - - e = e.originalEvent || e; - items = e.clipboardData.items; - - for ( i = 0, len = items.length; i < len; i++ ) { - item = items[ i ]; - - if ( item.kind !== 'file' || !(blob = item.getAsFile()) ) { - continue; - } - - allowed.push( new File( ruid, blob ) ); - } - - if ( allowed.length ) { - // 不阻止非文件粘贴(文字粘贴)的事件冒泡 - e.preventDefault(); - e.stopPropagation(); - this.trigger( 'paste', allowed ); - } - }, - - destroy: function() { - this.elem.off( 'paste', this.hander ); - } - }); - }); - - /** - * @fileOverview FilePicker - */ - define('runtime/html5/filepicker',[ - 'base', - 'runtime/html5/runtime' - ], function( Base, Html5Runtime ) { - - var $ = Base.$; - - return Html5Runtime.register( 'FilePicker', { - init: function() { - var container = this.getRuntime().getContainer(), - me = this, - owner = me.owner, - opts = me.options, - label = this.label = $( document.createElement('label') ), - input = this.input = $( document.createElement('input') ), - arr, i, len, mouseHandler; - - input.attr( 'type', 'file' ); - input.attr( 'name', opts.name ); - input.addClass('webuploader-element-invisible'); - - label.on( 'click', function() { - input.trigger('click'); - }); - - label.css({ - opacity: 0, - width: '100%', - height: '100%', - display: 'block', - cursor: 'pointer', - background: '#ffffff' - }); - - if ( opts.multiple ) { - input.attr( 'multiple', 'multiple' ); - } - - // @todo Firefox不支持单独指定后缀 - if ( opts.accept && opts.accept.length > 0 ) { - arr = []; - - for ( i = 0, len = opts.accept.length; i < len; i++ ) { - arr.push( opts.accept[ i ].mimeTypes ); - } - - input.attr( 'accept', arr.join(',') ); - } - - container.append( input ); - container.append( label ); - - mouseHandler = function( e ) { - owner.trigger( e.type ); - }; - - input.on( 'change', function( e ) { - var fn = arguments.callee, - clone; - - me.files = e.target.files; - - // reset input - clone = this.cloneNode( true ); - clone.value = null; - this.parentNode.replaceChild( clone, this ); - - input.off(); - input = $( clone ).on( 'change', fn ) - .on( 'mouseenter mouseleave', mouseHandler ); - - owner.trigger('change'); - }); - - label.on( 'mouseenter mouseleave', mouseHandler ); - - }, - - - getFiles: function() { - return this.files; - }, - - destroy: function() { - this.input.off(); - this.label.off(); - } - }); - }); - /** - * Terms: - * - * Uint8Array, FileReader, BlobBuilder, atob, ArrayBuffer - * @fileOverview Image控件 - */ - define('runtime/html5/util',[ - 'base' - ], function( Base ) { - - var urlAPI = window.createObjectURL && window || - window.URL && URL.revokeObjectURL && URL || - window.webkitURL, - createObjectURL = Base.noop, - revokeObjectURL = createObjectURL; - - if ( urlAPI ) { - - // 更安全的方式调用,比如android里面就能把context改成其他的对象。 - createObjectURL = function() { - return urlAPI.createObjectURL.apply( urlAPI, arguments ); - }; - - revokeObjectURL = function() { - return urlAPI.revokeObjectURL.apply( urlAPI, arguments ); - }; - } - - return { - createObjectURL: createObjectURL, - revokeObjectURL: revokeObjectURL, - - dataURL2Blob: function( dataURI ) { - var byteStr, intArray, ab, i, mimetype, parts; - - parts = dataURI.split(','); - - if ( ~parts[ 0 ].indexOf('base64') ) { - byteStr = atob( parts[ 1 ] ); - } else { - byteStr = decodeURIComponent( parts[ 1 ] ); - } - - ab = new ArrayBuffer( byteStr.length ); - intArray = new Uint8Array( ab ); - - for ( i = 0; i < byteStr.length; i++ ) { - intArray[ i ] = byteStr.charCodeAt( i ); - } - - mimetype = parts[ 0 ].split(':')[ 1 ].split(';')[ 0 ]; - - return this.arrayBufferToBlob( ab, mimetype ); - }, - - dataURL2ArrayBuffer: function( dataURI ) { - var byteStr, intArray, i, parts; - - parts = dataURI.split(','); - - if ( ~parts[ 0 ].indexOf('base64') ) { - byteStr = atob( parts[ 1 ] ); - } else { - byteStr = decodeURIComponent( parts[ 1 ] ); - } - - intArray = new Uint8Array( byteStr.length ); - - for ( i = 0; i < byteStr.length; i++ ) { - intArray[ i ] = byteStr.charCodeAt( i ); - } - - return intArray.buffer; - }, - - arrayBufferToBlob: function( buffer, type ) { - var builder = window.BlobBuilder || window.WebKitBlobBuilder, - bb; - - // android不支持直接new Blob, 只能借助blobbuilder. - if ( builder ) { - bb = new builder(); - bb.append( buffer ); - return bb.getBlob( type ); - } - - return new Blob([ buffer ], type ? { type: type } : {} ); - }, - - // 抽出来主要是为了解决android下面canvas.toDataUrl不支持jpeg. - // 你得到的结果是png. - canvasToDataUrl: function( canvas, type, quality ) { - return canvas.toDataURL( type, quality / 100 ); - }, - - // imagemeat会复写这个方法,如果用户选择加载那个文件了的话。 - parseMeta: function( blob, callback ) { - callback( false, {}); - }, - - // imagemeat会复写这个方法,如果用户选择加载那个文件了的话。 - updateImageHead: function( data ) { - return data; - } - }; - }); - /** - * Terms: - * - * Uint8Array, FileReader, BlobBuilder, atob, ArrayBuffer - * @fileOverview Image控件 - */ - define('runtime/html5/imagemeta',[ - 'runtime/html5/util' - ], function( Util ) { - - var api; - - api = { - parsers: { - 0xffe1: [] - }, - - maxMetaDataSize: 262144, - - parse: function( blob, cb ) { - var me = this, - fr = new FileReader(); - - fr.onload = function() { - cb( false, me._parse( this.result ) ); - fr = fr.onload = fr.onerror = null; - }; - - fr.onerror = function( e ) { - cb( e.message ); - fr = fr.onload = fr.onerror = null; - }; - - blob = blob.slice( 0, me.maxMetaDataSize ); - fr.readAsArrayBuffer( blob.getSource() ); - }, - - _parse: function( buffer, noParse ) { - if ( buffer.byteLength < 6 ) { - return; - } - - var dataview = new DataView( buffer ), - offset = 2, - maxOffset = dataview.byteLength - 4, - headLength = offset, - ret = {}, - markerBytes, markerLength, parsers, i; - - if ( dataview.getUint16( 0 ) === 0xffd8 ) { - - while ( offset < maxOffset ) { - markerBytes = dataview.getUint16( offset ); - - if ( markerBytes >= 0xffe0 && markerBytes <= 0xffef || - markerBytes === 0xfffe ) { - - markerLength = dataview.getUint16( offset + 2 ) + 2; - - if ( offset + markerLength > dataview.byteLength ) { - break; - } - - parsers = api.parsers[ markerBytes ]; - - if ( !noParse && parsers ) { - for ( i = 0; i < parsers.length; i += 1 ) { - parsers[ i ].call( api, dataview, offset, - markerLength, ret ); - } - } - - offset += markerLength; - headLength = offset; - } else { - break; - } - } - - if ( headLength > 6 ) { - if ( buffer.slice ) { - ret.imageHead = buffer.slice( 2, headLength ); - } else { - // Workaround for IE10, which does not yet - // support ArrayBuffer.slice: - ret.imageHead = new Uint8Array( buffer ) - .subarray( 2, headLength ); - } - } - } - - return ret; - }, - - updateImageHead: function( buffer, head ) { - var data = this._parse( buffer, true ), - buf1, buf2, bodyoffset; - - - bodyoffset = 2; - if ( data.imageHead ) { - bodyoffset = 2 + data.imageHead.byteLength; - } - - if ( buffer.slice ) { - buf2 = buffer.slice( bodyoffset ); - } else { - buf2 = new Uint8Array( buffer ).subarray( bodyoffset ); - } - - buf1 = new Uint8Array( head.byteLength + 2 + buf2.byteLength ); - - buf1[ 0 ] = 0xFF; - buf1[ 1 ] = 0xD8; - buf1.set( new Uint8Array( head ), 2 ); - buf1.set( new Uint8Array( buf2 ), head.byteLength + 2 ); - - return buf1.buffer; - } - }; - - Util.parseMeta = function() { - return api.parse.apply( api, arguments ); - }; - - Util.updateImageHead = function() { - return api.updateImageHead.apply( api, arguments ); - }; - - return api; - }); - /** - * 代码来自于:https://github.com/blueimp/JavaScript-Load-Image - * 暂时项目中只用了orientation. - * - * 去除了 Exif Sub IFD Pointer, GPS Info IFD Pointer, Exif Thumbnail. - * @fileOverview EXIF解析 - */ - - // Sample - // ==================================== - // Make : Apple - // Model : iPhone 4S - // Orientation : 1 - // XResolution : 72 [72/1] - // YResolution : 72 [72/1] - // ResolutionUnit : 2 - // Software : QuickTime 7.7.1 - // DateTime : 2013:09:01 22:53:55 - // ExifIFDPointer : 190 - // ExposureTime : 0.058823529411764705 [1/17] - // FNumber : 2.4 [12/5] - // ExposureProgram : Normal program - // ISOSpeedRatings : 800 - // ExifVersion : 0220 - // DateTimeOriginal : 2013:09:01 22:52:51 - // DateTimeDigitized : 2013:09:01 22:52:51 - // ComponentsConfiguration : YCbCr - // ShutterSpeedValue : 4.058893515764426 - // ApertureValue : 2.5260688216892597 [4845/1918] - // BrightnessValue : -0.3126686601998395 - // MeteringMode : Pattern - // Flash : Flash did not fire, compulsory flash mode - // FocalLength : 4.28 [107/25] - // SubjectArea : [4 values] - // FlashpixVersion : 0100 - // ColorSpace : 1 - // PixelXDimension : 2448 - // PixelYDimension : 3264 - // SensingMethod : One-chip color area sensor - // ExposureMode : 0 - // WhiteBalance : Auto white balance - // FocalLengthIn35mmFilm : 35 - // SceneCaptureType : Standard - define('runtime/html5/imagemeta/exif',[ - 'base', - 'runtime/html5/imagemeta' - ], function( Base, ImageMeta ) { - - var EXIF = {}; - - EXIF.ExifMap = function() { - return this; - }; - - EXIF.ExifMap.prototype.map = { - 'Orientation': 0x0112 - }; - - EXIF.ExifMap.prototype.get = function( id ) { - return this[ id ] || this[ this.map[ id ] ]; - }; - - EXIF.exifTagTypes = { - // byte, 8-bit unsigned int: - 1: { - getValue: function( dataView, dataOffset ) { - return dataView.getUint8( dataOffset ); - }, - size: 1 - }, - - // ascii, 8-bit byte: - 2: { - getValue: function( dataView, dataOffset ) { - return String.fromCharCode( dataView.getUint8( dataOffset ) ); - }, - size: 1, - ascii: true - }, - - // short, 16 bit int: - 3: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getUint16( dataOffset, littleEndian ); - }, - size: 2 - }, - - // long, 32 bit int: - 4: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getUint32( dataOffset, littleEndian ); - }, - size: 4 - }, - - // rational = two long values, - // first is numerator, second is denominator: - 5: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getUint32( dataOffset, littleEndian ) / - dataView.getUint32( dataOffset + 4, littleEndian ); - }, - size: 8 - }, - - // slong, 32 bit signed int: - 9: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getInt32( dataOffset, littleEndian ); - }, - size: 4 - }, - - // srational, two slongs, first is numerator, second is denominator: - 10: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getInt32( dataOffset, littleEndian ) / - dataView.getInt32( dataOffset + 4, littleEndian ); - }, - size: 8 - } - }; - - // undefined, 8-bit byte, value depending on field: - EXIF.exifTagTypes[ 7 ] = EXIF.exifTagTypes[ 1 ]; - - EXIF.getExifValue = function( dataView, tiffOffset, offset, type, length, - littleEndian ) { - - var tagType = EXIF.exifTagTypes[ type ], - tagSize, dataOffset, values, i, str, c; - - if ( !tagType ) { - Base.log('Invalid Exif data: Invalid tag type.'); - return; - } - - tagSize = tagType.size * length; - - // Determine if the value is contained in the dataOffset bytes, - // or if the value at the dataOffset is a pointer to the actual data: - dataOffset = tagSize > 4 ? tiffOffset + dataView.getUint32( offset + 8, - littleEndian ) : (offset + 8); - - if ( dataOffset + tagSize > dataView.byteLength ) { - Base.log('Invalid Exif data: Invalid data offset.'); - return; - } - - if ( length === 1 ) { - return tagType.getValue( dataView, dataOffset, littleEndian ); - } - - values = []; - - for ( i = 0; i < length; i += 1 ) { - values[ i ] = tagType.getValue( dataView, - dataOffset + i * tagType.size, littleEndian ); - } - - if ( tagType.ascii ) { - str = ''; - - // Concatenate the chars: - for ( i = 0; i < values.length; i += 1 ) { - c = values[ i ]; - - // Ignore the terminating NULL byte(s): - if ( c === '\u0000' ) { - break; - } - str += c; - } - - return str; - } - return values; - }; - - EXIF.parseExifTag = function( dataView, tiffOffset, offset, littleEndian, - data ) { - - var tag = dataView.getUint16( offset, littleEndian ); - data.exif[ tag ] = EXIF.getExifValue( dataView, tiffOffset, offset, - dataView.getUint16( offset + 2, littleEndian ), // tag type - dataView.getUint32( offset + 4, littleEndian ), // tag length - littleEndian ); - }; - - EXIF.parseExifTags = function( dataView, tiffOffset, dirOffset, - littleEndian, data ) { - - var tagsNumber, dirEndOffset, i; - - if ( dirOffset + 6 > dataView.byteLength ) { - Base.log('Invalid Exif data: Invalid directory offset.'); - return; - } - - tagsNumber = dataView.getUint16( dirOffset, littleEndian ); - dirEndOffset = dirOffset + 2 + 12 * tagsNumber; - - if ( dirEndOffset + 4 > dataView.byteLength ) { - Base.log('Invalid Exif data: Invalid directory size.'); - return; - } - - for ( i = 0; i < tagsNumber; i += 1 ) { - this.parseExifTag( dataView, tiffOffset, - dirOffset + 2 + 12 * i, // tag offset - littleEndian, data ); - } - - // Return the offset to the next directory: - return dataView.getUint32( dirEndOffset, littleEndian ); - }; - - // EXIF.getExifThumbnail = function(dataView, offset, length) { - // var hexData, - // i, - // b; - // if (!length || offset + length > dataView.byteLength) { - // Base.log('Invalid Exif data: Invalid thumbnail data.'); - // return; - // } - // hexData = []; - // for (i = 0; i < length; i += 1) { - // b = dataView.getUint8(offset + i); - // hexData.push((b < 16 ? '0' : '') + b.toString(16)); - // } - // return 'data:image/jpeg,%' + hexData.join('%'); - // }; - - EXIF.parseExifData = function( dataView, offset, length, data ) { - - var tiffOffset = offset + 10, - littleEndian, dirOffset; - - // Check for the ASCII code for "Exif" (0x45786966): - if ( dataView.getUint32( offset + 4 ) !== 0x45786966 ) { - // No Exif data, might be XMP data instead - return; - } - if ( tiffOffset + 8 > dataView.byteLength ) { - Base.log('Invalid Exif data: Invalid segment size.'); - return; - } - - // Check for the two null bytes: - if ( dataView.getUint16( offset + 8 ) !== 0x0000 ) { - Base.log('Invalid Exif data: Missing byte alignment offset.'); - return; - } - - // Check the byte alignment: - switch ( dataView.getUint16( tiffOffset ) ) { - case 0x4949: - littleEndian = true; - break; - - case 0x4D4D: - littleEndian = false; - break; - - default: - Base.log('Invalid Exif data: Invalid byte alignment marker.'); - return; - } - - // Check for the TIFF tag marker (0x002A): - if ( dataView.getUint16( tiffOffset + 2, littleEndian ) !== 0x002A ) { - Base.log('Invalid Exif data: Missing TIFF marker.'); - return; - } - - // Retrieve the directory offset bytes, usually 0x00000008 or 8 decimal: - dirOffset = dataView.getUint32( tiffOffset + 4, littleEndian ); - // Create the exif object to store the tags: - data.exif = new EXIF.ExifMap(); - // Parse the tags of the main image directory and retrieve the - // offset to the next directory, usually the thumbnail directory: - dirOffset = EXIF.parseExifTags( dataView, tiffOffset, - tiffOffset + dirOffset, littleEndian, data ); - - // 尝试读取缩略图 - // if ( dirOffset ) { - // thumbnailData = {exif: {}}; - // dirOffset = EXIF.parseExifTags( - // dataView, - // tiffOffset, - // tiffOffset + dirOffset, - // littleEndian, - // thumbnailData - // ); - - // // Check for JPEG Thumbnail offset: - // if (thumbnailData.exif[0x0201]) { - // data.exif.Thumbnail = EXIF.getExifThumbnail( - // dataView, - // tiffOffset + thumbnailData.exif[0x0201], - // thumbnailData.exif[0x0202] // Thumbnail data length - // ); - // } - // } - }; - - ImageMeta.parsers[ 0xffe1 ].push( EXIF.parseExifData ); - return EXIF; - }); - /** - * @fileOverview Image - */ - define('runtime/html5/image',[ - 'base', - 'runtime/html5/runtime', - 'runtime/html5/util' - ], function( Base, Html5Runtime, Util ) { - - var BLANK = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D'; - - return Html5Runtime.register( 'Image', { - - // flag: 标记是否被修改过。 - modified: false, - - init: function() { - var me = this, - img = new Image(); - - img.onload = function() { - - me._info = { - type: me.type, - width: this.width, - height: this.height - }; - - // 读取meta信息。 - if ( !me._metas && 'image/jpeg' === me.type ) { - Util.parseMeta( me._blob, function( error, ret ) { - me._metas = ret; - me.owner.trigger('load'); - }); - } else { - me.owner.trigger('load'); - } - }; - - img.onerror = function() { - me.owner.trigger('error'); - }; - - me._img = img; - }, - - loadFromBlob: function( blob ) { - var me = this, - img = me._img; - - me._blob = blob; - me.type = blob.type; - img.src = Util.createObjectURL( blob.getSource() ); - me.owner.once( 'load', function() { - Util.revokeObjectURL( img.src ); - }); - }, - - resize: function( width, height ) { - var canvas = this._canvas || - (this._canvas = document.createElement('canvas')); - - this._resize( this._img, canvas, width, height ); - this._blob = null; // 没用了,可以删掉了。 - this.modified = true; - this.owner.trigger( 'complete', 'resize' ); - }, - - crop: function( x, y, w, h, s ) { - var cvs = this._canvas || - (this._canvas = document.createElement('canvas')), - opts = this.options, - img = this._img, - iw = img.naturalWidth, - ih = img.naturalHeight, - orientation = this.getOrientation(); - - s = s || 1; - - // todo 解决 orientation 的问题。 - // values that require 90 degree rotation - // if ( ~[ 5, 6, 7, 8 ].indexOf( orientation ) ) { - - // switch ( orientation ) { - // case 6: - // tmp = x; - // x = y; - // y = iw * s - tmp - w; - // console.log(ih * s, tmp, w) - // break; - // } - - // (w ^= h, h ^= w, w ^= h); - // } - - cvs.width = w; - cvs.height = h; - - opts.preserveHeaders || this._rotate2Orientaion( cvs, orientation ); - this._renderImageToCanvas( cvs, img, -x, -y, iw * s, ih * s ); - - this._blob = null; // 没用了,可以删掉了。 - this.modified = true; - this.owner.trigger( 'complete', 'crop' ); - }, - - getAsBlob: function( type ) { - var blob = this._blob, - opts = this.options, - canvas; - - type = type || this.type; - - // blob需要重新生成。 - if ( this.modified || this.type !== type ) { - canvas = this._canvas; - - if ( type === 'image/jpeg' ) { - - blob = Util.canvasToDataUrl( canvas, type, opts.quality ); - - if ( opts.preserveHeaders && this._metas && - this._metas.imageHead ) { - - blob = Util.dataURL2ArrayBuffer( blob ); - blob = Util.updateImageHead( blob, - this._metas.imageHead ); - blob = Util.arrayBufferToBlob( blob, type ); - return blob; - } - } else { - blob = Util.canvasToDataUrl( canvas, type ); - } - - blob = Util.dataURL2Blob( blob ); - } - - return blob; - }, - - getAsDataUrl: function( type ) { - var opts = this.options; - - type = type || this.type; - - if ( type === 'image/jpeg' ) { - return Util.canvasToDataUrl( this._canvas, type, opts.quality ); - } else { - return this._canvas.toDataURL( type ); - } - }, - - getOrientation: function() { - return this._metas && this._metas.exif && - this._metas.exif.get('Orientation') || 1; - }, - - info: function( val ) { - - // setter - if ( val ) { - this._info = val; - return this; - } - - // getter - return this._info; - }, - - meta: function( val ) { - - // setter - if ( val ) { - this._meta = val; - return this; - } - - // getter - return this._meta; - }, - - destroy: function() { - var canvas = this._canvas; - this._img.onload = null; - - if ( canvas ) { - canvas.getContext('2d') - .clearRect( 0, 0, canvas.width, canvas.height ); - canvas.width = canvas.height = 0; - this._canvas = null; - } - - // 释放内存。非常重要,否则释放不了image的内存。 - this._img.src = BLANK; - this._img = this._blob = null; - }, - - _resize: function( img, cvs, width, height ) { - var opts = this.options, - naturalWidth = img.width, - naturalHeight = img.height, - orientation = this.getOrientation(), - scale, w, h, x, y; - - // values that require 90 degree rotation - if ( ~[ 5, 6, 7, 8 ].indexOf( orientation ) ) { - - // 交换width, height的值。 - width ^= height; - height ^= width; - width ^= height; - } - - scale = Math[ opts.crop ? 'max' : 'min' ]( width / naturalWidth, - height / naturalHeight ); - - // 不允许放大。 - opts.allowMagnify || (scale = Math.min( 1, scale )); - - w = naturalWidth * scale; - h = naturalHeight * scale; - - if ( opts.crop ) { - cvs.width = width; - cvs.height = height; - } else { - cvs.width = w; - cvs.height = h; - } - - x = (cvs.width - w) / 2; - y = (cvs.height - h) / 2; - - opts.preserveHeaders || this._rotate2Orientaion( cvs, orientation ); - - this._renderImageToCanvas( cvs, img, x, y, w, h ); - }, - - _rotate2Orientaion: function( canvas, orientation ) { - var width = canvas.width, - height = canvas.height, - ctx = canvas.getContext('2d'); - - switch ( orientation ) { - case 5: - case 6: - case 7: - case 8: - canvas.width = height; - canvas.height = width; - break; - } - - switch ( orientation ) { - case 2: // horizontal flip - ctx.translate( width, 0 ); - ctx.scale( -1, 1 ); - break; - - case 3: // 180 rotate left - ctx.translate( width, height ); - ctx.rotate( Math.PI ); - break; - - case 4: // vertical flip - ctx.translate( 0, height ); - ctx.scale( 1, -1 ); - break; - - case 5: // vertical flip + 90 rotate right - ctx.rotate( 0.5 * Math.PI ); - ctx.scale( 1, -1 ); - break; - - case 6: // 90 rotate right - ctx.rotate( 0.5 * Math.PI ); - ctx.translate( 0, -height ); - break; - - case 7: // horizontal flip + 90 rotate right - ctx.rotate( 0.5 * Math.PI ); - ctx.translate( width, -height ); - ctx.scale( -1, 1 ); - break; - - case 8: // 90 rotate left - ctx.rotate( -0.5 * Math.PI ); - ctx.translate( -width, 0 ); - break; - } - }, - - // https://github.com/stomita/ios-imagefile-megapixel/ - // blob/master/src/megapix-image.js - _renderImageToCanvas: (function() { - - // 如果不是ios, 不需要这么复杂! - if ( !Base.os.ios ) { - return function( canvas ) { - var args = Base.slice( arguments, 1 ), - ctx = canvas.getContext('2d'); - - ctx.drawImage.apply( ctx, args ); - }; - } - - /** - * Detecting vertical squash in loaded image. - * Fixes a bug which squash image vertically while drawing into - * canvas for some images. - */ - function detectVerticalSquash( img, iw, ih ) { - var canvas = document.createElement('canvas'), - ctx = canvas.getContext('2d'), - sy = 0, - ey = ih, - py = ih, - data, alpha, ratio; - - - canvas.width = 1; - canvas.height = ih; - ctx.drawImage( img, 0, 0 ); - data = ctx.getImageData( 0, 0, 1, ih ).data; - - // search image edge pixel position in case - // it is squashed vertically. - while ( py > sy ) { - alpha = data[ (py - 1) * 4 + 3 ]; - - if ( alpha === 0 ) { - ey = py; - } else { - sy = py; - } - - py = (ey + sy) >> 1; - } - - ratio = (py / ih); - return (ratio === 0) ? 1 : ratio; - } - - // fix ie7 bug - // http://stackoverflow.com/questions/11929099/ - // html5-canvas-drawimage-ratio-bug-ios - if ( Base.os.ios >= 7 ) { - return function( canvas, img, x, y, w, h ) { - var iw = img.naturalWidth, - ih = img.naturalHeight, - vertSquashRatio = detectVerticalSquash( img, iw, ih ); - - return canvas.getContext('2d').drawImage( img, 0, 0, - iw * vertSquashRatio, ih * vertSquashRatio, - x, y, w, h ); - }; - } - - /** - * Detect subsampling in loaded image. - * In iOS, larger images than 2M pixels may be - * subsampled in rendering. - */ - function detectSubsampling( img ) { - var iw = img.naturalWidth, - ih = img.naturalHeight, - canvas, ctx; - - // subsampling may happen overmegapixel image - if ( iw * ih > 1024 * 1024 ) { - canvas = document.createElement('canvas'); - canvas.width = canvas.height = 1; - ctx = canvas.getContext('2d'); - ctx.drawImage( img, -iw + 1, 0 ); - - // subsampled image becomes half smaller in rendering size. - // check alpha channel value to confirm image is covering - // edge pixel or not. if alpha value is 0 - // image is not covering, hence subsampled. - return ctx.getImageData( 0, 0, 1, 1 ).data[ 3 ] === 0; - } else { - return false; - } - } - - - return function( canvas, img, x, y, width, height ) { - var iw = img.naturalWidth, - ih = img.naturalHeight, - ctx = canvas.getContext('2d'), - subsampled = detectSubsampling( img ), - doSquash = this.type === 'image/jpeg', - d = 1024, - sy = 0, - dy = 0, - tmpCanvas, tmpCtx, vertSquashRatio, dw, dh, sx, dx; - - if ( subsampled ) { - iw /= 2; - ih /= 2; - } - - ctx.save(); - tmpCanvas = document.createElement('canvas'); - tmpCanvas.width = tmpCanvas.height = d; - - tmpCtx = tmpCanvas.getContext('2d'); - vertSquashRatio = doSquash ? - detectVerticalSquash( img, iw, ih ) : 1; - - dw = Math.ceil( d * width / iw ); - dh = Math.ceil( d * height / ih / vertSquashRatio ); - - while ( sy < ih ) { - sx = 0; - dx = 0; - while ( sx < iw ) { - tmpCtx.clearRect( 0, 0, d, d ); - tmpCtx.drawImage( img, -sx, -sy ); - ctx.drawImage( tmpCanvas, 0, 0, d, d, - x + dx, y + dy, dw, dh ); - sx += d; - dx += dw; - } - sy += d; - dy += dh; - } - ctx.restore(); - tmpCanvas = tmpCtx = null; - }; - })() - }); - }); - /** - * @fileOverview Transport - * @todo 支持chunked传输,优势: - * 可以将大文件分成小块,挨个传输,可以提高大文件成功率,当失败的时候,也只需要重传那小部分, - * 而不需要重头再传一次。另外断点续传也需要用chunked方式。 - */ - define('runtime/html5/transport',[ - 'base', - 'runtime/html5/runtime' - ], function( Base, Html5Runtime ) { - - var noop = Base.noop, - $ = Base.$; - - return Html5Runtime.register( 'Transport', { - init: function() { - this._status = 0; - this._response = null; - }, - - send: function() { - var owner = this.owner, - opts = this.options, - xhr = this._initAjax(), - blob = owner._blob, - server = opts.server, - formData, binary, fr; - - if ( opts.sendAsBinary ) { - server += (/\?/.test( server ) ? '&' : '?') + - $.param( owner._formData ); - - binary = blob.getSource(); - } else { - formData = new FormData(); - $.each( owner._formData, function( k, v ) { - formData.append( k, v ); - }); - - formData.append( opts.fileVal, blob.getSource(), - opts.filename || owner._formData.name || '' ); - } - - if ( opts.withCredentials && 'withCredentials' in xhr ) { - xhr.open( opts.method, server, true ); - xhr.withCredentials = true; - } else { - xhr.open( opts.method, server ); - } - - this._setRequestHeader( xhr, opts.headers ); - - if ( binary ) { - // 强制设置成 content-type 为文件流。 - xhr.overrideMimeType && - xhr.overrideMimeType('application/octet-stream'); - - // android直接发送blob会导致服务端接收到的是空文件。 - // bug详情。 - // https://code.google.com/p/android/issues/detail?id=39882 - // 所以先用fileReader读取出来再通过arraybuffer的方式发送。 - if ( Base.os.android ) { - fr = new FileReader(); - - fr.onload = function() { - xhr.send( this.result ); - fr = fr.onload = null; - }; - - fr.readAsArrayBuffer( binary ); - } else { - xhr.send( binary ); - } - } else { - xhr.send( formData ); - } - }, - - getResponse: function() { - return this._response; - }, - - getResponseAsJson: function() { - return this._parseJson( this._response ); - }, - - getStatus: function() { - return this._status; - }, - - abort: function() { - var xhr = this._xhr; - - if ( xhr ) { - xhr.upload.onprogress = noop; - xhr.onreadystatechange = noop; - xhr.abort(); - - this._xhr = xhr = null; - } - }, - - destroy: function() { - this.abort(); - }, - - _initAjax: function() { - var me = this, - xhr = new XMLHttpRequest(), - opts = this.options; - - if ( opts.withCredentials && !('withCredentials' in xhr) && - typeof XDomainRequest !== 'undefined' ) { - xhr = new XDomainRequest(); - } - - xhr.upload.onprogress = function( e ) { - var percentage = 0; - - if ( e.lengthComputable ) { - percentage = e.loaded / e.total; - } - - return me.trigger( 'progress', percentage ); - }; - - xhr.onreadystatechange = function() { - - if ( xhr.readyState !== 4 ) { - return; - } - - xhr.upload.onprogress = noop; - xhr.onreadystatechange = noop; - me._xhr = null; - me._status = xhr.status; - - if ( xhr.status >= 200 && xhr.status < 300 ) { - me._response = xhr.responseText; - return me.trigger('load'); - } else if ( xhr.status >= 500 && xhr.status < 600 ) { - me._response = xhr.responseText; - return me.trigger( 'error', 'server' ); - } - - - return me.trigger( 'error', me._status ? 'http' : 'abort' ); - }; - - me._xhr = xhr; - return xhr; - }, - - _setRequestHeader: function( xhr, headers ) { - $.each( headers, function( key, val ) { - xhr.setRequestHeader( key, val ); - }); - }, - - _parseJson: function( str ) { - var json; - - try { - json = JSON.parse( str ); - } catch ( ex ) { - json = {}; - } - - return json; - } - }); - }); - /** - * @fileOverview 只有html5实现的文件版本。 - */ - define('preset/html5only',[ - 'base', - - // widgets - 'widgets/filednd', - 'widgets/filepaste', - 'widgets/filepicker', - 'widgets/image', - 'widgets/queue', - 'widgets/runtime', - 'widgets/upload', - 'widgets/validator', - - // runtimes - // html5 - 'runtime/html5/blob', - 'runtime/html5/dnd', - 'runtime/html5/filepaste', - 'runtime/html5/filepicker', - 'runtime/html5/imagemeta/exif', - 'runtime/html5/image', - 'runtime/html5/transport' - ], function( Base ) { - return Base; - }); - define('webuploader',[ - 'preset/html5only' - ], function( preset ) { - return preset; - }); - return require('webuploader'); -}); diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.html5only.min.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.html5only.min.js deleted file mode 100644 index 8710e4ea..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.html5only.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* WebUploader 0.1.5 */!function(a,b){var c,d={},e=function(a,b){var c,d,e;if("string"==typeof a)return h(a);for(c=[],d=a.length,e=0;d>e;e++)c.push(h(a[e]));return b.apply(null,c)},f=function(a,b,c){2===arguments.length&&(c=b,b=null),e(b||[],function(){g(a,c,arguments)})},g=function(a,b,c){var f,g={exports:b};"function"==typeof b&&(c.length||(c=[e,g.exports,g]),f=b.apply(null,c),void 0!==f&&(g.exports=f)),d[a]=g.exports},h=function(b){var c=d[b]||a[b];if(!c)throw new Error("`"+b+"` is undefined");return c},i=function(a){var b,c,e,f,g,h;h=function(a){return a&&a.charAt(0).toUpperCase()+a.substr(1)};for(b in d)if(c=a,d.hasOwnProperty(b)){for(e=b.split("/"),g=h(e.pop());f=h(e.shift());)c[f]=c[f]||{},c=c[f];c[g]=d[b]}return a},j=function(c){return a.__dollar=c,i(b(a,f,e))};"object"==typeof module&&"object"==typeof module.exports?module.exports=j():"function"==typeof define&&define.amd?define(["jquery"],j):(c=a.WebUploader,a.WebUploader=j(),a.WebUploader.noConflict=function(){a.WebUploader=c})}(window,function(a,b,c){return b("dollar-third",[],function(){var b=a.__dollar||a.jQuery||a.Zepto;if(!b)throw new Error("jQuery or Zepto not found!");return b}),b("dollar",["dollar-third"],function(a){return a}),b("promise-third",["dollar"],function(a){return{Deferred:a.Deferred,when:a.when,isPromise:function(a){return a&&"function"==typeof a.then}}}),b("promise",["promise-third"],function(a){return a}),b("base",["dollar","promise"],function(b,c){function d(a){return function(){return h.apply(a,arguments)}}function e(a,b){return function(){return a.apply(b,arguments)}}function f(a){var b;return Object.create?Object.create(a):(b=function(){},b.prototype=a,new b)}var g=function(){},h=Function.call;return{version:"0.1.5",$:b,Deferred:c.Deferred,isPromise:c.isPromise,when:c.when,browser:function(a){var b={},c=a.match(/WebKit\/([\d.]+)/),d=a.match(/Chrome\/([\d.]+)/)||a.match(/CriOS\/([\d.]+)/),e=a.match(/MSIE\s([\d\.]+)/)||a.match(/(?:trident)(?:.*rv:([\w.]+))?/i),f=a.match(/Firefox\/([\d.]+)/),g=a.match(/Safari\/([\d.]+)/),h=a.match(/OPR\/([\d.]+)/);return c&&(b.webkit=parseFloat(c[1])),d&&(b.chrome=parseFloat(d[1])),e&&(b.ie=parseFloat(e[1])),f&&(b.firefox=parseFloat(f[1])),g&&(b.safari=parseFloat(g[1])),h&&(b.opera=parseFloat(h[1])),b}(navigator.userAgent),os:function(a){var b={},c=a.match(/(?:Android);?[\s\/]+([\d.]+)?/),d=a.match(/(?:iPad|iPod|iPhone).*OS\s([\d_]+)/);return c&&(b.android=parseFloat(c[1])),d&&(b.ios=parseFloat(d[1].replace(/_/g,"."))),b}(navigator.userAgent),inherits:function(a,c,d){var e;return"function"==typeof c?(e=c,c=null):e=c&&c.hasOwnProperty("constructor")?c.constructor:function(){return a.apply(this,arguments)},b.extend(!0,e,a,d||{}),e.__super__=a.prototype,e.prototype=f(a.prototype),c&&b.extend(!0,e.prototype,c),e},noop:g,bindFn:e,log:function(){return a.console?e(console.log,console):g}(),nextTick:function(){return function(a){setTimeout(a,1)}}(),slice:d([].slice),guid:function(){var a=0;return function(b){for(var c=(+new Date).toString(32),d=0;5>d;d++)c+=Math.floor(65535*Math.random()).toString(32);return(b||"wu_")+c+(a++).toString(32)}}(),formatSize:function(a,b,c){var d;for(c=c||["B","K","M","G","TB"];(d=c.shift())&&a>1024;)a/=1024;return("B"===d?a:a.toFixed(b||2))+d}}}),b("mediator",["base"],function(a){function b(a,b,c,d){return f.grep(a,function(a){return!(!a||b&&a.e!==b||c&&a.cb!==c&&a.cb._cb!==c||d&&a.ctx!==d)})}function c(a,b,c){f.each((a||"").split(h),function(a,d){c(d,b)})}function d(a,b){for(var c,d=!1,e=-1,f=a.length;++e1?void(d.isPlainObject(b)&&d.isPlainObject(c[a])?d.extend(c[a],b):c[a]=b):a?c[a]:c},getStats:function(){var a=this.request("get-stats");return a?{successNum:a.numOfSuccess,progressNum:a.numOfProgress,cancelNum:a.numOfCancel,invalidNum:a.numOfInvalid,uploadFailNum:a.numOfUploadFailed,queueNum:a.numOfQueue,interruptNum:a.numofInterrupt}:{}},trigger:function(a){var c=[].slice.call(arguments,1),e=this.options,f="on"+a.substring(0,1).toUpperCase()+a.substring(1);return b.trigger.apply(this,arguments)===!1||d.isFunction(e[f])&&e[f].apply(this,c)===!1||d.isFunction(this[f])&&this[f].apply(this,c)===!1||b.trigger.apply(b,[this,a].concat(c))===!1?!1:!0},destroy:function(){this.request("destroy",arguments),this.off()},request:a.noop}),a.create=c.create=function(a){return new c(a)},a.Uploader=c,c}),b("runtime/runtime",["base","mediator"],function(a,b){function c(b){this.options=d.extend({container:document.body},b),this.uid=a.guid("rt_")}var d=a.$,e={},f=function(a){for(var b in a)if(a.hasOwnProperty(b))return b;return null};return d.extend(c.prototype,{getContainer:function(){var a,b,c=this.options;return this._container?this._container:(a=d(c.container||document.body),b=d(document.createElement("div")),b.attr("id","rt_"+this.uid),b.css({position:"absolute",top:"0px",left:"0px",width:"1px",height:"1px",overflow:"hidden"}),a.append(b),a.addClass("webuploader-container"),this._container=b,this._parent=a,b)},init:a.noop,exec:a.noop,destroy:function(){this._container&&this._container.remove(),this._parent&&this._parent.removeClass("webuploader-container"),this.off()}}),c.orders="html5,flash",c.addRuntime=function(a,b){e[a]=b},c.hasRuntime=function(a){return!!(a?e[a]:f(e))},c.create=function(a,b){var g,h;if(b=b||c.orders,d.each(b.split(/\s*,\s*/g),function(){return e[this]?(g=this,!1):void 0}),g=g||f(e),!g)throw new Error("Runtime Error");return h=new e[g](a)},b.installTo(c.prototype),c}),b("runtime/client",["base","mediator","runtime/runtime"],function(a,b,c){function d(b,d){var f,g=a.Deferred();this.uid=a.guid("client_"),this.runtimeReady=function(a){return g.done(a)},this.connectRuntime=function(b,h){if(f)throw new Error("already connected!");return g.done(h),"string"==typeof b&&e.get(b)&&(f=e.get(b)),f=f||e.get(null,d),f?(a.$.extend(f.options,b),f.__promise.then(g.resolve),f.__client++):(f=c.create(b,b.runtimeOrder),f.__promise=g.promise(),f.once("ready",g.resolve),f.init(),e.add(f),f.__client=1),d&&(f.__standalone=d),f},this.getRuntime=function(){return f},this.disconnectRuntime=function(){f&&(f.__client--,f.__client<=0&&(e.remove(f),delete f.__promise,f.destroy()),f=null)},this.exec=function(){if(f){var c=a.slice(arguments);return b&&c.unshift(b),f.exec.apply(this,c)}},this.getRuid=function(){return f&&f.uid},this.destroy=function(a){return function(){a&&a.apply(this,arguments),this.trigger("destroy"),this.off(),this.exec("destroy"),this.disconnectRuntime()}}(this.destroy)}var e;return e=function(){var a={};return{add:function(b){a[b.uid]=b},get:function(b,c){var d;if(b)return a[b];for(d in a)if(!c||!a[d].__standalone)return a[d];return null},remove:function(b){delete a[b.uid]}}}(),b.installTo(d.prototype),d}),b("lib/dnd",["base","mediator","runtime/client"],function(a,b,c){function d(a){a=this.options=e.extend({},d.options,a),a.container=e(a.container),a.container.length&&c.call(this,"DragAndDrop")}var e=a.$;return d.options={accept:null,disableGlobalDnd:!1},a.inherits(c,{constructor:d,init:function(){var a=this;a.connectRuntime(a.options,function(){a.exec("init"),a.trigger("ready")})}}),b.installTo(d.prototype),d}),b("widgets/widget",["base","uploader"],function(a,b){function c(a){if(!a)return!1;var b=a.length,c=e.type(a);return 1===a.nodeType&&b?!0:"array"===c||"function"!==c&&"string"!==c&&(0===b||"number"==typeof b&&b>0&&b-1 in a)}function d(a){this.owner=a,this.options=a.options}var e=a.$,f=b.prototype._init,g=b.prototype.destroy,h={},i=[];return e.extend(d.prototype,{init:a.noop,invoke:function(a,b){var c=this.responseMap;return c&&a in c&&c[a]in this&&e.isFunction(this[c[a]])?this[c[a]].apply(this,b):h},request:function(){return this.owner.request.apply(this.owner,arguments)}}),e.extend(b.prototype,{_init:function(){var a=this,b=a._widgets=[],c=a.options.disableWidgets||"";return e.each(i,function(d,e){(!c||!~c.indexOf(e._name))&&b.push(new e(a))}),f.apply(a,arguments)},request:function(b,d,e){var f,g,i,j,k=0,l=this._widgets,m=l&&l.length,n=[],o=[];for(d=c(d)?d:[d];m>k;k++)f=l[k],g=f.invoke(b,d),g!==h&&(a.isPromise(g)?o.push(g):n.push(g));return e||o.length?(i=a.when.apply(a,o),j=i.pipe?"pipe":"then",i[j](function(){var b=a.Deferred(),c=arguments;return 1===c.length&&(c=c[0]),setTimeout(function(){b.resolve(c)},1),b.promise()})[e?j:"done"](e||a.noop)):n[0]},destroy:function(){g.apply(this,arguments),this._widgets=null}}),b.register=d.register=function(b,c){var f,g={init:"init",destroy:"destroy",name:"anonymous"};return 1===arguments.length?(c=b,e.each(c,function(a){return"_"===a[0]||"name"===a?void("name"===a&&(g.name=c.name)):void(g[a.replace(/[A-Z]/g,"-$&").toLowerCase()]=a)})):g=e.extend(g,b),c.responseMap=g,f=a.inherits(d,c),f._name=g.name,i.push(f),f},b.unRegister=d.unRegister=function(a){if(a&&"anonymous"!==a)for(var b=i.length;b--;)i[b]._name===a&&i.splice(b,1)},d}),b("widgets/filednd",["base","uploader","lib/dnd","widgets/widget"],function(a,b,c){var d=a.$;return b.options.dnd="",b.register({name:"dnd",init:function(b){if(b.dnd&&"html5"===this.request("predict-runtime-type")){var e,f=this,g=a.Deferred(),h=d.extend({},{disableGlobalDnd:b.disableGlobalDnd,container:b.dnd,accept:b.accept});return this.dnd=e=new c(h),e.once("ready",g.resolve),e.on("drop",function(a){f.request("add-file",[a])}),e.on("accept",function(a){return f.owner.trigger("dndAccept",a)}),e.init(),g.promise()}},destroy:function(){this.dnd&&this.dnd.destroy()}})}),b("lib/filepaste",["base","mediator","runtime/client"],function(a,b,c){function d(a){a=this.options=e.extend({},a),a.container=e(a.container||document.body),c.call(this,"FilePaste")}var e=a.$;return a.inherits(c,{constructor:d,init:function(){var a=this;a.connectRuntime(a.options,function(){a.exec("init"),a.trigger("ready")})}}),b.installTo(d.prototype),d}),b("widgets/filepaste",["base","uploader","lib/filepaste","widgets/widget"],function(a,b,c){var d=a.$;return b.register({name:"paste",init:function(b){if(b.paste&&"html5"===this.request("predict-runtime-type")){var e,f=this,g=a.Deferred(),h=d.extend({},{container:b.paste,accept:b.accept});return this.paste=e=new c(h),e.once("ready",g.resolve),e.on("paste",function(a){f.owner.request("add-file",[a])}),e.init(),g.promise()}},destroy:function(){this.paste&&this.paste.destroy()}})}),b("lib/blob",["base","runtime/client"],function(a,b){function c(a,c){var d=this;d.source=c,d.ruid=a,this.size=c.size||0,this.type=!c.type&&this.ext&&~"jpg,jpeg,png,gif,bmp".indexOf(this.ext)?"image/"+("jpg"===this.ext?"jpeg":this.ext):c.type||"application/octet-stream",b.call(d,"Blob"),this.uid=c.uid||this.uid,a&&d.connectRuntime(a)}return a.inherits(b,{constructor:c,slice:function(a,b){return this.exec("slice",a,b)},getSource:function(){return this.source}}),c}),b("lib/file",["base","lib/blob"],function(a,b){function c(a,c){var f;this.name=c.name||"untitled"+d++,f=e.exec(c.name)?RegExp.$1.toLowerCase():"",!f&&c.type&&(f=/\/(jpg|jpeg|png|gif|bmp)$/i.exec(c.type)?RegExp.$1.toLowerCase():"",this.name+="."+f),this.ext=f,this.lastModifiedDate=c.lastModifiedDate||(new Date).toLocaleString(),b.apply(this,arguments)}var d=1,e=/\.([^.]+)$/;return a.inherits(b,c)}),b("lib/filepicker",["base","runtime/client","lib/file"],function(b,c,d){function e(a){if(a=this.options=f.extend({},e.options,a),a.container=f(a.id),!a.container.length)throw new Error("按钮指定错误");a.innerHTML=a.innerHTML||a.label||a.container.html()||"",a.button=f(a.button||document.createElement("div")),a.button.html(a.innerHTML),a.container.html(a.button),c.call(this,"FilePicker",!0)}var f=b.$;return e.options={button:null,container:null,label:null,innerHTML:null,multiple:!0,accept:null,name:"file"},b.inherits(c,{constructor:e,init:function(){var c=this,e=c.options,g=e.button;g.addClass("webuploader-pick"),c.on("all",function(a){var b;switch(a){case"mouseenter":g.addClass("webuploader-pick-hover");break;case"mouseleave":g.removeClass("webuploader-pick-hover");break;case"change":b=c.exec("getFiles"),c.trigger("select",f.map(b,function(a){return a=new d(c.getRuid(),a),a._refer=e.container,a}),e.container)}}),c.connectRuntime(e,function(){c.refresh(),c.exec("init",e),c.trigger("ready")}),this._resizeHandler=b.bindFn(this.refresh,this),f(a).on("resize",this._resizeHandler)},refresh:function(){var a=this.getRuntime().getContainer(),b=this.options.button,c=b.outerWidth?b.outerWidth():b.width(),d=b.outerHeight?b.outerHeight():b.height(),e=b.offset();c&&d&&a.css({bottom:"auto",right:"auto",width:c+"px",height:d+"px"}).offset(e)},enable:function(){var a=this.options.button;a.removeClass("webuploader-pick-disable"),this.refresh()},disable:function(){var a=this.options.button;this.getRuntime().getContainer().css({top:"-99999px"}),a.addClass("webuploader-pick-disable")},destroy:function(){var b=this.options.button;f(a).off("resize",this._resizeHandler),b.removeClass("webuploader-pick-disable webuploader-pick-hover webuploader-pick")}}),e}),b("widgets/filepicker",["base","uploader","lib/filepicker","widgets/widget"],function(a,b,c){var d=a.$;return d.extend(b.options,{pick:null,accept:null}),b.register({name:"picker",init:function(a){return this.pickers=[],a.pick&&this.addBtn(a.pick)},refresh:function(){d.each(this.pickers,function(){this.refresh()})},addBtn:function(b){var e=this,f=e.options,g=f.accept,h=[];if(b)return d.isPlainObject(b)||(b={id:b}),d(b.id).each(function(){var i,j,k;k=a.Deferred(),i=d.extend({},b,{accept:d.isPlainObject(g)?[g]:g,swf:f.swf,runtimeOrder:f.runtimeOrder,id:this}),j=new c(i),j.once("ready",k.resolve),j.on("select",function(a){e.owner.request("add-file",[a])}),j.init(),e.pickers.push(j),h.push(k.promise())}),a.when.apply(a,h)},disable:function(){d.each(this.pickers,function(){this.disable()})},enable:function(){d.each(this.pickers,function(){this.enable()})},destroy:function(){d.each(this.pickers,function(){this.destroy()}),this.pickers=null}})}),b("lib/image",["base","runtime/client","lib/blob"],function(a,b,c){function d(a){this.options=e.extend({},d.options,a),b.call(this,"Image"),this.on("load",function(){this._info=this.exec("info"),this._meta=this.exec("meta")})}var e=a.$;return d.options={quality:90,crop:!1,preserveHeaders:!1,allowMagnify:!1},a.inherits(b,{constructor:d,info:function(a){return a?(this._info=a,this):this._info},meta:function(a){return a?(this._meta=a,this):this._meta},loadFromBlob:function(a){var b=this,c=a.getRuid();this.connectRuntime(c,function(){b.exec("init",b.options),b.exec("loadFromBlob",a)})},resize:function(){var b=a.slice(arguments);return this.exec.apply(this,["resize"].concat(b))},crop:function(){var b=a.slice(arguments);return this.exec.apply(this,["crop"].concat(b))},getAsDataUrl:function(a){return this.exec("getAsDataUrl",a)},getAsBlob:function(a){var b=this.exec("getAsBlob",a);return new c(this.getRuid(),b)}}),d}),b("widgets/image",["base","uploader","lib/image","widgets/widget"],function(a,b,c){var d,e=a.$;return d=function(a){var b=0,c=[],d=function(){for(var d;c.length&&a>b;)d=c.shift(),b+=d[0],d[1]()};return function(a,e,f){c.push([e,f]),a.once("destroy",function(){b-=e,setTimeout(d,1)}),setTimeout(d,1)}}(5242880),e.extend(b.options,{thumb:{width:110,height:110,quality:70,allowMagnify:!0,crop:!0,preserveHeaders:!1,type:"image/jpeg"},compress:{width:1600,height:1600,quality:90,allowMagnify:!1,crop:!1,preserveHeaders:!0}}),b.register({name:"image",makeThumb:function(a,b,f,g){var h,i;return a=this.request("get-file",a),a.type.match(/^image/)?(h=e.extend({},this.options.thumb),e.isPlainObject(f)&&(h=e.extend(h,f),f=null),f=f||h.width,g=g||h.height,i=new c(h),i.once("load",function(){a._info=a._info||i.info(),a._meta=a._meta||i.meta(),1>=f&&f>0&&(f=a._info.width*f),1>=g&&g>0&&(g=a._info.height*g),i.resize(f,g)}),i.once("complete",function(){b(!1,i.getAsDataUrl(h.type)),i.destroy()}),i.once("error",function(a){b(a||!0),i.destroy()}),void d(i,a.source.size,function(){a._info&&i.info(a._info),a._meta&&i.meta(a._meta),i.loadFromBlob(a.source)})):void b(!0)},beforeSendFile:function(b){var d,f,g=this.options.compress||this.options.resize,h=g&&g.compressSize||0,i=g&&g.noCompressIfLarger||!1;return b=this.request("get-file",b),!g||!~"image/jpeg,image/jpg".indexOf(b.type)||b.size=a&&a>0&&(a=b._info.width*a),1>=c&&c>0&&(c=b._info.height*c),d.resize(a,c)}),d.once("complete",function(){var a,c;try{a=d.getAsBlob(g.type),c=b.size,(!i||a.sizeb;b++)if(c=this._queue[b],a===c.getStatus())return c;return null},sort:function(a){"function"==typeof a&&this._queue.sort(a)},getFiles:function(){for(var a,b=[].slice.call(arguments,0),c=[],d=0,f=this._queue.length;f>d;d++)a=this._queue[d],(!b.length||~e.inArray(a.getStatus(),b))&&c.push(a);return c},removeFile:function(a){var b=this._map[a.id];b&&(delete this._map[a.id],a.destroy(),this.stats.numofDeleted++)},_fileAdded:function(a){var b=this,c=this._map[a.id];c||(this._map[a.id]=a,a.on("statuschange",function(a,c){b._onFileStatusChange(a,c)}))},_onFileStatusChange:function(a,b){var c=this.stats;switch(b){case f.PROGRESS:c.numOfProgress--;break;case f.QUEUED:c.numOfQueue--;break;case f.ERROR:c.numOfUploadFailed--;break;case f.INVALID:c.numOfInvalid--;break;case f.INTERRUPT:c.numofInterrupt--}switch(a){case f.QUEUED:c.numOfQueue++;break;case f.PROGRESS:c.numOfProgress++;break;case f.ERROR:c.numOfUploadFailed++;break;case f.COMPLETE:c.numOfSuccess++;break;case f.CANCELLED:c.numOfCancel++;break;case f.INVALID:c.numOfInvalid++;break;case f.INTERRUPT:c.numofInterrupt++}}}),b.installTo(d.prototype),d}),b("widgets/queue",["base","uploader","queue","file","lib/file","runtime/client","widgets/widget"],function(a,b,c,d,e,f){var g=a.$,h=/\.\w+$/,i=d.Status;return b.register({name:"queue",init:function(b){var d,e,h,i,j,k,l,m=this;if(g.isPlainObject(b.accept)&&(b.accept=[b.accept]),b.accept){for(j=[],h=0,e=b.accept.length;e>h;h++)i=b.accept[h].extensions,i&&j.push(i);j.length&&(k="\\."+j.join(",").replace(/,/g,"$|\\.").replace(/\*/g,".*")+"$"),m.accept=new RegExp(k,"i")}return m.queue=new c,m.stats=m.queue.stats,"html5"===this.request("predict-runtime-type")?(d=a.Deferred(),this.placeholder=l=new f("Placeholder"),l.connectRuntime({runtimeOrder:"html5"},function(){m._ruid=l.getRuid(),d.resolve()}),d.promise()):void 0},_wrapFile:function(a){if(!(a instanceof d)){if(!(a instanceof e)){if(!this._ruid)throw new Error("Can't add external files.");a=new e(this._ruid,a)}a=new d(a)}return a},acceptFile:function(a){var b=!a||!a.size||this.accept&&h.exec(a.name)&&!this.accept.test(a.name);return!b},_addFile:function(a){var b=this;return a=b._wrapFile(a),b.owner.trigger("beforeFileQueued",a)?b.acceptFile(a)?(b.queue.append(a),b.owner.trigger("fileQueued",a),a):void b.owner.trigger("error","Q_TYPE_DENIED",a):void 0},getFile:function(a){return this.queue.getFile(a)},addFile:function(a){var b=this;a.length||(a=[a]),a=g.map(a,function(a){return b._addFile(a)}),b.owner.trigger("filesQueued",a),b.options.auto&&setTimeout(function(){b.request("start-upload")},20)},getStats:function(){return this.stats},removeFile:function(a,b){var c=this;a=a.id?a:c.queue.getFile(a),this.request("cancel-file",a),b&&this.queue.removeFile(a)},getFiles:function(){return this.queue.getFiles.apply(this.queue,arguments)},fetchFile:function(){return this.queue.fetch.apply(this.queue,arguments)},retry:function(a,b){var c,d,e,f=this;if(a)return a=a.id?a:f.queue.getFile(a),a.setStatus(i.QUEUED),void(b||f.request("start-upload"));for(c=f.queue.getFiles(i.ERROR),d=0,e=c.length;e>d;d++)a=c[d],a.setStatus(i.QUEUED);f.request("start-upload")},sortFiles:function(){return this.queue.sort.apply(this.queue,arguments)},reset:function(){this.owner.trigger("reset"),this.queue=new c,this.stats=this.queue.stats},destroy:function(){this.reset(),this.placeholder&&this.placeholder.destroy()}})}),b("widgets/runtime",["uploader","runtime/runtime","widgets/widget"],function(a,b){return a.support=function(){return b.hasRuntime.apply(b,arguments)},a.register({name:"runtime",init:function(){if(!this.predictRuntimeType())throw Error("Runtime Error")},predictRuntimeType:function(){var a,c,d=this.options.runtimeOrder||b.orders,e=this.type;if(!e)for(d=d.split(/\s*,\s*/g),a=0,c=d.length;c>a;a++)if(b.hasRuntime(d[a])){this.type=e=d[a];break}return e}})}),b("lib/transport",["base","runtime/client","mediator"],function(a,b,c){function d(a){var c=this;a=c.options=e.extend(!0,{},d.options,a||{}),b.call(this,"Transport"),this._blob=null,this._formData=a.formData||{},this._headers=a.headers||{},this.on("progress",this._timeout),this.on("load error",function(){c.trigger("progress",1),clearTimeout(c._timer)})}var e=a.$;return d.options={server:"",method:"POST",withCredentials:!1,fileVal:"file",timeout:12e4,formData:{},headers:{},sendAsBinary:!1},e.extend(d.prototype,{appendBlob:function(a,b,c){var d=this,e=d.options;d.getRuid()&&d.disconnectRuntime(),d.connectRuntime(b.ruid,function(){d.exec("init")}),d._blob=b,e.fileVal=a||e.fileVal,e.filename=c||e.filename},append:function(a,b){"object"==typeof a?e.extend(this._formData,a):this._formData[a]=b},setRequestHeader:function(a,b){"object"==typeof a?e.extend(this._headers,a):this._headers[a]=b},send:function(a){this.exec("send",a),this._timeout()},abort:function(){return clearTimeout(this._timer),this.exec("abort")},destroy:function(){this.trigger("destroy"),this.off(),this.exec("destroy"),this.disconnectRuntime()},getResponse:function(){return this.exec("getResponse")},getResponseAsJson:function(){return this.exec("getResponseAsJson")},getStatus:function(){return this.exec("getStatus")},_timeout:function(){var a=this,b=a.options.timeout;b&&(clearTimeout(a._timer),a._timer=setTimeout(function(){a.abort(),a.trigger("error","timeout")},b))}}),c.installTo(d.prototype),d}),b("widgets/upload",["base","uploader","file","lib/transport","widgets/widget"],function(a,b,c,d){function e(a,b){var c,d,e=[],f=a.source,g=f.size,h=b?Math.ceil(g/b):1,i=0,j=0;for(d={file:a,has:function(){return!!e.length},shift:function(){return e.shift()},unshift:function(a){e.unshift(a)}};h>j;)c=Math.min(b,g-i),e.push({file:a,start:i,end:b?i+c:g,total:g,chunks:h,chunk:j++,cuted:d}),i+=c;return a.blocks=e.concat(),a.remaning=e.length,d}var f=a.$,g=a.isPromise,h=c.Status;f.extend(b.options,{prepareNextFile:!1,chunked:!1,chunkSize:5242880,chunkRetry:2,threads:3,formData:{}}),b.register({name:"upload",init:function(){var b=this.owner,c=this;this.runing=!1,this.progress=!1,b.on("startUpload",function(){c.progress=!0}).on("uploadFinished",function(){c.progress=!1}),this.pool=[],this.stack=[],this.pending=[],this.remaning=0,this.__tick=a.bindFn(this._tick,this),b.on("uploadComplete",function(a){a.blocks&&f.each(a.blocks,function(a,b){b.transport&&(b.transport.abort(),b.transport.destroy()),delete b.transport}),delete a.blocks,delete a.remaning})},reset:function(){this.request("stop-upload",!0),this.runing=!1,this.pool=[],this.stack=[],this.pending=[],this.remaning=0,this._trigged=!1,this._promise=null},startUpload:function(b){var c=this;if(f.each(c.request("get-files",h.INVALID),function(){c.request("remove-file",this)}),b)if(b=b.id?b:c.request("get-file",b),b.getStatus()===h.INTERRUPT)f.each(c.pool,function(a,c){c.file===b&&c.transport&&c.transport.send()}),b.setStatus(h.QUEUED);else{if(b.getStatus()===h.PROGRESS)return;b.setStatus(h.QUEUED)}else f.each(c.request("get-files",[h.INITED]),function(){this.setStatus(h.QUEUED)});if(!c.runing){c.runing=!0;var d=[];f.each(c.pool,function(a,b){var e=b.file;e.getStatus()===h.INTERRUPT&&(d.push(e),c._trigged=!1,b.transport&&b.transport.send())});for(var b;b=d.shift();)b.setStatus(h.PROGRESS);b||f.each(c.request("get-files",h.INTERRUPT),function(){this.setStatus(h.PROGRESS)}),c._trigged=!1,a.nextTick(c.__tick),c.owner.trigger("startUpload")}},stopUpload:function(b,c){var d=this;if(b===!0&&(c=b,b=null),d.runing!==!1){if(b){if(b=b.id?b:d.request("get-file",b),b.getStatus()!==h.PROGRESS&&b.getStatus()!==h.QUEUED)return;return b.setStatus(h.INTERRUPT),f.each(d.pool,function(a,c){c.file===b&&(c.transport&&c.transport.abort(),d._putback(c),d._popBlock(c))}),a.nextTick(d.__tick)}d.runing=!1,this._promise&&this._promise.file&&this._promise.file.setStatus(h.INTERRUPT),c&&f.each(d.pool,function(a,b){b.transport&&b.transport.abort(),b.file.setStatus(h.INTERRUPT)}),d.owner.trigger("stopUpload")}},cancelFile:function(a){a=a.id?a:this.request("get-file",a),a.blocks&&f.each(a.blocks,function(a,b){var c=b.transport;c&&(c.abort(),c.destroy(),delete b.transport)}),a.setStatus(h.CANCELLED),this.owner.trigger("fileDequeued",a)},isInProgress:function(){return!!this.progress},_getStats:function(){return this.request("get-stats")},skipFile:function(a,b){a=a.id?a:this.request("get-file",a),a.setStatus(b||h.COMPLETE),a.skipped=!0,a.blocks&&f.each(a.blocks,function(a,b){var c=b.transport;c&&(c.abort(),c.destroy(),delete b.transport)}),this.owner.trigger("uploadSkip",a)},_tick:function(){var b,c,d=this,e=d.options;return d._promise?d._promise.always(d.__tick):void(d.pool.length1&&~"http,abort".indexOf(a)&&b.retried1&&f.extend(m,{chunks:b.chunks,chunk:b.chunk}),i.trigger("uploadBeforeSend",b,m,n),l.appendBlob(j.fileVal,b.blob,k.name),l.append(m),l.setRequestHeader(n),l.send()},_finishFile:function(a,b,c){var d=this.owner;return d.request("after-send-file",arguments,function(){a.setStatus(h.COMPLETE),d.trigger("uploadSuccess",a,b,c)}).fail(function(b){a.getStatus()===h.PROGRESS&&a.setStatus(h.ERROR,b),d.trigger("uploadError",a,b) -}).always(function(){d.trigger("uploadComplete",a)})},updateFileProgress:function(a){var b=0,c=0;a.blocks&&(f.each(a.blocks,function(a,b){c+=(b.percentage||0)*(b.end-b.start)}),b=c/a.size,this.owner.trigger("uploadProgress",a,b||0))}})}),b("widgets/validator",["base","uploader","file","widgets/widget"],function(a,b,c){var d,e=a.$,f={};return d={addValidator:function(a,b){f[a]=b},removeValidator:function(a){delete f[a]}},b.register({name:"validator",init:function(){var b=this;a.nextTick(function(){e.each(f,function(){this.call(b.owner)})})}}),d.addValidator("fileNumLimit",function(){var a=this,b=a.options,c=0,d=parseInt(b.fileNumLimit,10),e=!0;d&&(a.on("beforeFileQueued",function(a){return c>=d&&e&&(e=!1,this.trigger("error","Q_EXCEED_NUM_LIMIT",d,a),setTimeout(function(){e=!0},1)),c>=d?!1:!0}),a.on("fileQueued",function(){c++}),a.on("fileDequeued",function(){c--}),a.on("reset",function(){c=0}))}),d.addValidator("fileSizeLimit",function(){var a=this,b=a.options,c=0,d=parseInt(b.fileSizeLimit,10),e=!0;d&&(a.on("beforeFileQueued",function(a){var b=c+a.size>d;return b&&e&&(e=!1,this.trigger("error","Q_EXCEED_SIZE_LIMIT",d,a),setTimeout(function(){e=!0},1)),b?!1:!0}),a.on("fileQueued",function(a){c+=a.size}),a.on("fileDequeued",function(a){c-=a.size}),a.on("reset",function(){c=0}))}),d.addValidator("fileSingleSizeLimit",function(){var a=this,b=a.options,d=b.fileSingleSizeLimit;d&&a.on("beforeFileQueued",function(a){return a.size>d?(a.setStatus(c.Status.INVALID,"exceed_size"),this.trigger("error","F_EXCEED_SIZE",d,a),!1):void 0})}),d.addValidator("duplicate",function(){function a(a){for(var b,c=0,d=0,e=a.length;e>d;d++)b=a.charCodeAt(d),c=b+(c<<6)+(c<<16)-c;return c}var b=this,c=b.options,d={};c.duplicate||(b.on("beforeFileQueued",function(b){var c=b.__hash||(b.__hash=a(b.name+b.size+b.lastModifiedDate));return d[c]?(this.trigger("error","F_DUPLICATE",b),!1):void 0}),b.on("fileQueued",function(a){var b=a.__hash;b&&(d[b]=!0)}),b.on("fileDequeued",function(a){var b=a.__hash;b&&delete d[b]}),b.on("reset",function(){d={}}))}),d}),b("runtime/compbase",[],function(){function a(a,b){this.owner=a,this.options=a.options,this.getRuntime=function(){return b},this.getRuid=function(){return b.uid},this.trigger=function(){return a.trigger.apply(a,arguments)}}return a}),b("runtime/html5/runtime",["base","runtime/runtime","runtime/compbase"],function(b,c,d){function e(){var a={},d=this,e=this.destroy;c.apply(d,arguments),d.type=f,d.exec=function(c,e){var f,h=this,i=h.uid,j=b.slice(arguments,2);return g[c]&&(f=a[i]=a[i]||new g[c](h,d),f[e])?f[e].apply(f,j):void 0},d.destroy=function(){return e&&e.apply(this,arguments)}}var f="html5",g={};return b.inherits(c,{constructor:e,init:function(){var a=this;setTimeout(function(){a.trigger("ready")},1)}}),e.register=function(a,c){var e=g[a]=b.inherits(d,c);return e},a.Blob&&a.FileReader&&a.DataView&&c.addRuntime(f,e),e}),b("runtime/html5/blob",["runtime/html5/runtime","lib/blob"],function(a,b){return a.register("Blob",{slice:function(a,c){var d=this.owner.source,e=d.slice||d.webkitSlice||d.mozSlice;return d=e.call(d,a,c),new b(this.getRuid(),d)}})}),b("runtime/html5/dnd",["base","runtime/html5/runtime","lib/file"],function(a,b,c){var d=a.$,e="webuploader-dnd-";return b.register("DragAndDrop",{init:function(){var b=this.elem=this.options.container;this.dragEnterHandler=a.bindFn(this._dragEnterHandler,this),this.dragOverHandler=a.bindFn(this._dragOverHandler,this),this.dragLeaveHandler=a.bindFn(this._dragLeaveHandler,this),this.dropHandler=a.bindFn(this._dropHandler,this),this.dndOver=!1,b.on("dragenter",this.dragEnterHandler),b.on("dragover",this.dragOverHandler),b.on("dragleave",this.dragLeaveHandler),b.on("drop",this.dropHandler),this.options.disableGlobalDnd&&(d(document).on("dragover",this.dragOverHandler),d(document).on("drop",this.dropHandler))},_dragEnterHandler:function(a){var b,c=this,d=c._denied||!1;return a=a.originalEvent||a,c.dndOver||(c.dndOver=!0,b=a.dataTransfer.items,b&&b.length&&(c._denied=d=!c.trigger("accept",b)),c.elem.addClass(e+"over"),c.elem[d?"addClass":"removeClass"](e+"denied")),a.dataTransfer.dropEffect=d?"none":"copy",!1},_dragOverHandler:function(a){var b=this.elem.parent().get(0);return b&&!d.contains(b,a.currentTarget)?!1:(clearTimeout(this._leaveTimer),this._dragEnterHandler.call(this,a),!1)},_dragLeaveHandler:function(){var a,b=this;return a=function(){b.dndOver=!1,b.elem.removeClass(e+"over "+e+"denied")},clearTimeout(b._leaveTimer),b._leaveTimer=setTimeout(a,100),!1},_dropHandler:function(a){var b,f,g=this,h=g.getRuid(),i=g.elem.parent().get(0);if(i&&!d.contains(i,a.currentTarget))return!1;a=a.originalEvent||a,b=a.dataTransfer;try{f=b.getData("text/html")}catch(j){}return f?void 0:(g._getTansferFiles(b,function(a){g.trigger("drop",d.map(a,function(a){return new c(h,a)}))}),g.dndOver=!1,g.elem.removeClass(e+"over"),!1)},_getTansferFiles:function(b,c){var d,e,f,g,h,i,j,k=[],l=[];for(d=b.items,e=b.files,j=!(!d||!d[0].webkitGetAsEntry),h=0,i=e.length;i>h;h++)f=e[h],g=d&&d[h],j&&g.webkitGetAsEntry().isDirectory?l.push(this._traverseDirectoryTree(g.webkitGetAsEntry(),k)):k.push(f);a.when.apply(a,l).done(function(){k.length&&c(k)})},_traverseDirectoryTree:function(b,c){var d=a.Deferred(),e=this;return b.isFile?b.file(function(a){c.push(a),d.resolve()}):b.isDirectory&&b.createReader().readEntries(function(b){var f,g=b.length,h=[],i=[];for(f=0;g>f;f++)h.push(e._traverseDirectoryTree(b[f],i));a.when.apply(a,h).then(function(){c.push.apply(c,i),d.resolve()},d.reject)}),d.promise()},destroy:function(){var a=this.elem;a&&(a.off("dragenter",this.dragEnterHandler),a.off("dragover",this.dragOverHandler),a.off("dragleave",this.dragLeaveHandler),a.off("drop",this.dropHandler),this.options.disableGlobalDnd&&(d(document).off("dragover",this.dragOverHandler),d(document).off("drop",this.dropHandler)))}})}),b("runtime/html5/filepaste",["base","runtime/html5/runtime","lib/file"],function(a,b,c){return b.register("FilePaste",{init:function(){var b,c,d,e,f=this.options,g=this.elem=f.container,h=".*";if(f.accept){for(b=[],c=0,d=f.accept.length;d>c;c++)e=f.accept[c].mimeTypes,e&&b.push(e);b.length&&(h=b.join(","),h=h.replace(/,/g,"|").replace(/\*/g,".*"))}this.accept=h=new RegExp(h,"i"),this.hander=a.bindFn(this._pasteHander,this),g.on("paste",this.hander)},_pasteHander:function(a){var b,d,e,f,g,h=[],i=this.getRuid();for(a=a.originalEvent||a,b=a.clipboardData.items,f=0,g=b.length;g>f;f++)d=b[f],"file"===d.kind&&(e=d.getAsFile())&&h.push(new c(i,e));h.length&&(a.preventDefault(),a.stopPropagation(),this.trigger("paste",h))},destroy:function(){this.elem.off("paste",this.hander)}})}),b("runtime/html5/filepicker",["base","runtime/html5/runtime"],function(a,b){var c=a.$;return b.register("FilePicker",{init:function(){var a,b,d,e,f=this.getRuntime().getContainer(),g=this,h=g.owner,i=g.options,j=this.label=c(document.createElement("label")),k=this.input=c(document.createElement("input"));if(k.attr("type","file"),k.attr("name",i.name),k.addClass("webuploader-element-invisible"),j.on("click",function(){k.trigger("click")}),j.css({opacity:0,width:"100%",height:"100%",display:"block",cursor:"pointer",background:"#ffffff"}),i.multiple&&k.attr("multiple","multiple"),i.accept&&i.accept.length>0){for(a=[],b=0,d=i.accept.length;d>b;b++)a.push(i.accept[b].mimeTypes);k.attr("accept",a.join(","))}f.append(k),f.append(j),e=function(a){h.trigger(a.type)},k.on("change",function(a){var b,d=arguments.callee;g.files=a.target.files,b=this.cloneNode(!0),b.value=null,this.parentNode.replaceChild(b,this),k.off(),k=c(b).on("change",d).on("mouseenter mouseleave",e),h.trigger("change")}),j.on("mouseenter mouseleave",e)},getFiles:function(){return this.files},destroy:function(){this.input.off(),this.label.off()}})}),b("runtime/html5/util",["base"],function(b){var c=a.createObjectURL&&a||a.URL&&URL.revokeObjectURL&&URL||a.webkitURL,d=b.noop,e=d;return c&&(d=function(){return c.createObjectURL.apply(c,arguments)},e=function(){return c.revokeObjectURL.apply(c,arguments)}),{createObjectURL:d,revokeObjectURL:e,dataURL2Blob:function(a){var b,c,d,e,f,g;for(g=a.split(","),b=~g[0].indexOf("base64")?atob(g[1]):decodeURIComponent(g[1]),d=new ArrayBuffer(b.length),c=new Uint8Array(d),e=0;ei&&(d=h.getUint16(i),d>=65504&&65519>=d||65534===d)&&(e=h.getUint16(i+2)+2,!(i+e>h.byteLength));){if(f=b.parsers[d],!c&&f)for(g=0;g6&&(l.imageHead=a.slice?a.slice(2,k):new Uint8Array(a).subarray(2,k))}return l}},updateImageHead:function(a,b){var c,d,e,f=this._parse(a,!0);return e=2,f.imageHead&&(e=2+f.imageHead.byteLength),d=a.slice?a.slice(e):new Uint8Array(a).subarray(e),c=new Uint8Array(b.byteLength+2+d.byteLength),c[0]=255,c[1]=216,c.set(new Uint8Array(b),2),c.set(new Uint8Array(d),b.byteLength+2),c.buffer}},a.parseMeta=function(){return b.parse.apply(b,arguments)},a.updateImageHead=function(){return b.updateImageHead.apply(b,arguments)},b}),b("runtime/html5/imagemeta/exif",["base","runtime/html5/imagemeta"],function(a,b){var c={};return c.ExifMap=function(){return this},c.ExifMap.prototype.map={Orientation:274},c.ExifMap.prototype.get=function(a){return this[a]||this[this.map[a]]},c.exifTagTypes={1:{getValue:function(a,b){return a.getUint8(b)},size:1},2:{getValue:function(a,b){return String.fromCharCode(a.getUint8(b))},size:1,ascii:!0},3:{getValue:function(a,b,c){return a.getUint16(b,c)},size:2},4:{getValue:function(a,b,c){return a.getUint32(b,c)},size:4},5:{getValue:function(a,b,c){return a.getUint32(b,c)/a.getUint32(b+4,c)},size:8},9:{getValue:function(a,b,c){return a.getInt32(b,c)},size:4},10:{getValue:function(a,b,c){return a.getInt32(b,c)/a.getInt32(b+4,c)},size:8}},c.exifTagTypes[7]=c.exifTagTypes[1],c.getExifValue=function(b,d,e,f,g,h){var i,j,k,l,m,n,o=c.exifTagTypes[f];if(!o)return void a.log("Invalid Exif data: Invalid tag type.");if(i=o.size*g,j=i>4?d+b.getUint32(e+8,h):e+8,j+i>b.byteLength)return void a.log("Invalid Exif data: Invalid data offset.");if(1===g)return o.getValue(b,j,h);for(k=[],l=0;g>l;l+=1)k[l]=o.getValue(b,j+l*o.size,h);if(o.ascii){for(m="",l=0;lb.byteLength)return void a.log("Invalid Exif data: Invalid directory offset.");if(g=b.getUint16(d,e),h=d+2+12*g,h+4>b.byteLength)return void a.log("Invalid Exif data: Invalid directory size.");for(i=0;g>i;i+=1)this.parseExifTag(b,c,d+2+12*i,e,f);return b.getUint32(h,e)},c.parseExifData=function(b,d,e,f){var g,h,i=d+10;if(1165519206===b.getUint32(d+4)){if(i+8>b.byteLength)return void a.log("Invalid Exif data: Invalid segment size.");if(0!==b.getUint16(d+8))return void a.log("Invalid Exif data: Missing byte alignment offset.");switch(b.getUint16(i)){case 18761:g=!0;break;case 19789:g=!1;break;default:return void a.log("Invalid Exif data: Invalid byte alignment marker.")}if(42!==b.getUint16(i+2,g))return void a.log("Invalid Exif data: Missing TIFF marker.");h=b.getUint32(i+4,g),f.exif=new c.ExifMap,h=c.parseExifTags(b,i,i+h,g,f)}},b.parsers[65505].push(c.parseExifData),c}),b("runtime/html5/image",["base","runtime/html5/runtime","runtime/html5/util"],function(a,b,c){var d="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D";return b.register("Image",{modified:!1,init:function(){var a=this,b=new Image;b.onload=function(){a._info={type:a.type,width:this.width,height:this.height},a._metas||"image/jpeg"!==a.type?a.owner.trigger("load"):c.parseMeta(a._blob,function(b,c){a._metas=c,a.owner.trigger("load")})},b.onerror=function(){a.owner.trigger("error")},a._img=b},loadFromBlob:function(a){var b=this,d=b._img;b._blob=a,b.type=a.type,d.src=c.createObjectURL(a.getSource()),b.owner.once("load",function(){c.revokeObjectURL(d.src)})},resize:function(a,b){var c=this._canvas||(this._canvas=document.createElement("canvas"));this._resize(this._img,c,a,b),this._blob=null,this.modified=!0,this.owner.trigger("complete","resize")},crop:function(a,b,c,d,e){var f=this._canvas||(this._canvas=document.createElement("canvas")),g=this.options,h=this._img,i=h.naturalWidth,j=h.naturalHeight,k=this.getOrientation();e=e||1,f.width=c,f.height=d,g.preserveHeaders||this._rotate2Orientaion(f,k),this._renderImageToCanvas(f,h,-a,-b,i*e,j*e),this._blob=null,this.modified=!0,this.owner.trigger("complete","crop")},getAsBlob:function(a){var b,d=this._blob,e=this.options;if(a=a||this.type,this.modified||this.type!==a){if(b=this._canvas,"image/jpeg"===a){if(d=c.canvasToDataUrl(b,a,e.quality),e.preserveHeaders&&this._metas&&this._metas.imageHead)return d=c.dataURL2ArrayBuffer(d),d=c.updateImageHead(d,this._metas.imageHead),d=c.arrayBufferToBlob(d,a)}else d=c.canvasToDataUrl(b,a);d=c.dataURL2Blob(d)}return d},getAsDataUrl:function(a){var b=this.options;return a=a||this.type,"image/jpeg"===a?c.canvasToDataUrl(this._canvas,a,b.quality):this._canvas.toDataURL(a)},getOrientation:function(){return this._metas&&this._metas.exif&&this._metas.exif.get("Orientation")||1},info:function(a){return a?(this._info=a,this):this._info},meta:function(a){return a?(this._meta=a,this):this._meta},destroy:function(){var a=this._canvas;this._img.onload=null,a&&(a.getContext("2d").clearRect(0,0,a.width,a.height),a.width=a.height=0,this._canvas=null),this._img.src=d,this._img=this._blob=null},_resize:function(a,b,c,d){var e,f,g,h,i,j=this.options,k=a.width,l=a.height,m=this.getOrientation();~[5,6,7,8].indexOf(m)&&(c^=d,d^=c,c^=d),e=Math[j.crop?"max":"min"](c/k,d/l),j.allowMagnify||(e=Math.min(1,e)),f=k*e,g=l*e,j.crop?(b.width=c,b.height=d):(b.width=f,b.height=g),h=(b.width-f)/2,i=(b.height-g)/2,j.preserveHeaders||this._rotate2Orientaion(b,m),this._renderImageToCanvas(b,a,h,i,f,g)},_rotate2Orientaion:function(a,b){var c=a.width,d=a.height,e=a.getContext("2d");switch(b){case 5:case 6:case 7:case 8:a.width=d,a.height=c}switch(b){case 2:e.translate(c,0),e.scale(-1,1);break;case 3:e.translate(c,d),e.rotate(Math.PI);break;case 4:e.translate(0,d),e.scale(1,-1);break;case 5:e.rotate(.5*Math.PI),e.scale(1,-1);break;case 6:e.rotate(.5*Math.PI),e.translate(0,-d);break;case 7:e.rotate(.5*Math.PI),e.translate(c,-d),e.scale(-1,1);break;case 8:e.rotate(-.5*Math.PI),e.translate(-c,0)}},_renderImageToCanvas:function(){function b(a,b,c){var d,e,f,g=document.createElement("canvas"),h=g.getContext("2d"),i=0,j=c,k=c;for(g.width=1,g.height=c,h.drawImage(a,0,0),d=h.getImageData(0,0,1,c).data;k>i;)e=d[4*(k-1)+3],0===e?j=k:i=k,k=j+i>>1;return f=k/c,0===f?1:f}function c(a){var b,c,d=a.naturalWidth,e=a.naturalHeight;return d*e>1048576?(b=document.createElement("canvas"),b.width=b.height=1,c=b.getContext("2d"),c.drawImage(a,-d+1,0),0===c.getImageData(0,0,1,1).data[3]):!1}return a.os.ios?a.os.ios>=7?function(a,c,d,e,f,g){var h=c.naturalWidth,i=c.naturalHeight,j=b(c,h,i);return a.getContext("2d").drawImage(c,0,0,h*j,i*j,d,e,f,g)}:function(a,d,e,f,g,h){var i,j,k,l,m,n,o,p=d.naturalWidth,q=d.naturalHeight,r=a.getContext("2d"),s=c(d),t="image/jpeg"===this.type,u=1024,v=0,w=0;for(s&&(p/=2,q/=2),r.save(),i=document.createElement("canvas"),i.width=i.height=u,j=i.getContext("2d"),k=t?b(d,p,q):1,l=Math.ceil(u*g/p),m=Math.ceil(u*h/q/k);q>v;){for(n=0,o=0;p>n;)j.clearRect(0,0,u,u),j.drawImage(d,-n,-v),r.drawImage(i,0,0,u,u,e+o,f+w,l,m),n+=u,o+=l;v+=u,w+=m}r.restore(),i=j=null}:function(b){var c=a.slice(arguments,1),d=b.getContext("2d");d.drawImage.apply(d,c)}}()})}),b("runtime/html5/transport",["base","runtime/html5/runtime"],function(a,b){var c=a.noop,d=a.$;return b.register("Transport",{init:function(){this._status=0,this._response=null},send:function(){var b,c,e,f=this.owner,g=this.options,h=this._initAjax(),i=f._blob,j=g.server;g.sendAsBinary?(j+=(/\?/.test(j)?"&":"?")+d.param(f._formData),c=i.getSource()):(b=new FormData,d.each(f._formData,function(a,c){b.append(a,c)}),b.append(g.fileVal,i.getSource(),g.filename||f._formData.name||"")),g.withCredentials&&"withCredentials"in h?(h.open(g.method,j,!0),h.withCredentials=!0):h.open(g.method,j),this._setRequestHeader(h,g.headers),c?(h.overrideMimeType&&h.overrideMimeType("application/octet-stream"),a.os.android?(e=new FileReader,e.onload=function(){h.send(this.result),e=e.onload=null},e.readAsArrayBuffer(c)):h.send(c)):h.send(b)},getResponse:function(){return this._response},getResponseAsJson:function(){return this._parseJson(this._response)},getStatus:function(){return this._status},abort:function(){var a=this._xhr;a&&(a.upload.onprogress=c,a.onreadystatechange=c,a.abort(),this._xhr=a=null)},destroy:function(){this.abort()},_initAjax:function(){var a=this,b=new XMLHttpRequest,d=this.options;return!d.withCredentials||"withCredentials"in b||"undefined"==typeof XDomainRequest||(b=new XDomainRequest),b.upload.onprogress=function(b){var c=0;return b.lengthComputable&&(c=b.loaded/b.total),a.trigger("progress",c)},b.onreadystatechange=function(){return 4===b.readyState?(b.upload.onprogress=c,b.onreadystatechange=c,a._xhr=null,a._status=b.status,b.status>=200&&b.status<300?(a._response=b.responseText,a.trigger("load")):b.status>=500&&b.status<600?(a._response=b.responseText,a.trigger("error","server")):a.trigger("error",a._status?"http":"abort")):void 0},a._xhr=b,b},_setRequestHeader:function(a,b){d.each(b,function(b,c){a.setRequestHeader(b,c)})},_parseJson:function(a){var b;try{b=JSON.parse(a)}catch(c){b={}}return b}})}),b("preset/html5only",["base","widgets/filednd","widgets/filepaste","widgets/filepicker","widgets/image","widgets/queue","widgets/runtime","widgets/upload","widgets/validator","runtime/html5/blob","runtime/html5/dnd","runtime/html5/filepaste","runtime/html5/filepicker","runtime/html5/imagemeta/exif","runtime/html5/image","runtime/html5/transport"],function(a){return a}),b("webuploader",["preset/html5only"],function(a){return a}),c("webuploader")}); \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.js deleted file mode 100644 index e1a483b4..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.js +++ /dev/null @@ -1,8106 +0,0 @@ -/*! WebUploader 0.1.5 */ - - -/** - * @fileOverview 让内部各个部件的代码可以用[amd](https://github.com/amdjs/amdjs-api/wiki/AMD)模块定义方式组织起来。 - * - * AMD API 内部的简单不完全实现,请忽略。只有当WebUploader被合并成一个文件的时候才会引入。 - */ -(function( root, factory ) { - var modules = {}, - - // 内部require, 简单不完全实现。 - // https://github.com/amdjs/amdjs-api/wiki/require - _require = function( deps, callback ) { - var args, len, i; - - // 如果deps不是数组,则直接返回指定module - if ( typeof deps === 'string' ) { - return getModule( deps ); - } else { - args = []; - for( len = deps.length, i = 0; i < len; i++ ) { - args.push( getModule( deps[ i ] ) ); - } - - return callback.apply( null, args ); - } - }, - - // 内部define,暂时不支持不指定id. - _define = function( id, deps, factory ) { - if ( arguments.length === 2 ) { - factory = deps; - deps = null; - } - - _require( deps || [], function() { - setModule( id, factory, arguments ); - }); - }, - - // 设置module, 兼容CommonJs写法。 - setModule = function( id, factory, args ) { - var module = { - exports: factory - }, - returned; - - if ( typeof factory === 'function' ) { - args.length || (args = [ _require, module.exports, module ]); - returned = factory.apply( null, args ); - returned !== undefined && (module.exports = returned); - } - - modules[ id ] = module.exports; - }, - - // 根据id获取module - getModule = function( id ) { - var module = modules[ id ] || root[ id ]; - - if ( !module ) { - throw new Error( '`' + id + '` is undefined' ); - } - - return module; - }, - - // 将所有modules,将路径ids装换成对象。 - exportsTo = function( obj ) { - var key, host, parts, part, last, ucFirst; - - // make the first character upper case. - ucFirst = function( str ) { - return str && (str.charAt( 0 ).toUpperCase() + str.substr( 1 )); - }; - - for ( key in modules ) { - host = obj; - - if ( !modules.hasOwnProperty( key ) ) { - continue; - } - - parts = key.split('/'); - last = ucFirst( parts.pop() ); - - while( (part = ucFirst( parts.shift() )) ) { - host[ part ] = host[ part ] || {}; - host = host[ part ]; - } - - host[ last ] = modules[ key ]; - } - - return obj; - }, - - makeExport = function( dollar ) { - root.__dollar = dollar; - - // exports every module. - return exportsTo( factory( root, _define, _require ) ); - }, - - origin; - - if ( typeof module === 'object' && typeof module.exports === 'object' ) { - - // For CommonJS and CommonJS-like environments where a proper window is present, - module.exports = makeExport(); - } else if ( typeof define === 'function' && define.amd ) { - - // Allow using this built library as an AMD module - // in another project. That other project will only - // see this AMD call, not the internal modules in - // the closure below. - define([ 'jquery' ], makeExport ); - } else { - - // Browser globals case. Just assign the - // result to a property on the global. - origin = root.WebUploader; - root.WebUploader = makeExport(); - root.WebUploader.noConflict = function() { - root.WebUploader = origin; - }; - } -})( window, function( window, define, require ) { - - - /** - * @fileOverview jQuery or Zepto - */ - define('dollar-third',[],function() { - var $ = window.__dollar || window.jQuery || window.Zepto; - - if ( !$ ) { - throw new Error('jQuery or Zepto not found!'); - } - - return $; - }); - /** - * @fileOverview Dom 操作相关 - */ - define('dollar',[ - 'dollar-third' - ], function( _ ) { - return _; - }); - /** - * @fileOverview 使用jQuery的Promise - */ - define('promise-third',[ - 'dollar' - ], function( $ ) { - return { - Deferred: $.Deferred, - when: $.when, - - isPromise: function( anything ) { - return anything && typeof anything.then === 'function'; - } - }; - }); - /** - * @fileOverview Promise/A+ - */ - define('promise',[ - 'promise-third' - ], function( _ ) { - return _; - }); - /** - * @fileOverview 基础类方法。 - */ - - /** - * Web Uploader内部类的详细说明,以下提及的功能类,都可以在`WebUploader`这个变量中访问到。 - * - * As you know, Web Uploader的每个文件都是用过[AMD](https://github.com/amdjs/amdjs-api/wiki/AMD)规范中的`define`组织起来的, 每个Module都会有个module id. - * 默认module id为该文件的路径,而此路径将会转化成名字空间存放在WebUploader中。如: - * - * * module `base`:WebUploader.Base - * * module `file`: WebUploader.File - * * module `lib/dnd`: WebUploader.Lib.Dnd - * * module `runtime/html5/dnd`: WebUploader.Runtime.Html5.Dnd - * - * - * 以下文档中对类的使用可能省略掉了`WebUploader`前缀。 - * @module WebUploader - * @title WebUploader API文档 - */ - define('base',[ - 'dollar', - 'promise' - ], function( $, promise ) { - - var noop = function() {}, - call = Function.call; - - // http://jsperf.com/uncurrythis - // 反科里化 - function uncurryThis( fn ) { - return function() { - return call.apply( fn, arguments ); - }; - } - - function bindFn( fn, context ) { - return function() { - return fn.apply( context, arguments ); - }; - } - - function createObject( proto ) { - var f; - - if ( Object.create ) { - return Object.create( proto ); - } else { - f = function() {}; - f.prototype = proto; - return new f(); - } - } - - - /** - * 基础类,提供一些简单常用的方法。 - * @class Base - */ - return { - - /** - * @property {String} version 当前版本号。 - */ - version: '0.1.5', - - /** - * @property {jQuery|Zepto} $ 引用依赖的jQuery或者Zepto对象。 - */ - $: $, - - Deferred: promise.Deferred, - - isPromise: promise.isPromise, - - when: promise.when, - - /** - * @description 简单的浏览器检查结果。 - * - * * `webkit` webkit版本号,如果浏览器为非webkit内核,此属性为`undefined`。 - * * `chrome` chrome浏览器版本号,如果浏览器为chrome,此属性为`undefined`。 - * * `ie` ie浏览器版本号,如果浏览器为非ie,此属性为`undefined`。**暂不支持ie10+** - * * `firefox` firefox浏览器版本号,如果浏览器为非firefox,此属性为`undefined`。 - * * `safari` safari浏览器版本号,如果浏览器为非safari,此属性为`undefined`。 - * * `opera` opera浏览器版本号,如果浏览器为非opera,此属性为`undefined`。 - * - * @property {Object} [browser] - */ - browser: (function( ua ) { - var ret = {}, - webkit = ua.match( /WebKit\/([\d.]+)/ ), - chrome = ua.match( /Chrome\/([\d.]+)/ ) || - ua.match( /CriOS\/([\d.]+)/ ), - - ie = ua.match( /MSIE\s([\d\.]+)/ ) || - ua.match( /(?:trident)(?:.*rv:([\w.]+))?/i ), - firefox = ua.match( /Firefox\/([\d.]+)/ ), - safari = ua.match( /Safari\/([\d.]+)/ ), - opera = ua.match( /OPR\/([\d.]+)/ ); - - webkit && (ret.webkit = parseFloat( webkit[ 1 ] )); - chrome && (ret.chrome = parseFloat( chrome[ 1 ] )); - ie && (ret.ie = parseFloat( ie[ 1 ] )); - firefox && (ret.firefox = parseFloat( firefox[ 1 ] )); - safari && (ret.safari = parseFloat( safari[ 1 ] )); - opera && (ret.opera = parseFloat( opera[ 1 ] )); - - return ret; - })( navigator.userAgent ), - - /** - * @description 操作系统检查结果。 - * - * * `android` 如果在android浏览器环境下,此值为对应的android版本号,否则为`undefined`。 - * * `ios` 如果在ios浏览器环境下,此值为对应的ios版本号,否则为`undefined`。 - * @property {Object} [os] - */ - os: (function( ua ) { - var ret = {}, - - // osx = !!ua.match( /\(Macintosh\; Intel / ), - android = ua.match( /(?:Android);?[\s\/]+([\d.]+)?/ ), - ios = ua.match( /(?:iPad|iPod|iPhone).*OS\s([\d_]+)/ ); - - // osx && (ret.osx = true); - android && (ret.android = parseFloat( android[ 1 ] )); - ios && (ret.ios = parseFloat( ios[ 1 ].replace( /_/g, '.' ) )); - - return ret; - })( navigator.userAgent ), - - /** - * 实现类与类之间的继承。 - * @method inherits - * @grammar Base.inherits( super ) => child - * @grammar Base.inherits( super, protos ) => child - * @grammar Base.inherits( super, protos, statics ) => child - * @param {Class} super 父类 - * @param {Object | Function} [protos] 子类或者对象。如果对象中包含constructor,子类将是用此属性值。 - * @param {Function} [protos.constructor] 子类构造器,不指定的话将创建个临时的直接执行父类构造器的方法。 - * @param {Object} [statics] 静态属性或方法。 - * @return {Class} 返回子类。 - * @example - * function Person() { - * console.log( 'Super' ); - * } - * Person.prototype.hello = function() { - * console.log( 'hello' ); - * }; - * - * var Manager = Base.inherits( Person, { - * world: function() { - * console.log( 'World' ); - * } - * }); - * - * // 因为没有指定构造器,父类的构造器将会执行。 - * var instance = new Manager(); // => Super - * - * // 继承子父类的方法 - * instance.hello(); // => hello - * instance.world(); // => World - * - * // 子类的__super__属性指向父类 - * console.log( Manager.__super__ === Person ); // => true - */ - inherits: function( Super, protos, staticProtos ) { - var child; - - if ( typeof protos === 'function' ) { - child = protos; - protos = null; - } else if ( protos && protos.hasOwnProperty('constructor') ) { - child = protos.constructor; - } else { - child = function() { - return Super.apply( this, arguments ); - }; - } - - // 复制静态方法 - $.extend( true, child, Super, staticProtos || {} ); - - /* jshint camelcase: false */ - - // 让子类的__super__属性指向父类。 - child.__super__ = Super.prototype; - - // 构建原型,添加原型方法或属性。 - // 暂时用Object.create实现。 - child.prototype = createObject( Super.prototype ); - protos && $.extend( true, child.prototype, protos ); - - return child; - }, - - /** - * 一个不做任何事情的方法。可以用来赋值给默认的callback. - * @method noop - */ - noop: noop, - - /** - * 返回一个新的方法,此方法将已指定的`context`来执行。 - * @grammar Base.bindFn( fn, context ) => Function - * @method bindFn - * @example - * var doSomething = function() { - * console.log( this.name ); - * }, - * obj = { - * name: 'Object Name' - * }, - * aliasFn = Base.bind( doSomething, obj ); - * - * aliasFn(); // => Object Name - * - */ - bindFn: bindFn, - - /** - * 引用Console.log如果存在的话,否则引用一个[空函数noop](#WebUploader:Base.noop)。 - * @grammar Base.log( args... ) => undefined - * @method log - */ - log: (function() { - if ( window.console ) { - return bindFn( console.log, console ); - } - return noop; - })(), - - nextTick: (function() { - - return function( cb ) { - setTimeout( cb, 1 ); - }; - - // @bug 当浏览器不在当前窗口时就停了。 - // var next = window.requestAnimationFrame || - // window.webkitRequestAnimationFrame || - // window.mozRequestAnimationFrame || - // function( cb ) { - // window.setTimeout( cb, 1000 / 60 ); - // }; - - // // fix: Uncaught TypeError: Illegal invocation - // return bindFn( next, window ); - })(), - - /** - * 被[uncurrythis](http://www.2ality.com/2011/11/uncurrying-this.html)的数组slice方法。 - * 将用来将非数组对象转化成数组对象。 - * @grammar Base.slice( target, start[, end] ) => Array - * @method slice - * @example - * function doSomthing() { - * var args = Base.slice( arguments, 1 ); - * console.log( args ); - * } - * - * doSomthing( 'ignored', 'arg2', 'arg3' ); // => Array ["arg2", "arg3"] - */ - slice: uncurryThis( [].slice ), - - /** - * 生成唯一的ID - * @method guid - * @grammar Base.guid() => String - * @grammar Base.guid( prefx ) => String - */ - guid: (function() { - var counter = 0; - - return function( prefix ) { - var guid = (+new Date()).toString( 32 ), - i = 0; - - for ( ; i < 5; i++ ) { - guid += Math.floor( Math.random() * 65535 ).toString( 32 ); - } - - return (prefix || 'wu_') + guid + (counter++).toString( 32 ); - }; - })(), - - /** - * 格式化文件大小, 输出成带单位的字符串 - * @method formatSize - * @grammar Base.formatSize( size ) => String - * @grammar Base.formatSize( size, pointLength ) => String - * @grammar Base.formatSize( size, pointLength, units ) => String - * @param {Number} size 文件大小 - * @param {Number} [pointLength=2] 精确到的小数点数。 - * @param {Array} [units=[ 'B', 'K', 'M', 'G', 'TB' ]] 单位数组。从字节,到千字节,一直往上指定。如果单位数组里面只指定了到了K(千字节),同时文件大小大于M, 此方法的输出将还是显示成多少K. - * @example - * console.log( Base.formatSize( 100 ) ); // => 100B - * console.log( Base.formatSize( 1024 ) ); // => 1.00K - * console.log( Base.formatSize( 1024, 0 ) ); // => 1K - * console.log( Base.formatSize( 1024 * 1024 ) ); // => 1.00M - * console.log( Base.formatSize( 1024 * 1024 * 1024 ) ); // => 1.00G - * console.log( Base.formatSize( 1024 * 1024 * 1024, 0, ['B', 'KB', 'MB'] ) ); // => 1024MB - */ - formatSize: function( size, pointLength, units ) { - var unit; - - units = units || [ 'B', 'K', 'M', 'G', 'TB' ]; - - while ( (unit = units.shift()) && size > 1024 ) { - size = size / 1024; - } - - return (unit === 'B' ? size : size.toFixed( pointLength || 2 )) + - unit; - } - }; - }); - /** - * 事件处理类,可以独立使用,也可以扩展给对象使用。 - * @fileOverview Mediator - */ - define('mediator',[ - 'base' - ], function( Base ) { - var $ = Base.$, - slice = [].slice, - separator = /\s+/, - protos; - - // 根据条件过滤出事件handlers. - function findHandlers( arr, name, callback, context ) { - return $.grep( arr, function( handler ) { - return handler && - (!name || handler.e === name) && - (!callback || handler.cb === callback || - handler.cb._cb === callback) && - (!context || handler.ctx === context); - }); - } - - function eachEvent( events, callback, iterator ) { - // 不支持对象,只支持多个event用空格隔开 - $.each( (events || '').split( separator ), function( _, key ) { - iterator( key, callback ); - }); - } - - function triggerHanders( events, args ) { - var stoped = false, - i = -1, - len = events.length, - handler; - - while ( ++i < len ) { - handler = events[ i ]; - - if ( handler.cb.apply( handler.ctx2, args ) === false ) { - stoped = true; - break; - } - } - - return !stoped; - } - - protos = { - - /** - * 绑定事件。 - * - * `callback`方法在执行时,arguments将会来源于trigger的时候携带的参数。如 - * ```javascript - * var obj = {}; - * - * // 使得obj有事件行为 - * Mediator.installTo( obj ); - * - * obj.on( 'testa', function( arg1, arg2 ) { - * console.log( arg1, arg2 ); // => 'arg1', 'arg2' - * }); - * - * obj.trigger( 'testa', 'arg1', 'arg2' ); - * ``` - * - * 如果`callback`中,某一个方法`return false`了,则后续的其他`callback`都不会被执行到。 - * 切会影响到`trigger`方法的返回值,为`false`。 - * - * `on`还可以用来添加一个特殊事件`all`, 这样所有的事件触发都会响应到。同时此类`callback`中的arguments有一个不同处, - * 就是第一个参数为`type`,记录当前是什么事件在触发。此类`callback`的优先级比脚低,会再正常`callback`执行完后触发。 - * ```javascript - * obj.on( 'all', function( type, arg1, arg2 ) { - * console.log( type, arg1, arg2 ); // => 'testa', 'arg1', 'arg2' - * }); - * ``` - * - * @method on - * @grammar on( name, callback[, context] ) => self - * @param {String} name 事件名,支持多个事件用空格隔开 - * @param {Function} callback 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - * @class Mediator - */ - on: function( name, callback, context ) { - var me = this, - set; - - if ( !callback ) { - return this; - } - - set = this._events || (this._events = []); - - eachEvent( name, callback, function( name, callback ) { - var handler = { e: name }; - - handler.cb = callback; - handler.ctx = context; - handler.ctx2 = context || me; - handler.id = set.length; - - set.push( handler ); - }); - - return this; - }, - - /** - * 绑定事件,且当handler执行完后,自动解除绑定。 - * @method once - * @grammar once( name, callback[, context] ) => self - * @param {String} name 事件名 - * @param {Function} callback 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - */ - once: function( name, callback, context ) { - var me = this; - - if ( !callback ) { - return me; - } - - eachEvent( name, callback, function( name, callback ) { - var once = function() { - me.off( name, once ); - return callback.apply( context || me, arguments ); - }; - - once._cb = callback; - me.on( name, once, context ); - }); - - return me; - }, - - /** - * 解除事件绑定 - * @method off - * @grammar off( [name[, callback[, context] ] ] ) => self - * @param {String} [name] 事件名 - * @param {Function} [callback] 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - */ - off: function( name, cb, ctx ) { - var events = this._events; - - if ( !events ) { - return this; - } - - if ( !name && !cb && !ctx ) { - this._events = []; - return this; - } - - eachEvent( name, cb, function( name, cb ) { - $.each( findHandlers( events, name, cb, ctx ), function() { - delete events[ this.id ]; - }); - }); - - return this; - }, - - /** - * 触发事件 - * @method trigger - * @grammar trigger( name[, args...] ) => self - * @param {String} type 事件名 - * @param {*} [...] 任意参数 - * @return {Boolean} 如果handler中return false了,则返回false, 否则返回true - */ - trigger: function( type ) { - var args, events, allEvents; - - if ( !this._events || !type ) { - return this; - } - - args = slice.call( arguments, 1 ); - events = findHandlers( this._events, type ); - allEvents = findHandlers( this._events, 'all' ); - - return triggerHanders( events, args ) && - triggerHanders( allEvents, arguments ); - } - }; - - /** - * 中介者,它本身是个单例,但可以通过[installTo](#WebUploader:Mediator:installTo)方法,使任何对象具备事件行为。 - * 主要目的是负责模块与模块之间的合作,降低耦合度。 - * - * @class Mediator - */ - return $.extend({ - - /** - * 可以通过这个接口,使任何对象具备事件功能。 - * @method installTo - * @param {Object} obj 需要具备事件行为的对象。 - * @return {Object} 返回obj. - */ - installTo: function( obj ) { - return $.extend( obj, protos ); - } - - }, protos ); - }); - /** - * @fileOverview Uploader上传类 - */ - define('uploader',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$; - - /** - * 上传入口类。 - * @class Uploader - * @constructor - * @grammar new Uploader( opts ) => Uploader - * @example - * var uploader = WebUploader.Uploader({ - * swf: 'path_of_swf/Uploader.swf', - * - * // 开起分片上传。 - * chunked: true - * }); - */ - function Uploader( opts ) { - this.options = $.extend( true, {}, Uploader.options, opts ); - this._init( this.options ); - } - - // default Options - // widgets中有相应扩展 - Uploader.options = {}; - Mediator.installTo( Uploader.prototype ); - - // 批量添加纯命令式方法。 - $.each({ - upload: 'start-upload', - stop: 'stop-upload', - getFile: 'get-file', - getFiles: 'get-files', - addFile: 'add-file', - addFiles: 'add-file', - sort: 'sort-files', - removeFile: 'remove-file', - cancelFile: 'cancel-file', - skipFile: 'skip-file', - retry: 'retry', - isInProgress: 'is-in-progress', - makeThumb: 'make-thumb', - md5File: 'md5-file', - getDimension: 'get-dimension', - addButton: 'add-btn', - predictRuntimeType: 'predict-runtime-type', - refresh: 'refresh', - disable: 'disable', - enable: 'enable', - reset: 'reset' - }, function( fn, command ) { - Uploader.prototype[ fn ] = function() { - return this.request( command, arguments ); - }; - }); - - $.extend( Uploader.prototype, { - state: 'pending', - - _init: function( opts ) { - var me = this; - - me.request( 'init', opts, function() { - me.state = 'ready'; - me.trigger('ready'); - }); - }, - - /** - * 获取或者设置Uploader配置项。 - * @method option - * @grammar option( key ) => * - * @grammar option( key, val ) => self - * @example - * - * // 初始状态图片上传前不会压缩 - * var uploader = new WebUploader.Uploader({ - * compress: null; - * }); - * - * // 修改后图片上传前,尝试将图片压缩到1600 * 1600 - * uploader.option( 'compress', { - * width: 1600, - * height: 1600 - * }); - */ - option: function( key, val ) { - var opts = this.options; - - // setter - if ( arguments.length > 1 ) { - - if ( $.isPlainObject( val ) && - $.isPlainObject( opts[ key ] ) ) { - $.extend( opts[ key ], val ); - } else { - opts[ key ] = val; - } - - } else { // getter - return key ? opts[ key ] : opts; - } - }, - - /** - * 获取文件统计信息。返回一个包含一下信息的对象。 - * * `successNum` 上传成功的文件数 - * * `progressNum` 上传中的文件数 - * * `cancelNum` 被删除的文件数 - * * `invalidNum` 无效的文件数 - * * `uploadFailNum` 上传失败的文件数 - * * `queueNum` 还在队列中的文件数 - * * `interruptNum` 被暂停的文件数 - * @method getStats - * @grammar getStats() => Object - */ - getStats: function() { - // return this._mgr.getStats.apply( this._mgr, arguments ); - var stats = this.request('get-stats'); - - return stats ? { - successNum: stats.numOfSuccess, - progressNum: stats.numOfProgress, - - // who care? - // queueFailNum: 0, - cancelNum: stats.numOfCancel, - invalidNum: stats.numOfInvalid, - uploadFailNum: stats.numOfUploadFailed, - queueNum: stats.numOfQueue, - interruptNum: stats.numofInterrupt - } : {}; - }, - - // 需要重写此方法来来支持opts.onEvent和instance.onEvent的处理器 - trigger: function( type/*, args...*/ ) { - var args = [].slice.call( arguments, 1 ), - opts = this.options, - name = 'on' + type.substring( 0, 1 ).toUpperCase() + - type.substring( 1 ); - - if ( - // 调用通过on方法注册的handler. - Mediator.trigger.apply( this, arguments ) === false || - - // 调用opts.onEvent - $.isFunction( opts[ name ] ) && - opts[ name ].apply( this, args ) === false || - - // 调用this.onEvent - $.isFunction( this[ name ] ) && - this[ name ].apply( this, args ) === false || - - // 广播所有uploader的事件。 - Mediator.trigger.apply( Mediator, - [ this, type ].concat( args ) ) === false ) { - - return false; - } - - return true; - }, - - /** - * 销毁 webuploader 实例 - * @method destroy - * @grammar destroy() => undefined - */ - destroy: function() { - this.request( 'destroy', arguments ); - this.off(); - }, - - // widgets/widget.js将补充此方法的详细文档。 - request: Base.noop - }); - - /** - * 创建Uploader实例,等同于new Uploader( opts ); - * @method create - * @class Base - * @static - * @grammar Base.create( opts ) => Uploader - */ - Base.create = Uploader.create = function( opts ) { - return new Uploader( opts ); - }; - - // 暴露Uploader,可以通过它来扩展业务逻辑。 - Base.Uploader = Uploader; - - return Uploader; - }); - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/runtime',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$, - factories = {}, - - // 获取对象的第一个key - getFirstKey = function( obj ) { - for ( var key in obj ) { - if ( obj.hasOwnProperty( key ) ) { - return key; - } - } - return null; - }; - - // 接口类。 - function Runtime( options ) { - this.options = $.extend({ - container: document.body - }, options ); - this.uid = Base.guid('rt_'); - } - - $.extend( Runtime.prototype, { - - getContainer: function() { - var opts = this.options, - parent, container; - - if ( this._container ) { - return this._container; - } - - parent = $( opts.container || document.body ); - container = $( document.createElement('div') ); - - container.attr( 'id', 'rt_' + this.uid ); - container.css({ - position: 'absolute', - top: '0px', - left: '0px', - width: '1px', - height: '1px', - overflow: 'hidden' - }); - - parent.append( container ); - parent.addClass('webuploader-container'); - this._container = container; - this._parent = parent; - return container; - }, - - init: Base.noop, - exec: Base.noop, - - destroy: function() { - this._container && this._container.remove(); - this._parent && this._parent.removeClass('webuploader-container'); - this.off(); - } - }); - - Runtime.orders = 'html5,flash'; - - - /** - * 添加Runtime实现。 - * @param {String} type 类型 - * @param {Runtime} factory 具体Runtime实现。 - */ - Runtime.addRuntime = function( type, factory ) { - factories[ type ] = factory; - }; - - Runtime.hasRuntime = function( type ) { - return !!(type ? factories[ type ] : getFirstKey( factories )); - }; - - Runtime.create = function( opts, orders ) { - var type, runtime; - - orders = orders || Runtime.orders; - $.each( orders.split( /\s*,\s*/g ), function() { - if ( factories[ this ] ) { - type = this; - return false; - } - }); - - type = type || getFirstKey( factories ); - - if ( !type ) { - throw new Error('Runtime Error'); - } - - runtime = new factories[ type ]( opts ); - return runtime; - }; - - Mediator.installTo( Runtime.prototype ); - return Runtime; - }); - - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/client',[ - 'base', - 'mediator', - 'runtime/runtime' - ], function( Base, Mediator, Runtime ) { - - var cache; - - cache = (function() { - var obj = {}; - - return { - add: function( runtime ) { - obj[ runtime.uid ] = runtime; - }, - - get: function( ruid, standalone ) { - var i; - - if ( ruid ) { - return obj[ ruid ]; - } - - for ( i in obj ) { - // 有些类型不能重用,比如filepicker. - if ( standalone && obj[ i ].__standalone ) { - continue; - } - - return obj[ i ]; - } - - return null; - }, - - remove: function( runtime ) { - delete obj[ runtime.uid ]; - } - }; - })(); - - function RuntimeClient( component, standalone ) { - var deferred = Base.Deferred(), - runtime; - - this.uid = Base.guid('client_'); - - // 允许runtime没有初始化之前,注册一些方法在初始化后执行。 - this.runtimeReady = function( cb ) { - return deferred.done( cb ); - }; - - this.connectRuntime = function( opts, cb ) { - - // already connected. - if ( runtime ) { - throw new Error('already connected!'); - } - - deferred.done( cb ); - - if ( typeof opts === 'string' && cache.get( opts ) ) { - runtime = cache.get( opts ); - } - - // 像filePicker只能独立存在,不能公用。 - runtime = runtime || cache.get( null, standalone ); - - // 需要创建 - if ( !runtime ) { - runtime = Runtime.create( opts, opts.runtimeOrder ); - runtime.__promise = deferred.promise(); - runtime.once( 'ready', deferred.resolve ); - runtime.init(); - cache.add( runtime ); - runtime.__client = 1; - } else { - // 来自cache - Base.$.extend( runtime.options, opts ); - runtime.__promise.then( deferred.resolve ); - runtime.__client++; - } - - standalone && (runtime.__standalone = standalone); - return runtime; - }; - - this.getRuntime = function() { - return runtime; - }; - - this.disconnectRuntime = function() { - if ( !runtime ) { - return; - } - - runtime.__client--; - - if ( runtime.__client <= 0 ) { - cache.remove( runtime ); - delete runtime.__promise; - runtime.destroy(); - } - - runtime = null; - }; - - this.exec = function() { - if ( !runtime ) { - return; - } - - var args = Base.slice( arguments ); - component && args.unshift( component ); - - return runtime.exec.apply( this, args ); - }; - - this.getRuid = function() { - return runtime && runtime.uid; - }; - - this.destroy = (function( destroy ) { - return function() { - destroy && destroy.apply( this, arguments ); - this.trigger('destroy'); - this.off(); - this.exec('destroy'); - this.disconnectRuntime(); - }; - })( this.destroy ); - } - - Mediator.installTo( RuntimeClient.prototype ); - return RuntimeClient; - }); - /** - * @fileOverview 错误信息 - */ - define('lib/dnd',[ - 'base', - 'mediator', - 'runtime/client' - ], function( Base, Mediator, RuntimeClent ) { - - var $ = Base.$; - - function DragAndDrop( opts ) { - opts = this.options = $.extend({}, DragAndDrop.options, opts ); - - opts.container = $( opts.container ); - - if ( !opts.container.length ) { - return; - } - - RuntimeClent.call( this, 'DragAndDrop' ); - } - - DragAndDrop.options = { - accept: null, - disableGlobalDnd: false - }; - - Base.inherits( RuntimeClent, { - constructor: DragAndDrop, - - init: function() { - var me = this; - - me.connectRuntime( me.options, function() { - me.exec('init'); - me.trigger('ready'); - }); - } - }); - - Mediator.installTo( DragAndDrop.prototype ); - - return DragAndDrop; - }); - /** - * @fileOverview 组件基类。 - */ - define('widgets/widget',[ - 'base', - 'uploader' - ], function( Base, Uploader ) { - - var $ = Base.$, - _init = Uploader.prototype._init, - _destroy = Uploader.prototype.destroy, - IGNORE = {}, - widgetClass = []; - - function isArrayLike( obj ) { - if ( !obj ) { - return false; - } - - var length = obj.length, - type = $.type( obj ); - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === 'array' || type !== 'function' && type !== 'string' && - (length === 0 || typeof length === 'number' && length > 0 && - (length - 1) in obj); - } - - function Widget( uploader ) { - this.owner = uploader; - this.options = uploader.options; - } - - $.extend( Widget.prototype, { - - init: Base.noop, - - // 类Backbone的事件监听声明,监听uploader实例上的事件 - // widget直接无法监听事件,事件只能通过uploader来传递 - invoke: function( apiName, args ) { - - /* - { - 'make-thumb': 'makeThumb' - } - */ - var map = this.responseMap; - - // 如果无API响应声明则忽略 - if ( !map || !(apiName in map) || !(map[ apiName ] in this) || - !$.isFunction( this[ map[ apiName ] ] ) ) { - - return IGNORE; - } - - return this[ map[ apiName ] ].apply( this, args ); - - }, - - /** - * 发送命令。当传入`callback`或者`handler`中返回`promise`时。返回一个当所有`handler`中的promise都完成后完成的新`promise`。 - * @method request - * @grammar request( command, args ) => * | Promise - * @grammar request( command, args, callback ) => Promise - * @for Uploader - */ - request: function() { - return this.owner.request.apply( this.owner, arguments ); - } - }); - - // 扩展Uploader. - $.extend( Uploader.prototype, { - - /** - * @property {String | Array} [disableWidgets=undefined] - * @namespace options - * @for Uploader - * @description 默认所有 Uploader.register 了的 widget 都会被加载,如果禁用某一部分,请通过此 option 指定黑名单。 - */ - - // 覆写_init用来初始化widgets - _init: function() { - var me = this, - widgets = me._widgets = [], - deactives = me.options.disableWidgets || ''; - - $.each( widgetClass, function( _, klass ) { - (!deactives || !~deactives.indexOf( klass._name )) && - widgets.push( new klass( me ) ); - }); - - return _init.apply( me, arguments ); - }, - - request: function( apiName, args, callback ) { - var i = 0, - widgets = this._widgets, - len = widgets && widgets.length, - rlts = [], - dfds = [], - widget, rlt, promise, key; - - args = isArrayLike( args ) ? args : [ args ]; - - for ( ; i < len; i++ ) { - widget = widgets[ i ]; - rlt = widget.invoke( apiName, args ); - - if ( rlt !== IGNORE ) { - - // Deferred对象 - if ( Base.isPromise( rlt ) ) { - dfds.push( rlt ); - } else { - rlts.push( rlt ); - } - } - } - - // 如果有callback,则用异步方式。 - if ( callback || dfds.length ) { - promise = Base.when.apply( Base, dfds ); - key = promise.pipe ? 'pipe' : 'then'; - - // 很重要不能删除。删除了会死循环。 - // 保证执行顺序。让callback总是在下一个 tick 中执行。 - return promise[ key ](function() { - var deferred = Base.Deferred(), - args = arguments; - - if ( args.length === 1 ) { - args = args[ 0 ]; - } - - setTimeout(function() { - deferred.resolve( args ); - }, 1 ); - - return deferred.promise(); - })[ callback ? key : 'done' ]( callback || Base.noop ); - } else { - return rlts[ 0 ]; - } - }, - - destroy: function() { - _destroy.apply( this, arguments ); - this._widgets = null; - } - }); - - /** - * 添加组件 - * @grammar Uploader.register(proto); - * @grammar Uploader.register(map, proto); - * @param {object} responseMap API 名称与函数实现的映射 - * @param {object} proto 组件原型,构造函数通过 constructor 属性定义 - * @method Uploader.register - * @for Uploader - * @example - * Uploader.register({ - * 'make-thumb': 'makeThumb' - * }, { - * init: function( options ) {}, - * makeThumb: function() {} - * }); - * - * Uploader.register({ - * 'make-thumb': function() { - * - * } - * }); - */ - Uploader.register = Widget.register = function( responseMap, widgetProto ) { - var map = { init: 'init', destroy: 'destroy', name: 'anonymous' }, - klass; - - if ( arguments.length === 1 ) { - widgetProto = responseMap; - - // 自动生成 map 表。 - $.each(widgetProto, function(key) { - if ( key[0] === '_' || key === 'name' ) { - key === 'name' && (map.name = widgetProto.name); - return; - } - - map[key.replace(/[A-Z]/g, '-$&').toLowerCase()] = key; - }); - - } else { - map = $.extend( map, responseMap ); - } - - widgetProto.responseMap = map; - klass = Base.inherits( Widget, widgetProto ); - klass._name = map.name; - widgetClass.push( klass ); - - return klass; - }; - - /** - * 删除插件,只有在注册时指定了名字的才能被删除。 - * @grammar Uploader.unRegister(name); - * @param {string} name 组件名字 - * @method Uploader.unRegister - * @for Uploader - * @example - * - * Uploader.register({ - * name: 'custom', - * - * 'make-thumb': function() { - * - * } - * }); - * - * Uploader.unRegister('custom'); - */ - Uploader.unRegister = Widget.unRegister = function( name ) { - if ( !name || name === 'anonymous' ) { - return; - } - - // 删除指定的插件。 - for ( var i = widgetClass.length; i--; ) { - if ( widgetClass[i]._name === name ) { - widgetClass.splice(i, 1) - } - } - }; - - return Widget; - }); - /** - * @fileOverview DragAndDrop Widget。 - */ - define('widgets/filednd',[ - 'base', - 'uploader', - 'lib/dnd', - 'widgets/widget' - ], function( Base, Uploader, Dnd ) { - var $ = Base.$; - - Uploader.options.dnd = ''; - - /** - * @property {Selector} [dnd=undefined] 指定Drag And Drop拖拽的容器,如果不指定,则不启动。 - * @namespace options - * @for Uploader - */ - - /** - * @property {Selector} [disableGlobalDnd=false] 是否禁掉整个页面的拖拽功能,如果不禁用,图片拖进来的时候会默认被浏览器打开。 - * @namespace options - * @for Uploader - */ - - /** - * @event dndAccept - * @param {DataTransferItemList} items DataTransferItem - * @description 阻止此事件可以拒绝某些类型的文件拖入进来。目前只有 chrome 提供这样的 API,且只能通过 mime-type 验证。 - * @for Uploader - */ - return Uploader.register({ - name: 'dnd', - - init: function( opts ) { - - if ( !opts.dnd || - this.request('predict-runtime-type') !== 'html5' ) { - return; - } - - var me = this, - deferred = Base.Deferred(), - options = $.extend({}, { - disableGlobalDnd: opts.disableGlobalDnd, - container: opts.dnd, - accept: opts.accept - }), - dnd; - - this.dnd = dnd = new Dnd( options ); - - dnd.once( 'ready', deferred.resolve ); - dnd.on( 'drop', function( files ) { - me.request( 'add-file', [ files ]); - }); - - // 检测文件是否全部允许添加。 - dnd.on( 'accept', function( items ) { - return me.owner.trigger( 'dndAccept', items ); - }); - - dnd.init(); - - return deferred.promise(); - }, - - destroy: function() { - this.dnd && this.dnd.destroy(); - } - }); - }); - - /** - * @fileOverview 错误信息 - */ - define('lib/filepaste',[ - 'base', - 'mediator', - 'runtime/client' - ], function( Base, Mediator, RuntimeClent ) { - - var $ = Base.$; - - function FilePaste( opts ) { - opts = this.options = $.extend({}, opts ); - opts.container = $( opts.container || document.body ); - RuntimeClent.call( this, 'FilePaste' ); - } - - Base.inherits( RuntimeClent, { - constructor: FilePaste, - - init: function() { - var me = this; - - me.connectRuntime( me.options, function() { - me.exec('init'); - me.trigger('ready'); - }); - } - }); - - Mediator.installTo( FilePaste.prototype ); - - return FilePaste; - }); - /** - * @fileOverview 组件基类。 - */ - define('widgets/filepaste',[ - 'base', - 'uploader', - 'lib/filepaste', - 'widgets/widget' - ], function( Base, Uploader, FilePaste ) { - var $ = Base.$; - - /** - * @property {Selector} [paste=undefined] 指定监听paste事件的容器,如果不指定,不启用此功能。此功能为通过粘贴来添加截屏的图片。建议设置为`document.body`. - * @namespace options - * @for Uploader - */ - return Uploader.register({ - name: 'paste', - - init: function( opts ) { - - if ( !opts.paste || - this.request('predict-runtime-type') !== 'html5' ) { - return; - } - - var me = this, - deferred = Base.Deferred(), - options = $.extend({}, { - container: opts.paste, - accept: opts.accept - }), - paste; - - this.paste = paste = new FilePaste( options ); - - paste.once( 'ready', deferred.resolve ); - paste.on( 'paste', function( files ) { - me.owner.request( 'add-file', [ files ]); - }); - paste.init(); - - return deferred.promise(); - }, - - destroy: function() { - this.paste && this.paste.destroy(); - } - }); - }); - /** - * @fileOverview Blob - */ - define('lib/blob',[ - 'base', - 'runtime/client' - ], function( Base, RuntimeClient ) { - - function Blob( ruid, source ) { - var me = this; - - me.source = source; - me.ruid = ruid; - this.size = source.size || 0; - - // 如果没有指定 mimetype, 但是知道文件后缀。 - if ( !source.type && this.ext && - ~'jpg,jpeg,png,gif,bmp'.indexOf( this.ext ) ) { - this.type = 'image/' + (this.ext === 'jpg' ? 'jpeg' : this.ext); - } else { - this.type = source.type || 'application/octet-stream'; - } - - RuntimeClient.call( me, 'Blob' ); - this.uid = source.uid || this.uid; - - if ( ruid ) { - me.connectRuntime( ruid ); - } - } - - Base.inherits( RuntimeClient, { - constructor: Blob, - - slice: function( start, end ) { - return this.exec( 'slice', start, end ); - }, - - getSource: function() { - return this.source; - } - }); - - return Blob; - }); - /** - * 为了统一化Flash的File和HTML5的File而存在。 - * 以至于要调用Flash里面的File,也可以像调用HTML5版本的File一下。 - * @fileOverview File - */ - define('lib/file',[ - 'base', - 'lib/blob' - ], function( Base, Blob ) { - - var uid = 1, - rExt = /\.([^.]+)$/; - - function File( ruid, file ) { - var ext; - - this.name = file.name || ('untitled' + uid++); - ext = rExt.exec( file.name ) ? RegExp.$1.toLowerCase() : ''; - - // todo 支持其他类型文件的转换。 - // 如果有 mimetype, 但是文件名里面没有找出后缀规律 - if ( !ext && file.type ) { - ext = /\/(jpg|jpeg|png|gif|bmp)$/i.exec( file.type ) ? - RegExp.$1.toLowerCase() : ''; - this.name += '.' + ext; - } - - this.ext = ext; - this.lastModifiedDate = file.lastModifiedDate || - (new Date()).toLocaleString(); - - Blob.apply( this, arguments ); - } - - return Base.inherits( Blob, File ); - }); - - /** - * @fileOverview 错误信息 - */ - define('lib/filepicker',[ - 'base', - 'runtime/client', - 'lib/file' - ], function( Base, RuntimeClent, File ) { - - var $ = Base.$; - - function FilePicker( opts ) { - opts = this.options = $.extend({}, FilePicker.options, opts ); - - opts.container = $( opts.id ); - - if ( !opts.container.length ) { - throw new Error('按钮指定错误'); - } - - opts.innerHTML = opts.innerHTML || opts.label || - opts.container.html() || ''; - - opts.button = $( opts.button || document.createElement('div') ); - opts.button.html( opts.innerHTML ); - opts.container.html( opts.button ); - - RuntimeClent.call( this, 'FilePicker', true ); - } - - FilePicker.options = { - button: null, - container: null, - label: null, - innerHTML: null, - multiple: true, - accept: null, - name: 'file' - }; - - Base.inherits( RuntimeClent, { - constructor: FilePicker, - - init: function() { - var me = this, - opts = me.options, - button = opts.button; - - button.addClass('webuploader-pick'); - - me.on( 'all', function( type ) { - var files; - - switch ( type ) { - case 'mouseenter': - button.addClass('webuploader-pick-hover'); - break; - - case 'mouseleave': - button.removeClass('webuploader-pick-hover'); - break; - - case 'change': - files = me.exec('getFiles'); - me.trigger( 'select', $.map( files, function( file ) { - file = new File( me.getRuid(), file ); - - // 记录来源。 - file._refer = opts.container; - return file; - }), opts.container ); - break; - } - }); - - me.connectRuntime( opts, function() { - me.refresh(); - me.exec( 'init', opts ); - me.trigger('ready'); - }); - - this._resizeHandler = Base.bindFn( this.refresh, this ); - $( window ).on( 'resize', this._resizeHandler ); - }, - - refresh: function() { - var shimContainer = this.getRuntime().getContainer(), - button = this.options.button, - width = button.outerWidth ? - button.outerWidth() : button.width(), - - height = button.outerHeight ? - button.outerHeight() : button.height(), - - pos = button.offset(); - - width && height && shimContainer.css({ - bottom: 'auto', - right: 'auto', - width: width + 'px', - height: height + 'px' - }).offset( pos ); - }, - - enable: function() { - var btn = this.options.button; - - btn.removeClass('webuploader-pick-disable'); - this.refresh(); - }, - - disable: function() { - var btn = this.options.button; - - this.getRuntime().getContainer().css({ - top: '-99999px' - }); - - btn.addClass('webuploader-pick-disable'); - }, - - destroy: function() { - var btn = this.options.button; - $( window ).off( 'resize', this._resizeHandler ); - btn.removeClass('webuploader-pick-disable webuploader-pick-hover ' + - 'webuploader-pick'); - } - }); - - return FilePicker; - }); - - /** - * @fileOverview 文件选择相关 - */ - define('widgets/filepicker',[ - 'base', - 'uploader', - 'lib/filepicker', - 'widgets/widget' - ], function( Base, Uploader, FilePicker ) { - var $ = Base.$; - - $.extend( Uploader.options, { - - /** - * @property {Selector | Object} [pick=undefined] - * @namespace options - * @for Uploader - * @description 指定选择文件的按钮容器,不指定则不创建按钮。 - * - * * `id` {Seletor|dom} 指定选择文件的按钮容器,不指定则不创建按钮。**注意** 这里虽然写的是 id, 但是不是只支持 id, 还支持 class, 或者 dom 节点。 - * * `label` {String} 请采用 `innerHTML` 代替 - * * `innerHTML` {String} 指定按钮文字。不指定时优先从指定的容器中看是否自带文字。 - * * `multiple` {Boolean} 是否开起同时选择多个文件能力。 - */ - pick: null, - - /** - * @property {Arroy} [accept=null] - * @namespace options - * @for Uploader - * @description 指定接受哪些类型的文件。 由于目前还有ext转mimeType表,所以这里需要分开指定。 - * - * * `title` {String} 文字描述 - * * `extensions` {String} 允许的文件后缀,不带点,多个用逗号分割。 - * * `mimeTypes` {String} 多个用逗号分割。 - * - * 如: - * - * ``` - * { - * title: 'Images', - * extensions: 'gif,jpg,jpeg,bmp,png', - * mimeTypes: 'image/*' - * } - * ``` - */ - accept: null/*{ - title: 'Images', - extensions: 'gif,jpg,jpeg,bmp,png', - mimeTypes: 'image/*' - }*/ - }); - - return Uploader.register({ - name: 'picker', - - init: function( opts ) { - this.pickers = []; - return opts.pick && this.addBtn( opts.pick ); - }, - - refresh: function() { - $.each( this.pickers, function() { - this.refresh(); - }); - }, - - /** - * @method addButton - * @for Uploader - * @grammar addButton( pick ) => Promise - * @description - * 添加文件选择按钮,如果一个按钮不够,需要调用此方法来添加。参数跟[options.pick](#WebUploader:Uploader:options)一致。 - * @example - * uploader.addButton({ - * id: '#btnContainer', - * innerHTML: '选择文件' - * }); - */ - addBtn: function( pick ) { - var me = this, - opts = me.options, - accept = opts.accept, - promises = []; - - if ( !pick ) { - return; - } - - $.isPlainObject( pick ) || (pick = { - id: pick - }); - - $( pick.id ).each(function() { - var options, picker, deferred; - - deferred = Base.Deferred(); - - options = $.extend({}, pick, { - accept: $.isPlainObject( accept ) ? [ accept ] : accept, - swf: opts.swf, - runtimeOrder: opts.runtimeOrder, - id: this - }); - - picker = new FilePicker( options ); - - picker.once( 'ready', deferred.resolve ); - picker.on( 'select', function( files ) { - me.owner.request( 'add-file', [ files ]); - }); - picker.init(); - - me.pickers.push( picker ); - - promises.push( deferred.promise() ); - }); - - return Base.when.apply( Base, promises ); - }, - - disable: function() { - $.each( this.pickers, function() { - this.disable(); - }); - }, - - enable: function() { - $.each( this.pickers, function() { - this.enable(); - }); - }, - - destroy: function() { - $.each( this.pickers, function() { - this.destroy(); - }); - this.pickers = null; - } - }); - }); - /** - * @fileOverview Image - */ - define('lib/image',[ - 'base', - 'runtime/client', - 'lib/blob' - ], function( Base, RuntimeClient, Blob ) { - var $ = Base.$; - - // 构造器。 - function Image( opts ) { - this.options = $.extend({}, Image.options, opts ); - RuntimeClient.call( this, 'Image' ); - - this.on( 'load', function() { - this._info = this.exec('info'); - this._meta = this.exec('meta'); - }); - } - - // 默认选项。 - Image.options = { - - // 默认的图片处理质量 - quality: 90, - - // 是否裁剪 - crop: false, - - // 是否保留头部信息 - preserveHeaders: false, - - // 是否允许放大。 - allowMagnify: false - }; - - // 继承RuntimeClient. - Base.inherits( RuntimeClient, { - constructor: Image, - - info: function( val ) { - - // setter - if ( val ) { - this._info = val; - return this; - } - - // getter - return this._info; - }, - - meta: function( val ) { - - // setter - if ( val ) { - this._meta = val; - return this; - } - - // getter - return this._meta; - }, - - loadFromBlob: function( blob ) { - var me = this, - ruid = blob.getRuid(); - - this.connectRuntime( ruid, function() { - me.exec( 'init', me.options ); - me.exec( 'loadFromBlob', blob ); - }); - }, - - resize: function() { - var args = Base.slice( arguments ); - return this.exec.apply( this, [ 'resize' ].concat( args ) ); - }, - - crop: function() { - var args = Base.slice( arguments ); - return this.exec.apply( this, [ 'crop' ].concat( args ) ); - }, - - getAsDataUrl: function( type ) { - return this.exec( 'getAsDataUrl', type ); - }, - - getAsBlob: function( type ) { - var blob = this.exec( 'getAsBlob', type ); - - return new Blob( this.getRuid(), blob ); - } - }); - - return Image; - }); - /** - * @fileOverview 图片操作, 负责预览图片和上传前压缩图片 - */ - define('widgets/image',[ - 'base', - 'uploader', - 'lib/image', - 'widgets/widget' - ], function( Base, Uploader, Image ) { - - var $ = Base.$, - throttle; - - // 根据要处理的文件大小来节流,一次不能处理太多,会卡。 - throttle = (function( max ) { - var occupied = 0, - waiting = [], - tick = function() { - var item; - - while ( waiting.length && occupied < max ) { - item = waiting.shift(); - occupied += item[ 0 ]; - item[ 1 ](); - } - }; - - return function( emiter, size, cb ) { - waiting.push([ size, cb ]); - emiter.once( 'destroy', function() { - occupied -= size; - setTimeout( tick, 1 ); - }); - setTimeout( tick, 1 ); - }; - })( 5 * 1024 * 1024 ); - - $.extend( Uploader.options, { - - /** - * @property {Object} [thumb] - * @namespace options - * @for Uploader - * @description 配置生成缩略图的选项。 - * - * 默认为: - * - * ```javascript - * { - * width: 110, - * height: 110, - * - * // 图片质量,只有type为`image/jpeg`的时候才有效。 - * quality: 70, - * - * // 是否允许放大,如果想要生成小图的时候不失真,此选项应该设置为false. - * allowMagnify: true, - * - * // 是否允许裁剪。 - * crop: true, - * - * // 为空的话则保留原有图片格式。 - * // 否则强制转换成指定的类型。 - * type: 'image/jpeg' - * } - * ``` - */ - thumb: { - width: 110, - height: 110, - quality: 70, - allowMagnify: true, - crop: true, - preserveHeaders: false, - - // 为空的话则保留原有图片格式。 - // 否则强制转换成指定的类型。 - // IE 8下面 base64 大小不能超过 32K 否则预览失败,而非 jpeg 编码的图片很可 - // 能会超过 32k, 所以这里设置成预览的时候都是 image/jpeg - type: 'image/jpeg' - }, - - /** - * @property {Object} [compress] - * @namespace options - * @for Uploader - * @description 配置压缩的图片的选项。如果此选项为`false`, 则图片在上传前不进行压缩。 - * - * 默认为: - * - * ```javascript - * { - * width: 1600, - * height: 1600, - * - * // 图片质量,只有type为`image/jpeg`的时候才有效。 - * quality: 90, - * - * // 是否允许放大,如果想要生成小图的时候不失真,此选项应该设置为false. - * allowMagnify: false, - * - * // 是否允许裁剪。 - * crop: false, - * - * // 是否保留头部meta信息。 - * preserveHeaders: true, - * - * // 如果发现压缩后文件大小比原来还大,则使用原来图片 - * // 此属性可能会影响图片自动纠正功能 - * noCompressIfLarger: false, - * - * // 单位字节,如果图片大小小于此值,不会采用压缩。 - * compressSize: 0 - * } - * ``` - */ - compress: { - width: 1600, - height: 1600, - quality: 90, - allowMagnify: false, - crop: false, - preserveHeaders: true - } - }); - - return Uploader.register({ - - name: 'image', - - - /** - * 生成缩略图,此过程为异步,所以需要传入`callback`。 - * 通常情况在图片加入队里后调用此方法来生成预览图以增强交互效果。 - * - * 当 width 或者 height 的值介于 0 - 1 时,被当成百分比使用。 - * - * `callback`中可以接收到两个参数。 - * * 第一个为error,如果生成缩略图有错误,此error将为真。 - * * 第二个为ret, 缩略图的Data URL值。 - * - * **注意** - * Date URL在IE6/7中不支持,所以不用调用此方法了,直接显示一张暂不支持预览图片好了。 - * 也可以借助服务端,将 base64 数据传给服务端,生成一个临时文件供预览。 - * - * @method makeThumb - * @grammar makeThumb( file, callback ) => undefined - * @grammar makeThumb( file, callback, width, height ) => undefined - * @for Uploader - * @example - * - * uploader.on( 'fileQueued', function( file ) { - * var $li = ...; - * - * uploader.makeThumb( file, function( error, ret ) { - * if ( error ) { - * $li.text('预览错误'); - * } else { - * $li.append(''); - * } - * }); - * - * }); - */ - makeThumb: function( file, cb, width, height ) { - var opts, image; - - file = this.request( 'get-file', file ); - - // 只预览图片格式。 - if ( !file.type.match( /^image/ ) ) { - cb( true ); - return; - } - - opts = $.extend({}, this.options.thumb ); - - // 如果传入的是object. - if ( $.isPlainObject( width ) ) { - opts = $.extend( opts, width ); - width = null; - } - - width = width || opts.width; - height = height || opts.height; - - image = new Image( opts ); - - image.once( 'load', function() { - file._info = file._info || image.info(); - file._meta = file._meta || image.meta(); - - // 如果 width 的值介于 0 - 1 - // 说明设置的是百分比。 - if ( width <= 1 && width > 0 ) { - width = file._info.width * width; - } - - // 同样的规则应用于 height - if ( height <= 1 && height > 0 ) { - height = file._info.height * height; - } - - image.resize( width, height ); - }); - - // 当 resize 完后 - image.once( 'complete', function() { - cb( false, image.getAsDataUrl( opts.type ) ); - image.destroy(); - }); - - image.once( 'error', function( reason ) { - cb( reason || true ); - image.destroy(); - }); - - throttle( image, file.source.size, function() { - file._info && image.info( file._info ); - file._meta && image.meta( file._meta ); - image.loadFromBlob( file.source ); - }); - }, - - beforeSendFile: function( file ) { - var opts = this.options.compress || this.options.resize, - compressSize = opts && opts.compressSize || 0, - noCompressIfLarger = opts && opts.noCompressIfLarger || false, - image, deferred; - - file = this.request( 'get-file', file ); - - // 只压缩 jpeg 图片格式。 - // gif 可能会丢失针 - // bmp png 基本上尺寸都不大,且压缩比比较小。 - if ( !opts || !~'image/jpeg,image/jpg'.indexOf( file.type ) || - file.size < compressSize || - file._compressed ) { - return; - } - - opts = $.extend({}, opts ); - deferred = Base.Deferred(); - - image = new Image( opts ); - - deferred.always(function() { - image.destroy(); - image = null; - }); - image.once( 'error', deferred.reject ); - image.once( 'load', function() { - var width = opts.width, - height = opts.height; - - file._info = file._info || image.info(); - file._meta = file._meta || image.meta(); - - // 如果 width 的值介于 0 - 1 - // 说明设置的是百分比。 - if ( width <= 1 && width > 0 ) { - width = file._info.width * width; - } - - // 同样的规则应用于 height - if ( height <= 1 && height > 0 ) { - height = file._info.height * height; - } - - image.resize( width, height ); - }); - - image.once( 'complete', function() { - var blob, size; - - // 移动端 UC / qq 浏览器的无图模式下 - // ctx.getImageData 处理大图的时候会报 Exception - // INDEX_SIZE_ERR: DOM Exception 1 - try { - blob = image.getAsBlob( opts.type ); - - size = file.size; - - // 如果压缩后,比原来还大则不用压缩后的。 - if ( !noCompressIfLarger || blob.size < size ) { - // file.source.destroy && file.source.destroy(); - file.source = blob; - file.size = blob.size; - - file.trigger( 'resize', blob.size, size ); - } - - // 标记,避免重复压缩。 - file._compressed = true; - deferred.resolve(); - } catch ( e ) { - // 出错了直接继续,让其上传原始图片 - deferred.resolve(); - } - }); - - file._info && image.info( file._info ); - file._meta && image.meta( file._meta ); - - image.loadFromBlob( file.source ); - return deferred.promise(); - } - }); - }); - /** - * @fileOverview 文件属性封装 - */ - define('file',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$, - idPrefix = 'WU_FILE_', - idSuffix = 0, - rExt = /\.([^.]+)$/, - statusMap = {}; - - function gid() { - return idPrefix + idSuffix++; - } - - /** - * 文件类 - * @class File - * @constructor 构造函数 - * @grammar new File( source ) => File - * @param {Lib.File} source [lib.File](#Lib.File)实例, 此source对象是带有Runtime信息的。 - */ - function WUFile( source ) { - - /** - * 文件名,包括扩展名(后缀) - * @property name - * @type {string} - */ - this.name = source.name || 'Untitled'; - - /** - * 文件体积(字节) - * @property size - * @type {uint} - * @default 0 - */ - this.size = source.size || 0; - - /** - * 文件MIMETYPE类型,与文件类型的对应关系请参考[http://t.cn/z8ZnFny](http://t.cn/z8ZnFny) - * @property type - * @type {string} - * @default 'application/octet-stream' - */ - this.type = source.type || 'application/octet-stream'; - - /** - * 文件最后修改日期 - * @property lastModifiedDate - * @type {int} - * @default 当前时间戳 - */ - this.lastModifiedDate = source.lastModifiedDate || (new Date() * 1); - - /** - * 文件ID,每个对象具有唯一ID,与文件名无关 - * @property id - * @type {string} - */ - this.id = gid(); - - /** - * 文件扩展名,通过文件名获取,例如test.png的扩展名为png - * @property ext - * @type {string} - */ - this.ext = rExt.exec( this.name ) ? RegExp.$1 : ''; - - - /** - * 状态文字说明。在不同的status语境下有不同的用途。 - * @property statusText - * @type {string} - */ - this.statusText = ''; - - // 存储文件状态,防止通过属性直接修改 - statusMap[ this.id ] = WUFile.Status.INITED; - - this.source = source; - this.loaded = 0; - - this.on( 'error', function( msg ) { - this.setStatus( WUFile.Status.ERROR, msg ); - }); - } - - $.extend( WUFile.prototype, { - - /** - * 设置状态,状态变化时会触发`change`事件。 - * @method setStatus - * @grammar setStatus( status[, statusText] ); - * @param {File.Status|String} status [文件状态值](#WebUploader:File:File.Status) - * @param {String} [statusText=''] 状态说明,常在error时使用,用http, abort,server等来标记是由于什么原因导致文件错误。 - */ - setStatus: function( status, text ) { - - var prevStatus = statusMap[ this.id ]; - - typeof text !== 'undefined' && (this.statusText = text); - - if ( status !== prevStatus ) { - statusMap[ this.id ] = status; - /** - * 文件状态变化 - * @event statuschange - */ - this.trigger( 'statuschange', status, prevStatus ); - } - - }, - - /** - * 获取文件状态 - * @return {File.Status} - * @example - 文件状态具体包括以下几种类型: - { - // 初始化 - INITED: 0, - // 已入队列 - QUEUED: 1, - // 正在上传 - PROGRESS: 2, - // 上传出错 - ERROR: 3, - // 上传成功 - COMPLETE: 4, - // 上传取消 - CANCELLED: 5 - } - */ - getStatus: function() { - return statusMap[ this.id ]; - }, - - /** - * 获取文件原始信息。 - * @return {*} - */ - getSource: function() { - return this.source; - }, - - destroy: function() { - this.off(); - delete statusMap[ this.id ]; - } - }); - - Mediator.installTo( WUFile.prototype ); - - /** - * 文件状态值,具体包括以下几种类型: - * * `inited` 初始状态 - * * `queued` 已经进入队列, 等待上传 - * * `progress` 上传中 - * * `complete` 上传完成。 - * * `error` 上传出错,可重试 - * * `interrupt` 上传中断,可续传。 - * * `invalid` 文件不合格,不能重试上传。会自动从队列中移除。 - * * `cancelled` 文件被移除。 - * @property {Object} Status - * @namespace File - * @class File - * @static - */ - WUFile.Status = { - INITED: 'inited', // 初始状态 - QUEUED: 'queued', // 已经进入队列, 等待上传 - PROGRESS: 'progress', // 上传中 - ERROR: 'error', // 上传出错,可重试 - COMPLETE: 'complete', // 上传完成。 - CANCELLED: 'cancelled', // 上传取消。 - INTERRUPT: 'interrupt', // 上传中断,可续传。 - INVALID: 'invalid' // 文件不合格,不能重试上传。 - }; - - return WUFile; - }); - - /** - * @fileOverview 文件队列 - */ - define('queue',[ - 'base', - 'mediator', - 'file' - ], function( Base, Mediator, WUFile ) { - - var $ = Base.$, - STATUS = WUFile.Status; - - /** - * 文件队列, 用来存储各个状态中的文件。 - * @class Queue - * @extends Mediator - */ - function Queue() { - - /** - * 统计文件数。 - * * `numOfQueue` 队列中的文件数。 - * * `numOfSuccess` 上传成功的文件数 - * * `numOfCancel` 被取消的文件数 - * * `numOfProgress` 正在上传中的文件数 - * * `numOfUploadFailed` 上传错误的文件数。 - * * `numOfInvalid` 无效的文件数。 - * * `numofDeleted` 被移除的文件数。 - * @property {Object} stats - */ - this.stats = { - numOfQueue: 0, - numOfSuccess: 0, - numOfCancel: 0, - numOfProgress: 0, - numOfUploadFailed: 0, - numOfInvalid: 0, - numofDeleted: 0, - numofInterrupt: 0 - }; - - // 上传队列,仅包括等待上传的文件 - this._queue = []; - - // 存储所有文件 - this._map = {}; - } - - $.extend( Queue.prototype, { - - /** - * 将新文件加入对队列尾部 - * - * @method append - * @param {File} file 文件对象 - */ - append: function( file ) { - this._queue.push( file ); - this._fileAdded( file ); - return this; - }, - - /** - * 将新文件加入对队列头部 - * - * @method prepend - * @param {File} file 文件对象 - */ - prepend: function( file ) { - this._queue.unshift( file ); - this._fileAdded( file ); - return this; - }, - - /** - * 获取文件对象 - * - * @method getFile - * @param {String} fileId 文件ID - * @return {File} - */ - getFile: function( fileId ) { - if ( typeof fileId !== 'string' ) { - return fileId; - } - return this._map[ fileId ]; - }, - - /** - * 从队列中取出一个指定状态的文件。 - * @grammar fetch( status ) => File - * @method fetch - * @param {String} status [文件状态值](#WebUploader:File:File.Status) - * @return {File} [File](#WebUploader:File) - */ - fetch: function( status ) { - var len = this._queue.length, - i, file; - - status = status || STATUS.QUEUED; - - for ( i = 0; i < len; i++ ) { - file = this._queue[ i ]; - - if ( status === file.getStatus() ) { - return file; - } - } - - return null; - }, - - /** - * 对队列进行排序,能够控制文件上传顺序。 - * @grammar sort( fn ) => undefined - * @method sort - * @param {Function} fn 排序方法 - */ - sort: function( fn ) { - if ( typeof fn === 'function' ) { - this._queue.sort( fn ); - } - }, - - /** - * 获取指定类型的文件列表, 列表中每一个成员为[File](#WebUploader:File)对象。 - * @grammar getFiles( [status1[, status2 ...]] ) => Array - * @method getFiles - * @param {String} [status] [文件状态值](#WebUploader:File:File.Status) - */ - getFiles: function() { - var sts = [].slice.call( arguments, 0 ), - ret = [], - i = 0, - len = this._queue.length, - file; - - for ( ; i < len; i++ ) { - file = this._queue[ i ]; - - if ( sts.length && !~$.inArray( file.getStatus(), sts ) ) { - continue; - } - - ret.push( file ); - } - - return ret; - }, - - /** - * 在队列中删除文件。 - * @grammar removeFile( file ) => Array - * @method removeFile - * @param {File} 文件对象。 - */ - removeFile: function( file ) { - var me = this, - existing = this._map[ file.id ]; - - if ( existing ) { - delete this._map[ file.id ]; - file.destroy(); - this.stats.numofDeleted++; - } - }, - - _fileAdded: function( file ) { - var me = this, - existing = this._map[ file.id ]; - - if ( !existing ) { - this._map[ file.id ] = file; - - file.on( 'statuschange', function( cur, pre ) { - me._onFileStatusChange( cur, pre ); - }); - } - }, - - _onFileStatusChange: function( curStatus, preStatus ) { - var stats = this.stats; - - switch ( preStatus ) { - case STATUS.PROGRESS: - stats.numOfProgress--; - break; - - case STATUS.QUEUED: - stats.numOfQueue --; - break; - - case STATUS.ERROR: - stats.numOfUploadFailed--; - break; - - case STATUS.INVALID: - stats.numOfInvalid--; - break; - - case STATUS.INTERRUPT: - stats.numofInterrupt--; - break; - } - - switch ( curStatus ) { - case STATUS.QUEUED: - stats.numOfQueue++; - break; - - case STATUS.PROGRESS: - stats.numOfProgress++; - break; - - case STATUS.ERROR: - stats.numOfUploadFailed++; - break; - - case STATUS.COMPLETE: - stats.numOfSuccess++; - break; - - case STATUS.CANCELLED: - stats.numOfCancel++; - break; - - - case STATUS.INVALID: - stats.numOfInvalid++; - break; - - case STATUS.INTERRUPT: - stats.numofInterrupt++; - break; - } - } - - }); - - Mediator.installTo( Queue.prototype ); - - return Queue; - }); - /** - * @fileOverview 队列 - */ - define('widgets/queue',[ - 'base', - 'uploader', - 'queue', - 'file', - 'lib/file', - 'runtime/client', - 'widgets/widget' - ], function( Base, Uploader, Queue, WUFile, File, RuntimeClient ) { - - var $ = Base.$, - rExt = /\.\w+$/, - Status = WUFile.Status; - - return Uploader.register({ - name: 'queue', - - init: function( opts ) { - var me = this, - deferred, len, i, item, arr, accept, runtime; - - if ( $.isPlainObject( opts.accept ) ) { - opts.accept = [ opts.accept ]; - } - - // accept中的中生成匹配正则。 - if ( opts.accept ) { - arr = []; - - for ( i = 0, len = opts.accept.length; i < len; i++ ) { - item = opts.accept[ i ].extensions; - item && arr.push( item ); - } - - if ( arr.length ) { - accept = '\\.' + arr.join(',') - .replace( /,/g, '$|\\.' ) - .replace( /\*/g, '.*' ) + '$'; - } - - me.accept = new RegExp( accept, 'i' ); - } - - me.queue = new Queue(); - me.stats = me.queue.stats; - - // 如果当前不是html5运行时,那就算了。 - // 不执行后续操作 - if ( this.request('predict-runtime-type') !== 'html5' ) { - return; - } - - // 创建一个 html5 运行时的 placeholder - // 以至于外部添加原生 File 对象的时候能正确包裹一下供 webuploader 使用。 - deferred = Base.Deferred(); - this.placeholder = runtime = new RuntimeClient('Placeholder'); - runtime.connectRuntime({ - runtimeOrder: 'html5' - }, function() { - me._ruid = runtime.getRuid(); - deferred.resolve(); - }); - return deferred.promise(); - }, - - - // 为了支持外部直接添加一个原生File对象。 - _wrapFile: function( file ) { - if ( !(file instanceof WUFile) ) { - - if ( !(file instanceof File) ) { - if ( !this._ruid ) { - throw new Error('Can\'t add external files.'); - } - file = new File( this._ruid, file ); - } - - file = new WUFile( file ); - } - - return file; - }, - - // 判断文件是否可以被加入队列 - acceptFile: function( file ) { - var invalid = !file || !file.size || this.accept && - - // 如果名字中有后缀,才做后缀白名单处理。 - rExt.exec( file.name ) && !this.accept.test( file.name ); - - return !invalid; - }, - - - /** - * @event beforeFileQueued - * @param {File} file File对象 - * @description 当文件被加入队列之前触发,此事件的handler返回值为`false`,则此文件不会被添加进入队列。 - * @for Uploader - */ - - /** - * @event fileQueued - * @param {File} file File对象 - * @description 当文件被加入队列以后触发。 - * @for Uploader - */ - - _addFile: function( file ) { - var me = this; - - file = me._wrapFile( file ); - - // 不过类型判断允许不允许,先派送 `beforeFileQueued` - if ( !me.owner.trigger( 'beforeFileQueued', file ) ) { - return; - } - - // 类型不匹配,则派送错误事件,并返回。 - if ( !me.acceptFile( file ) ) { - me.owner.trigger( 'error', 'Q_TYPE_DENIED', file ); - return; - } - - me.queue.append( file ); - me.owner.trigger( 'fileQueued', file ); - return file; - }, - - getFile: function( fileId ) { - return this.queue.getFile( fileId ); - }, - - /** - * @event filesQueued - * @param {File} files 数组,内容为原始File(lib/File)对象。 - * @description 当一批文件添加进队列以后触发。 - * @for Uploader - */ - - /** - * @property {Boolean} [auto=false] - * @namespace options - * @for Uploader - * @description 设置为 true 后,不需要手动调用上传,有文件选择即开始上传。 - * - */ - - /** - * @method addFiles - * @grammar addFiles( file ) => undefined - * @grammar addFiles( [file1, file2 ...] ) => undefined - * @param {Array of File or File} [files] Files 对象 数组 - * @description 添加文件到队列 - * @for Uploader - */ - addFile: function( files ) { - var me = this; - - if ( !files.length ) { - files = [ files ]; - } - - files = $.map( files, function( file ) { - return me._addFile( file ); - }); - - me.owner.trigger( 'filesQueued', files ); - - if ( me.options.auto ) { - setTimeout(function() { - me.request('start-upload'); - }, 20 ); - } - }, - - getStats: function() { - return this.stats; - }, - - /** - * @event fileDequeued - * @param {File} file File对象 - * @description 当文件被移除队列后触发。 - * @for Uploader - */ - - /** - * @method removeFile - * @grammar removeFile( file ) => undefined - * @grammar removeFile( id ) => undefined - * @grammar removeFile( file, true ) => undefined - * @grammar removeFile( id, true ) => undefined - * @param {File|id} file File对象或这File对象的id - * @description 移除某一文件, 默认只会标记文件状态为已取消,如果第二个参数为 `true` 则会从 queue 中移除。 - * @for Uploader - * @example - * - * $li.on('click', '.remove-this', function() { - * uploader.removeFile( file ); - * }) - */ - removeFile: function( file, remove ) { - var me = this; - - file = file.id ? file : me.queue.getFile( file ); - - this.request( 'cancel-file', file ); - - if ( remove ) { - this.queue.removeFile( file ); - } - }, - - /** - * @method getFiles - * @grammar getFiles() => Array - * @grammar getFiles( status1, status2, status... ) => Array - * @description 返回指定状态的文件集合,不传参数将返回所有状态的文件。 - * @for Uploader - * @example - * console.log( uploader.getFiles() ); // => all files - * console.log( uploader.getFiles('error') ) // => all error files. - */ - getFiles: function() { - return this.queue.getFiles.apply( this.queue, arguments ); - }, - - fetchFile: function() { - return this.queue.fetch.apply( this.queue, arguments ); - }, - - /** - * @method retry - * @grammar retry() => undefined - * @grammar retry( file ) => undefined - * @description 重试上传,重试指定文件,或者从出错的文件开始重新上传。 - * @for Uploader - * @example - * function retry() { - * uploader.retry(); - * } - */ - retry: function( file, noForceStart ) { - var me = this, - files, i, len; - - if ( file ) { - file = file.id ? file : me.queue.getFile( file ); - file.setStatus( Status.QUEUED ); - noForceStart || me.request('start-upload'); - return; - } - - files = me.queue.getFiles( Status.ERROR ); - i = 0; - len = files.length; - - for ( ; i < len; i++ ) { - file = files[ i ]; - file.setStatus( Status.QUEUED ); - } - - me.request('start-upload'); - }, - - /** - * @method sort - * @grammar sort( fn ) => undefined - * @description 排序队列中的文件,在上传之前调整可以控制上传顺序。 - * @for Uploader - */ - sortFiles: function() { - return this.queue.sort.apply( this.queue, arguments ); - }, - - /** - * @event reset - * @description 当 uploader 被重置的时候触发。 - * @for Uploader - */ - - /** - * @method reset - * @grammar reset() => undefined - * @description 重置uploader。目前只重置了队列。 - * @for Uploader - * @example - * uploader.reset(); - */ - reset: function() { - this.owner.trigger('reset'); - this.queue = new Queue(); - this.stats = this.queue.stats; - }, - - destroy: function() { - this.reset(); - this.placeholder && this.placeholder.destroy(); - } - }); - - }); - /** - * @fileOverview 添加获取Runtime相关信息的方法。 - */ - define('widgets/runtime',[ - 'uploader', - 'runtime/runtime', - 'widgets/widget' - ], function( Uploader, Runtime ) { - - Uploader.support = function() { - return Runtime.hasRuntime.apply( Runtime, arguments ); - }; - - /** - * @property {Object} [runtimeOrder=html5,flash] - * @namespace options - * @for Uploader - * @description 指定运行时启动顺序。默认会想尝试 html5 是否支持,如果支持则使用 html5, 否则则使用 flash. - * - * 可以将此值设置成 `flash`,来强制使用 flash 运行时。 - */ - - return Uploader.register({ - name: 'runtime', - - init: function() { - if ( !this.predictRuntimeType() ) { - throw Error('Runtime Error'); - } - }, - - /** - * 预测Uploader将采用哪个`Runtime` - * @grammar predictRuntimeType() => String - * @method predictRuntimeType - * @for Uploader - */ - predictRuntimeType: function() { - var orders = this.options.runtimeOrder || Runtime.orders, - type = this.type, - i, len; - - if ( !type ) { - orders = orders.split( /\s*,\s*/g ); - - for ( i = 0, len = orders.length; i < len; i++ ) { - if ( Runtime.hasRuntime( orders[ i ] ) ) { - this.type = type = orders[ i ]; - break; - } - } - } - - return type; - } - }); - }); - /** - * @fileOverview Transport - */ - define('lib/transport',[ - 'base', - 'runtime/client', - 'mediator' - ], function( Base, RuntimeClient, Mediator ) { - - var $ = Base.$; - - function Transport( opts ) { - var me = this; - - opts = me.options = $.extend( true, {}, Transport.options, opts || {} ); - RuntimeClient.call( this, 'Transport' ); - - this._blob = null; - this._formData = opts.formData || {}; - this._headers = opts.headers || {}; - - this.on( 'progress', this._timeout ); - this.on( 'load error', function() { - me.trigger( 'progress', 1 ); - clearTimeout( me._timer ); - }); - } - - Transport.options = { - server: '', - method: 'POST', - - // 跨域时,是否允许携带cookie, 只有html5 runtime才有效 - withCredentials: false, - fileVal: 'file', - timeout: 2 * 60 * 1000, // 2分钟 - formData: {}, - headers: {}, - sendAsBinary: false - }; - - $.extend( Transport.prototype, { - - // 添加Blob, 只能添加一次,最后一次有效。 - appendBlob: function( key, blob, filename ) { - var me = this, - opts = me.options; - - if ( me.getRuid() ) { - me.disconnectRuntime(); - } - - // 连接到blob归属的同一个runtime. - me.connectRuntime( blob.ruid, function() { - me.exec('init'); - }); - - me._blob = blob; - opts.fileVal = key || opts.fileVal; - opts.filename = filename || opts.filename; - }, - - // 添加其他字段 - append: function( key, value ) { - if ( typeof key === 'object' ) { - $.extend( this._formData, key ); - } else { - this._formData[ key ] = value; - } - }, - - setRequestHeader: function( key, value ) { - if ( typeof key === 'object' ) { - $.extend( this._headers, key ); - } else { - this._headers[ key ] = value; - } - }, - - send: function( method ) { - this.exec( 'send', method ); - this._timeout(); - }, - - abort: function() { - clearTimeout( this._timer ); - return this.exec('abort'); - }, - - destroy: function() { - this.trigger('destroy'); - this.off(); - this.exec('destroy'); - this.disconnectRuntime(); - }, - - getResponse: function() { - return this.exec('getResponse'); - }, - - getResponseAsJson: function() { - return this.exec('getResponseAsJson'); - }, - - getStatus: function() { - return this.exec('getStatus'); - }, - - _timeout: function() { - var me = this, - duration = me.options.timeout; - - if ( !duration ) { - return; - } - - clearTimeout( me._timer ); - me._timer = setTimeout(function() { - me.abort(); - me.trigger( 'error', 'timeout' ); - }, duration ); - } - - }); - - // 让Transport具备事件功能。 - Mediator.installTo( Transport.prototype ); - - return Transport; - }); - /** - * @fileOverview 负责文件上传相关。 - */ - define('widgets/upload',[ - 'base', - 'uploader', - 'file', - 'lib/transport', - 'widgets/widget' - ], function( Base, Uploader, WUFile, Transport ) { - - var $ = Base.$, - isPromise = Base.isPromise, - Status = WUFile.Status; - - // 添加默认配置项 - $.extend( Uploader.options, { - - - /** - * @property {Boolean} [prepareNextFile=false] - * @namespace options - * @for Uploader - * @description 是否允许在文件传输时提前把下一个文件准备好。 - * 对于一个文件的准备工作比较耗时,比如图片压缩,md5序列化。 - * 如果能提前在当前文件传输期处理,可以节省总体耗时。 - */ - prepareNextFile: false, - - /** - * @property {Boolean} [chunked=false] - * @namespace options - * @for Uploader - * @description 是否要分片处理大文件上传。 - */ - chunked: false, - - /** - * @property {Boolean} [chunkSize=5242880] - * @namespace options - * @for Uploader - * @description 如果要分片,分多大一片? 默认大小为5M. - */ - chunkSize: 5 * 1024 * 1024, - - /** - * @property {Boolean} [chunkRetry=2] - * @namespace options - * @for Uploader - * @description 如果某个分片由于网络问题出错,允许自动重传多少次? - */ - chunkRetry: 2, - - /** - * @property {Boolean} [threads=3] - * @namespace options - * @for Uploader - * @description 上传并发数。允许同时最大上传进程数。 - */ - threads: 3, - - - /** - * @property {Object} [formData={}] - * @namespace options - * @for Uploader - * @description 文件上传请求的参数表,每次发送都会发送此对象中的参数。 - */ - formData: {} - - /** - * @property {Object} [fileVal='file'] - * @namespace options - * @for Uploader - * @description 设置文件上传域的name。 - */ - - /** - * @property {Object} [method='POST'] - * @namespace options - * @for Uploader - * @description 文件上传方式,`POST`或者`GET`。 - */ - - /** - * @property {Object} [sendAsBinary=false] - * @namespace options - * @for Uploader - * @description 是否已二进制的流的方式发送文件,这样整个上传内容`php://input`都为文件内容, - * 其他参数在$_GET数组中。 - */ - }); - - // 负责将文件切片。 - function CuteFile( file, chunkSize ) { - var pending = [], - blob = file.source, - total = blob.size, - chunks = chunkSize ? Math.ceil( total / chunkSize ) : 1, - start = 0, - index = 0, - len, api; - - api = { - file: file, - - has: function() { - return !!pending.length; - }, - - shift: function() { - return pending.shift(); - }, - - unshift: function( block ) { - pending.unshift( block ); - } - }; - - while ( index < chunks ) { - len = Math.min( chunkSize, total - start ); - - pending.push({ - file: file, - start: start, - end: chunkSize ? (start + len) : total, - total: total, - chunks: chunks, - chunk: index++, - cuted: api - }); - start += len; - } - - file.blocks = pending.concat(); - file.remaning = pending.length; - - return api; - } - - Uploader.register({ - name: 'upload', - - init: function() { - var owner = this.owner, - me = this; - - this.runing = false; - this.progress = false; - - owner - .on( 'startUpload', function() { - me.progress = true; - }) - .on( 'uploadFinished', function() { - me.progress = false; - }); - - // 记录当前正在传的数据,跟threads相关 - this.pool = []; - - // 缓存分好片的文件。 - this.stack = []; - - // 缓存即将上传的文件。 - this.pending = []; - - // 跟踪还有多少分片在上传中但是没有完成上传。 - this.remaning = 0; - this.__tick = Base.bindFn( this._tick, this ); - - owner.on( 'uploadComplete', function( file ) { - - // 把其他块取消了。 - file.blocks && $.each( file.blocks, function( _, v ) { - v.transport && (v.transport.abort(), v.transport.destroy()); - delete v.transport; - }); - - delete file.blocks; - delete file.remaning; - }); - }, - - reset: function() { - this.request( 'stop-upload', true ); - this.runing = false; - this.pool = []; - this.stack = []; - this.pending = []; - this.remaning = 0; - this._trigged = false; - this._promise = null; - }, - - /** - * @event startUpload - * @description 当开始上传流程时触发。 - * @for Uploader - */ - - /** - * 开始上传。此方法可以从初始状态调用开始上传流程,也可以从暂停状态调用,继续上传流程。 - * - * 可以指定开始某一个文件。 - * @grammar upload() => undefined - * @grammar upload( file | fileId) => undefined - * @method upload - * @for Uploader - */ - startUpload: function(file) { - var me = this; - - // 移出invalid的文件 - $.each( me.request( 'get-files', Status.INVALID ), function() { - me.request( 'remove-file', this ); - }); - - // 如果指定了开始某个文件,则只开始指定文件。 - if ( file ) { - file = file.id ? file : me.request( 'get-file', file ); - - if (file.getStatus() === Status.INTERRUPT) { - $.each( me.pool, function( _, v ) { - - // 之前暂停过。 - if (v.file !== file) { - return; - } - - v.transport && v.transport.send(); - }); - - file.setStatus( Status.QUEUED ); - } else if (file.getStatus() === Status.PROGRESS) { - return; - } else { - file.setStatus( Status.QUEUED ); - } - } else { - $.each( me.request( 'get-files', [ Status.INITED ] ), function() { - this.setStatus( Status.QUEUED ); - }); - } - - if ( me.runing ) { - return; - } - - me.runing = true; - - var files = []; - - // 如果有暂停的,则续传 - $.each( me.pool, function( _, v ) { - var file = v.file; - - if ( file.getStatus() === Status.INTERRUPT ) { - files.push(file); - me._trigged = false; - v.transport && v.transport.send(); - } - }); - - var file; - while ( (file = files.shift()) ) { - file.setStatus( Status.PROGRESS ); - } - - file || $.each( me.request( 'get-files', - Status.INTERRUPT ), function() { - this.setStatus( Status.PROGRESS ); - }); - - me._trigged = false; - Base.nextTick( me.__tick ); - me.owner.trigger('startUpload'); - }, - - /** - * @event stopUpload - * @description 当开始上传流程暂停时触发。 - * @for Uploader - */ - - /** - * 暂停上传。第一个参数为是否中断上传当前正在上传的文件。 - * - * 如果第一个参数是文件,则只暂停指定文件。 - * @grammar stop() => undefined - * @grammar stop( true ) => undefined - * @grammar stop( file ) => undefined - * @method stop - * @for Uploader - */ - stopUpload: function( file, interrupt ) { - var me = this; - - if (file === true) { - interrupt = file; - file = null; - } - - if ( me.runing === false ) { - return; - } - - // 如果只是暂停某个文件。 - if ( file ) { - file = file.id ? file : me.request( 'get-file', file ); - - if ( file.getStatus() !== Status.PROGRESS && - file.getStatus() !== Status.QUEUED ) { - return; - } - - file.setStatus( Status.INTERRUPT ); - $.each( me.pool, function( _, v ) { - - // 只 abort 指定的文件。 - if (v.file !== file) { - return; - } - - v.transport && v.transport.abort(); - me._putback(v); - me._popBlock(v); - }); - - return Base.nextTick( me.__tick ); - } - - me.runing = false; - - if (this._promise && this._promise.file) { - this._promise.file.setStatus( Status.INTERRUPT ); - } - - interrupt && $.each( me.pool, function( _, v ) { - v.transport && v.transport.abort(); - v.file.setStatus( Status.INTERRUPT ); - }); - - me.owner.trigger('stopUpload'); - }, - - /** - * @method cancelFile - * @grammar cancelFile( file ) => undefined - * @grammar cancelFile( id ) => undefined - * @param {File|id} file File对象或这File对象的id - * @description 标记文件状态为已取消, 同时将中断文件传输。 - * @for Uploader - * @example - * - * $li.on('click', '.remove-this', function() { - * uploader.cancelFile( file ); - * }) - */ - cancelFile: function( file ) { - file = file.id ? file : this.request( 'get-file', file ); - - // 如果正在上传。 - file.blocks && $.each( file.blocks, function( _, v ) { - var _tr = v.transport; - - if ( _tr ) { - _tr.abort(); - _tr.destroy(); - delete v.transport; - } - }); - - file.setStatus( Status.CANCELLED ); - this.owner.trigger( 'fileDequeued', file ); - }, - - /** - * 判断`Uplaode`r是否正在上传中。 - * @grammar isInProgress() => Boolean - * @method isInProgress - * @for Uploader - */ - isInProgress: function() { - return !!this.progress; - }, - - _getStats: function() { - return this.request('get-stats'); - }, - - /** - * 掉过一个文件上传,直接标记指定文件为已上传状态。 - * @grammar skipFile( file ) => undefined - * @method skipFile - * @for Uploader - */ - skipFile: function( file, status ) { - file = file.id ? file : this.request( 'get-file', file ); - - file.setStatus( status || Status.COMPLETE ); - file.skipped = true; - - // 如果正在上传。 - file.blocks && $.each( file.blocks, function( _, v ) { - var _tr = v.transport; - - if ( _tr ) { - _tr.abort(); - _tr.destroy(); - delete v.transport; - } - }); - - this.owner.trigger( 'uploadSkip', file ); - }, - - /** - * @event uploadFinished - * @description 当所有文件上传结束时触发。 - * @for Uploader - */ - _tick: function() { - var me = this, - opts = me.options, - fn, val; - - // 上一个promise还没有结束,则等待完成后再执行。 - if ( me._promise ) { - return me._promise.always( me.__tick ); - } - - // 还有位置,且还有文件要处理的话。 - if ( me.pool.length < opts.threads && (val = me._nextBlock()) ) { - me._trigged = false; - - fn = function( val ) { - me._promise = null; - - // 有可能是reject过来的,所以要检测val的类型。 - val && val.file && me._startSend( val ); - Base.nextTick( me.__tick ); - }; - - me._promise = isPromise( val ) ? val.always( fn ) : fn( val ); - - // 没有要上传的了,且没有正在传输的了。 - } else if ( !me.remaning && !me._getStats().numOfQueue && - !me._getStats().numofInterrupt ) { - me.runing = false; - - me._trigged || Base.nextTick(function() { - me.owner.trigger('uploadFinished'); - }); - me._trigged = true; - } - }, - - _putback: function(block) { - var idx; - - block.cuted.unshift(block); - idx = this.stack.indexOf(block.cuted); - - if (!~idx) { - this.stack.unshift(block.cuted); - } - }, - - _getStack: function() { - var i = 0, - act; - - while ( (act = this.stack[ i++ ]) ) { - if ( act.has() && act.file.getStatus() === Status.PROGRESS ) { - return act; - } else if (!act.has() || - act.file.getStatus() !== Status.PROGRESS && - act.file.getStatus() !== Status.INTERRUPT ) { - - // 把已经处理完了的,或者,状态为非 progress(上传中)、 - // interupt(暂停中) 的移除。 - this.stack.splice( --i, 1 ); - } - } - - return null; - }, - - _nextBlock: function() { - var me = this, - opts = me.options, - act, next, done, preparing; - - // 如果当前文件还有没有需要传输的,则直接返回剩下的。 - if ( (act = this._getStack()) ) { - - // 是否提前准备下一个文件 - if ( opts.prepareNextFile && !me.pending.length ) { - me._prepareNextFile(); - } - - return act.shift(); - - // 否则,如果正在运行,则准备下一个文件,并等待完成后返回下个分片。 - } else if ( me.runing ) { - - // 如果缓存中有,则直接在缓存中取,没有则去queue中取。 - if ( !me.pending.length && me._getStats().numOfQueue ) { - me._prepareNextFile(); - } - - next = me.pending.shift(); - done = function( file ) { - if ( !file ) { - return null; - } - - act = CuteFile( file, opts.chunked ? opts.chunkSize : 0 ); - me.stack.push(act); - return act.shift(); - }; - - // 文件可能还在prepare中,也有可能已经完全准备好了。 - if ( isPromise( next) ) { - preparing = next.file; - next = next[ next.pipe ? 'pipe' : 'then' ]( done ); - next.file = preparing; - return next; - } - - return done( next ); - } - }, - - - /** - * @event uploadStart - * @param {File} file File对象 - * @description 某个文件开始上传前触发,一个文件只会触发一次。 - * @for Uploader - */ - _prepareNextFile: function() { - var me = this, - file = me.request('fetch-file'), - pending = me.pending, - promise; - - if ( file ) { - promise = me.request( 'before-send-file', file, function() { - - // 有可能文件被skip掉了。文件被skip掉后,状态坑定不是Queued. - if ( file.getStatus() === Status.PROGRESS || - file.getStatus() === Status.INTERRUPT ) { - return file; - } - - return me._finishFile( file ); - }); - - me.owner.trigger( 'uploadStart', file ); - file.setStatus( Status.PROGRESS ); - - promise.file = file; - - // 如果还在pending中,则替换成文件本身。 - promise.done(function() { - var idx = $.inArray( promise, pending ); - - ~idx && pending.splice( idx, 1, file ); - }); - - // befeore-send-file的钩子就有错误发生。 - promise.fail(function( reason ) { - file.setStatus( Status.ERROR, reason ); - me.owner.trigger( 'uploadError', file, reason ); - me.owner.trigger( 'uploadComplete', file ); - }); - - pending.push( promise ); - } - }, - - // 让出位置了,可以让其他分片开始上传 - _popBlock: function( block ) { - var idx = $.inArray( block, this.pool ); - - this.pool.splice( idx, 1 ); - block.file.remaning--; - this.remaning--; - }, - - // 开始上传,可以被掉过。如果promise被reject了,则表示跳过此分片。 - _startSend: function( block ) { - var me = this, - file = block.file, - promise; - - // 有可能在 before-send-file 的 promise 期间改变了文件状态。 - // 如:暂停,取消 - // 我们不能中断 promise, 但是可以在 promise 完后,不做上传操作。 - if ( file.getStatus() !== Status.PROGRESS ) { - - // 如果是中断,则还需要放回去。 - if (file.getStatus() === Status.INTERRUPT) { - me._putback(block); - } - - return; - } - - me.pool.push( block ); - me.remaning++; - - // 如果没有分片,则直接使用原始的。 - // 不会丢失content-type信息。 - block.blob = block.chunks === 1 ? file.source : - file.source.slice( block.start, block.end ); - - // hook, 每个分片发送之前可能要做些异步的事情。 - promise = me.request( 'before-send', block, function() { - - // 有可能文件已经上传出错了,所以不需要再传输了。 - if ( file.getStatus() === Status.PROGRESS ) { - me._doSend( block ); - } else { - me._popBlock( block ); - Base.nextTick( me.__tick ); - } - }); - - // 如果为fail了,则跳过此分片。 - promise.fail(function() { - if ( file.remaning === 1 ) { - me._finishFile( file ).always(function() { - block.percentage = 1; - me._popBlock( block ); - me.owner.trigger( 'uploadComplete', file ); - Base.nextTick( me.__tick ); - }); - } else { - block.percentage = 1; - me.updateFileProgress( file ); - me._popBlock( block ); - Base.nextTick( me.__tick ); - } - }); - }, - - - /** - * @event uploadBeforeSend - * @param {Object} object - * @param {Object} data 默认的上传参数,可以扩展此对象来控制上传参数。 - * @param {Object} headers 可以扩展此对象来控制上传头部。 - * @description 当某个文件的分块在发送前触发,主要用来询问是否要添加附带参数,大文件在开起分片上传的前提下此事件可能会触发多次。 - * @for Uploader - */ - - /** - * @event uploadAccept - * @param {Object} object - * @param {Object} ret 服务端的返回数据,json格式,如果服务端不是json格式,从ret._raw中取数据,自行解析。 - * @description 当某个文件上传到服务端响应后,会派送此事件来询问服务端响应是否有效。如果此事件handler返回值为`false`, 则此文件将派送`server`类型的`uploadError`事件。 - * @for Uploader - */ - - /** - * @event uploadProgress - * @param {File} file File对象 - * @param {Number} percentage 上传进度 - * @description 上传过程中触发,携带上传进度。 - * @for Uploader - */ - - - /** - * @event uploadError - * @param {File} file File对象 - * @param {String} reason 出错的code - * @description 当文件上传出错时触发。 - * @for Uploader - */ - - /** - * @event uploadSuccess - * @param {File} file File对象 - * @param {Object} response 服务端返回的数据 - * @description 当文件上传成功时触发。 - * @for Uploader - */ - - /** - * @event uploadComplete - * @param {File} [file] File对象 - * @description 不管成功或者失败,文件上传完成时触发。 - * @for Uploader - */ - - // 做上传操作。 - _doSend: function( block ) { - var me = this, - owner = me.owner, - opts = me.options, - file = block.file, - tr = new Transport( opts ), - data = $.extend({}, opts.formData ), - headers = $.extend({}, opts.headers ), - requestAccept, ret; - - block.transport = tr; - - tr.on( 'destroy', function() { - delete block.transport; - me._popBlock( block ); - Base.nextTick( me.__tick ); - }); - - // 广播上传进度。以文件为单位。 - tr.on( 'progress', function( percentage ) { - block.percentage = percentage; - me.updateFileProgress( file ); - }); - - // 用来询问,是否返回的结果是有错误的。 - requestAccept = function( reject ) { - var fn; - - ret = tr.getResponseAsJson() || {}; - ret._raw = tr.getResponse(); - fn = function( value ) { - reject = value; - }; - - // 服务端响应了,不代表成功了,询问是否响应正确。 - if ( !owner.trigger( 'uploadAccept', block, ret, fn ) ) { - reject = reject || 'server'; - } - - return reject; - }; - - // 尝试重试,然后广播文件上传出错。 - tr.on( 'error', function( type, flag ) { - block.retried = block.retried || 0; - - // 自动重试 - if ( block.chunks > 1 && ~'http,abort'.indexOf( type ) && - block.retried < opts.chunkRetry ) { - - block.retried++; - tr.send(); - - } else { - - // http status 500 ~ 600 - if ( !flag && type === 'server' ) { - type = requestAccept( type ); - } - - file.setStatus( Status.ERROR, type ); - owner.trigger( 'uploadError', file, type ); - owner.trigger( 'uploadComplete', file ); - } - }); - - // 上传成功 - tr.on( 'load', function() { - var reason; - - // 如果非预期,转向上传出错。 - if ( (reason = requestAccept()) ) { - tr.trigger( 'error', reason, true ); - return; - } - - // 全部上传完成。 - if ( file.remaning === 1 ) { - me._finishFile( file, ret ); - } else { - tr.destroy(); - } - }); - - // 配置默认的上传字段。 - data = $.extend( data, { - id: file.id, - name: file.name, - type: file.type, - lastModifiedDate: file.lastModifiedDate, - size: file.size - }); - - block.chunks > 1 && $.extend( data, { - chunks: block.chunks, - chunk: block.chunk - }); - - // 在发送之间可以添加字段什么的。。。 - // 如果默认的字段不够使用,可以通过监听此事件来扩展 - owner.trigger( 'uploadBeforeSend', block, data, headers ); - - // 开始发送。 - tr.appendBlob( opts.fileVal, block.blob, file.name ); - tr.append( data ); - tr.setRequestHeader( headers ); - tr.send(); - }, - - // 完成上传。 - _finishFile: function( file, ret, hds ) { - var owner = this.owner; - - return owner - .request( 'after-send-file', arguments, function() { - file.setStatus( Status.COMPLETE ); - owner.trigger( 'uploadSuccess', file, ret, hds ); - }) - .fail(function( reason ) { - - // 如果外部已经标记为invalid什么的,不再改状态。 - if ( file.getStatus() === Status.PROGRESS ) { - file.setStatus( Status.ERROR, reason ); - } - - owner.trigger( 'uploadError', file, reason ); - }) - .always(function() { - owner.trigger( 'uploadComplete', file ); - }); - }, - - updateFileProgress: function(file) { - var totalPercent = 0, - uploaded = 0; - - if (!file.blocks) { - return; - } - - $.each( file.blocks, function( _, v ) { - uploaded += (v.percentage || 0) * (v.end - v.start); - }); - - totalPercent = uploaded / file.size; - this.owner.trigger( 'uploadProgress', file, totalPercent || 0 ); - } - - }); - }); - /** - * @fileOverview 各种验证,包括文件总大小是否超出、单文件是否超出和文件是否重复。 - */ - - define('widgets/validator',[ - 'base', - 'uploader', - 'file', - 'widgets/widget' - ], function( Base, Uploader, WUFile ) { - - var $ = Base.$, - validators = {}, - api; - - /** - * @event error - * @param {String} type 错误类型。 - * @description 当validate不通过时,会以派送错误事件的形式通知调用者。通过`upload.on('error', handler)`可以捕获到此类错误,目前有以下错误会在特定的情况下派送错来。 - * - * * `Q_EXCEED_NUM_LIMIT` 在设置了`fileNumLimit`且尝试给`uploader`添加的文件数量超出这个值时派送。 - * * `Q_EXCEED_SIZE_LIMIT` 在设置了`Q_EXCEED_SIZE_LIMIT`且尝试给`uploader`添加的文件总大小超出这个值时派送。 - * * `Q_TYPE_DENIED` 当文件类型不满足时触发。。 - * @for Uploader - */ - - // 暴露给外面的api - api = { - - // 添加验证器 - addValidator: function( type, cb ) { - validators[ type ] = cb; - }, - - // 移除验证器 - removeValidator: function( type ) { - delete validators[ type ]; - } - }; - - // 在Uploader初始化的时候启动Validators的初始化 - Uploader.register({ - name: 'validator', - - init: function() { - var me = this; - Base.nextTick(function() { - $.each( validators, function() { - this.call( me.owner ); - }); - }); - } - }); - - /** - * @property {int} [fileNumLimit=undefined] - * @namespace options - * @for Uploader - * @description 验证文件总数量, 超出则不允许加入队列。 - */ - api.addValidator( 'fileNumLimit', function() { - var uploader = this, - opts = uploader.options, - count = 0, - max = parseInt( opts.fileNumLimit, 10 ), - flag = true; - - if ( !max ) { - return; - } - - uploader.on( 'beforeFileQueued', function( file ) { - - if ( count >= max && flag ) { - flag = false; - this.trigger( 'error', 'Q_EXCEED_NUM_LIMIT', max, file ); - setTimeout(function() { - flag = true; - }, 1 ); - } - - return count >= max ? false : true; - }); - - uploader.on( 'fileQueued', function() { - count++; - }); - - uploader.on( 'fileDequeued', function() { - count--; - }); - - uploader.on( 'reset', function() { - count = 0; - }); - }); - - - /** - * @property {int} [fileSizeLimit=undefined] - * @namespace options - * @for Uploader - * @description 验证文件总大小是否超出限制, 超出则不允许加入队列。 - */ - api.addValidator( 'fileSizeLimit', function() { - var uploader = this, - opts = uploader.options, - count = 0, - max = parseInt( opts.fileSizeLimit, 10 ), - flag = true; - - if ( !max ) { - return; - } - - uploader.on( 'beforeFileQueued', function( file ) { - var invalid = count + file.size > max; - - if ( invalid && flag ) { - flag = false; - this.trigger( 'error', 'Q_EXCEED_SIZE_LIMIT', max, file ); - setTimeout(function() { - flag = true; - }, 1 ); - } - - return invalid ? false : true; - }); - - uploader.on( 'fileQueued', function( file ) { - count += file.size; - }); - - uploader.on( 'fileDequeued', function( file ) { - count -= file.size; - }); - - uploader.on( 'reset', function() { - count = 0; - }); - }); - - /** - * @property {int} [fileSingleSizeLimit=undefined] - * @namespace options - * @for Uploader - * @description 验证单个文件大小是否超出限制, 超出则不允许加入队列。 - */ - api.addValidator( 'fileSingleSizeLimit', function() { - var uploader = this, - opts = uploader.options, - max = opts.fileSingleSizeLimit; - - if ( !max ) { - return; - } - - uploader.on( 'beforeFileQueued', function( file ) { - - if ( file.size > max ) { - file.setStatus( WUFile.Status.INVALID, 'exceed_size' ); - this.trigger( 'error', 'F_EXCEED_SIZE', max, file ); - return false; - } - - }); - - }); - - /** - * @property {Boolean} [duplicate=undefined] - * @namespace options - * @for Uploader - * @description 去重, 根据文件名字、文件大小和最后修改时间来生成hash Key. - */ - api.addValidator( 'duplicate', function() { - var uploader = this, - opts = uploader.options, - mapping = {}; - - if ( opts.duplicate ) { - return; - } - - function hashString( str ) { - var hash = 0, - i = 0, - len = str.length, - _char; - - for ( ; i < len; i++ ) { - _char = str.charCodeAt( i ); - hash = _char + (hash << 6) + (hash << 16) - hash; - } - - return hash; - } - - uploader.on( 'beforeFileQueued', function( file ) { - var hash = file.__hash || (file.__hash = hashString( file.name + - file.size + file.lastModifiedDate )); - - // 已经重复了 - if ( mapping[ hash ] ) { - this.trigger( 'error', 'F_DUPLICATE', file ); - return false; - } - }); - - uploader.on( 'fileQueued', function( file ) { - var hash = file.__hash; - - hash && (mapping[ hash ] = true); - }); - - uploader.on( 'fileDequeued', function( file ) { - var hash = file.__hash; - - hash && (delete mapping[ hash ]); - }); - - uploader.on( 'reset', function() { - mapping = {}; - }); - }); - - return api; - }); - - /** - * @fileOverview Md5 - */ - define('lib/md5',[ - 'runtime/client', - 'mediator' - ], function( RuntimeClient, Mediator ) { - - function Md5() { - RuntimeClient.call( this, 'Md5' ); - } - - // 让 Md5 具备事件功能。 - Mediator.installTo( Md5.prototype ); - - Md5.prototype.loadFromBlob = function( blob ) { - var me = this; - - if ( me.getRuid() ) { - me.disconnectRuntime(); - } - - // 连接到blob归属的同一个runtime. - me.connectRuntime( blob.ruid, function() { - me.exec('init'); - me.exec( 'loadFromBlob', blob ); - }); - }; - - Md5.prototype.getResult = function() { - return this.exec('getResult'); - }; - - return Md5; - }); - /** - * @fileOverview 图片操作, 负责预览图片和上传前压缩图片 - */ - define('widgets/md5',[ - 'base', - 'uploader', - 'lib/md5', - 'lib/blob', - 'widgets/widget' - ], function( Base, Uploader, Md5, Blob ) { - - return Uploader.register({ - name: 'md5', - - - /** - * 计算文件 md5 值,返回一个 promise 对象,可以监听 progress 进度。 - * - * - * @method md5File - * @grammar md5File( file[, start[, end]] ) => promise - * @for Uploader - * @example - * - * uploader.on( 'fileQueued', function( file ) { - * var $li = ...; - * - * uploader.md5File( file ) - * - * // 及时显示进度 - * .progress(function(percentage) { - * console.log('Percentage:', percentage); - * }) - * - * // 完成 - * .then(function(val) { - * console.log('md5 result:', val); - * }); - * - * }); - */ - md5File: function( file, start, end ) { - var md5 = new Md5(), - deferred = Base.Deferred(), - blob = (file instanceof Blob) ? file : - this.request( 'get-file', file ).source; - - md5.on( 'progress load', function( e ) { - e = e || {}; - deferred.notify( e.total ? e.loaded / e.total : 1 ); - }); - - md5.on( 'complete', function() { - deferred.resolve( md5.getResult() ); - }); - - md5.on( 'error', function( reason ) { - deferred.reject( reason ); - }); - - if ( arguments.length > 1 ) { - start = start || 0; - end = end || 0; - start < 0 && (start = blob.size + start); - end < 0 && (end = blob.size + end); - end = Math.min( end, blob.size ); - blob = blob.slice( start, end ); - } - - md5.loadFromBlob( blob ); - - return deferred.promise(); - } - }); - }); - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/compbase',[],function() { - - function CompBase( owner, runtime ) { - - this.owner = owner; - this.options = owner.options; - - this.getRuntime = function() { - return runtime; - }; - - this.getRuid = function() { - return runtime.uid; - }; - - this.trigger = function() { - return owner.trigger.apply( owner, arguments ); - }; - } - - return CompBase; - }); - /** - * @fileOverview Html5Runtime - */ - define('runtime/html5/runtime',[ - 'base', - 'runtime/runtime', - 'runtime/compbase' - ], function( Base, Runtime, CompBase ) { - - var type = 'html5', - components = {}; - - function Html5Runtime() { - var pool = {}, - me = this, - destroy = this.destroy; - - Runtime.apply( me, arguments ); - me.type = type; - - - // 这个方法的调用者,实际上是RuntimeClient - me.exec = function( comp, fn/*, args...*/) { - var client = this, - uid = client.uid, - args = Base.slice( arguments, 2 ), - instance; - - if ( components[ comp ] ) { - instance = pool[ uid ] = pool[ uid ] || - new components[ comp ]( client, me ); - - if ( instance[ fn ] ) { - return instance[ fn ].apply( instance, args ); - } - } - }; - - me.destroy = function() { - // @todo 删除池子中的所有实例 - return destroy && destroy.apply( this, arguments ); - }; - } - - Base.inherits( Runtime, { - constructor: Html5Runtime, - - // 不需要连接其他程序,直接执行callback - init: function() { - var me = this; - setTimeout(function() { - me.trigger('ready'); - }, 1 ); - } - - }); - - // 注册Components - Html5Runtime.register = function( name, component ) { - var klass = components[ name ] = Base.inherits( CompBase, component ); - return klass; - }; - - // 注册html5运行时。 - // 只有在支持的前提下注册。 - if ( window.Blob && window.FileReader && window.DataView ) { - Runtime.addRuntime( type, Html5Runtime ); - } - - return Html5Runtime; - }); - /** - * @fileOverview Blob Html实现 - */ - define('runtime/html5/blob',[ - 'runtime/html5/runtime', - 'lib/blob' - ], function( Html5Runtime, Blob ) { - - return Html5Runtime.register( 'Blob', { - slice: function( start, end ) { - var blob = this.owner.source, - slice = blob.slice || blob.webkitSlice || blob.mozSlice; - - blob = slice.call( blob, start, end ); - - return new Blob( this.getRuid(), blob ); - } - }); - }); - /** - * @fileOverview FilePaste - */ - define('runtime/html5/dnd',[ - 'base', - 'runtime/html5/runtime', - 'lib/file' - ], function( Base, Html5Runtime, File ) { - - var $ = Base.$, - prefix = 'webuploader-dnd-'; - - return Html5Runtime.register( 'DragAndDrop', { - init: function() { - var elem = this.elem = this.options.container; - - this.dragEnterHandler = Base.bindFn( this._dragEnterHandler, this ); - this.dragOverHandler = Base.bindFn( this._dragOverHandler, this ); - this.dragLeaveHandler = Base.bindFn( this._dragLeaveHandler, this ); - this.dropHandler = Base.bindFn( this._dropHandler, this ); - this.dndOver = false; - - elem.on( 'dragenter', this.dragEnterHandler ); - elem.on( 'dragover', this.dragOverHandler ); - elem.on( 'dragleave', this.dragLeaveHandler ); - elem.on( 'drop', this.dropHandler ); - - if ( this.options.disableGlobalDnd ) { - $( document ).on( 'dragover', this.dragOverHandler ); - $( document ).on( 'drop', this.dropHandler ); - } - }, - - _dragEnterHandler: function( e ) { - var me = this, - denied = me._denied || false, - items; - - e = e.originalEvent || e; - - if ( !me.dndOver ) { - me.dndOver = true; - - // 注意只有 chrome 支持。 - items = e.dataTransfer.items; - - if ( items && items.length ) { - me._denied = denied = !me.trigger( 'accept', items ); - } - - me.elem.addClass( prefix + 'over' ); - me.elem[ denied ? 'addClass' : - 'removeClass' ]( prefix + 'denied' ); - } - - e.dataTransfer.dropEffect = denied ? 'none' : 'copy'; - - return false; - }, - - _dragOverHandler: function( e ) { - // 只处理框内的。 - var parentElem = this.elem.parent().get( 0 ); - if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) { - return false; - } - - clearTimeout( this._leaveTimer ); - this._dragEnterHandler.call( this, e ); - - return false; - }, - - _dragLeaveHandler: function() { - var me = this, - handler; - - handler = function() { - me.dndOver = false; - me.elem.removeClass( prefix + 'over ' + prefix + 'denied' ); - }; - - clearTimeout( me._leaveTimer ); - me._leaveTimer = setTimeout( handler, 100 ); - return false; - }, - - _dropHandler: function( e ) { - var me = this, - ruid = me.getRuid(), - parentElem = me.elem.parent().get( 0 ), - dataTransfer, data; - - // 只处理框内的。 - if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) { - return false; - } - - e = e.originalEvent || e; - dataTransfer = e.dataTransfer; - - // 如果是页面内拖拽,还不能处理,不阻止事件。 - // 此处 ie11 下会报参数错误, - try { - data = dataTransfer.getData('text/html'); - } catch( err ) { - } - - if ( data ) { - return; - } - - me._getTansferFiles( dataTransfer, function( results ) { - me.trigger( 'drop', $.map( results, function( file ) { - return new File( ruid, file ); - }) ); - }); - - me.dndOver = false; - me.elem.removeClass( prefix + 'over' ); - return false; - }, - - // 如果传入 callback 则去查看文件夹,否则只管当前文件夹。 - _getTansferFiles: function( dataTransfer, callback ) { - var results = [], - promises = [], - items, files, file, item, i, len, canAccessFolder; - - items = dataTransfer.items; - files = dataTransfer.files; - - canAccessFolder = !!(items && items[ 0 ].webkitGetAsEntry); - - for ( i = 0, len = files.length; i < len; i++ ) { - file = files[ i ]; - item = items && items[ i ]; - - if ( canAccessFolder && item.webkitGetAsEntry().isDirectory ) { - - promises.push( this._traverseDirectoryTree( - item.webkitGetAsEntry(), results ) ); - } else { - results.push( file ); - } - } - - Base.when.apply( Base, promises ).done(function() { - - if ( !results.length ) { - return; - } - - callback( results ); - }); - }, - - _traverseDirectoryTree: function( entry, results ) { - var deferred = Base.Deferred(), - me = this; - - if ( entry.isFile ) { - entry.file(function( file ) { - results.push( file ); - deferred.resolve(); - }); - } else if ( entry.isDirectory ) { - entry.createReader().readEntries(function( entries ) { - var len = entries.length, - promises = [], - arr = [], // 为了保证顺序。 - i; - - for ( i = 0; i < len; i++ ) { - promises.push( me._traverseDirectoryTree( - entries[ i ], arr ) ); - } - - Base.when.apply( Base, promises ).then(function() { - results.push.apply( results, arr ); - deferred.resolve(); - }, deferred.reject ); - }); - } - - return deferred.promise(); - }, - - destroy: function() { - var elem = this.elem; - - // 还没 init 就调用 destroy - if (!elem) { - return; - } - - elem.off( 'dragenter', this.dragEnterHandler ); - elem.off( 'dragover', this.dragOverHandler ); - elem.off( 'dragleave', this.dragLeaveHandler ); - elem.off( 'drop', this.dropHandler ); - - if ( this.options.disableGlobalDnd ) { - $( document ).off( 'dragover', this.dragOverHandler ); - $( document ).off( 'drop', this.dropHandler ); - } - } - }); - }); - - /** - * @fileOverview FilePaste - */ - define('runtime/html5/filepaste',[ - 'base', - 'runtime/html5/runtime', - 'lib/file' - ], function( Base, Html5Runtime, File ) { - - return Html5Runtime.register( 'FilePaste', { - init: function() { - var opts = this.options, - elem = this.elem = opts.container, - accept = '.*', - arr, i, len, item; - - // accetp的mimeTypes中生成匹配正则。 - if ( opts.accept ) { - arr = []; - - for ( i = 0, len = opts.accept.length; i < len; i++ ) { - item = opts.accept[ i ].mimeTypes; - item && arr.push( item ); - } - - if ( arr.length ) { - accept = arr.join(','); - accept = accept.replace( /,/g, '|' ).replace( /\*/g, '.*' ); - } - } - this.accept = accept = new RegExp( accept, 'i' ); - this.hander = Base.bindFn( this._pasteHander, this ); - elem.on( 'paste', this.hander ); - }, - - _pasteHander: function( e ) { - var allowed = [], - ruid = this.getRuid(), - items, item, blob, i, len; - - e = e.originalEvent || e; - items = e.clipboardData.items; - - for ( i = 0, len = items.length; i < len; i++ ) { - item = items[ i ]; - - if ( item.kind !== 'file' || !(blob = item.getAsFile()) ) { - continue; - } - - allowed.push( new File( ruid, blob ) ); - } - - if ( allowed.length ) { - // 不阻止非文件粘贴(文字粘贴)的事件冒泡 - e.preventDefault(); - e.stopPropagation(); - this.trigger( 'paste', allowed ); - } - }, - - destroy: function() { - this.elem.off( 'paste', this.hander ); - } - }); - }); - - /** - * @fileOverview FilePicker - */ - define('runtime/html5/filepicker',[ - 'base', - 'runtime/html5/runtime' - ], function( Base, Html5Runtime ) { - - var $ = Base.$; - - return Html5Runtime.register( 'FilePicker', { - init: function() { - var container = this.getRuntime().getContainer(), - me = this, - owner = me.owner, - opts = me.options, - label = this.label = $( document.createElement('label') ), - input = this.input = $( document.createElement('input') ), - arr, i, len, mouseHandler; - - input.attr( 'type', 'file' ); - input.attr( 'name', opts.name ); - input.addClass('webuploader-element-invisible'); - - label.on( 'click', function() { - input.trigger('click'); - }); - - label.css({ - opacity: 0, - width: '100%', - height: '100%', - display: 'block', - cursor: 'pointer', - background: '#ffffff' - }); - - if ( opts.multiple ) { - input.attr( 'multiple', 'multiple' ); - } - - // @todo Firefox不支持单独指定后缀 - if ( opts.accept && opts.accept.length > 0 ) { - arr = []; - - for ( i = 0, len = opts.accept.length; i < len; i++ ) { - arr.push( opts.accept[ i ].mimeTypes ); - } - - input.attr( 'accept', arr.join(',') ); - } - - container.append( input ); - container.append( label ); - - mouseHandler = function( e ) { - owner.trigger( e.type ); - }; - - input.on( 'change', function( e ) { - var fn = arguments.callee, - clone; - - me.files = e.target.files; - - // reset input - clone = this.cloneNode( true ); - clone.value = null; - this.parentNode.replaceChild( clone, this ); - - input.off(); - input = $( clone ).on( 'change', fn ) - .on( 'mouseenter mouseleave', mouseHandler ); - - owner.trigger('change'); - }); - - label.on( 'mouseenter mouseleave', mouseHandler ); - - }, - - - getFiles: function() { - return this.files; - }, - - destroy: function() { - this.input.off(); - this.label.off(); - } - }); - }); - /** - * Terms: - * - * Uint8Array, FileReader, BlobBuilder, atob, ArrayBuffer - * @fileOverview Image控件 - */ - define('runtime/html5/util',[ - 'base' - ], function( Base ) { - - var urlAPI = window.createObjectURL && window || - window.URL && URL.revokeObjectURL && URL || - window.webkitURL, - createObjectURL = Base.noop, - revokeObjectURL = createObjectURL; - - if ( urlAPI ) { - - // 更安全的方式调用,比如android里面就能把context改成其他的对象。 - createObjectURL = function() { - return urlAPI.createObjectURL.apply( urlAPI, arguments ); - }; - - revokeObjectURL = function() { - return urlAPI.revokeObjectURL.apply( urlAPI, arguments ); - }; - } - - return { - createObjectURL: createObjectURL, - revokeObjectURL: revokeObjectURL, - - dataURL2Blob: function( dataURI ) { - var byteStr, intArray, ab, i, mimetype, parts; - - parts = dataURI.split(','); - - if ( ~parts[ 0 ].indexOf('base64') ) { - byteStr = atob( parts[ 1 ] ); - } else { - byteStr = decodeURIComponent( parts[ 1 ] ); - } - - ab = new ArrayBuffer( byteStr.length ); - intArray = new Uint8Array( ab ); - - for ( i = 0; i < byteStr.length; i++ ) { - intArray[ i ] = byteStr.charCodeAt( i ); - } - - mimetype = parts[ 0 ].split(':')[ 1 ].split(';')[ 0 ]; - - return this.arrayBufferToBlob( ab, mimetype ); - }, - - dataURL2ArrayBuffer: function( dataURI ) { - var byteStr, intArray, i, parts; - - parts = dataURI.split(','); - - if ( ~parts[ 0 ].indexOf('base64') ) { - byteStr = atob( parts[ 1 ] ); - } else { - byteStr = decodeURIComponent( parts[ 1 ] ); - } - - intArray = new Uint8Array( byteStr.length ); - - for ( i = 0; i < byteStr.length; i++ ) { - intArray[ i ] = byteStr.charCodeAt( i ); - } - - return intArray.buffer; - }, - - arrayBufferToBlob: function( buffer, type ) { - var builder = window.BlobBuilder || window.WebKitBlobBuilder, - bb; - - // android不支持直接new Blob, 只能借助blobbuilder. - if ( builder ) { - bb = new builder(); - bb.append( buffer ); - return bb.getBlob( type ); - } - - return new Blob([ buffer ], type ? { type: type } : {} ); - }, - - // 抽出来主要是为了解决android下面canvas.toDataUrl不支持jpeg. - // 你得到的结果是png. - canvasToDataUrl: function( canvas, type, quality ) { - return canvas.toDataURL( type, quality / 100 ); - }, - - // imagemeat会复写这个方法,如果用户选择加载那个文件了的话。 - parseMeta: function( blob, callback ) { - callback( false, {}); - }, - - // imagemeat会复写这个方法,如果用户选择加载那个文件了的话。 - updateImageHead: function( data ) { - return data; - } - }; - }); - /** - * Terms: - * - * Uint8Array, FileReader, BlobBuilder, atob, ArrayBuffer - * @fileOverview Image控件 - */ - define('runtime/html5/imagemeta',[ - 'runtime/html5/util' - ], function( Util ) { - - var api; - - api = { - parsers: { - 0xffe1: [] - }, - - maxMetaDataSize: 262144, - - parse: function( blob, cb ) { - var me = this, - fr = new FileReader(); - - fr.onload = function() { - cb( false, me._parse( this.result ) ); - fr = fr.onload = fr.onerror = null; - }; - - fr.onerror = function( e ) { - cb( e.message ); - fr = fr.onload = fr.onerror = null; - }; - - blob = blob.slice( 0, me.maxMetaDataSize ); - fr.readAsArrayBuffer( blob.getSource() ); - }, - - _parse: function( buffer, noParse ) { - if ( buffer.byteLength < 6 ) { - return; - } - - var dataview = new DataView( buffer ), - offset = 2, - maxOffset = dataview.byteLength - 4, - headLength = offset, - ret = {}, - markerBytes, markerLength, parsers, i; - - if ( dataview.getUint16( 0 ) === 0xffd8 ) { - - while ( offset < maxOffset ) { - markerBytes = dataview.getUint16( offset ); - - if ( markerBytes >= 0xffe0 && markerBytes <= 0xffef || - markerBytes === 0xfffe ) { - - markerLength = dataview.getUint16( offset + 2 ) + 2; - - if ( offset + markerLength > dataview.byteLength ) { - break; - } - - parsers = api.parsers[ markerBytes ]; - - if ( !noParse && parsers ) { - for ( i = 0; i < parsers.length; i += 1 ) { - parsers[ i ].call( api, dataview, offset, - markerLength, ret ); - } - } - - offset += markerLength; - headLength = offset; - } else { - break; - } - } - - if ( headLength > 6 ) { - if ( buffer.slice ) { - ret.imageHead = buffer.slice( 2, headLength ); - } else { - // Workaround for IE10, which does not yet - // support ArrayBuffer.slice: - ret.imageHead = new Uint8Array( buffer ) - .subarray( 2, headLength ); - } - } - } - - return ret; - }, - - updateImageHead: function( buffer, head ) { - var data = this._parse( buffer, true ), - buf1, buf2, bodyoffset; - - - bodyoffset = 2; - if ( data.imageHead ) { - bodyoffset = 2 + data.imageHead.byteLength; - } - - if ( buffer.slice ) { - buf2 = buffer.slice( bodyoffset ); - } else { - buf2 = new Uint8Array( buffer ).subarray( bodyoffset ); - } - - buf1 = new Uint8Array( head.byteLength + 2 + buf2.byteLength ); - - buf1[ 0 ] = 0xFF; - buf1[ 1 ] = 0xD8; - buf1.set( new Uint8Array( head ), 2 ); - buf1.set( new Uint8Array( buf2 ), head.byteLength + 2 ); - - return buf1.buffer; - } - }; - - Util.parseMeta = function() { - return api.parse.apply( api, arguments ); - }; - - Util.updateImageHead = function() { - return api.updateImageHead.apply( api, arguments ); - }; - - return api; - }); - /** - * 代码来自于:https://github.com/blueimp/JavaScript-Load-Image - * 暂时项目中只用了orientation. - * - * 去除了 Exif Sub IFD Pointer, GPS Info IFD Pointer, Exif Thumbnail. - * @fileOverview EXIF解析 - */ - - // Sample - // ==================================== - // Make : Apple - // Model : iPhone 4S - // Orientation : 1 - // XResolution : 72 [72/1] - // YResolution : 72 [72/1] - // ResolutionUnit : 2 - // Software : QuickTime 7.7.1 - // DateTime : 2013:09:01 22:53:55 - // ExifIFDPointer : 190 - // ExposureTime : 0.058823529411764705 [1/17] - // FNumber : 2.4 [12/5] - // ExposureProgram : Normal program - // ISOSpeedRatings : 800 - // ExifVersion : 0220 - // DateTimeOriginal : 2013:09:01 22:52:51 - // DateTimeDigitized : 2013:09:01 22:52:51 - // ComponentsConfiguration : YCbCr - // ShutterSpeedValue : 4.058893515764426 - // ApertureValue : 2.5260688216892597 [4845/1918] - // BrightnessValue : -0.3126686601998395 - // MeteringMode : Pattern - // Flash : Flash did not fire, compulsory flash mode - // FocalLength : 4.28 [107/25] - // SubjectArea : [4 values] - // FlashpixVersion : 0100 - // ColorSpace : 1 - // PixelXDimension : 2448 - // PixelYDimension : 3264 - // SensingMethod : One-chip color area sensor - // ExposureMode : 0 - // WhiteBalance : Auto white balance - // FocalLengthIn35mmFilm : 35 - // SceneCaptureType : Standard - define('runtime/html5/imagemeta/exif',[ - 'base', - 'runtime/html5/imagemeta' - ], function( Base, ImageMeta ) { - - var EXIF = {}; - - EXIF.ExifMap = function() { - return this; - }; - - EXIF.ExifMap.prototype.map = { - 'Orientation': 0x0112 - }; - - EXIF.ExifMap.prototype.get = function( id ) { - return this[ id ] || this[ this.map[ id ] ]; - }; - - EXIF.exifTagTypes = { - // byte, 8-bit unsigned int: - 1: { - getValue: function( dataView, dataOffset ) { - return dataView.getUint8( dataOffset ); - }, - size: 1 - }, - - // ascii, 8-bit byte: - 2: { - getValue: function( dataView, dataOffset ) { - return String.fromCharCode( dataView.getUint8( dataOffset ) ); - }, - size: 1, - ascii: true - }, - - // short, 16 bit int: - 3: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getUint16( dataOffset, littleEndian ); - }, - size: 2 - }, - - // long, 32 bit int: - 4: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getUint32( dataOffset, littleEndian ); - }, - size: 4 - }, - - // rational = two long values, - // first is numerator, second is denominator: - 5: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getUint32( dataOffset, littleEndian ) / - dataView.getUint32( dataOffset + 4, littleEndian ); - }, - size: 8 - }, - - // slong, 32 bit signed int: - 9: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getInt32( dataOffset, littleEndian ); - }, - size: 4 - }, - - // srational, two slongs, first is numerator, second is denominator: - 10: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getInt32( dataOffset, littleEndian ) / - dataView.getInt32( dataOffset + 4, littleEndian ); - }, - size: 8 - } - }; - - // undefined, 8-bit byte, value depending on field: - EXIF.exifTagTypes[ 7 ] = EXIF.exifTagTypes[ 1 ]; - - EXIF.getExifValue = function( dataView, tiffOffset, offset, type, length, - littleEndian ) { - - var tagType = EXIF.exifTagTypes[ type ], - tagSize, dataOffset, values, i, str, c; - - if ( !tagType ) { - Base.log('Invalid Exif data: Invalid tag type.'); - return; - } - - tagSize = tagType.size * length; - - // Determine if the value is contained in the dataOffset bytes, - // or if the value at the dataOffset is a pointer to the actual data: - dataOffset = tagSize > 4 ? tiffOffset + dataView.getUint32( offset + 8, - littleEndian ) : (offset + 8); - - if ( dataOffset + tagSize > dataView.byteLength ) { - Base.log('Invalid Exif data: Invalid data offset.'); - return; - } - - if ( length === 1 ) { - return tagType.getValue( dataView, dataOffset, littleEndian ); - } - - values = []; - - for ( i = 0; i < length; i += 1 ) { - values[ i ] = tagType.getValue( dataView, - dataOffset + i * tagType.size, littleEndian ); - } - - if ( tagType.ascii ) { - str = ''; - - // Concatenate the chars: - for ( i = 0; i < values.length; i += 1 ) { - c = values[ i ]; - - // Ignore the terminating NULL byte(s): - if ( c === '\u0000' ) { - break; - } - str += c; - } - - return str; - } - return values; - }; - - EXIF.parseExifTag = function( dataView, tiffOffset, offset, littleEndian, - data ) { - - var tag = dataView.getUint16( offset, littleEndian ); - data.exif[ tag ] = EXIF.getExifValue( dataView, tiffOffset, offset, - dataView.getUint16( offset + 2, littleEndian ), // tag type - dataView.getUint32( offset + 4, littleEndian ), // tag length - littleEndian ); - }; - - EXIF.parseExifTags = function( dataView, tiffOffset, dirOffset, - littleEndian, data ) { - - var tagsNumber, dirEndOffset, i; - - if ( dirOffset + 6 > dataView.byteLength ) { - Base.log('Invalid Exif data: Invalid directory offset.'); - return; - } - - tagsNumber = dataView.getUint16( dirOffset, littleEndian ); - dirEndOffset = dirOffset + 2 + 12 * tagsNumber; - - if ( dirEndOffset + 4 > dataView.byteLength ) { - Base.log('Invalid Exif data: Invalid directory size.'); - return; - } - - for ( i = 0; i < tagsNumber; i += 1 ) { - this.parseExifTag( dataView, tiffOffset, - dirOffset + 2 + 12 * i, // tag offset - littleEndian, data ); - } - - // Return the offset to the next directory: - return dataView.getUint32( dirEndOffset, littleEndian ); - }; - - // EXIF.getExifThumbnail = function(dataView, offset, length) { - // var hexData, - // i, - // b; - // if (!length || offset + length > dataView.byteLength) { - // Base.log('Invalid Exif data: Invalid thumbnail data.'); - // return; - // } - // hexData = []; - // for (i = 0; i < length; i += 1) { - // b = dataView.getUint8(offset + i); - // hexData.push((b < 16 ? '0' : '') + b.toString(16)); - // } - // return 'data:image/jpeg,%' + hexData.join('%'); - // }; - - EXIF.parseExifData = function( dataView, offset, length, data ) { - - var tiffOffset = offset + 10, - littleEndian, dirOffset; - - // Check for the ASCII code for "Exif" (0x45786966): - if ( dataView.getUint32( offset + 4 ) !== 0x45786966 ) { - // No Exif data, might be XMP data instead - return; - } - if ( tiffOffset + 8 > dataView.byteLength ) { - Base.log('Invalid Exif data: Invalid segment size.'); - return; - } - - // Check for the two null bytes: - if ( dataView.getUint16( offset + 8 ) !== 0x0000 ) { - Base.log('Invalid Exif data: Missing byte alignment offset.'); - return; - } - - // Check the byte alignment: - switch ( dataView.getUint16( tiffOffset ) ) { - case 0x4949: - littleEndian = true; - break; - - case 0x4D4D: - littleEndian = false; - break; - - default: - Base.log('Invalid Exif data: Invalid byte alignment marker.'); - return; - } - - // Check for the TIFF tag marker (0x002A): - if ( dataView.getUint16( tiffOffset + 2, littleEndian ) !== 0x002A ) { - Base.log('Invalid Exif data: Missing TIFF marker.'); - return; - } - - // Retrieve the directory offset bytes, usually 0x00000008 or 8 decimal: - dirOffset = dataView.getUint32( tiffOffset + 4, littleEndian ); - // Create the exif object to store the tags: - data.exif = new EXIF.ExifMap(); - // Parse the tags of the main image directory and retrieve the - // offset to the next directory, usually the thumbnail directory: - dirOffset = EXIF.parseExifTags( dataView, tiffOffset, - tiffOffset + dirOffset, littleEndian, data ); - - // 尝试读取缩略图 - // if ( dirOffset ) { - // thumbnailData = {exif: {}}; - // dirOffset = EXIF.parseExifTags( - // dataView, - // tiffOffset, - // tiffOffset + dirOffset, - // littleEndian, - // thumbnailData - // ); - - // // Check for JPEG Thumbnail offset: - // if (thumbnailData.exif[0x0201]) { - // data.exif.Thumbnail = EXIF.getExifThumbnail( - // dataView, - // tiffOffset + thumbnailData.exif[0x0201], - // thumbnailData.exif[0x0202] // Thumbnail data length - // ); - // } - // } - }; - - ImageMeta.parsers[ 0xffe1 ].push( EXIF.parseExifData ); - return EXIF; - }); - /** - * 这个方式性能不行,但是可以解决android里面的toDataUrl的bug - * android里面toDataUrl('image/jpege')得到的结果却是png. - * - * 所以这里没辙,只能借助这个工具 - * @fileOverview jpeg encoder - */ - define('runtime/html5/jpegencoder',[], function( require, exports, module ) { - - /* - Copyright (c) 2008, Adobe Systems Incorporated - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of Adobe Systems Incorporated nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - /* - JPEG encoder ported to JavaScript and optimized by Andreas Ritter, www.bytestrom.eu, 11/2009 - - Basic GUI blocking jpeg encoder - */ - - function JPEGEncoder(quality) { - var self = this; - var fround = Math.round; - var ffloor = Math.floor; - var YTable = new Array(64); - var UVTable = new Array(64); - var fdtbl_Y = new Array(64); - var fdtbl_UV = new Array(64); - var YDC_HT; - var UVDC_HT; - var YAC_HT; - var UVAC_HT; - - var bitcode = new Array(65535); - var category = new Array(65535); - var outputfDCTQuant = new Array(64); - var DU = new Array(64); - var byteout = []; - var bytenew = 0; - var bytepos = 7; - - var YDU = new Array(64); - var UDU = new Array(64); - var VDU = new Array(64); - var clt = new Array(256); - var RGB_YUV_TABLE = new Array(2048); - var currentQuality; - - var ZigZag = [ - 0, 1, 5, 6,14,15,27,28, - 2, 4, 7,13,16,26,29,42, - 3, 8,12,17,25,30,41,43, - 9,11,18,24,31,40,44,53, - 10,19,23,32,39,45,52,54, - 20,22,33,38,46,51,55,60, - 21,34,37,47,50,56,59,61, - 35,36,48,49,57,58,62,63 - ]; - - var std_dc_luminance_nrcodes = [0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0]; - var std_dc_luminance_values = [0,1,2,3,4,5,6,7,8,9,10,11]; - var std_ac_luminance_nrcodes = [0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,0x7d]; - var std_ac_luminance_values = [ - 0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12, - 0x21,0x31,0x41,0x06,0x13,0x51,0x61,0x07, - 0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08, - 0x23,0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0, - 0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16, - 0x17,0x18,0x19,0x1a,0x25,0x26,0x27,0x28, - 0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39, - 0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49, - 0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59, - 0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69, - 0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79, - 0x7a,0x83,0x84,0x85,0x86,0x87,0x88,0x89, - 0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98, - 0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7, - 0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6, - 0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5, - 0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4, - 0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2, - 0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea, - 0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8, - 0xf9,0xfa - ]; - - var std_dc_chrominance_nrcodes = [0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0]; - var std_dc_chrominance_values = [0,1,2,3,4,5,6,7,8,9,10,11]; - var std_ac_chrominance_nrcodes = [0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,0x77]; - var std_ac_chrominance_values = [ - 0x00,0x01,0x02,0x03,0x11,0x04,0x05,0x21, - 0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71, - 0x13,0x22,0x32,0x81,0x08,0x14,0x42,0x91, - 0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0, - 0x15,0x62,0x72,0xd1,0x0a,0x16,0x24,0x34, - 0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26, - 0x27,0x28,0x29,0x2a,0x35,0x36,0x37,0x38, - 0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48, - 0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58, - 0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68, - 0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78, - 0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87, - 0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96, - 0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5, - 0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4, - 0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3, - 0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2, - 0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda, - 0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9, - 0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8, - 0xf9,0xfa - ]; - - function initQuantTables(sf){ - var YQT = [ - 16, 11, 10, 16, 24, 40, 51, 61, - 12, 12, 14, 19, 26, 58, 60, 55, - 14, 13, 16, 24, 40, 57, 69, 56, - 14, 17, 22, 29, 51, 87, 80, 62, - 18, 22, 37, 56, 68,109,103, 77, - 24, 35, 55, 64, 81,104,113, 92, - 49, 64, 78, 87,103,121,120,101, - 72, 92, 95, 98,112,100,103, 99 - ]; - - for (var i = 0; i < 64; i++) { - var t = ffloor((YQT[i]*sf+50)/100); - if (t < 1) { - t = 1; - } else if (t > 255) { - t = 255; - } - YTable[ZigZag[i]] = t; - } - var UVQT = [ - 17, 18, 24, 47, 99, 99, 99, 99, - 18, 21, 26, 66, 99, 99, 99, 99, - 24, 26, 56, 99, 99, 99, 99, 99, - 47, 66, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99 - ]; - for (var j = 0; j < 64; j++) { - var u = ffloor((UVQT[j]*sf+50)/100); - if (u < 1) { - u = 1; - } else if (u > 255) { - u = 255; - } - UVTable[ZigZag[j]] = u; - } - var aasf = [ - 1.0, 1.387039845, 1.306562965, 1.175875602, - 1.0, 0.785694958, 0.541196100, 0.275899379 - ]; - var k = 0; - for (var row = 0; row < 8; row++) - { - for (var col = 0; col < 8; col++) - { - fdtbl_Y[k] = (1.0 / (YTable [ZigZag[k]] * aasf[row] * aasf[col] * 8.0)); - fdtbl_UV[k] = (1.0 / (UVTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0)); - k++; - } - } - } - - function computeHuffmanTbl(nrcodes, std_table){ - var codevalue = 0; - var pos_in_table = 0; - var HT = new Array(); - for (var k = 1; k <= 16; k++) { - for (var j = 1; j <= nrcodes[k]; j++) { - HT[std_table[pos_in_table]] = []; - HT[std_table[pos_in_table]][0] = codevalue; - HT[std_table[pos_in_table]][1] = k; - pos_in_table++; - codevalue++; - } - codevalue*=2; - } - return HT; - } - - function initHuffmanTbl() - { - YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes,std_dc_luminance_values); - UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes,std_dc_chrominance_values); - YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes,std_ac_luminance_values); - UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes,std_ac_chrominance_values); - } - - function initCategoryNumber() - { - var nrlower = 1; - var nrupper = 2; - for (var cat = 1; cat <= 15; cat++) { - //Positive numbers - for (var nr = nrlower; nr>0] = 38470 * i; - RGB_YUV_TABLE[(i+ 512)>>0] = 7471 * i + 0x8000; - RGB_YUV_TABLE[(i+ 768)>>0] = -11059 * i; - RGB_YUV_TABLE[(i+1024)>>0] = -21709 * i; - RGB_YUV_TABLE[(i+1280)>>0] = 32768 * i + 0x807FFF; - RGB_YUV_TABLE[(i+1536)>>0] = -27439 * i; - RGB_YUV_TABLE[(i+1792)>>0] = - 5329 * i; - } - } - - // IO functions - function writeBits(bs) - { - var value = bs[0]; - var posval = bs[1]-1; - while ( posval >= 0 ) { - if (value & (1 << posval) ) { - bytenew |= (1 << bytepos); - } - posval--; - bytepos--; - if (bytepos < 0) { - if (bytenew == 0xFF) { - writeByte(0xFF); - writeByte(0); - } - else { - writeByte(bytenew); - } - bytepos=7; - bytenew=0; - } - } - } - - function writeByte(value) - { - byteout.push(clt[value]); // write char directly instead of converting later - } - - function writeWord(value) - { - writeByte((value>>8)&0xFF); - writeByte((value )&0xFF); - } - - // DCT & quantization core - function fDCTQuant(data, fdtbl) - { - var d0, d1, d2, d3, d4, d5, d6, d7; - /* Pass 1: process rows. */ - var dataOff=0; - var i; - var I8 = 8; - var I64 = 64; - for (i=0; i 0.0) ? ((fDCTQuant + 0.5)|0) : ((fDCTQuant - 0.5)|0); - //outputfDCTQuant[i] = fround(fDCTQuant); - - } - return outputfDCTQuant; - } - - function writeAPP0() - { - writeWord(0xFFE0); // marker - writeWord(16); // length - writeByte(0x4A); // J - writeByte(0x46); // F - writeByte(0x49); // I - writeByte(0x46); // F - writeByte(0); // = "JFIF",'\0' - writeByte(1); // versionhi - writeByte(1); // versionlo - writeByte(0); // xyunits - writeWord(1); // xdensity - writeWord(1); // ydensity - writeByte(0); // thumbnwidth - writeByte(0); // thumbnheight - } - - function writeSOF0(width, height) - { - writeWord(0xFFC0); // marker - writeWord(17); // length, truecolor YUV JPG - writeByte(8); // precision - writeWord(height); - writeWord(width); - writeByte(3); // nrofcomponents - writeByte(1); // IdY - writeByte(0x11); // HVY - writeByte(0); // QTY - writeByte(2); // IdU - writeByte(0x11); // HVU - writeByte(1); // QTU - writeByte(3); // IdV - writeByte(0x11); // HVV - writeByte(1); // QTV - } - - function writeDQT() - { - writeWord(0xFFDB); // marker - writeWord(132); // length - writeByte(0); - for (var i=0; i<64; i++) { - writeByte(YTable[i]); - } - writeByte(1); - for (var j=0; j<64; j++) { - writeByte(UVTable[j]); - } - } - - function writeDHT() - { - writeWord(0xFFC4); // marker - writeWord(0x01A2); // length - - writeByte(0); // HTYDCinfo - for (var i=0; i<16; i++) { - writeByte(std_dc_luminance_nrcodes[i+1]); - } - for (var j=0; j<=11; j++) { - writeByte(std_dc_luminance_values[j]); - } - - writeByte(0x10); // HTYACinfo - for (var k=0; k<16; k++) { - writeByte(std_ac_luminance_nrcodes[k+1]); - } - for (var l=0; l<=161; l++) { - writeByte(std_ac_luminance_values[l]); - } - - writeByte(1); // HTUDCinfo - for (var m=0; m<16; m++) { - writeByte(std_dc_chrominance_nrcodes[m+1]); - } - for (var n=0; n<=11; n++) { - writeByte(std_dc_chrominance_values[n]); - } - - writeByte(0x11); // HTUACinfo - for (var o=0; o<16; o++) { - writeByte(std_ac_chrominance_nrcodes[o+1]); - } - for (var p=0; p<=161; p++) { - writeByte(std_ac_chrominance_values[p]); - } - } - - function writeSOS() - { - writeWord(0xFFDA); // marker - writeWord(12); // length - writeByte(3); // nrofcomponents - writeByte(1); // IdY - writeByte(0); // HTY - writeByte(2); // IdU - writeByte(0x11); // HTU - writeByte(3); // IdV - writeByte(0x11); // HTV - writeByte(0); // Ss - writeByte(0x3f); // Se - writeByte(0); // Bf - } - - function processDU(CDU, fdtbl, DC, HTDC, HTAC){ - var EOB = HTAC[0x00]; - var M16zeroes = HTAC[0xF0]; - var pos; - var I16 = 16; - var I63 = 63; - var I64 = 64; - var DU_DCT = fDCTQuant(CDU, fdtbl); - //ZigZag reorder - for (var j=0;j0)&&(DU[end0pos]==0); end0pos--) {}; - //end0pos = first element in reverse order !=0 - if ( end0pos == 0) { - writeBits(EOB); - return DC; - } - var i = 1; - var lng; - while ( i <= end0pos ) { - var startpos = i; - for (; (DU[i]==0) && (i<=end0pos); ++i) {} - var nrzeroes = i-startpos; - if ( nrzeroes >= I16 ) { - lng = nrzeroes>>4; - for (var nrmarker=1; nrmarker <= lng; ++nrmarker) - writeBits(M16zeroes); - nrzeroes = nrzeroes&0xF; - } - pos = 32767+DU[i]; - writeBits(HTAC[(nrzeroes<<4)+category[pos]]); - writeBits(bitcode[pos]); - i++; - } - if ( end0pos != I63 ) { - writeBits(EOB); - } - return DC; - } - - function initCharLookupTable(){ - var sfcc = String.fromCharCode; - for(var i=0; i < 256; i++){ ///// ACHTUNG // 255 - clt[i] = sfcc(i); - } - } - - this.encode = function(image,quality) // image data object - { - // var time_start = new Date().getTime(); - - if(quality) setQuality(quality); - - // Initialize bit writer - byteout = new Array(); - bytenew=0; - bytepos=7; - - // Add JPEG headers - writeWord(0xFFD8); // SOI - writeAPP0(); - writeDQT(); - writeSOF0(image.width,image.height); - writeDHT(); - writeSOS(); - - - // Encode 8x8 macroblocks - var DCY=0; - var DCU=0; - var DCV=0; - - bytenew=0; - bytepos=7; - - - this.encode.displayName = "_encode_"; - - var imageData = image.data; - var width = image.width; - var height = image.height; - - var quadWidth = width*4; - var tripleWidth = width*3; - - var x, y = 0; - var r, g, b; - var start,p, col,row,pos; - while(y < height){ - x = 0; - while(x < quadWidth){ - start = quadWidth * y + x; - p = start; - col = -1; - row = 0; - - for(pos=0; pos < 64; pos++){ - row = pos >> 3;// /8 - col = ( pos & 7 ) * 4; // %8 - p = start + ( row * quadWidth ) + col; - - if(y+row >= height){ // padding bottom - p-= (quadWidth*(y+1+row-height)); - } - - if(x+col >= quadWidth){ // padding right - p-= ((x+col) - quadWidth +4) - } - - r = imageData[ p++ ]; - g = imageData[ p++ ]; - b = imageData[ p++ ]; - - - /* // calculate YUV values dynamically - YDU[pos]=((( 0.29900)*r+( 0.58700)*g+( 0.11400)*b))-128; //-0x80 - UDU[pos]=(((-0.16874)*r+(-0.33126)*g+( 0.50000)*b)); - VDU[pos]=((( 0.50000)*r+(-0.41869)*g+(-0.08131)*b)); - */ - - // use lookup table (slightly faster) - YDU[pos] = ((RGB_YUV_TABLE[r] + RGB_YUV_TABLE[(g + 256)>>0] + RGB_YUV_TABLE[(b + 512)>>0]) >> 16)-128; - UDU[pos] = ((RGB_YUV_TABLE[(r + 768)>>0] + RGB_YUV_TABLE[(g + 1024)>>0] + RGB_YUV_TABLE[(b + 1280)>>0]) >> 16)-128; - VDU[pos] = ((RGB_YUV_TABLE[(r + 1280)>>0] + RGB_YUV_TABLE[(g + 1536)>>0] + RGB_YUV_TABLE[(b + 1792)>>0]) >> 16)-128; - - } - - DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT); - DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT); - DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT); - x+=32; - } - y+=8; - } - - - //////////////////////////////////////////////////////////////// - - // Do the bit alignment of the EOI marker - if ( bytepos >= 0 ) { - var fillbits = []; - fillbits[1] = bytepos+1; - fillbits[0] = (1<<(bytepos+1))-1; - writeBits(fillbits); - } - - writeWord(0xFFD9); //EOI - - var jpegDataUri = 'data:image/jpeg;base64,' + btoa(byteout.join('')); - - byteout = []; - - // benchmarking - // var duration = new Date().getTime() - time_start; - // console.log('Encoding time: '+ currentQuality + 'ms'); - // - - return jpegDataUri - } - - function setQuality(quality){ - if (quality <= 0) { - quality = 1; - } - if (quality > 100) { - quality = 100; - } - - if(currentQuality == quality) return // don't recalc if unchanged - - var sf = 0; - if (quality < 50) { - sf = Math.floor(5000 / quality); - } else { - sf = Math.floor(200 - quality*2); - } - - initQuantTables(sf); - currentQuality = quality; - // console.log('Quality set to: '+quality +'%'); - } - - function init(){ - // var time_start = new Date().getTime(); - if(!quality) quality = 50; - // Create tables - initCharLookupTable() - initHuffmanTbl(); - initCategoryNumber(); - initRGBYUVTable(); - - setQuality(quality); - // var duration = new Date().getTime() - time_start; - // console.log('Initialization '+ duration + 'ms'); - } - - init(); - - }; - - JPEGEncoder.encode = function( data, quality ) { - var encoder = new JPEGEncoder( quality ); - - return encoder.encode( data ); - } - - return JPEGEncoder; - }); - /** - * @fileOverview Fix android canvas.toDataUrl bug. - */ - define('runtime/html5/androidpatch',[ - 'runtime/html5/util', - 'runtime/html5/jpegencoder', - 'base' - ], function( Util, encoder, Base ) { - var origin = Util.canvasToDataUrl, - supportJpeg; - - Util.canvasToDataUrl = function( canvas, type, quality ) { - var ctx, w, h, fragement, parts; - - // 非android手机直接跳过。 - if ( !Base.os.android ) { - return origin.apply( null, arguments ); - } - - // 检测是否canvas支持jpeg导出,根据数据格式来判断。 - // JPEG 前两位分别是:255, 216 - if ( type === 'image/jpeg' && typeof supportJpeg === 'undefined' ) { - fragement = origin.apply( null, arguments ); - - parts = fragement.split(','); - - if ( ~parts[ 0 ].indexOf('base64') ) { - fragement = atob( parts[ 1 ] ); - } else { - fragement = decodeURIComponent( parts[ 1 ] ); - } - - fragement = fragement.substring( 0, 2 ); - - supportJpeg = fragement.charCodeAt( 0 ) === 255 && - fragement.charCodeAt( 1 ) === 216; - } - - // 只有在android环境下才修复 - if ( type === 'image/jpeg' && !supportJpeg ) { - w = canvas.width; - h = canvas.height; - ctx = canvas.getContext('2d'); - - return encoder.encode( ctx.getImageData( 0, 0, w, h ), quality ); - } - - return origin.apply( null, arguments ); - }; - }); - /** - * @fileOverview Image - */ - define('runtime/html5/image',[ - 'base', - 'runtime/html5/runtime', - 'runtime/html5/util' - ], function( Base, Html5Runtime, Util ) { - - var BLANK = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D'; - - return Html5Runtime.register( 'Image', { - - // flag: 标记是否被修改过。 - modified: false, - - init: function() { - var me = this, - img = new Image(); - - img.onload = function() { - - me._info = { - type: me.type, - width: this.width, - height: this.height - }; - - // 读取meta信息。 - if ( !me._metas && 'image/jpeg' === me.type ) { - Util.parseMeta( me._blob, function( error, ret ) { - me._metas = ret; - me.owner.trigger('load'); - }); - } else { - me.owner.trigger('load'); - } - }; - - img.onerror = function() { - me.owner.trigger('error'); - }; - - me._img = img; - }, - - loadFromBlob: function( blob ) { - var me = this, - img = me._img; - - me._blob = blob; - me.type = blob.type; - img.src = Util.createObjectURL( blob.getSource() ); - me.owner.once( 'load', function() { - Util.revokeObjectURL( img.src ); - }); - }, - - resize: function( width, height ) { - var canvas = this._canvas || - (this._canvas = document.createElement('canvas')); - - this._resize( this._img, canvas, width, height ); - this._blob = null; // 没用了,可以删掉了。 - this.modified = true; - this.owner.trigger( 'complete', 'resize' ); - }, - - crop: function( x, y, w, h, s ) { - var cvs = this._canvas || - (this._canvas = document.createElement('canvas')), - opts = this.options, - img = this._img, - iw = img.naturalWidth, - ih = img.naturalHeight, - orientation = this.getOrientation(); - - s = s || 1; - - // todo 解决 orientation 的问题。 - // values that require 90 degree rotation - // if ( ~[ 5, 6, 7, 8 ].indexOf( orientation ) ) { - - // switch ( orientation ) { - // case 6: - // tmp = x; - // x = y; - // y = iw * s - tmp - w; - // console.log(ih * s, tmp, w) - // break; - // } - - // (w ^= h, h ^= w, w ^= h); - // } - - cvs.width = w; - cvs.height = h; - - opts.preserveHeaders || this._rotate2Orientaion( cvs, orientation ); - this._renderImageToCanvas( cvs, img, -x, -y, iw * s, ih * s ); - - this._blob = null; // 没用了,可以删掉了。 - this.modified = true; - this.owner.trigger( 'complete', 'crop' ); - }, - - getAsBlob: function( type ) { - var blob = this._blob, - opts = this.options, - canvas; - - type = type || this.type; - - // blob需要重新生成。 - if ( this.modified || this.type !== type ) { - canvas = this._canvas; - - if ( type === 'image/jpeg' ) { - - blob = Util.canvasToDataUrl( canvas, type, opts.quality ); - - if ( opts.preserveHeaders && this._metas && - this._metas.imageHead ) { - - blob = Util.dataURL2ArrayBuffer( blob ); - blob = Util.updateImageHead( blob, - this._metas.imageHead ); - blob = Util.arrayBufferToBlob( blob, type ); - return blob; - } - } else { - blob = Util.canvasToDataUrl( canvas, type ); - } - - blob = Util.dataURL2Blob( blob ); - } - - return blob; - }, - - getAsDataUrl: function( type ) { - var opts = this.options; - - type = type || this.type; - - if ( type === 'image/jpeg' ) { - return Util.canvasToDataUrl( this._canvas, type, opts.quality ); - } else { - return this._canvas.toDataURL( type ); - } - }, - - getOrientation: function() { - return this._metas && this._metas.exif && - this._metas.exif.get('Orientation') || 1; - }, - - info: function( val ) { - - // setter - if ( val ) { - this._info = val; - return this; - } - - // getter - return this._info; - }, - - meta: function( val ) { - - // setter - if ( val ) { - this._meta = val; - return this; - } - - // getter - return this._meta; - }, - - destroy: function() { - var canvas = this._canvas; - this._img.onload = null; - - if ( canvas ) { - canvas.getContext('2d') - .clearRect( 0, 0, canvas.width, canvas.height ); - canvas.width = canvas.height = 0; - this._canvas = null; - } - - // 释放内存。非常重要,否则释放不了image的内存。 - this._img.src = BLANK; - this._img = this._blob = null; - }, - - _resize: function( img, cvs, width, height ) { - var opts = this.options, - naturalWidth = img.width, - naturalHeight = img.height, - orientation = this.getOrientation(), - scale, w, h, x, y; - - // values that require 90 degree rotation - if ( ~[ 5, 6, 7, 8 ].indexOf( orientation ) ) { - - // 交换width, height的值。 - width ^= height; - height ^= width; - width ^= height; - } - - scale = Math[ opts.crop ? 'max' : 'min' ]( width / naturalWidth, - height / naturalHeight ); - - // 不允许放大。 - opts.allowMagnify || (scale = Math.min( 1, scale )); - - w = naturalWidth * scale; - h = naturalHeight * scale; - - if ( opts.crop ) { - cvs.width = width; - cvs.height = height; - } else { - cvs.width = w; - cvs.height = h; - } - - x = (cvs.width - w) / 2; - y = (cvs.height - h) / 2; - - opts.preserveHeaders || this._rotate2Orientaion( cvs, orientation ); - - this._renderImageToCanvas( cvs, img, x, y, w, h ); - }, - - _rotate2Orientaion: function( canvas, orientation ) { - var width = canvas.width, - height = canvas.height, - ctx = canvas.getContext('2d'); - - switch ( orientation ) { - case 5: - case 6: - case 7: - case 8: - canvas.width = height; - canvas.height = width; - break; - } - - switch ( orientation ) { - case 2: // horizontal flip - ctx.translate( width, 0 ); - ctx.scale( -1, 1 ); - break; - - case 3: // 180 rotate left - ctx.translate( width, height ); - ctx.rotate( Math.PI ); - break; - - case 4: // vertical flip - ctx.translate( 0, height ); - ctx.scale( 1, -1 ); - break; - - case 5: // vertical flip + 90 rotate right - ctx.rotate( 0.5 * Math.PI ); - ctx.scale( 1, -1 ); - break; - - case 6: // 90 rotate right - ctx.rotate( 0.5 * Math.PI ); - ctx.translate( 0, -height ); - break; - - case 7: // horizontal flip + 90 rotate right - ctx.rotate( 0.5 * Math.PI ); - ctx.translate( width, -height ); - ctx.scale( -1, 1 ); - break; - - case 8: // 90 rotate left - ctx.rotate( -0.5 * Math.PI ); - ctx.translate( -width, 0 ); - break; - } - }, - - // https://github.com/stomita/ios-imagefile-megapixel/ - // blob/master/src/megapix-image.js - _renderImageToCanvas: (function() { - - // 如果不是ios, 不需要这么复杂! - if ( !Base.os.ios ) { - return function( canvas ) { - var args = Base.slice( arguments, 1 ), - ctx = canvas.getContext('2d'); - - ctx.drawImage.apply( ctx, args ); - }; - } - - /** - * Detecting vertical squash in loaded image. - * Fixes a bug which squash image vertically while drawing into - * canvas for some images. - */ - function detectVerticalSquash( img, iw, ih ) { - var canvas = document.createElement('canvas'), - ctx = canvas.getContext('2d'), - sy = 0, - ey = ih, - py = ih, - data, alpha, ratio; - - - canvas.width = 1; - canvas.height = ih; - ctx.drawImage( img, 0, 0 ); - data = ctx.getImageData( 0, 0, 1, ih ).data; - - // search image edge pixel position in case - // it is squashed vertically. - while ( py > sy ) { - alpha = data[ (py - 1) * 4 + 3 ]; - - if ( alpha === 0 ) { - ey = py; - } else { - sy = py; - } - - py = (ey + sy) >> 1; - } - - ratio = (py / ih); - return (ratio === 0) ? 1 : ratio; - } - - // fix ie7 bug - // http://stackoverflow.com/questions/11929099/ - // html5-canvas-drawimage-ratio-bug-ios - if ( Base.os.ios >= 7 ) { - return function( canvas, img, x, y, w, h ) { - var iw = img.naturalWidth, - ih = img.naturalHeight, - vertSquashRatio = detectVerticalSquash( img, iw, ih ); - - return canvas.getContext('2d').drawImage( img, 0, 0, - iw * vertSquashRatio, ih * vertSquashRatio, - x, y, w, h ); - }; - } - - /** - * Detect subsampling in loaded image. - * In iOS, larger images than 2M pixels may be - * subsampled in rendering. - */ - function detectSubsampling( img ) { - var iw = img.naturalWidth, - ih = img.naturalHeight, - canvas, ctx; - - // subsampling may happen overmegapixel image - if ( iw * ih > 1024 * 1024 ) { - canvas = document.createElement('canvas'); - canvas.width = canvas.height = 1; - ctx = canvas.getContext('2d'); - ctx.drawImage( img, -iw + 1, 0 ); - - // subsampled image becomes half smaller in rendering size. - // check alpha channel value to confirm image is covering - // edge pixel or not. if alpha value is 0 - // image is not covering, hence subsampled. - return ctx.getImageData( 0, 0, 1, 1 ).data[ 3 ] === 0; - } else { - return false; - } - } - - - return function( canvas, img, x, y, width, height ) { - var iw = img.naturalWidth, - ih = img.naturalHeight, - ctx = canvas.getContext('2d'), - subsampled = detectSubsampling( img ), - doSquash = this.type === 'image/jpeg', - d = 1024, - sy = 0, - dy = 0, - tmpCanvas, tmpCtx, vertSquashRatio, dw, dh, sx, dx; - - if ( subsampled ) { - iw /= 2; - ih /= 2; - } - - ctx.save(); - tmpCanvas = document.createElement('canvas'); - tmpCanvas.width = tmpCanvas.height = d; - - tmpCtx = tmpCanvas.getContext('2d'); - vertSquashRatio = doSquash ? - detectVerticalSquash( img, iw, ih ) : 1; - - dw = Math.ceil( d * width / iw ); - dh = Math.ceil( d * height / ih / vertSquashRatio ); - - while ( sy < ih ) { - sx = 0; - dx = 0; - while ( sx < iw ) { - tmpCtx.clearRect( 0, 0, d, d ); - tmpCtx.drawImage( img, -sx, -sy ); - ctx.drawImage( tmpCanvas, 0, 0, d, d, - x + dx, y + dy, dw, dh ); - sx += d; - dx += dw; - } - sy += d; - dy += dh; - } - ctx.restore(); - tmpCanvas = tmpCtx = null; - }; - })() - }); - }); - /** - * @fileOverview Transport - * @todo 支持chunked传输,优势: - * 可以将大文件分成小块,挨个传输,可以提高大文件成功率,当失败的时候,也只需要重传那小部分, - * 而不需要重头再传一次。另外断点续传也需要用chunked方式。 - */ - define('runtime/html5/transport',[ - 'base', - 'runtime/html5/runtime' - ], function( Base, Html5Runtime ) { - - var noop = Base.noop, - $ = Base.$; - - return Html5Runtime.register( 'Transport', { - init: function() { - this._status = 0; - this._response = null; - }, - - send: function() { - var owner = this.owner, - opts = this.options, - xhr = this._initAjax(), - blob = owner._blob, - server = opts.server, - formData, binary, fr; - - if ( opts.sendAsBinary ) { - server += (/\?/.test( server ) ? '&' : '?') + - $.param( owner._formData ); - - binary = blob.getSource(); - } else { - formData = new FormData(); - $.each( owner._formData, function( k, v ) { - formData.append( k, v ); - }); - - formData.append( opts.fileVal, blob.getSource(), - opts.filename || owner._formData.name || '' ); - } - - if ( opts.withCredentials && 'withCredentials' in xhr ) { - xhr.open( opts.method, server, true ); - xhr.withCredentials = true; - } else { - xhr.open( opts.method, server ); - } - - this._setRequestHeader( xhr, opts.headers ); - - if ( binary ) { - // 强制设置成 content-type 为文件流。 - xhr.overrideMimeType && - xhr.overrideMimeType('application/octet-stream'); - - // android直接发送blob会导致服务端接收到的是空文件。 - // bug详情。 - // https://code.google.com/p/android/issues/detail?id=39882 - // 所以先用fileReader读取出来再通过arraybuffer的方式发送。 - if ( Base.os.android ) { - fr = new FileReader(); - - fr.onload = function() { - xhr.send( this.result ); - fr = fr.onload = null; - }; - - fr.readAsArrayBuffer( binary ); - } else { - xhr.send( binary ); - } - } else { - xhr.send( formData ); - } - }, - - getResponse: function() { - return this._response; - }, - - getResponseAsJson: function() { - return this._parseJson( this._response ); - }, - - getStatus: function() { - return this._status; - }, - - abort: function() { - var xhr = this._xhr; - - if ( xhr ) { - xhr.upload.onprogress = noop; - xhr.onreadystatechange = noop; - xhr.abort(); - - this._xhr = xhr = null; - } - }, - - destroy: function() { - this.abort(); - }, - - _initAjax: function() { - var me = this, - xhr = new XMLHttpRequest(), - opts = this.options; - - if ( opts.withCredentials && !('withCredentials' in xhr) && - typeof XDomainRequest !== 'undefined' ) { - xhr = new XDomainRequest(); - } - - xhr.upload.onprogress = function( e ) { - var percentage = 0; - - if ( e.lengthComputable ) { - percentage = e.loaded / e.total; - } - - return me.trigger( 'progress', percentage ); - }; - - xhr.onreadystatechange = function() { - - if ( xhr.readyState !== 4 ) { - return; - } - - xhr.upload.onprogress = noop; - xhr.onreadystatechange = noop; - me._xhr = null; - me._status = xhr.status; - - if ( xhr.status >= 200 && xhr.status < 300 ) { - me._response = xhr.responseText; - return me.trigger('load'); - } else if ( xhr.status >= 500 && xhr.status < 600 ) { - me._response = xhr.responseText; - return me.trigger( 'error', 'server' ); - } - - - return me.trigger( 'error', me._status ? 'http' : 'abort' ); - }; - - me._xhr = xhr; - return xhr; - }, - - _setRequestHeader: function( xhr, headers ) { - $.each( headers, function( key, val ) { - xhr.setRequestHeader( key, val ); - }); - }, - - _parseJson: function( str ) { - var json; - - try { - json = JSON.parse( str ); - } catch ( ex ) { - json = {}; - } - - return json; - } - }); - }); - /** - * @fileOverview Transport flash实现 - */ - define('runtime/html5/md5',[ - 'runtime/html5/runtime' - ], function( FlashRuntime ) { - - /* - * Fastest md5 implementation around (JKM md5) - * Credits: Joseph Myers - * - * @see http://www.myersdaily.org/joseph/javascript/md5-text.html - * @see http://jsperf.com/md5-shootout/7 - */ - - /* this function is much faster, - so if possible we use it. Some IEs - are the only ones I know of that - need the idiotic second function, - generated by an if clause. */ - var add32 = function (a, b) { - return (a + b) & 0xFFFFFFFF; - }, - - cmn = function (q, a, b, x, s, t) { - a = add32(add32(a, q), add32(x, t)); - return add32((a << s) | (a >>> (32 - s)), b); - }, - - ff = function (a, b, c, d, x, s, t) { - return cmn((b & c) | ((~b) & d), a, b, x, s, t); - }, - - gg = function (a, b, c, d, x, s, t) { - return cmn((b & d) | (c & (~d)), a, b, x, s, t); - }, - - hh = function (a, b, c, d, x, s, t) { - return cmn(b ^ c ^ d, a, b, x, s, t); - }, - - ii = function (a, b, c, d, x, s, t) { - return cmn(c ^ (b | (~d)), a, b, x, s, t); - }, - - md5cycle = function (x, k) { - var a = x[0], - b = x[1], - c = x[2], - d = x[3]; - - a = ff(a, b, c, d, k[0], 7, -680876936); - d = ff(d, a, b, c, k[1], 12, -389564586); - c = ff(c, d, a, b, k[2], 17, 606105819); - b = ff(b, c, d, a, k[3], 22, -1044525330); - a = ff(a, b, c, d, k[4], 7, -176418897); - d = ff(d, a, b, c, k[5], 12, 1200080426); - c = ff(c, d, a, b, k[6], 17, -1473231341); - b = ff(b, c, d, a, k[7], 22, -45705983); - a = ff(a, b, c, d, k[8], 7, 1770035416); - d = ff(d, a, b, c, k[9], 12, -1958414417); - c = ff(c, d, a, b, k[10], 17, -42063); - b = ff(b, c, d, a, k[11], 22, -1990404162); - a = ff(a, b, c, d, k[12], 7, 1804603682); - d = ff(d, a, b, c, k[13], 12, -40341101); - c = ff(c, d, a, b, k[14], 17, -1502002290); - b = ff(b, c, d, a, k[15], 22, 1236535329); - - a = gg(a, b, c, d, k[1], 5, -165796510); - d = gg(d, a, b, c, k[6], 9, -1069501632); - c = gg(c, d, a, b, k[11], 14, 643717713); - b = gg(b, c, d, a, k[0], 20, -373897302); - a = gg(a, b, c, d, k[5], 5, -701558691); - d = gg(d, a, b, c, k[10], 9, 38016083); - c = gg(c, d, a, b, k[15], 14, -660478335); - b = gg(b, c, d, a, k[4], 20, -405537848); - a = gg(a, b, c, d, k[9], 5, 568446438); - d = gg(d, a, b, c, k[14], 9, -1019803690); - c = gg(c, d, a, b, k[3], 14, -187363961); - b = gg(b, c, d, a, k[8], 20, 1163531501); - a = gg(a, b, c, d, k[13], 5, -1444681467); - d = gg(d, a, b, c, k[2], 9, -51403784); - c = gg(c, d, a, b, k[7], 14, 1735328473); - b = gg(b, c, d, a, k[12], 20, -1926607734); - - a = hh(a, b, c, d, k[5], 4, -378558); - d = hh(d, a, b, c, k[8], 11, -2022574463); - c = hh(c, d, a, b, k[11], 16, 1839030562); - b = hh(b, c, d, a, k[14], 23, -35309556); - a = hh(a, b, c, d, k[1], 4, -1530992060); - d = hh(d, a, b, c, k[4], 11, 1272893353); - c = hh(c, d, a, b, k[7], 16, -155497632); - b = hh(b, c, d, a, k[10], 23, -1094730640); - a = hh(a, b, c, d, k[13], 4, 681279174); - d = hh(d, a, b, c, k[0], 11, -358537222); - c = hh(c, d, a, b, k[3], 16, -722521979); - b = hh(b, c, d, a, k[6], 23, 76029189); - a = hh(a, b, c, d, k[9], 4, -640364487); - d = hh(d, a, b, c, k[12], 11, -421815835); - c = hh(c, d, a, b, k[15], 16, 530742520); - b = hh(b, c, d, a, k[2], 23, -995338651); - - a = ii(a, b, c, d, k[0], 6, -198630844); - d = ii(d, a, b, c, k[7], 10, 1126891415); - c = ii(c, d, a, b, k[14], 15, -1416354905); - b = ii(b, c, d, a, k[5], 21, -57434055); - a = ii(a, b, c, d, k[12], 6, 1700485571); - d = ii(d, a, b, c, k[3], 10, -1894986606); - c = ii(c, d, a, b, k[10], 15, -1051523); - b = ii(b, c, d, a, k[1], 21, -2054922799); - a = ii(a, b, c, d, k[8], 6, 1873313359); - d = ii(d, a, b, c, k[15], 10, -30611744); - c = ii(c, d, a, b, k[6], 15, -1560198380); - b = ii(b, c, d, a, k[13], 21, 1309151649); - a = ii(a, b, c, d, k[4], 6, -145523070); - d = ii(d, a, b, c, k[11], 10, -1120210379); - c = ii(c, d, a, b, k[2], 15, 718787259); - b = ii(b, c, d, a, k[9], 21, -343485551); - - x[0] = add32(a, x[0]); - x[1] = add32(b, x[1]); - x[2] = add32(c, x[2]); - x[3] = add32(d, x[3]); - }, - - /* there needs to be support for Unicode here, - * unless we pretend that we can redefine the MD-5 - * algorithm for multi-byte characters (perhaps - * by adding every four 16-bit characters and - * shortening the sum to 32 bits). Otherwise - * I suggest performing MD-5 as if every character - * was two bytes--e.g., 0040 0025 = @%--but then - * how will an ordinary MD-5 sum be matched? - * There is no way to standardize text to something - * like UTF-8 before transformation; speed cost is - * utterly prohibitive. The JavaScript standard - * itself needs to look at this: it should start - * providing access to strings as preformed UTF-8 - * 8-bit unsigned value arrays. - */ - md5blk = function (s) { - var md5blks = [], - i; /* Andy King said do it this way. */ - - for (i = 0; i < 64; i += 4) { - md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24); - } - return md5blks; - }, - - md5blk_array = function (a) { - var md5blks = [], - i; /* Andy King said do it this way. */ - - for (i = 0; i < 64; i += 4) { - md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24); - } - return md5blks; - }, - - md51 = function (s) { - var n = s.length, - state = [1732584193, -271733879, -1732584194, 271733878], - i, - length, - tail, - tmp, - lo, - hi; - - for (i = 64; i <= n; i += 64) { - md5cycle(state, md5blk(s.substring(i - 64, i))); - } - s = s.substring(i - 64); - length = s.length; - tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - for (i = 0; i < length; i += 1) { - tail[i >> 2] |= s.charCodeAt(i) << ((i % 4) << 3); - } - tail[i >> 2] |= 0x80 << ((i % 4) << 3); - if (i > 55) { - md5cycle(state, tail); - for (i = 0; i < 16; i += 1) { - tail[i] = 0; - } - } - - // Beware that the final length might not fit in 32 bits so we take care of that - tmp = n * 8; - tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/); - lo = parseInt(tmp[2], 16); - hi = parseInt(tmp[1], 16) || 0; - - tail[14] = lo; - tail[15] = hi; - - md5cycle(state, tail); - return state; - }, - - md51_array = function (a) { - var n = a.length, - state = [1732584193, -271733879, -1732584194, 271733878], - i, - length, - tail, - tmp, - lo, - hi; - - for (i = 64; i <= n; i += 64) { - md5cycle(state, md5blk_array(a.subarray(i - 64, i))); - } - - // Not sure if it is a bug, however IE10 will always produce a sub array of length 1 - // containing the last element of the parent array if the sub array specified starts - // beyond the length of the parent array - weird. - // https://connect.microsoft.com/IE/feedback/details/771452/typed-array-subarray-issue - a = (i - 64) < n ? a.subarray(i - 64) : new Uint8Array(0); - - length = a.length; - tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - for (i = 0; i < length; i += 1) { - tail[i >> 2] |= a[i] << ((i % 4) << 3); - } - - tail[i >> 2] |= 0x80 << ((i % 4) << 3); - if (i > 55) { - md5cycle(state, tail); - for (i = 0; i < 16; i += 1) { - tail[i] = 0; - } - } - - // Beware that the final length might not fit in 32 bits so we take care of that - tmp = n * 8; - tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/); - lo = parseInt(tmp[2], 16); - hi = parseInt(tmp[1], 16) || 0; - - tail[14] = lo; - tail[15] = hi; - - md5cycle(state, tail); - - return state; - }, - - hex_chr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'], - - rhex = function (n) { - var s = '', - j; - for (j = 0; j < 4; j += 1) { - s += hex_chr[(n >> (j * 8 + 4)) & 0x0F] + hex_chr[(n >> (j * 8)) & 0x0F]; - } - return s; - }, - - hex = function (x) { - var i; - for (i = 0; i < x.length; i += 1) { - x[i] = rhex(x[i]); - } - return x.join(''); - }, - - md5 = function (s) { - return hex(md51(s)); - }, - - - - //////////////////////////////////////////////////////////////////////////// - - /** - * SparkMD5 OOP implementation. - * - * Use this class to perform an incremental md5, otherwise use the - * static methods instead. - */ - SparkMD5 = function () { - // call reset to init the instance - this.reset(); - }; - - - // In some cases the fast add32 function cannot be used.. - if (md5('hello') !== '5d41402abc4b2a76b9719d911017c592') { - add32 = function (x, y) { - var lsw = (x & 0xFFFF) + (y & 0xFFFF), - msw = (x >> 16) + (y >> 16) + (lsw >> 16); - return (msw << 16) | (lsw & 0xFFFF); - }; - } - - - /** - * Appends a string. - * A conversion will be applied if an utf8 string is detected. - * - * @param {String} str The string to be appended - * - * @return {SparkMD5} The instance itself - */ - SparkMD5.prototype.append = function (str) { - // converts the string to utf8 bytes if necessary - if (/[\u0080-\uFFFF]/.test(str)) { - str = unescape(encodeURIComponent(str)); - } - - // then append as binary - this.appendBinary(str); - - return this; - }; - - /** - * Appends a binary string. - * - * @param {String} contents The binary string to be appended - * - * @return {SparkMD5} The instance itself - */ - SparkMD5.prototype.appendBinary = function (contents) { - this._buff += contents; - this._length += contents.length; - - var length = this._buff.length, - i; - - for (i = 64; i <= length; i += 64) { - md5cycle(this._state, md5blk(this._buff.substring(i - 64, i))); - } - - this._buff = this._buff.substr(i - 64); - - return this; - }; - - /** - * Finishes the incremental computation, reseting the internal state and - * returning the result. - * Use the raw parameter to obtain the raw result instead of the hex one. - * - * @param {Boolean} raw True to get the raw result, false to get the hex result - * - * @return {String|Array} The result - */ - SparkMD5.prototype.end = function (raw) { - var buff = this._buff, - length = buff.length, - i, - tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - ret; - - for (i = 0; i < length; i += 1) { - tail[i >> 2] |= buff.charCodeAt(i) << ((i % 4) << 3); - } - - this._finish(tail, length); - ret = !!raw ? this._state : hex(this._state); - - this.reset(); - - return ret; - }; - - /** - * Finish the final calculation based on the tail. - * - * @param {Array} tail The tail (will be modified) - * @param {Number} length The length of the remaining buffer - */ - SparkMD5.prototype._finish = function (tail, length) { - var i = length, - tmp, - lo, - hi; - - tail[i >> 2] |= 0x80 << ((i % 4) << 3); - if (i > 55) { - md5cycle(this._state, tail); - for (i = 0; i < 16; i += 1) { - tail[i] = 0; - } - } - - // Do the final computation based on the tail and length - // Beware that the final length may not fit in 32 bits so we take care of that - tmp = this._length * 8; - tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/); - lo = parseInt(tmp[2], 16); - hi = parseInt(tmp[1], 16) || 0; - - tail[14] = lo; - tail[15] = hi; - md5cycle(this._state, tail); - }; - - /** - * Resets the internal state of the computation. - * - * @return {SparkMD5} The instance itself - */ - SparkMD5.prototype.reset = function () { - this._buff = ""; - this._length = 0; - this._state = [1732584193, -271733879, -1732584194, 271733878]; - - return this; - }; - - /** - * Releases memory used by the incremental buffer and other aditional - * resources. If you plan to use the instance again, use reset instead. - */ - SparkMD5.prototype.destroy = function () { - delete this._state; - delete this._buff; - delete this._length; - }; - - - /** - * Performs the md5 hash on a string. - * A conversion will be applied if utf8 string is detected. - * - * @param {String} str The string - * @param {Boolean} raw True to get the raw result, false to get the hex result - * - * @return {String|Array} The result - */ - SparkMD5.hash = function (str, raw) { - // converts the string to utf8 bytes if necessary - if (/[\u0080-\uFFFF]/.test(str)) { - str = unescape(encodeURIComponent(str)); - } - - var hash = md51(str); - - return !!raw ? hash : hex(hash); - }; - - /** - * Performs the md5 hash on a binary string. - * - * @param {String} content The binary string - * @param {Boolean} raw True to get the raw result, false to get the hex result - * - * @return {String|Array} The result - */ - SparkMD5.hashBinary = function (content, raw) { - var hash = md51(content); - - return !!raw ? hash : hex(hash); - }; - - /** - * SparkMD5 OOP implementation for array buffers. - * - * Use this class to perform an incremental md5 ONLY for array buffers. - */ - SparkMD5.ArrayBuffer = function () { - // call reset to init the instance - this.reset(); - }; - - //////////////////////////////////////////////////////////////////////////// - - /** - * Appends an array buffer. - * - * @param {ArrayBuffer} arr The array to be appended - * - * @return {SparkMD5.ArrayBuffer} The instance itself - */ - SparkMD5.ArrayBuffer.prototype.append = function (arr) { - // TODO: we could avoid the concatenation here but the algorithm would be more complex - // if you find yourself needing extra performance, please make a PR. - var buff = this._concatArrayBuffer(this._buff, arr), - length = buff.length, - i; - - this._length += arr.byteLength; - - for (i = 64; i <= length; i += 64) { - md5cycle(this._state, md5blk_array(buff.subarray(i - 64, i))); - } - - // Avoids IE10 weirdness (documented above) - this._buff = (i - 64) < length ? buff.subarray(i - 64) : new Uint8Array(0); - - return this; - }; - - /** - * Finishes the incremental computation, reseting the internal state and - * returning the result. - * Use the raw parameter to obtain the raw result instead of the hex one. - * - * @param {Boolean} raw True to get the raw result, false to get the hex result - * - * @return {String|Array} The result - */ - SparkMD5.ArrayBuffer.prototype.end = function (raw) { - var buff = this._buff, - length = buff.length, - tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - i, - ret; - - for (i = 0; i < length; i += 1) { - tail[i >> 2] |= buff[i] << ((i % 4) << 3); - } - - this._finish(tail, length); - ret = !!raw ? this._state : hex(this._state); - - this.reset(); - - return ret; - }; - - SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish; - - /** - * Resets the internal state of the computation. - * - * @return {SparkMD5.ArrayBuffer} The instance itself - */ - SparkMD5.ArrayBuffer.prototype.reset = function () { - this._buff = new Uint8Array(0); - this._length = 0; - this._state = [1732584193, -271733879, -1732584194, 271733878]; - - return this; - }; - - /** - * Releases memory used by the incremental buffer and other aditional - * resources. If you plan to use the instance again, use reset instead. - */ - SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy; - - /** - * Concats two array buffers, returning a new one. - * - * @param {ArrayBuffer} first The first array buffer - * @param {ArrayBuffer} second The second array buffer - * - * @return {ArrayBuffer} The new array buffer - */ - SparkMD5.ArrayBuffer.prototype._concatArrayBuffer = function (first, second) { - var firstLength = first.length, - result = new Uint8Array(firstLength + second.byteLength); - - result.set(first); - result.set(new Uint8Array(second), firstLength); - - return result; - }; - - /** - * Performs the md5 hash on an array buffer. - * - * @param {ArrayBuffer} arr The array buffer - * @param {Boolean} raw True to get the raw result, false to get the hex result - * - * @return {String|Array} The result - */ - SparkMD5.ArrayBuffer.hash = function (arr, raw) { - var hash = md51_array(new Uint8Array(arr)); - - return !!raw ? hash : hex(hash); - }; - - return FlashRuntime.register( 'Md5', { - init: function() { - // do nothing. - }, - - loadFromBlob: function( file ) { - var blob = file.getSource(), - chunkSize = 2 * 1024 * 1024, - chunks = Math.ceil( blob.size / chunkSize ), - chunk = 0, - owner = this.owner, - spark = new SparkMD5.ArrayBuffer(), - me = this, - blobSlice = blob.mozSlice || blob.webkitSlice || blob.slice, - loadNext, fr; - - fr = new FileReader(); - - loadNext = function() { - var start, end; - - start = chunk * chunkSize; - end = Math.min( start + chunkSize, blob.size ); - - fr.onload = function( e ) { - spark.append( e.target.result ); - owner.trigger( 'progress', { - total: file.size, - loaded: end - }); - }; - - fr.onloadend = function() { - fr.onloadend = fr.onload = null; - - if ( ++chunk < chunks ) { - setTimeout( loadNext, 1 ); - } else { - setTimeout(function(){ - owner.trigger('load'); - me.result = spark.end(); - loadNext = file = blob = spark = null; - owner.trigger('complete'); - }, 50 ); - } - }; - - fr.readAsArrayBuffer( blobSlice.call( blob, start, end ) ); - }; - - loadNext(); - }, - - getResult: function() { - return this.result; - } - }); - }); - /** - * @fileOverview FlashRuntime - */ - define('runtime/flash/runtime',[ - 'base', - 'runtime/runtime', - 'runtime/compbase' - ], function( Base, Runtime, CompBase ) { - - var $ = Base.$, - type = 'flash', - components = {}; - - - function getFlashVersion() { - var version; - - try { - version = navigator.plugins[ 'Shockwave Flash' ]; - version = version.description; - } catch ( ex ) { - try { - version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash') - .GetVariable('$version'); - } catch ( ex2 ) { - version = '0.0'; - } - } - version = version.match( /\d+/g ); - return parseFloat( version[ 0 ] + '.' + version[ 1 ], 10 ); - } - - function FlashRuntime() { - var pool = {}, - clients = {}, - destroy = this.destroy, - me = this, - jsreciver = Base.guid('webuploader_'); - - Runtime.apply( me, arguments ); - me.type = type; - - - // 这个方法的调用者,实际上是RuntimeClient - me.exec = function( comp, fn/*, args...*/ ) { - var client = this, - uid = client.uid, - args = Base.slice( arguments, 2 ), - instance; - - clients[ uid ] = client; - - if ( components[ comp ] ) { - if ( !pool[ uid ] ) { - pool[ uid ] = new components[ comp ]( client, me ); - } - - instance = pool[ uid ]; - - if ( instance[ fn ] ) { - return instance[ fn ].apply( instance, args ); - } - } - - return me.flashExec.apply( client, arguments ); - }; - - function handler( evt, obj ) { - var type = evt.type || evt, - parts, uid; - - parts = type.split('::'); - uid = parts[ 0 ]; - type = parts[ 1 ]; - - // console.log.apply( console, arguments ); - - if ( type === 'Ready' && uid === me.uid ) { - me.trigger('ready'); - } else if ( clients[ uid ] ) { - clients[ uid ].trigger( type.toLowerCase(), evt, obj ); - } - - // Base.log( evt, obj ); - } - - // flash的接受器。 - window[ jsreciver ] = function() { - var args = arguments; - - // 为了能捕获得到。 - setTimeout(function() { - handler.apply( null, args ); - }, 1 ); - }; - - this.jsreciver = jsreciver; - - this.destroy = function() { - // @todo 删除池子中的所有实例 - return destroy && destroy.apply( this, arguments ); - }; - - this.flashExec = function( comp, fn ) { - var flash = me.getFlash(), - args = Base.slice( arguments, 2 ); - - return flash.exec( this.uid, comp, fn, args ); - }; - - // @todo - } - - Base.inherits( Runtime, { - constructor: FlashRuntime, - - init: function() { - var container = this.getContainer(), - opts = this.options, - html; - - // if not the minimal height, shims are not initialized - // in older browsers (e.g FF3.6, IE6,7,8, Safari 4.0,5.0, etc) - container.css({ - position: 'absolute', - top: '-8px', - left: '-8px', - width: '9px', - height: '9px', - overflow: 'hidden' - }); - - // insert flash object - html = '' + - '' + - '' + - '' + - ''; - - container.html( html ); - }, - - getFlash: function() { - if ( this._flash ) { - return this._flash; - } - - this._flash = $( '#' + this.uid ).get( 0 ); - return this._flash; - } - - }); - - FlashRuntime.register = function( name, component ) { - component = components[ name ] = Base.inherits( CompBase, $.extend({ - - // @todo fix this later - flashExec: function() { - var owner = this.owner, - runtime = this.getRuntime(); - - return runtime.flashExec.apply( owner, arguments ); - } - }, component ) ); - - return component; - }; - - if ( getFlashVersion() >= 11.4 ) { - Runtime.addRuntime( type, FlashRuntime ); - } - - return FlashRuntime; - }); - /** - * @fileOverview FilePicker - */ - define('runtime/flash/filepicker',[ - 'base', - 'runtime/flash/runtime' - ], function( Base, FlashRuntime ) { - var $ = Base.$; - - return FlashRuntime.register( 'FilePicker', { - init: function( opts ) { - var copy = $.extend({}, opts ), - len, i; - - // 修复Flash再没有设置title的情况下无法弹出flash文件选择框的bug. - len = copy.accept && copy.accept.length; - for ( i = 0; i < len; i++ ) { - if ( !copy.accept[ i ].title ) { - copy.accept[ i ].title = 'Files'; - } - } - - delete copy.button; - delete copy.id; - delete copy.container; - - this.flashExec( 'FilePicker', 'init', copy ); - }, - - destroy: function() { - this.flashExec( 'FilePicker', 'destroy' ); - } - }); - }); - /** - * @fileOverview 图片压缩 - */ - define('runtime/flash/image',[ - 'runtime/flash/runtime' - ], function( FlashRuntime ) { - - return FlashRuntime.register( 'Image', { - // init: function( options ) { - // var owner = this.owner; - - // this.flashExec( 'Image', 'init', options ); - // owner.on( 'load', function() { - // debugger; - // }); - // }, - - loadFromBlob: function( blob ) { - var owner = this.owner; - - owner.info() && this.flashExec( 'Image', 'info', owner.info() ); - owner.meta() && this.flashExec( 'Image', 'meta', owner.meta() ); - - this.flashExec( 'Image', 'loadFromBlob', blob.uid ); - } - }); - }); - /** - * @fileOverview Transport flash实现 - */ - define('runtime/flash/transport',[ - 'base', - 'runtime/flash/runtime', - 'runtime/client' - ], function( Base, FlashRuntime, RuntimeClient ) { - var $ = Base.$; - - return FlashRuntime.register( 'Transport', { - init: function() { - this._status = 0; - this._response = null; - this._responseJson = null; - }, - - send: function() { - var owner = this.owner, - opts = this.options, - xhr = this._initAjax(), - blob = owner._blob, - server = opts.server, - binary; - - xhr.connectRuntime( blob.ruid ); - - if ( opts.sendAsBinary ) { - server += (/\?/.test( server ) ? '&' : '?') + - $.param( owner._formData ); - - binary = blob.uid; - } else { - $.each( owner._formData, function( k, v ) { - xhr.exec( 'append', k, v ); - }); - - xhr.exec( 'appendBlob', opts.fileVal, blob.uid, - opts.filename || owner._formData.name || '' ); - } - - this._setRequestHeader( xhr, opts.headers ); - xhr.exec( 'send', { - method: opts.method, - url: server, - forceURLStream: opts.forceURLStream, - mimeType: 'application/octet-stream' - }, binary ); - }, - - getStatus: function() { - return this._status; - }, - - getResponse: function() { - return this._response || ''; - }, - - getResponseAsJson: function() { - return this._responseJson; - }, - - abort: function() { - var xhr = this._xhr; - - if ( xhr ) { - xhr.exec('abort'); - xhr.destroy(); - this._xhr = xhr = null; - } - }, - - destroy: function() { - this.abort(); - }, - - _initAjax: function() { - var me = this, - xhr = new RuntimeClient('XMLHttpRequest'); - - xhr.on( 'uploadprogress progress', function( e ) { - var percent = e.loaded / e.total; - percent = Math.min( 1, Math.max( 0, percent ) ); - return me.trigger( 'progress', percent ); - }); - - xhr.on( 'load', function() { - var status = xhr.exec('getStatus'), - readBody = false, - err = '', - p; - - xhr.off(); - me._xhr = null; - - if ( status >= 200 && status < 300 ) { - readBody = true; - } else if ( status >= 500 && status < 600 ) { - readBody = true; - err = 'server'; - } else { - err = 'http'; - } - - if ( readBody ) { - me._response = xhr.exec('getResponse'); - me._response = decodeURIComponent( me._response ); - - // flash 处理可能存在 bug, 没辙只能靠 js 了 - // try { - // me._responseJson = xhr.exec('getResponseAsJson'); - // } catch ( error ) { - - p = window.JSON && window.JSON.parse || function( s ) { - try { - return new Function('return ' + s).call(); - } catch ( err ) { - return {}; - } - }; - me._responseJson = me._response ? p(me._response) : {}; - - // } - } - - xhr.destroy(); - xhr = null; - - return err ? me.trigger( 'error', err ) : me.trigger('load'); - }); - - xhr.on( 'error', function() { - xhr.off(); - me._xhr = null; - me.trigger( 'error', 'http' ); - }); - - me._xhr = xhr; - return xhr; - }, - - _setRequestHeader: function( xhr, headers ) { - $.each( headers, function( key, val ) { - xhr.exec( 'setRequestHeader', key, val ); - }); - } - }); - }); - /** - * @fileOverview Blob Html实现 - */ - define('runtime/flash/blob',[ - 'runtime/flash/runtime', - 'lib/blob' - ], function( FlashRuntime, Blob ) { - - return FlashRuntime.register( 'Blob', { - slice: function( start, end ) { - var blob = this.flashExec( 'Blob', 'slice', start, end ); - - return new Blob( blob.uid, blob ); - } - }); - }); - /** - * @fileOverview Md5 flash实现 - */ - define('runtime/flash/md5',[ - 'runtime/flash/runtime' - ], function( FlashRuntime ) { - - return FlashRuntime.register( 'Md5', { - init: function() { - // do nothing. - }, - - loadFromBlob: function( blob ) { - return this.flashExec( 'Md5', 'loadFromBlob', blob.uid ); - } - }); - }); - /** - * @fileOverview 完全版本。 - */ - define('preset/all',[ - 'base', - - // widgets - 'widgets/filednd', - 'widgets/filepaste', - 'widgets/filepicker', - 'widgets/image', - 'widgets/queue', - 'widgets/runtime', - 'widgets/upload', - 'widgets/validator', - 'widgets/md5', - - // runtimes - // html5 - 'runtime/html5/blob', - 'runtime/html5/dnd', - 'runtime/html5/filepaste', - 'runtime/html5/filepicker', - 'runtime/html5/imagemeta/exif', - 'runtime/html5/androidpatch', - 'runtime/html5/image', - 'runtime/html5/transport', - 'runtime/html5/md5', - - // flash - 'runtime/flash/filepicker', - 'runtime/flash/image', - 'runtime/flash/transport', - 'runtime/flash/blob', - 'runtime/flash/md5' - ], function( Base ) { - return Base; - }); - /** - * @fileOverview 日志组件,主要用来收集错误信息,可以帮助 webuploader 更好的定位问题和发展。 - * - * 如果您不想要启用此功能,请在打包的时候去掉 log 模块。 - * - * 或者可以在初始化的时候通过 options.disableWidgets 属性禁用。 - * - * 如: - * WebUploader.create({ - * ... - * - * disableWidgets: 'log', - * - * ... - * }) - */ - define('widgets/log',[ - 'base', - 'uploader', - 'widgets/widget' - ], function( Base, Uploader ) { - var $ = Base.$, - logUrl = ' http://static.tieba.baidu.com/tb/pms/img/st.gif??', - product = (location.hostname || location.host || 'protected').toLowerCase(), - - // 只针对 baidu 内部产品用户做统计功能。 - enable = product && /baidu/i.exec(product), - base; - - if (!enable) { - return; - } - - base = { - dv: 3, - master: 'webuploader', - online: /test/.exec(product) ? 0 : 1, - module: '', - product: product, - type: 0 - }; - - function send(data) { - var obj = $.extend({}, base, data), - url = logUrl.replace(/^(.*)\?/, '$1' + $.param( obj )), - image = new Image(); - - image.src = url; - } - - return Uploader.register({ - name: 'log', - - init: function() { - var owner = this.owner, - count = 0, - size = 0; - - owner - .on('error', function(code) { - send({ - type: 2, - c_error_code: code - }); - }) - .on('uploadError', function(file, reason) { - send({ - type: 2, - c_error_code: 'UPLOAD_ERROR', - c_reason: '' + reason - }); - }) - .on('uploadComplete', function(file) { - count++; - size += file.size; - }). - on('uploadFinished', function() { - send({ - c_count: count, - c_size: size - }); - count = size = 0; - }); - - send({ - c_usage: 1 - }); - } - }); - }); - /** - * @fileOverview Uploader上传类 - */ - define('webuploader',[ - 'preset/all', - 'widgets/log' - ], function( preset ) { - return preset; - }); - return require('webuploader'); -}); diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.min.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.min.js deleted file mode 100644 index b7476bea..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* WebUploader 0.1.5 */!function(a,b){var c,d={},e=function(a,b){var c,d,e;if("string"==typeof a)return h(a);for(c=[],d=a.length,e=0;d>e;e++)c.push(h(a[e]));return b.apply(null,c)},f=function(a,b,c){2===arguments.length&&(c=b,b=null),e(b||[],function(){g(a,c,arguments)})},g=function(a,b,c){var f,g={exports:b};"function"==typeof b&&(c.length||(c=[e,g.exports,g]),f=b.apply(null,c),void 0!==f&&(g.exports=f)),d[a]=g.exports},h=function(b){var c=d[b]||a[b];if(!c)throw new Error("`"+b+"` is undefined");return c},i=function(a){var b,c,e,f,g,h;h=function(a){return a&&a.charAt(0).toUpperCase()+a.substr(1)};for(b in d)if(c=a,d.hasOwnProperty(b)){for(e=b.split("/"),g=h(e.pop());f=h(e.shift());)c[f]=c[f]||{},c=c[f];c[g]=d[b]}return a},j=function(c){return a.__dollar=c,i(b(a,f,e))};"object"==typeof module&&"object"==typeof module.exports?module.exports=j():"function"==typeof define&&define.amd?define(["jquery"],j):(c=a.WebUploader,a.WebUploader=j(),a.WebUploader.noConflict=function(){a.WebUploader=c})}(window,function(a,b,c){return b("dollar-third",[],function(){var b=a.__dollar||a.jQuery||a.Zepto;if(!b)throw new Error("jQuery or Zepto not found!");return b}),b("dollar",["dollar-third"],function(a){return a}),b("promise-third",["dollar"],function(a){return{Deferred:a.Deferred,when:a.when,isPromise:function(a){return a&&"function"==typeof a.then}}}),b("promise",["promise-third"],function(a){return a}),b("base",["dollar","promise"],function(b,c){function d(a){return function(){return h.apply(a,arguments)}}function e(a,b){return function(){return a.apply(b,arguments)}}function f(a){var b;return Object.create?Object.create(a):(b=function(){},b.prototype=a,new b)}var g=function(){},h=Function.call;return{version:"0.1.5",$:b,Deferred:c.Deferred,isPromise:c.isPromise,when:c.when,browser:function(a){var b={},c=a.match(/WebKit\/([\d.]+)/),d=a.match(/Chrome\/([\d.]+)/)||a.match(/CriOS\/([\d.]+)/),e=a.match(/MSIE\s([\d\.]+)/)||a.match(/(?:trident)(?:.*rv:([\w.]+))?/i),f=a.match(/Firefox\/([\d.]+)/),g=a.match(/Safari\/([\d.]+)/),h=a.match(/OPR\/([\d.]+)/);return c&&(b.webkit=parseFloat(c[1])),d&&(b.chrome=parseFloat(d[1])),e&&(b.ie=parseFloat(e[1])),f&&(b.firefox=parseFloat(f[1])),g&&(b.safari=parseFloat(g[1])),h&&(b.opera=parseFloat(h[1])),b}(navigator.userAgent),os:function(a){var b={},c=a.match(/(?:Android);?[\s\/]+([\d.]+)?/),d=a.match(/(?:iPad|iPod|iPhone).*OS\s([\d_]+)/);return c&&(b.android=parseFloat(c[1])),d&&(b.ios=parseFloat(d[1].replace(/_/g,"."))),b}(navigator.userAgent),inherits:function(a,c,d){var e;return"function"==typeof c?(e=c,c=null):e=c&&c.hasOwnProperty("constructor")?c.constructor:function(){return a.apply(this,arguments)},b.extend(!0,e,a,d||{}),e.__super__=a.prototype,e.prototype=f(a.prototype),c&&b.extend(!0,e.prototype,c),e},noop:g,bindFn:e,log:function(){return a.console?e(console.log,console):g}(),nextTick:function(){return function(a){setTimeout(a,1)}}(),slice:d([].slice),guid:function(){var a=0;return function(b){for(var c=(+new Date).toString(32),d=0;5>d;d++)c+=Math.floor(65535*Math.random()).toString(32);return(b||"wu_")+c+(a++).toString(32)}}(),formatSize:function(a,b,c){var d;for(c=c||["B","K","M","G","TB"];(d=c.shift())&&a>1024;)a/=1024;return("B"===d?a:a.toFixed(b||2))+d}}}),b("mediator",["base"],function(a){function b(a,b,c,d){return f.grep(a,function(a){return!(!a||b&&a.e!==b||c&&a.cb!==c&&a.cb._cb!==c||d&&a.ctx!==d)})}function c(a,b,c){f.each((a||"").split(h),function(a,d){c(d,b)})}function d(a,b){for(var c,d=!1,e=-1,f=a.length;++e1?void(d.isPlainObject(b)&&d.isPlainObject(c[a])?d.extend(c[a],b):c[a]=b):a?c[a]:c},getStats:function(){var a=this.request("get-stats");return a?{successNum:a.numOfSuccess,progressNum:a.numOfProgress,cancelNum:a.numOfCancel,invalidNum:a.numOfInvalid,uploadFailNum:a.numOfUploadFailed,queueNum:a.numOfQueue,interruptNum:a.numofInterrupt}:{}},trigger:function(a){var c=[].slice.call(arguments,1),e=this.options,f="on"+a.substring(0,1).toUpperCase()+a.substring(1);return b.trigger.apply(this,arguments)===!1||d.isFunction(e[f])&&e[f].apply(this,c)===!1||d.isFunction(this[f])&&this[f].apply(this,c)===!1||b.trigger.apply(b,[this,a].concat(c))===!1?!1:!0},destroy:function(){this.request("destroy",arguments),this.off()},request:a.noop}),a.create=c.create=function(a){return new c(a)},a.Uploader=c,c}),b("runtime/runtime",["base","mediator"],function(a,b){function c(b){this.options=d.extend({container:document.body},b),this.uid=a.guid("rt_")}var d=a.$,e={},f=function(a){for(var b in a)if(a.hasOwnProperty(b))return b;return null};return d.extend(c.prototype,{getContainer:function(){var a,b,c=this.options;return this._container?this._container:(a=d(c.container||document.body),b=d(document.createElement("div")),b.attr("id","rt_"+this.uid),b.css({position:"absolute",top:"0px",left:"0px",width:"1px",height:"1px",overflow:"hidden"}),a.append(b),a.addClass("webuploader-container"),this._container=b,this._parent=a,b)},init:a.noop,exec:a.noop,destroy:function(){this._container&&this._container.remove(),this._parent&&this._parent.removeClass("webuploader-container"),this.off()}}),c.orders="html5,flash",c.addRuntime=function(a,b){e[a]=b},c.hasRuntime=function(a){return!!(a?e[a]:f(e))},c.create=function(a,b){var g,h;if(b=b||c.orders,d.each(b.split(/\s*,\s*/g),function(){return e[this]?(g=this,!1):void 0}),g=g||f(e),!g)throw new Error("Runtime Error");return h=new e[g](a)},b.installTo(c.prototype),c}),b("runtime/client",["base","mediator","runtime/runtime"],function(a,b,c){function d(b,d){var f,g=a.Deferred();this.uid=a.guid("client_"),this.runtimeReady=function(a){return g.done(a)},this.connectRuntime=function(b,h){if(f)throw new Error("already connected!");return g.done(h),"string"==typeof b&&e.get(b)&&(f=e.get(b)),f=f||e.get(null,d),f?(a.$.extend(f.options,b),f.__promise.then(g.resolve),f.__client++):(f=c.create(b,b.runtimeOrder),f.__promise=g.promise(),f.once("ready",g.resolve),f.init(),e.add(f),f.__client=1),d&&(f.__standalone=d),f},this.getRuntime=function(){return f},this.disconnectRuntime=function(){f&&(f.__client--,f.__client<=0&&(e.remove(f),delete f.__promise,f.destroy()),f=null)},this.exec=function(){if(f){var c=a.slice(arguments);return b&&c.unshift(b),f.exec.apply(this,c)}},this.getRuid=function(){return f&&f.uid},this.destroy=function(a){return function(){a&&a.apply(this,arguments),this.trigger("destroy"),this.off(),this.exec("destroy"),this.disconnectRuntime()}}(this.destroy)}var e;return e=function(){var a={};return{add:function(b){a[b.uid]=b},get:function(b,c){var d;if(b)return a[b];for(d in a)if(!c||!a[d].__standalone)return a[d];return null},remove:function(b){delete a[b.uid]}}}(),b.installTo(d.prototype),d}),b("lib/dnd",["base","mediator","runtime/client"],function(a,b,c){function d(a){a=this.options=e.extend({},d.options,a),a.container=e(a.container),a.container.length&&c.call(this,"DragAndDrop")}var e=a.$;return d.options={accept:null,disableGlobalDnd:!1},a.inherits(c,{constructor:d,init:function(){var a=this;a.connectRuntime(a.options,function(){a.exec("init"),a.trigger("ready")})}}),b.installTo(d.prototype),d}),b("widgets/widget",["base","uploader"],function(a,b){function c(a){if(!a)return!1;var b=a.length,c=e.type(a);return 1===a.nodeType&&b?!0:"array"===c||"function"!==c&&"string"!==c&&(0===b||"number"==typeof b&&b>0&&b-1 in a)}function d(a){this.owner=a,this.options=a.options}var e=a.$,f=b.prototype._init,g=b.prototype.destroy,h={},i=[];return e.extend(d.prototype,{init:a.noop,invoke:function(a,b){var c=this.responseMap;return c&&a in c&&c[a]in this&&e.isFunction(this[c[a]])?this[c[a]].apply(this,b):h},request:function(){return this.owner.request.apply(this.owner,arguments)}}),e.extend(b.prototype,{_init:function(){var a=this,b=a._widgets=[],c=a.options.disableWidgets||"";return e.each(i,function(d,e){(!c||!~c.indexOf(e._name))&&b.push(new e(a))}),f.apply(a,arguments)},request:function(b,d,e){var f,g,i,j,k=0,l=this._widgets,m=l&&l.length,n=[],o=[];for(d=c(d)?d:[d];m>k;k++)f=l[k],g=f.invoke(b,d),g!==h&&(a.isPromise(g)?o.push(g):n.push(g));return e||o.length?(i=a.when.apply(a,o),j=i.pipe?"pipe":"then",i[j](function(){var b=a.Deferred(),c=arguments;return 1===c.length&&(c=c[0]),setTimeout(function(){b.resolve(c)},1),b.promise()})[e?j:"done"](e||a.noop)):n[0]},destroy:function(){g.apply(this,arguments),this._widgets=null}}),b.register=d.register=function(b,c){var f,g={init:"init",destroy:"destroy",name:"anonymous"};return 1===arguments.length?(c=b,e.each(c,function(a){return"_"===a[0]||"name"===a?void("name"===a&&(g.name=c.name)):void(g[a.replace(/[A-Z]/g,"-$&").toLowerCase()]=a)})):g=e.extend(g,b),c.responseMap=g,f=a.inherits(d,c),f._name=g.name,i.push(f),f},b.unRegister=d.unRegister=function(a){if(a&&"anonymous"!==a)for(var b=i.length;b--;)i[b]._name===a&&i.splice(b,1)},d}),b("widgets/filednd",["base","uploader","lib/dnd","widgets/widget"],function(a,b,c){var d=a.$;return b.options.dnd="",b.register({name:"dnd",init:function(b){if(b.dnd&&"html5"===this.request("predict-runtime-type")){var e,f=this,g=a.Deferred(),h=d.extend({},{disableGlobalDnd:b.disableGlobalDnd,container:b.dnd,accept:b.accept});return this.dnd=e=new c(h),e.once("ready",g.resolve),e.on("drop",function(a){f.request("add-file",[a])}),e.on("accept",function(a){return f.owner.trigger("dndAccept",a)}),e.init(),g.promise()}},destroy:function(){this.dnd&&this.dnd.destroy()}})}),b("lib/filepaste",["base","mediator","runtime/client"],function(a,b,c){function d(a){a=this.options=e.extend({},a),a.container=e(a.container||document.body),c.call(this,"FilePaste")}var e=a.$;return a.inherits(c,{constructor:d,init:function(){var a=this;a.connectRuntime(a.options,function(){a.exec("init"),a.trigger("ready")})}}),b.installTo(d.prototype),d}),b("widgets/filepaste",["base","uploader","lib/filepaste","widgets/widget"],function(a,b,c){var d=a.$;return b.register({name:"paste",init:function(b){if(b.paste&&"html5"===this.request("predict-runtime-type")){var e,f=this,g=a.Deferred(),h=d.extend({},{container:b.paste,accept:b.accept});return this.paste=e=new c(h),e.once("ready",g.resolve),e.on("paste",function(a){f.owner.request("add-file",[a])}),e.init(),g.promise()}},destroy:function(){this.paste&&this.paste.destroy()}})}),b("lib/blob",["base","runtime/client"],function(a,b){function c(a,c){var d=this;d.source=c,d.ruid=a,this.size=c.size||0,this.type=!c.type&&this.ext&&~"jpg,jpeg,png,gif,bmp".indexOf(this.ext)?"image/"+("jpg"===this.ext?"jpeg":this.ext):c.type||"application/octet-stream",b.call(d,"Blob"),this.uid=c.uid||this.uid,a&&d.connectRuntime(a)}return a.inherits(b,{constructor:c,slice:function(a,b){return this.exec("slice",a,b)},getSource:function(){return this.source}}),c}),b("lib/file",["base","lib/blob"],function(a,b){function c(a,c){var f;this.name=c.name||"untitled"+d++,f=e.exec(c.name)?RegExp.$1.toLowerCase():"",!f&&c.type&&(f=/\/(jpg|jpeg|png|gif|bmp)$/i.exec(c.type)?RegExp.$1.toLowerCase():"",this.name+="."+f),this.ext=f,this.lastModifiedDate=c.lastModifiedDate||(new Date).toLocaleString(),b.apply(this,arguments)}var d=1,e=/\.([^.]+)$/;return a.inherits(b,c)}),b("lib/filepicker",["base","runtime/client","lib/file"],function(b,c,d){function e(a){if(a=this.options=f.extend({},e.options,a),a.container=f(a.id),!a.container.length)throw new Error("按钮指定错误");a.innerHTML=a.innerHTML||a.label||a.container.html()||"",a.button=f(a.button||document.createElement("div")),a.button.html(a.innerHTML),a.container.html(a.button),c.call(this,"FilePicker",!0)}var f=b.$;return e.options={button:null,container:null,label:null,innerHTML:null,multiple:!0,accept:null,name:"file"},b.inherits(c,{constructor:e,init:function(){var c=this,e=c.options,g=e.button;g.addClass("webuploader-pick"),c.on("all",function(a){var b;switch(a){case"mouseenter":g.addClass("webuploader-pick-hover");break;case"mouseleave":g.removeClass("webuploader-pick-hover");break;case"change":b=c.exec("getFiles"),c.trigger("select",f.map(b,function(a){return a=new d(c.getRuid(),a),a._refer=e.container,a}),e.container)}}),c.connectRuntime(e,function(){c.refresh(),c.exec("init",e),c.trigger("ready")}),this._resizeHandler=b.bindFn(this.refresh,this),f(a).on("resize",this._resizeHandler)},refresh:function(){var a=this.getRuntime().getContainer(),b=this.options.button,c=b.outerWidth?b.outerWidth():b.width(),d=b.outerHeight?b.outerHeight():b.height(),e=b.offset();c&&d&&a.css({bottom:"auto",right:"auto",width:c+"px",height:d+"px"}).offset(e)},enable:function(){var a=this.options.button;a.removeClass("webuploader-pick-disable"),this.refresh()},disable:function(){var a=this.options.button;this.getRuntime().getContainer().css({top:"-99999px"}),a.addClass("webuploader-pick-disable")},destroy:function(){var b=this.options.button;f(a).off("resize",this._resizeHandler),b.removeClass("webuploader-pick-disable webuploader-pick-hover webuploader-pick")}}),e}),b("widgets/filepicker",["base","uploader","lib/filepicker","widgets/widget"],function(a,b,c){var d=a.$;return d.extend(b.options,{pick:null,accept:null}),b.register({name:"picker",init:function(a){return this.pickers=[],a.pick&&this.addBtn(a.pick)},refresh:function(){d.each(this.pickers,function(){this.refresh()})},addBtn:function(b){var e=this,f=e.options,g=f.accept,h=[];if(b)return d.isPlainObject(b)||(b={id:b}),d(b.id).each(function(){var i,j,k;k=a.Deferred(),i=d.extend({},b,{accept:d.isPlainObject(g)?[g]:g,swf:f.swf,runtimeOrder:f.runtimeOrder,id:this}),j=new c(i),j.once("ready",k.resolve),j.on("select",function(a){e.owner.request("add-file",[a])}),j.init(),e.pickers.push(j),h.push(k.promise())}),a.when.apply(a,h)},disable:function(){d.each(this.pickers,function(){this.disable()})},enable:function(){d.each(this.pickers,function(){this.enable()})},destroy:function(){d.each(this.pickers,function(){this.destroy()}),this.pickers=null}})}),b("lib/image",["base","runtime/client","lib/blob"],function(a,b,c){function d(a){this.options=e.extend({},d.options,a),b.call(this,"Image"),this.on("load",function(){this._info=this.exec("info"),this._meta=this.exec("meta")})}var e=a.$;return d.options={quality:90,crop:!1,preserveHeaders:!1,allowMagnify:!1},a.inherits(b,{constructor:d,info:function(a){return a?(this._info=a,this):this._info},meta:function(a){return a?(this._meta=a,this):this._meta},loadFromBlob:function(a){var b=this,c=a.getRuid();this.connectRuntime(c,function(){b.exec("init",b.options),b.exec("loadFromBlob",a)})},resize:function(){var b=a.slice(arguments);return this.exec.apply(this,["resize"].concat(b))},crop:function(){var b=a.slice(arguments);return this.exec.apply(this,["crop"].concat(b))},getAsDataUrl:function(a){return this.exec("getAsDataUrl",a)},getAsBlob:function(a){var b=this.exec("getAsBlob",a);return new c(this.getRuid(),b)}}),d}),b("widgets/image",["base","uploader","lib/image","widgets/widget"],function(a,b,c){var d,e=a.$;return d=function(a){var b=0,c=[],d=function(){for(var d;c.length&&a>b;)d=c.shift(),b+=d[0],d[1]()};return function(a,e,f){c.push([e,f]),a.once("destroy",function(){b-=e,setTimeout(d,1)}),setTimeout(d,1)}}(5242880),e.extend(b.options,{thumb:{width:110,height:110,quality:70,allowMagnify:!0,crop:!0,preserveHeaders:!1,type:"image/jpeg"},compress:{width:1600,height:1600,quality:90,allowMagnify:!1,crop:!1,preserveHeaders:!0}}),b.register({name:"image",makeThumb:function(a,b,f,g){var h,i;return a=this.request("get-file",a),a.type.match(/^image/)?(h=e.extend({},this.options.thumb),e.isPlainObject(f)&&(h=e.extend(h,f),f=null),f=f||h.width,g=g||h.height,i=new c(h),i.once("load",function(){a._info=a._info||i.info(),a._meta=a._meta||i.meta(),1>=f&&f>0&&(f=a._info.width*f),1>=g&&g>0&&(g=a._info.height*g),i.resize(f,g)}),i.once("complete",function(){b(!1,i.getAsDataUrl(h.type)),i.destroy()}),i.once("error",function(a){b(a||!0),i.destroy()}),void d(i,a.source.size,function(){a._info&&i.info(a._info),a._meta&&i.meta(a._meta),i.loadFromBlob(a.source)})):void b(!0)},beforeSendFile:function(b){var d,f,g=this.options.compress||this.options.resize,h=g&&g.compressSize||0,i=g&&g.noCompressIfLarger||!1;return b=this.request("get-file",b),!g||!~"image/jpeg,image/jpg".indexOf(b.type)||b.size=a&&a>0&&(a=b._info.width*a),1>=c&&c>0&&(c=b._info.height*c),d.resize(a,c)}),d.once("complete",function(){var a,c;try{a=d.getAsBlob(g.type),c=b.size,(!i||a.sizeb;b++)if(c=this._queue[b],a===c.getStatus())return c;return null},sort:function(a){"function"==typeof a&&this._queue.sort(a)},getFiles:function(){for(var a,b=[].slice.call(arguments,0),c=[],d=0,f=this._queue.length;f>d;d++)a=this._queue[d],(!b.length||~e.inArray(a.getStatus(),b))&&c.push(a);return c},removeFile:function(a){var b=this._map[a.id];b&&(delete this._map[a.id],a.destroy(),this.stats.numofDeleted++)},_fileAdded:function(a){var b=this,c=this._map[a.id];c||(this._map[a.id]=a,a.on("statuschange",function(a,c){b._onFileStatusChange(a,c)}))},_onFileStatusChange:function(a,b){var c=this.stats;switch(b){case f.PROGRESS:c.numOfProgress--;break;case f.QUEUED:c.numOfQueue--;break;case f.ERROR:c.numOfUploadFailed--;break;case f.INVALID:c.numOfInvalid--;break;case f.INTERRUPT:c.numofInterrupt--}switch(a){case f.QUEUED:c.numOfQueue++;break;case f.PROGRESS:c.numOfProgress++;break;case f.ERROR:c.numOfUploadFailed++;break;case f.COMPLETE:c.numOfSuccess++;break;case f.CANCELLED:c.numOfCancel++;break;case f.INVALID:c.numOfInvalid++;break;case f.INTERRUPT:c.numofInterrupt++}}}),b.installTo(d.prototype),d}),b("widgets/queue",["base","uploader","queue","file","lib/file","runtime/client","widgets/widget"],function(a,b,c,d,e,f){var g=a.$,h=/\.\w+$/,i=d.Status;return b.register({name:"queue",init:function(b){var d,e,h,i,j,k,l,m=this;if(g.isPlainObject(b.accept)&&(b.accept=[b.accept]),b.accept){for(j=[],h=0,e=b.accept.length;e>h;h++)i=b.accept[h].extensions,i&&j.push(i);j.length&&(k="\\."+j.join(",").replace(/,/g,"$|\\.").replace(/\*/g,".*")+"$"),m.accept=new RegExp(k,"i")}return m.queue=new c,m.stats=m.queue.stats,"html5"===this.request("predict-runtime-type")?(d=a.Deferred(),this.placeholder=l=new f("Placeholder"),l.connectRuntime({runtimeOrder:"html5"},function(){m._ruid=l.getRuid(),d.resolve()}),d.promise()):void 0},_wrapFile:function(a){if(!(a instanceof d)){if(!(a instanceof e)){if(!this._ruid)throw new Error("Can't add external files.");a=new e(this._ruid,a)}a=new d(a)}return a},acceptFile:function(a){var b=!a||!a.size||this.accept&&h.exec(a.name)&&!this.accept.test(a.name);return!b},_addFile:function(a){var b=this;return a=b._wrapFile(a),b.owner.trigger("beforeFileQueued",a)?b.acceptFile(a)?(b.queue.append(a),b.owner.trigger("fileQueued",a),a):void b.owner.trigger("error","Q_TYPE_DENIED",a):void 0},getFile:function(a){return this.queue.getFile(a)},addFile:function(a){var b=this;a.length||(a=[a]),a=g.map(a,function(a){return b._addFile(a)}),b.owner.trigger("filesQueued",a),b.options.auto&&setTimeout(function(){b.request("start-upload")},20)},getStats:function(){return this.stats},removeFile:function(a,b){var c=this;a=a.id?a:c.queue.getFile(a),this.request("cancel-file",a),b&&this.queue.removeFile(a)},getFiles:function(){return this.queue.getFiles.apply(this.queue,arguments)},fetchFile:function(){return this.queue.fetch.apply(this.queue,arguments)},retry:function(a,b){var c,d,e,f=this;if(a)return a=a.id?a:f.queue.getFile(a),a.setStatus(i.QUEUED),void(b||f.request("start-upload"));for(c=f.queue.getFiles(i.ERROR),d=0,e=c.length;e>d;d++)a=c[d],a.setStatus(i.QUEUED);f.request("start-upload")},sortFiles:function(){return this.queue.sort.apply(this.queue,arguments)},reset:function(){this.owner.trigger("reset"),this.queue=new c,this.stats=this.queue.stats},destroy:function(){this.reset(),this.placeholder&&this.placeholder.destroy()}})}),b("widgets/runtime",["uploader","runtime/runtime","widgets/widget"],function(a,b){return a.support=function(){return b.hasRuntime.apply(b,arguments)},a.register({name:"runtime",init:function(){if(!this.predictRuntimeType())throw Error("Runtime Error")},predictRuntimeType:function(){var a,c,d=this.options.runtimeOrder||b.orders,e=this.type;if(!e)for(d=d.split(/\s*,\s*/g),a=0,c=d.length;c>a;a++)if(b.hasRuntime(d[a])){this.type=e=d[a];break}return e}})}),b("lib/transport",["base","runtime/client","mediator"],function(a,b,c){function d(a){var c=this;a=c.options=e.extend(!0,{},d.options,a||{}),b.call(this,"Transport"),this._blob=null,this._formData=a.formData||{},this._headers=a.headers||{},this.on("progress",this._timeout),this.on("load error",function(){c.trigger("progress",1),clearTimeout(c._timer)})}var e=a.$;return d.options={server:"",method:"POST",withCredentials:!1,fileVal:"file",timeout:12e4,formData:{},headers:{},sendAsBinary:!1},e.extend(d.prototype,{appendBlob:function(a,b,c){var d=this,e=d.options;d.getRuid()&&d.disconnectRuntime(),d.connectRuntime(b.ruid,function(){d.exec("init")}),d._blob=b,e.fileVal=a||e.fileVal,e.filename=c||e.filename},append:function(a,b){"object"==typeof a?e.extend(this._formData,a):this._formData[a]=b},setRequestHeader:function(a,b){"object"==typeof a?e.extend(this._headers,a):this._headers[a]=b},send:function(a){this.exec("send",a),this._timeout()},abort:function(){return clearTimeout(this._timer),this.exec("abort")},destroy:function(){this.trigger("destroy"),this.off(),this.exec("destroy"),this.disconnectRuntime()},getResponse:function(){return this.exec("getResponse")},getResponseAsJson:function(){return this.exec("getResponseAsJson")},getStatus:function(){return this.exec("getStatus")},_timeout:function(){var a=this,b=a.options.timeout;b&&(clearTimeout(a._timer),a._timer=setTimeout(function(){a.abort(),a.trigger("error","timeout")},b))}}),c.installTo(d.prototype),d}),b("widgets/upload",["base","uploader","file","lib/transport","widgets/widget"],function(a,b,c,d){function e(a,b){var c,d,e=[],f=a.source,g=f.size,h=b?Math.ceil(g/b):1,i=0,j=0;for(d={file:a,has:function(){return!!e.length},shift:function(){return e.shift()},unshift:function(a){e.unshift(a)}};h>j;)c=Math.min(b,g-i),e.push({file:a,start:i,end:b?i+c:g,total:g,chunks:h,chunk:j++,cuted:d}),i+=c;return a.blocks=e.concat(),a.remaning=e.length,d}var f=a.$,g=a.isPromise,h=c.Status;f.extend(b.options,{prepareNextFile:!1,chunked:!1,chunkSize:5242880,chunkRetry:2,threads:3,formData:{}}),b.register({name:"upload",init:function(){var b=this.owner,c=this;this.runing=!1,this.progress=!1,b.on("startUpload",function(){c.progress=!0}).on("uploadFinished",function(){c.progress=!1}),this.pool=[],this.stack=[],this.pending=[],this.remaning=0,this.__tick=a.bindFn(this._tick,this),b.on("uploadComplete",function(a){a.blocks&&f.each(a.blocks,function(a,b){b.transport&&(b.transport.abort(),b.transport.destroy()),delete b.transport}),delete a.blocks,delete a.remaning})},reset:function(){this.request("stop-upload",!0),this.runing=!1,this.pool=[],this.stack=[],this.pending=[],this.remaning=0,this._trigged=!1,this._promise=null},startUpload:function(b){var c=this;if(f.each(c.request("get-files",h.INVALID),function(){c.request("remove-file",this)}),b)if(b=b.id?b:c.request("get-file",b),b.getStatus()===h.INTERRUPT)f.each(c.pool,function(a,c){c.file===b&&c.transport&&c.transport.send()}),b.setStatus(h.QUEUED);else{if(b.getStatus()===h.PROGRESS)return;b.setStatus(h.QUEUED)}else f.each(c.request("get-files",[h.INITED]),function(){this.setStatus(h.QUEUED)});if(!c.runing){c.runing=!0;var d=[];f.each(c.pool,function(a,b){var e=b.file;e.getStatus()===h.INTERRUPT&&(d.push(e),c._trigged=!1,b.transport&&b.transport.send())});for(var b;b=d.shift();)b.setStatus(h.PROGRESS);b||f.each(c.request("get-files",h.INTERRUPT),function(){this.setStatus(h.PROGRESS)}),c._trigged=!1,a.nextTick(c.__tick),c.owner.trigger("startUpload")}},stopUpload:function(b,c){var d=this;if(b===!0&&(c=b,b=null),d.runing!==!1){if(b){if(b=b.id?b:d.request("get-file",b),b.getStatus()!==h.PROGRESS&&b.getStatus()!==h.QUEUED)return;return b.setStatus(h.INTERRUPT),f.each(d.pool,function(a,c){c.file===b&&(c.transport&&c.transport.abort(),d._putback(c),d._popBlock(c))}),a.nextTick(d.__tick)}d.runing=!1,this._promise&&this._promise.file&&this._promise.file.setStatus(h.INTERRUPT),c&&f.each(d.pool,function(a,b){b.transport&&b.transport.abort(),b.file.setStatus(h.INTERRUPT)}),d.owner.trigger("stopUpload")}},cancelFile:function(a){a=a.id?a:this.request("get-file",a),a.blocks&&f.each(a.blocks,function(a,b){var c=b.transport;c&&(c.abort(),c.destroy(),delete b.transport)}),a.setStatus(h.CANCELLED),this.owner.trigger("fileDequeued",a)},isInProgress:function(){return!!this.progress},_getStats:function(){return this.request("get-stats")},skipFile:function(a,b){a=a.id?a:this.request("get-file",a),a.setStatus(b||h.COMPLETE),a.skipped=!0,a.blocks&&f.each(a.blocks,function(a,b){var c=b.transport;c&&(c.abort(),c.destroy(),delete b.transport)}),this.owner.trigger("uploadSkip",a)},_tick:function(){var b,c,d=this,e=d.options;return d._promise?d._promise.always(d.__tick):void(d.pool.length1&&~"http,abort".indexOf(a)&&b.retried1&&f.extend(m,{chunks:b.chunks,chunk:b.chunk}),i.trigger("uploadBeforeSend",b,m,n),l.appendBlob(j.fileVal,b.blob,k.name),l.append(m),l.setRequestHeader(n),l.send()},_finishFile:function(a,b,c){var d=this.owner;return d.request("after-send-file",arguments,function(){a.setStatus(h.COMPLETE),d.trigger("uploadSuccess",a,b,c)}).fail(function(b){a.getStatus()===h.PROGRESS&&a.setStatus(h.ERROR,b),d.trigger("uploadError",a,b) -}).always(function(){d.trigger("uploadComplete",a)})},updateFileProgress:function(a){var b=0,c=0;a.blocks&&(f.each(a.blocks,function(a,b){c+=(b.percentage||0)*(b.end-b.start)}),b=c/a.size,this.owner.trigger("uploadProgress",a,b||0))}})}),b("widgets/validator",["base","uploader","file","widgets/widget"],function(a,b,c){var d,e=a.$,f={};return d={addValidator:function(a,b){f[a]=b},removeValidator:function(a){delete f[a]}},b.register({name:"validator",init:function(){var b=this;a.nextTick(function(){e.each(f,function(){this.call(b.owner)})})}}),d.addValidator("fileNumLimit",function(){var a=this,b=a.options,c=0,d=parseInt(b.fileNumLimit,10),e=!0;d&&(a.on("beforeFileQueued",function(a){return c>=d&&e&&(e=!1,this.trigger("error","Q_EXCEED_NUM_LIMIT",d,a),setTimeout(function(){e=!0},1)),c>=d?!1:!0}),a.on("fileQueued",function(){c++}),a.on("fileDequeued",function(){c--}),a.on("reset",function(){c=0}))}),d.addValidator("fileSizeLimit",function(){var a=this,b=a.options,c=0,d=parseInt(b.fileSizeLimit,10),e=!0;d&&(a.on("beforeFileQueued",function(a){var b=c+a.size>d;return b&&e&&(e=!1,this.trigger("error","Q_EXCEED_SIZE_LIMIT",d,a),setTimeout(function(){e=!0},1)),b?!1:!0}),a.on("fileQueued",function(a){c+=a.size}),a.on("fileDequeued",function(a){c-=a.size}),a.on("reset",function(){c=0}))}),d.addValidator("fileSingleSizeLimit",function(){var a=this,b=a.options,d=b.fileSingleSizeLimit;d&&a.on("beforeFileQueued",function(a){return a.size>d?(a.setStatus(c.Status.INVALID,"exceed_size"),this.trigger("error","F_EXCEED_SIZE",d,a),!1):void 0})}),d.addValidator("duplicate",function(){function a(a){for(var b,c=0,d=0,e=a.length;e>d;d++)b=a.charCodeAt(d),c=b+(c<<6)+(c<<16)-c;return c}var b=this,c=b.options,d={};c.duplicate||(b.on("beforeFileQueued",function(b){var c=b.__hash||(b.__hash=a(b.name+b.size+b.lastModifiedDate));return d[c]?(this.trigger("error","F_DUPLICATE",b),!1):void 0}),b.on("fileQueued",function(a){var b=a.__hash;b&&(d[b]=!0)}),b.on("fileDequeued",function(a){var b=a.__hash;b&&delete d[b]}),b.on("reset",function(){d={}}))}),d}),b("lib/md5",["runtime/client","mediator"],function(a,b){function c(){a.call(this,"Md5")}return b.installTo(c.prototype),c.prototype.loadFromBlob=function(a){var b=this;b.getRuid()&&b.disconnectRuntime(),b.connectRuntime(a.ruid,function(){b.exec("init"),b.exec("loadFromBlob",a)})},c.prototype.getResult=function(){return this.exec("getResult")},c}),b("widgets/md5",["base","uploader","lib/md5","lib/blob","widgets/widget"],function(a,b,c,d){return b.register({name:"md5",md5File:function(b,e,f){var g=new c,h=a.Deferred(),i=b instanceof d?b:this.request("get-file",b).source;return g.on("progress load",function(a){a=a||{},h.notify(a.total?a.loaded/a.total:1)}),g.on("complete",function(){h.resolve(g.getResult())}),g.on("error",function(a){h.reject(a)}),arguments.length>1&&(e=e||0,f=f||0,0>e&&(e=i.size+e),0>f&&(f=i.size+f),f=Math.min(f,i.size),i=i.slice(e,f)),g.loadFromBlob(i),h.promise()}})}),b("runtime/compbase",[],function(){function a(a,b){this.owner=a,this.options=a.options,this.getRuntime=function(){return b},this.getRuid=function(){return b.uid},this.trigger=function(){return a.trigger.apply(a,arguments)}}return a}),b("runtime/html5/runtime",["base","runtime/runtime","runtime/compbase"],function(b,c,d){function e(){var a={},d=this,e=this.destroy;c.apply(d,arguments),d.type=f,d.exec=function(c,e){var f,h=this,i=h.uid,j=b.slice(arguments,2);return g[c]&&(f=a[i]=a[i]||new g[c](h,d),f[e])?f[e].apply(f,j):void 0},d.destroy=function(){return e&&e.apply(this,arguments)}}var f="html5",g={};return b.inherits(c,{constructor:e,init:function(){var a=this;setTimeout(function(){a.trigger("ready")},1)}}),e.register=function(a,c){var e=g[a]=b.inherits(d,c);return e},a.Blob&&a.FileReader&&a.DataView&&c.addRuntime(f,e),e}),b("runtime/html5/blob",["runtime/html5/runtime","lib/blob"],function(a,b){return a.register("Blob",{slice:function(a,c){var d=this.owner.source,e=d.slice||d.webkitSlice||d.mozSlice;return d=e.call(d,a,c),new b(this.getRuid(),d)}})}),b("runtime/html5/dnd",["base","runtime/html5/runtime","lib/file"],function(a,b,c){var d=a.$,e="webuploader-dnd-";return b.register("DragAndDrop",{init:function(){var b=this.elem=this.options.container;this.dragEnterHandler=a.bindFn(this._dragEnterHandler,this),this.dragOverHandler=a.bindFn(this._dragOverHandler,this),this.dragLeaveHandler=a.bindFn(this._dragLeaveHandler,this),this.dropHandler=a.bindFn(this._dropHandler,this),this.dndOver=!1,b.on("dragenter",this.dragEnterHandler),b.on("dragover",this.dragOverHandler),b.on("dragleave",this.dragLeaveHandler),b.on("drop",this.dropHandler),this.options.disableGlobalDnd&&(d(document).on("dragover",this.dragOverHandler),d(document).on("drop",this.dropHandler))},_dragEnterHandler:function(a){var b,c=this,d=c._denied||!1;return a=a.originalEvent||a,c.dndOver||(c.dndOver=!0,b=a.dataTransfer.items,b&&b.length&&(c._denied=d=!c.trigger("accept",b)),c.elem.addClass(e+"over"),c.elem[d?"addClass":"removeClass"](e+"denied")),a.dataTransfer.dropEffect=d?"none":"copy",!1},_dragOverHandler:function(a){var b=this.elem.parent().get(0);return b&&!d.contains(b,a.currentTarget)?!1:(clearTimeout(this._leaveTimer),this._dragEnterHandler.call(this,a),!1)},_dragLeaveHandler:function(){var a,b=this;return a=function(){b.dndOver=!1,b.elem.removeClass(e+"over "+e+"denied")},clearTimeout(b._leaveTimer),b._leaveTimer=setTimeout(a,100),!1},_dropHandler:function(a){var b,f,g=this,h=g.getRuid(),i=g.elem.parent().get(0);if(i&&!d.contains(i,a.currentTarget))return!1;a=a.originalEvent||a,b=a.dataTransfer;try{f=b.getData("text/html")}catch(j){}return f?void 0:(g._getTansferFiles(b,function(a){g.trigger("drop",d.map(a,function(a){return new c(h,a)}))}),g.dndOver=!1,g.elem.removeClass(e+"over"),!1)},_getTansferFiles:function(b,c){var d,e,f,g,h,i,j,k=[],l=[];for(d=b.items,e=b.files,j=!(!d||!d[0].webkitGetAsEntry),h=0,i=e.length;i>h;h++)f=e[h],g=d&&d[h],j&&g.webkitGetAsEntry().isDirectory?l.push(this._traverseDirectoryTree(g.webkitGetAsEntry(),k)):k.push(f);a.when.apply(a,l).done(function(){k.length&&c(k)})},_traverseDirectoryTree:function(b,c){var d=a.Deferred(),e=this;return b.isFile?b.file(function(a){c.push(a),d.resolve()}):b.isDirectory&&b.createReader().readEntries(function(b){var f,g=b.length,h=[],i=[];for(f=0;g>f;f++)h.push(e._traverseDirectoryTree(b[f],i));a.when.apply(a,h).then(function(){c.push.apply(c,i),d.resolve()},d.reject)}),d.promise()},destroy:function(){var a=this.elem;a&&(a.off("dragenter",this.dragEnterHandler),a.off("dragover",this.dragOverHandler),a.off("dragleave",this.dragLeaveHandler),a.off("drop",this.dropHandler),this.options.disableGlobalDnd&&(d(document).off("dragover",this.dragOverHandler),d(document).off("drop",this.dropHandler)))}})}),b("runtime/html5/filepaste",["base","runtime/html5/runtime","lib/file"],function(a,b,c){return b.register("FilePaste",{init:function(){var b,c,d,e,f=this.options,g=this.elem=f.container,h=".*";if(f.accept){for(b=[],c=0,d=f.accept.length;d>c;c++)e=f.accept[c].mimeTypes,e&&b.push(e);b.length&&(h=b.join(","),h=h.replace(/,/g,"|").replace(/\*/g,".*"))}this.accept=h=new RegExp(h,"i"),this.hander=a.bindFn(this._pasteHander,this),g.on("paste",this.hander)},_pasteHander:function(a){var b,d,e,f,g,h=[],i=this.getRuid();for(a=a.originalEvent||a,b=a.clipboardData.items,f=0,g=b.length;g>f;f++)d=b[f],"file"===d.kind&&(e=d.getAsFile())&&h.push(new c(i,e));h.length&&(a.preventDefault(),a.stopPropagation(),this.trigger("paste",h))},destroy:function(){this.elem.off("paste",this.hander)}})}),b("runtime/html5/filepicker",["base","runtime/html5/runtime"],function(a,b){var c=a.$;return b.register("FilePicker",{init:function(){var a,b,d,e,f=this.getRuntime().getContainer(),g=this,h=g.owner,i=g.options,j=this.label=c(document.createElement("label")),k=this.input=c(document.createElement("input"));if(k.attr("type","file"),k.attr("name",i.name),k.addClass("webuploader-element-invisible"),j.on("click",function(){k.trigger("click")}),j.css({opacity:0,width:"100%",height:"100%",display:"block",cursor:"pointer",background:"#ffffff"}),i.multiple&&k.attr("multiple","multiple"),i.accept&&i.accept.length>0){for(a=[],b=0,d=i.accept.length;d>b;b++)a.push(i.accept[b].mimeTypes);k.attr("accept",a.join(","))}f.append(k),f.append(j),e=function(a){h.trigger(a.type)},k.on("change",function(a){var b,d=arguments.callee;g.files=a.target.files,b=this.cloneNode(!0),b.value=null,this.parentNode.replaceChild(b,this),k.off(),k=c(b).on("change",d).on("mouseenter mouseleave",e),h.trigger("change")}),j.on("mouseenter mouseleave",e)},getFiles:function(){return this.files},destroy:function(){this.input.off(),this.label.off()}})}),b("runtime/html5/util",["base"],function(b){var c=a.createObjectURL&&a||a.URL&&URL.revokeObjectURL&&URL||a.webkitURL,d=b.noop,e=d;return c&&(d=function(){return c.createObjectURL.apply(c,arguments)},e=function(){return c.revokeObjectURL.apply(c,arguments)}),{createObjectURL:d,revokeObjectURL:e,dataURL2Blob:function(a){var b,c,d,e,f,g;for(g=a.split(","),b=~g[0].indexOf("base64")?atob(g[1]):decodeURIComponent(g[1]),d=new ArrayBuffer(b.length),c=new Uint8Array(d),e=0;ei&&(d=h.getUint16(i),d>=65504&&65519>=d||65534===d)&&(e=h.getUint16(i+2)+2,!(i+e>h.byteLength));){if(f=b.parsers[d],!c&&f)for(g=0;g6&&(l.imageHead=a.slice?a.slice(2,k):new Uint8Array(a).subarray(2,k))}return l}},updateImageHead:function(a,b){var c,d,e,f=this._parse(a,!0);return e=2,f.imageHead&&(e=2+f.imageHead.byteLength),d=a.slice?a.slice(e):new Uint8Array(a).subarray(e),c=new Uint8Array(b.byteLength+2+d.byteLength),c[0]=255,c[1]=216,c.set(new Uint8Array(b),2),c.set(new Uint8Array(d),b.byteLength+2),c.buffer}},a.parseMeta=function(){return b.parse.apply(b,arguments)},a.updateImageHead=function(){return b.updateImageHead.apply(b,arguments)},b}),b("runtime/html5/imagemeta/exif",["base","runtime/html5/imagemeta"],function(a,b){var c={};return c.ExifMap=function(){return this},c.ExifMap.prototype.map={Orientation:274},c.ExifMap.prototype.get=function(a){return this[a]||this[this.map[a]]},c.exifTagTypes={1:{getValue:function(a,b){return a.getUint8(b)},size:1},2:{getValue:function(a,b){return String.fromCharCode(a.getUint8(b))},size:1,ascii:!0},3:{getValue:function(a,b,c){return a.getUint16(b,c)},size:2},4:{getValue:function(a,b,c){return a.getUint32(b,c)},size:4},5:{getValue:function(a,b,c){return a.getUint32(b,c)/a.getUint32(b+4,c)},size:8},9:{getValue:function(a,b,c){return a.getInt32(b,c)},size:4},10:{getValue:function(a,b,c){return a.getInt32(b,c)/a.getInt32(b+4,c)},size:8}},c.exifTagTypes[7]=c.exifTagTypes[1],c.getExifValue=function(b,d,e,f,g,h){var i,j,k,l,m,n,o=c.exifTagTypes[f];if(!o)return void a.log("Invalid Exif data: Invalid tag type.");if(i=o.size*g,j=i>4?d+b.getUint32(e+8,h):e+8,j+i>b.byteLength)return void a.log("Invalid Exif data: Invalid data offset.");if(1===g)return o.getValue(b,j,h);for(k=[],l=0;g>l;l+=1)k[l]=o.getValue(b,j+l*o.size,h);if(o.ascii){for(m="",l=0;lb.byteLength)return void a.log("Invalid Exif data: Invalid directory offset.");if(g=b.getUint16(d,e),h=d+2+12*g,h+4>b.byteLength)return void a.log("Invalid Exif data: Invalid directory size.");for(i=0;g>i;i+=1)this.parseExifTag(b,c,d+2+12*i,e,f);return b.getUint32(h,e)},c.parseExifData=function(b,d,e,f){var g,h,i=d+10;if(1165519206===b.getUint32(d+4)){if(i+8>b.byteLength)return void a.log("Invalid Exif data: Invalid segment size.");if(0!==b.getUint16(d+8))return void a.log("Invalid Exif data: Missing byte alignment offset.");switch(b.getUint16(i)){case 18761:g=!0;break;case 19789:g=!1;break;default:return void a.log("Invalid Exif data: Invalid byte alignment marker.")}if(42!==b.getUint16(i+2,g))return void a.log("Invalid Exif data: Missing TIFF marker.");h=b.getUint32(i+4,g),f.exif=new c.ExifMap,h=c.parseExifTags(b,i,i+h,g,f)}},b.parsers[65505].push(c.parseExifData),c}),b("runtime/html5/jpegencoder",[],function(){function a(a){function b(a){for(var b=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],c=0;64>c;c++){var d=y((b[c]*a+50)/100);1>d?d=1:d>255&&(d=255),z[P[c]]=d}for(var e=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],f=0;64>f;f++){var g=y((e[f]*a+50)/100);1>g?g=1:g>255&&(g=255),A[P[f]]=g}for(var h=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],i=0,j=0;8>j;j++)for(var k=0;8>k;k++)B[i]=1/(z[P[i]]*h[j]*h[k]*8),C[i]=1/(A[P[i]]*h[j]*h[k]*8),i++}function c(a,b){for(var c=0,d=0,e=new Array,f=1;16>=f;f++){for(var g=1;g<=a[f];g++)e[b[d]]=[],e[b[d]][0]=c,e[b[d]][1]=f,d++,c++;c*=2}return e}function d(){t=c(Q,R),u=c(U,V),v=c(S,T),w=c(W,X)}function e(){for(var a=1,b=2,c=1;15>=c;c++){for(var d=a;b>d;d++)E[32767+d]=c,D[32767+d]=[],D[32767+d][1]=c,D[32767+d][0]=d;for(var e=-(b-1);-a>=e;e++)E[32767+e]=c,D[32767+e]=[],D[32767+e][1]=c,D[32767+e][0]=b-1+e;a<<=1,b<<=1}}function f(){for(var a=0;256>a;a++)O[a]=19595*a,O[a+256>>0]=38470*a,O[a+512>>0]=7471*a+32768,O[a+768>>0]=-11059*a,O[a+1024>>0]=-21709*a,O[a+1280>>0]=32768*a+8421375,O[a+1536>>0]=-27439*a,O[a+1792>>0]=-5329*a}function g(a){for(var b=a[0],c=a[1]-1;c>=0;)b&1<J&&(255==I?(h(255),h(0)):h(I),J=7,I=0)}function h(a){H.push(N[a])}function i(a){h(a>>8&255),h(255&a)}function j(a,b){var c,d,e,f,g,h,i,j,k,l=0,m=8,n=64;for(k=0;m>k;++k){c=a[l],d=a[l+1],e=a[l+2],f=a[l+3],g=a[l+4],h=a[l+5],i=a[l+6],j=a[l+7];var o=c+j,p=c-j,q=d+i,r=d-i,s=e+h,t=e-h,u=f+g,v=f-g,w=o+u,x=o-u,y=q+s,z=q-s;a[l]=w+y,a[l+4]=w-y;var A=.707106781*(z+x);a[l+2]=x+A,a[l+6]=x-A,w=v+t,y=t+r,z=r+p;var B=.382683433*(w-z),C=.5411961*w+B,D=1.306562965*z+B,E=.707106781*y,G=p+E,H=p-E;a[l+5]=H+C,a[l+3]=H-C,a[l+1]=G+D,a[l+7]=G-D,l+=8}for(l=0,k=0;m>k;++k){c=a[l],d=a[l+8],e=a[l+16],f=a[l+24],g=a[l+32],h=a[l+40],i=a[l+48],j=a[l+56];var I=c+j,J=c-j,K=d+i,L=d-i,M=e+h,N=e-h,O=f+g,P=f-g,Q=I+O,R=I-O,S=K+M,T=K-M;a[l]=Q+S,a[l+32]=Q-S;var U=.707106781*(T+R);a[l+16]=R+U,a[l+48]=R-U,Q=P+N,S=N+L,T=L+J;var V=.382683433*(Q-T),W=.5411961*Q+V,X=1.306562965*T+V,Y=.707106781*S,Z=J+Y,$=J-Y;a[l+40]=$+W,a[l+24]=$-W,a[l+8]=Z+X,a[l+56]=Z-X,l++}var _;for(k=0;n>k;++k)_=a[k]*b[k],F[k]=_>0?_+.5|0:_-.5|0;return F}function k(){i(65504),i(16),h(74),h(70),h(73),h(70),h(0),h(1),h(1),h(0),i(1),i(1),h(0),h(0)}function l(a,b){i(65472),i(17),h(8),i(b),i(a),h(3),h(1),h(17),h(0),h(2),h(17),h(1),h(3),h(17),h(1)}function m(){i(65499),i(132),h(0);for(var a=0;64>a;a++)h(z[a]);h(1);for(var b=0;64>b;b++)h(A[b])}function n(){i(65476),i(418),h(0);for(var a=0;16>a;a++)h(Q[a+1]);for(var b=0;11>=b;b++)h(R[b]);h(16);for(var c=0;16>c;c++)h(S[c+1]);for(var d=0;161>=d;d++)h(T[d]);h(1);for(var e=0;16>e;e++)h(U[e+1]);for(var f=0;11>=f;f++)h(V[f]);h(17);for(var g=0;16>g;g++)h(W[g+1]);for(var j=0;161>=j;j++)h(X[j])}function o(){i(65498),i(12),h(3),h(1),h(0),h(2),h(17),h(3),h(17),h(0),h(63),h(0)}function p(a,b,c,d,e){for(var f,h=e[0],i=e[240],k=16,l=63,m=64,n=j(a,b),o=0;m>o;++o)G[P[o]]=n[o];var p=G[0]-c;c=G[0],0==p?g(d[0]):(f=32767+p,g(d[E[f]]),g(D[f]));for(var q=63;q>0&&0==G[q];q--);if(0==q)return g(h),c;for(var r,s=1;q>=s;){for(var t=s;0==G[s]&&q>=s;++s);var u=s-t;if(u>=k){r=u>>4;for(var v=1;r>=v;++v)g(i);u=15&u}f=32767+G[s],g(e[(u<<4)+E[f]]),g(D[f]),s++}return q!=l&&g(h),c}function q(){for(var a=String.fromCharCode,b=0;256>b;b++)N[b]=a(b)}function r(a){if(0>=a&&(a=1),a>100&&(a=100),x!=a){var c=0;c=Math.floor(50>a?5e3/a:200-2*a),b(c),x=a}}function s(){a||(a=50),q(),d(),e(),f(),r(a)}var t,u,v,w,x,y=(Math.round,Math.floor),z=new Array(64),A=new Array(64),B=new Array(64),C=new Array(64),D=new Array(65535),E=new Array(65535),F=new Array(64),G=new Array(64),H=[],I=0,J=7,K=new Array(64),L=new Array(64),M=new Array(64),N=new Array(256),O=new Array(2048),P=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],Q=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],R=[0,1,2,3,4,5,6,7,8,9,10,11],S=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],T=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],U=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],V=[0,1,2,3,4,5,6,7,8,9,10,11],W=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],X=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];this.encode=function(a,b){b&&r(b),H=new Array,I=0,J=7,i(65496),k(),m(),l(a.width,a.height),n(),o();var c=0,d=0,e=0;I=0,J=7,this.encode.displayName="_encode_";for(var f,h,j,q,s,x,y,z,A,D=a.data,E=a.width,F=a.height,G=4*E,N=0;F>N;){for(f=0;G>f;){for(s=G*N+f,x=s,y=-1,z=0,A=0;64>A;A++)z=A>>3,y=4*(7&A),x=s+z*G+y,N+z>=F&&(x-=G*(N+1+z-F)),f+y>=G&&(x-=f+y-G+4),h=D[x++],j=D[x++],q=D[x++],K[A]=(O[h]+O[j+256>>0]+O[q+512>>0]>>16)-128,L[A]=(O[h+768>>0]+O[j+1024>>0]+O[q+1280>>0]>>16)-128,M[A]=(O[h+1280>>0]+O[j+1536>>0]+O[q+1792>>0]>>16)-128;c=p(K,B,c,t,v),d=p(L,C,d,u,w),e=p(M,C,e,u,w),f+=32}N+=8}if(J>=0){var P=[];P[1]=J+1,P[0]=(1<i;)e=d[4*(k-1)+3],0===e?j=k:i=k,k=j+i>>1;return f=k/c,0===f?1:f}function c(a){var b,c,d=a.naturalWidth,e=a.naturalHeight;return d*e>1048576?(b=document.createElement("canvas"),b.width=b.height=1,c=b.getContext("2d"),c.drawImage(a,-d+1,0),0===c.getImageData(0,0,1,1).data[3]):!1}return a.os.ios?a.os.ios>=7?function(a,c,d,e,f,g){var h=c.naturalWidth,i=c.naturalHeight,j=b(c,h,i);return a.getContext("2d").drawImage(c,0,0,h*j,i*j,d,e,f,g)}:function(a,d,e,f,g,h){var i,j,k,l,m,n,o,p=d.naturalWidth,q=d.naturalHeight,r=a.getContext("2d"),s=c(d),t="image/jpeg"===this.type,u=1024,v=0,w=0;for(s&&(p/=2,q/=2),r.save(),i=document.createElement("canvas"),i.width=i.height=u,j=i.getContext("2d"),k=t?b(d,p,q):1,l=Math.ceil(u*g/p),m=Math.ceil(u*h/q/k);q>v;){for(n=0,o=0;p>n;)j.clearRect(0,0,u,u),j.drawImage(d,-n,-v),r.drawImage(i,0,0,u,u,e+o,f+w,l,m),n+=u,o+=l;v+=u,w+=m}r.restore(),i=j=null}:function(b){var c=a.slice(arguments,1),d=b.getContext("2d");d.drawImage.apply(d,c)}}()})}),b("runtime/html5/transport",["base","runtime/html5/runtime"],function(a,b){var c=a.noop,d=a.$;return b.register("Transport",{init:function(){this._status=0,this._response=null},send:function(){var b,c,e,f=this.owner,g=this.options,h=this._initAjax(),i=f._blob,j=g.server;g.sendAsBinary?(j+=(/\?/.test(j)?"&":"?")+d.param(f._formData),c=i.getSource()):(b=new FormData,d.each(f._formData,function(a,c){b.append(a,c)}),b.append(g.fileVal,i.getSource(),g.filename||f._formData.name||"")),g.withCredentials&&"withCredentials"in h?(h.open(g.method,j,!0),h.withCredentials=!0):h.open(g.method,j),this._setRequestHeader(h,g.headers),c?(h.overrideMimeType&&h.overrideMimeType("application/octet-stream"),a.os.android?(e=new FileReader,e.onload=function(){h.send(this.result),e=e.onload=null},e.readAsArrayBuffer(c)):h.send(c)):h.send(b)},getResponse:function(){return this._response},getResponseAsJson:function(){return this._parseJson(this._response)},getStatus:function(){return this._status},abort:function(){var a=this._xhr;a&&(a.upload.onprogress=c,a.onreadystatechange=c,a.abort(),this._xhr=a=null)},destroy:function(){this.abort()},_initAjax:function(){var a=this,b=new XMLHttpRequest,d=this.options;return!d.withCredentials||"withCredentials"in b||"undefined"==typeof XDomainRequest||(b=new XDomainRequest),b.upload.onprogress=function(b){var c=0;return b.lengthComputable&&(c=b.loaded/b.total),a.trigger("progress",c)},b.onreadystatechange=function(){return 4===b.readyState?(b.upload.onprogress=c,b.onreadystatechange=c,a._xhr=null,a._status=b.status,b.status>=200&&b.status<300?(a._response=b.responseText,a.trigger("load")):b.status>=500&&b.status<600?(a._response=b.responseText,a.trigger("error","server")):a.trigger("error",a._status?"http":"abort")):void 0},a._xhr=b,b},_setRequestHeader:function(a,b){d.each(b,function(b,c){a.setRequestHeader(b,c)})},_parseJson:function(a){var b;try{b=JSON.parse(a)}catch(c){b={}}return b}})}),b("runtime/html5/md5",["runtime/html5/runtime"],function(a){var b=function(a,b){return a+b&4294967295},c=function(a,c,d,e,f,g){return c=b(b(c,a),b(e,g)),b(c<>>32-f,d)},d=function(a,b,d,e,f,g,h){return c(b&d|~b&e,a,b,f,g,h)},e=function(a,b,d,e,f,g,h){return c(b&e|d&~e,a,b,f,g,h)},f=function(a,b,d,e,f,g,h){return c(b^d^e,a,b,f,g,h)},g=function(a,b,d,e,f,g,h){return c(d^(b|~e),a,b,f,g,h)},h=function(a,c){var h=a[0],i=a[1],j=a[2],k=a[3];h=d(h,i,j,k,c[0],7,-680876936),k=d(k,h,i,j,c[1],12,-389564586),j=d(j,k,h,i,c[2],17,606105819),i=d(i,j,k,h,c[3],22,-1044525330),h=d(h,i,j,k,c[4],7,-176418897),k=d(k,h,i,j,c[5],12,1200080426),j=d(j,k,h,i,c[6],17,-1473231341),i=d(i,j,k,h,c[7],22,-45705983),h=d(h,i,j,k,c[8],7,1770035416),k=d(k,h,i,j,c[9],12,-1958414417),j=d(j,k,h,i,c[10],17,-42063),i=d(i,j,k,h,c[11],22,-1990404162),h=d(h,i,j,k,c[12],7,1804603682),k=d(k,h,i,j,c[13],12,-40341101),j=d(j,k,h,i,c[14],17,-1502002290),i=d(i,j,k,h,c[15],22,1236535329),h=e(h,i,j,k,c[1],5,-165796510),k=e(k,h,i,j,c[6],9,-1069501632),j=e(j,k,h,i,c[11],14,643717713),i=e(i,j,k,h,c[0],20,-373897302),h=e(h,i,j,k,c[5],5,-701558691),k=e(k,h,i,j,c[10],9,38016083),j=e(j,k,h,i,c[15],14,-660478335),i=e(i,j,k,h,c[4],20,-405537848),h=e(h,i,j,k,c[9],5,568446438),k=e(k,h,i,j,c[14],9,-1019803690),j=e(j,k,h,i,c[3],14,-187363961),i=e(i,j,k,h,c[8],20,1163531501),h=e(h,i,j,k,c[13],5,-1444681467),k=e(k,h,i,j,c[2],9,-51403784),j=e(j,k,h,i,c[7],14,1735328473),i=e(i,j,k,h,c[12],20,-1926607734),h=f(h,i,j,k,c[5],4,-378558),k=f(k,h,i,j,c[8],11,-2022574463),j=f(j,k,h,i,c[11],16,1839030562),i=f(i,j,k,h,c[14],23,-35309556),h=f(h,i,j,k,c[1],4,-1530992060),k=f(k,h,i,j,c[4],11,1272893353),j=f(j,k,h,i,c[7],16,-155497632),i=f(i,j,k,h,c[10],23,-1094730640),h=f(h,i,j,k,c[13],4,681279174),k=f(k,h,i,j,c[0],11,-358537222),j=f(j,k,h,i,c[3],16,-722521979),i=f(i,j,k,h,c[6],23,76029189),h=f(h,i,j,k,c[9],4,-640364487),k=f(k,h,i,j,c[12],11,-421815835),j=f(j,k,h,i,c[15],16,530742520),i=f(i,j,k,h,c[2],23,-995338651),h=g(h,i,j,k,c[0],6,-198630844),k=g(k,h,i,j,c[7],10,1126891415),j=g(j,k,h,i,c[14],15,-1416354905),i=g(i,j,k,h,c[5],21,-57434055),h=g(h,i,j,k,c[12],6,1700485571),k=g(k,h,i,j,c[3],10,-1894986606),j=g(j,k,h,i,c[10],15,-1051523),i=g(i,j,k,h,c[1],21,-2054922799),h=g(h,i,j,k,c[8],6,1873313359),k=g(k,h,i,j,c[15],10,-30611744),j=g(j,k,h,i,c[6],15,-1560198380),i=g(i,j,k,h,c[13],21,1309151649),h=g(h,i,j,k,c[4],6,-145523070),k=g(k,h,i,j,c[11],10,-1120210379),j=g(j,k,h,i,c[2],15,718787259),i=g(i,j,k,h,c[9],21,-343485551),a[0]=b(h,a[0]),a[1]=b(i,a[1]),a[2]=b(j,a[2]),a[3]=b(k,a[3])},i=function(a){var b,c=[];for(b=0;64>b;b+=4)c[b>>2]=a.charCodeAt(b)+(a.charCodeAt(b+1)<<8)+(a.charCodeAt(b+2)<<16)+(a.charCodeAt(b+3)<<24);return c},j=function(a){var b,c=[];for(b=0;64>b;b+=4)c[b>>2]=a[b]+(a[b+1]<<8)+(a[b+2]<<16)+(a[b+3]<<24);return c},k=function(a){var b,c,d,e,f,g,j=a.length,k=[1732584193,-271733879,-1732584194,271733878];for(b=64;j>=b;b+=64)h(k,i(a.substring(b-64,b)));for(a=a.substring(b-64),c=a.length,d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],b=0;c>b;b+=1)d[b>>2]|=a.charCodeAt(b)<<(b%4<<3);if(d[b>>2]|=128<<(b%4<<3),b>55)for(h(k,d),b=0;16>b;b+=1)d[b]=0;return e=8*j,e=e.toString(16).match(/(.*?)(.{0,8})$/),f=parseInt(e[2],16),g=parseInt(e[1],16)||0,d[14]=f,d[15]=g,h(k,d),k},l=function(a){var b,c,d,e,f,g,i=a.length,k=[1732584193,-271733879,-1732584194,271733878];for(b=64;i>=b;b+=64)h(k,j(a.subarray(b-64,b)));for(a=i>b-64?a.subarray(b-64):new Uint8Array(0),c=a.length,d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],b=0;c>b;b+=1)d[b>>2]|=a[b]<<(b%4<<3);if(d[b>>2]|=128<<(b%4<<3),b>55)for(h(k,d),b=0;16>b;b+=1)d[b]=0;return e=8*i,e=e.toString(16).match(/(.*?)(.{0,8})$/),f=parseInt(e[2],16),g=parseInt(e[1],16)||0,d[14]=f,d[15]=g,h(k,d),k},m=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n=function(a){var b,c="";for(b=0;4>b;b+=1)c+=m[a>>8*b+4&15]+m[a>>8*b&15];return c},o=function(a){var b;for(b=0;b>16)+(b>>16)+(c>>16);return d<<16|65535&c}),q.prototype.append=function(a){return/[\u0080-\uFFFF]/.test(a)&&(a=unescape(encodeURIComponent(a))),this.appendBinary(a),this},q.prototype.appendBinary=function(a){this._buff+=a,this._length+=a.length;var b,c=this._buff.length;for(b=64;c>=b;b+=64)h(this._state,i(this._buff.substring(b-64,b)));return this._buff=this._buff.substr(b-64),this},q.prototype.end=function(a){var b,c,d=this._buff,e=d.length,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(b=0;e>b;b+=1)f[b>>2]|=d.charCodeAt(b)<<(b%4<<3);return this._finish(f,e),c=a?this._state:o(this._state),this.reset(),c},q.prototype._finish=function(a,b){var c,d,e,f=b;if(a[f>>2]|=128<<(f%4<<3),f>55)for(h(this._state,a),f=0;16>f;f+=1)a[f]=0;c=8*this._length,c=c.toString(16).match(/(.*?)(.{0,8})$/),d=parseInt(c[2],16),e=parseInt(c[1],16)||0,a[14]=d,a[15]=e,h(this._state,a)},q.prototype.reset=function(){return this._buff="",this._length=0,this._state=[1732584193,-271733879,-1732584194,271733878],this},q.prototype.destroy=function(){delete this._state,delete this._buff,delete this._length},q.hash=function(a,b){/[\u0080-\uFFFF]/.test(a)&&(a=unescape(encodeURIComponent(a)));var c=k(a);return b?c:o(c)},q.hashBinary=function(a,b){var c=k(a);return b?c:o(c)},q.ArrayBuffer=function(){this.reset()},q.ArrayBuffer.prototype.append=function(a){var b,c=this._concatArrayBuffer(this._buff,a),d=c.length;for(this._length+=a.byteLength,b=64;d>=b;b+=64)h(this._state,j(c.subarray(b-64,b)));return this._buff=d>b-64?c.subarray(b-64):new Uint8Array(0),this},q.ArrayBuffer.prototype.end=function(a){var b,c,d=this._buff,e=d.length,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; -for(b=0;e>b;b+=1)f[b>>2]|=d[b]<<(b%4<<3);return this._finish(f,e),c=a?this._state:o(this._state),this.reset(),c},q.ArrayBuffer.prototype._finish=q.prototype._finish,q.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._state=[1732584193,-271733879,-1732584194,271733878],this},q.ArrayBuffer.prototype.destroy=q.prototype.destroy,q.ArrayBuffer.prototype._concatArrayBuffer=function(a,b){var c=a.length,d=new Uint8Array(c+b.byteLength);return d.set(a),d.set(new Uint8Array(b),c),d},q.ArrayBuffer.hash=function(a,b){var c=l(new Uint8Array(a));return b?c:o(c)},a.register("Md5",{init:function(){},loadFromBlob:function(a){var b,c,d=a.getSource(),e=2097152,f=Math.ceil(d.size/e),g=0,h=this.owner,i=new q.ArrayBuffer,j=this,k=d.mozSlice||d.webkitSlice||d.slice;c=new FileReader,(b=function(){var l,m;l=g*e,m=Math.min(l+e,d.size),c.onload=function(b){i.append(b.target.result),h.trigger("progress",{total:a.size,loaded:m})},c.onloadend=function(){c.onloadend=c.onload=null,++g',c.html(a)},getFlash:function(){return this._flash?this._flash:(this._flash=g("#"+this.uid).get(0),this._flash)}}),f.register=function(a,c){return c=i[a]=b.inherits(d,g.extend({flashExec:function(){var a=this.owner,b=this.getRuntime();return b.flashExec.apply(a,arguments)}},c))},e()>=11.4&&c.addRuntime(h,f),f}),b("runtime/flash/filepicker",["base","runtime/flash/runtime"],function(a,b){var c=a.$;return b.register("FilePicker",{init:function(a){var b,d,e=c.extend({},a);for(b=e.accept&&e.accept.length,d=0;b>d;d++)e.accept[d].title||(e.accept[d].title="Files");delete e.button,delete e.id,delete e.container,this.flashExec("FilePicker","init",e)},destroy:function(){this.flashExec("FilePicker","destroy")}})}),b("runtime/flash/image",["runtime/flash/runtime"],function(a){return a.register("Image",{loadFromBlob:function(a){var b=this.owner;b.info()&&this.flashExec("Image","info",b.info()),b.meta()&&this.flashExec("Image","meta",b.meta()),this.flashExec("Image","loadFromBlob",a.uid)}})}),b("runtime/flash/transport",["base","runtime/flash/runtime","runtime/client"],function(b,c,d){var e=b.$;return c.register("Transport",{init:function(){this._status=0,this._response=null,this._responseJson=null},send:function(){var a,b=this.owner,c=this.options,d=this._initAjax(),f=b._blob,g=c.server;d.connectRuntime(f.ruid),c.sendAsBinary?(g+=(/\?/.test(g)?"&":"?")+e.param(b._formData),a=f.uid):(e.each(b._formData,function(a,b){d.exec("append",a,b)}),d.exec("appendBlob",c.fileVal,f.uid,c.filename||b._formData.name||"")),this._setRequestHeader(d,c.headers),d.exec("send",{method:c.method,url:g,forceURLStream:c.forceURLStream,mimeType:"application/octet-stream"},a)},getStatus:function(){return this._status},getResponse:function(){return this._response||""},getResponseAsJson:function(){return this._responseJson},abort:function(){var a=this._xhr;a&&(a.exec("abort"),a.destroy(),this._xhr=a=null)},destroy:function(){this.abort()},_initAjax:function(){var b=this,c=new d("XMLHttpRequest");return c.on("uploadprogress progress",function(a){var c=a.loaded/a.total;return c=Math.min(1,Math.max(0,c)),b.trigger("progress",c)}),c.on("load",function(){var d,e=c.exec("getStatus"),f=!1,g="";return c.off(),b._xhr=null,e>=200&&300>e?f=!0:e>=500&&600>e?(f=!0,g="server"):g="http",f&&(b._response=c.exec("getResponse"),b._response=decodeURIComponent(b._response),d=a.JSON&&a.JSON.parse||function(a){try{return new Function("return "+a).call()}catch(b){return{}}},b._responseJson=b._response?d(b._response):{}),c.destroy(),c=null,g?b.trigger("error",g):b.trigger("load")}),c.on("error",function(){c.off(),b._xhr=null,b.trigger("error","http")}),b._xhr=c,c},_setRequestHeader:function(a,b){e.each(b,function(b,c){a.exec("setRequestHeader",b,c)})}})}),b("runtime/flash/blob",["runtime/flash/runtime","lib/blob"],function(a,b){return a.register("Blob",{slice:function(a,c){var d=this.flashExec("Blob","slice",a,c);return new b(d.uid,d)}})}),b("runtime/flash/md5",["runtime/flash/runtime"],function(a){return a.register("Md5",{init:function(){},loadFromBlob:function(a){return this.flashExec("Md5","loadFromBlob",a.uid)}})}),b("preset/all",["base","widgets/filednd","widgets/filepaste","widgets/filepicker","widgets/image","widgets/queue","widgets/runtime","widgets/upload","widgets/validator","widgets/md5","runtime/html5/blob","runtime/html5/dnd","runtime/html5/filepaste","runtime/html5/filepicker","runtime/html5/imagemeta/exif","runtime/html5/androidpatch","runtime/html5/image","runtime/html5/transport","runtime/html5/md5","runtime/flash/filepicker","runtime/flash/image","runtime/flash/transport","runtime/flash/blob","runtime/flash/md5"],function(a){return a}),b("widgets/log",["base","uploader","widgets/widget"],function(a,b){function c(a){var b=e.extend({},d,a),c=f.replace(/^(.*)\?/,"$1"+e.param(b)),g=new Image;g.src=c}var d,e=a.$,f=" http://static.tieba.baidu.com/tb/pms/img/st.gif??",g=(location.hostname||location.host||"protected").toLowerCase(),h=g&&/baidu/i.exec(g);if(h)return d={dv:3,master:"webuploader",online:/test/.exec(g)?0:1,module:"",product:g,type:0},b.register({name:"log",init:function(){var a=this.owner,b=0,d=0;a.on("error",function(a){c({type:2,c_error_code:a})}).on("uploadError",function(a,b){c({type:2,c_error_code:"UPLOAD_ERROR",c_reason:""+b})}).on("uploadComplete",function(a){b++,d+=a.size}).on("uploadFinished",function(){c({c_count:b,c_size:d}),b=d=0}),c({c_usage:1})}})}),b("webuploader",["preset/all","widgets/log"],function(a){return a}),c("webuploader")}); \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.noimage.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.noimage.js deleted file mode 100644 index 43755428..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.noimage.js +++ /dev/null @@ -1,5026 +0,0 @@ -/*! WebUploader 0.1.5 */ - - -/** - * @fileOverview 让内部各个部件的代码可以用[amd](https://github.com/amdjs/amdjs-api/wiki/AMD)模块定义方式组织起来。 - * - * AMD API 内部的简单不完全实现,请忽略。只有当WebUploader被合并成一个文件的时候才会引入。 - */ -(function( root, factory ) { - var modules = {}, - - // 内部require, 简单不完全实现。 - // https://github.com/amdjs/amdjs-api/wiki/require - _require = function( deps, callback ) { - var args, len, i; - - // 如果deps不是数组,则直接返回指定module - if ( typeof deps === 'string' ) { - return getModule( deps ); - } else { - args = []; - for( len = deps.length, i = 0; i < len; i++ ) { - args.push( getModule( deps[ i ] ) ); - } - - return callback.apply( null, args ); - } - }, - - // 内部define,暂时不支持不指定id. - _define = function( id, deps, factory ) { - if ( arguments.length === 2 ) { - factory = deps; - deps = null; - } - - _require( deps || [], function() { - setModule( id, factory, arguments ); - }); - }, - - // 设置module, 兼容CommonJs写法。 - setModule = function( id, factory, args ) { - var module = { - exports: factory - }, - returned; - - if ( typeof factory === 'function' ) { - args.length || (args = [ _require, module.exports, module ]); - returned = factory.apply( null, args ); - returned !== undefined && (module.exports = returned); - } - - modules[ id ] = module.exports; - }, - - // 根据id获取module - getModule = function( id ) { - var module = modules[ id ] || root[ id ]; - - if ( !module ) { - throw new Error( '`' + id + '` is undefined' ); - } - - return module; - }, - - // 将所有modules,将路径ids装换成对象。 - exportsTo = function( obj ) { - var key, host, parts, part, last, ucFirst; - - // make the first character upper case. - ucFirst = function( str ) { - return str && (str.charAt( 0 ).toUpperCase() + str.substr( 1 )); - }; - - for ( key in modules ) { - host = obj; - - if ( !modules.hasOwnProperty( key ) ) { - continue; - } - - parts = key.split('/'); - last = ucFirst( parts.pop() ); - - while( (part = ucFirst( parts.shift() )) ) { - host[ part ] = host[ part ] || {}; - host = host[ part ]; - } - - host[ last ] = modules[ key ]; - } - - return obj; - }, - - makeExport = function( dollar ) { - root.__dollar = dollar; - - // exports every module. - return exportsTo( factory( root, _define, _require ) ); - }, - - origin; - - if ( typeof module === 'object' && typeof module.exports === 'object' ) { - - // For CommonJS and CommonJS-like environments where a proper window is present, - module.exports = makeExport(); - } else if ( typeof define === 'function' && define.amd ) { - - // Allow using this built library as an AMD module - // in another project. That other project will only - // see this AMD call, not the internal modules in - // the closure below. - define([ 'jquery' ], makeExport ); - } else { - - // Browser globals case. Just assign the - // result to a property on the global. - origin = root.WebUploader; - root.WebUploader = makeExport(); - root.WebUploader.noConflict = function() { - root.WebUploader = origin; - }; - } -})( window, function( window, define, require ) { - - - /** - * @fileOverview jQuery or Zepto - */ - define('dollar-third',[],function() { - var $ = window.__dollar || window.jQuery || window.Zepto; - - if ( !$ ) { - throw new Error('jQuery or Zepto not found!'); - } - - return $; - }); - /** - * @fileOverview Dom 操作相关 - */ - define('dollar',[ - 'dollar-third' - ], function( _ ) { - return _; - }); - /** - * @fileOverview 使用jQuery的Promise - */ - define('promise-third',[ - 'dollar' - ], function( $ ) { - return { - Deferred: $.Deferred, - when: $.when, - - isPromise: function( anything ) { - return anything && typeof anything.then === 'function'; - } - }; - }); - /** - * @fileOverview Promise/A+ - */ - define('promise',[ - 'promise-third' - ], function( _ ) { - return _; - }); - /** - * @fileOverview 基础类方法。 - */ - - /** - * Web Uploader内部类的详细说明,以下提及的功能类,都可以在`WebUploader`这个变量中访问到。 - * - * As you know, Web Uploader的每个文件都是用过[AMD](https://github.com/amdjs/amdjs-api/wiki/AMD)规范中的`define`组织起来的, 每个Module都会有个module id. - * 默认module id为该文件的路径,而此路径将会转化成名字空间存放在WebUploader中。如: - * - * * module `base`:WebUploader.Base - * * module `file`: WebUploader.File - * * module `lib/dnd`: WebUploader.Lib.Dnd - * * module `runtime/html5/dnd`: WebUploader.Runtime.Html5.Dnd - * - * - * 以下文档中对类的使用可能省略掉了`WebUploader`前缀。 - * @module WebUploader - * @title WebUploader API文档 - */ - define('base',[ - 'dollar', - 'promise' - ], function( $, promise ) { - - var noop = function() {}, - call = Function.call; - - // http://jsperf.com/uncurrythis - // 反科里化 - function uncurryThis( fn ) { - return function() { - return call.apply( fn, arguments ); - }; - } - - function bindFn( fn, context ) { - return function() { - return fn.apply( context, arguments ); - }; - } - - function createObject( proto ) { - var f; - - if ( Object.create ) { - return Object.create( proto ); - } else { - f = function() {}; - f.prototype = proto; - return new f(); - } - } - - - /** - * 基础类,提供一些简单常用的方法。 - * @class Base - */ - return { - - /** - * @property {String} version 当前版本号。 - */ - version: '0.1.5', - - /** - * @property {jQuery|Zepto} $ 引用依赖的jQuery或者Zepto对象。 - */ - $: $, - - Deferred: promise.Deferred, - - isPromise: promise.isPromise, - - when: promise.when, - - /** - * @description 简单的浏览器检查结果。 - * - * * `webkit` webkit版本号,如果浏览器为非webkit内核,此属性为`undefined`。 - * * `chrome` chrome浏览器版本号,如果浏览器为chrome,此属性为`undefined`。 - * * `ie` ie浏览器版本号,如果浏览器为非ie,此属性为`undefined`。**暂不支持ie10+** - * * `firefox` firefox浏览器版本号,如果浏览器为非firefox,此属性为`undefined`。 - * * `safari` safari浏览器版本号,如果浏览器为非safari,此属性为`undefined`。 - * * `opera` opera浏览器版本号,如果浏览器为非opera,此属性为`undefined`。 - * - * @property {Object} [browser] - */ - browser: (function( ua ) { - var ret = {}, - webkit = ua.match( /WebKit\/([\d.]+)/ ), - chrome = ua.match( /Chrome\/([\d.]+)/ ) || - ua.match( /CriOS\/([\d.]+)/ ), - - ie = ua.match( /MSIE\s([\d\.]+)/ ) || - ua.match( /(?:trident)(?:.*rv:([\w.]+))?/i ), - firefox = ua.match( /Firefox\/([\d.]+)/ ), - safari = ua.match( /Safari\/([\d.]+)/ ), - opera = ua.match( /OPR\/([\d.]+)/ ); - - webkit && (ret.webkit = parseFloat( webkit[ 1 ] )); - chrome && (ret.chrome = parseFloat( chrome[ 1 ] )); - ie && (ret.ie = parseFloat( ie[ 1 ] )); - firefox && (ret.firefox = parseFloat( firefox[ 1 ] )); - safari && (ret.safari = parseFloat( safari[ 1 ] )); - opera && (ret.opera = parseFloat( opera[ 1 ] )); - - return ret; - })( navigator.userAgent ), - - /** - * @description 操作系统检查结果。 - * - * * `android` 如果在android浏览器环境下,此值为对应的android版本号,否则为`undefined`。 - * * `ios` 如果在ios浏览器环境下,此值为对应的ios版本号,否则为`undefined`。 - * @property {Object} [os] - */ - os: (function( ua ) { - var ret = {}, - - // osx = !!ua.match( /\(Macintosh\; Intel / ), - android = ua.match( /(?:Android);?[\s\/]+([\d.]+)?/ ), - ios = ua.match( /(?:iPad|iPod|iPhone).*OS\s([\d_]+)/ ); - - // osx && (ret.osx = true); - android && (ret.android = parseFloat( android[ 1 ] )); - ios && (ret.ios = parseFloat( ios[ 1 ].replace( /_/g, '.' ) )); - - return ret; - })( navigator.userAgent ), - - /** - * 实现类与类之间的继承。 - * @method inherits - * @grammar Base.inherits( super ) => child - * @grammar Base.inherits( super, protos ) => child - * @grammar Base.inherits( super, protos, statics ) => child - * @param {Class} super 父类 - * @param {Object | Function} [protos] 子类或者对象。如果对象中包含constructor,子类将是用此属性值。 - * @param {Function} [protos.constructor] 子类构造器,不指定的话将创建个临时的直接执行父类构造器的方法。 - * @param {Object} [statics] 静态属性或方法。 - * @return {Class} 返回子类。 - * @example - * function Person() { - * console.log( 'Super' ); - * } - * Person.prototype.hello = function() { - * console.log( 'hello' ); - * }; - * - * var Manager = Base.inherits( Person, { - * world: function() { - * console.log( 'World' ); - * } - * }); - * - * // 因为没有指定构造器,父类的构造器将会执行。 - * var instance = new Manager(); // => Super - * - * // 继承子父类的方法 - * instance.hello(); // => hello - * instance.world(); // => World - * - * // 子类的__super__属性指向父类 - * console.log( Manager.__super__ === Person ); // => true - */ - inherits: function( Super, protos, staticProtos ) { - var child; - - if ( typeof protos === 'function' ) { - child = protos; - protos = null; - } else if ( protos && protos.hasOwnProperty('constructor') ) { - child = protos.constructor; - } else { - child = function() { - return Super.apply( this, arguments ); - }; - } - - // 复制静态方法 - $.extend( true, child, Super, staticProtos || {} ); - - /* jshint camelcase: false */ - - // 让子类的__super__属性指向父类。 - child.__super__ = Super.prototype; - - // 构建原型,添加原型方法或属性。 - // 暂时用Object.create实现。 - child.prototype = createObject( Super.prototype ); - protos && $.extend( true, child.prototype, protos ); - - return child; - }, - - /** - * 一个不做任何事情的方法。可以用来赋值给默认的callback. - * @method noop - */ - noop: noop, - - /** - * 返回一个新的方法,此方法将已指定的`context`来执行。 - * @grammar Base.bindFn( fn, context ) => Function - * @method bindFn - * @example - * var doSomething = function() { - * console.log( this.name ); - * }, - * obj = { - * name: 'Object Name' - * }, - * aliasFn = Base.bind( doSomething, obj ); - * - * aliasFn(); // => Object Name - * - */ - bindFn: bindFn, - - /** - * 引用Console.log如果存在的话,否则引用一个[空函数noop](#WebUploader:Base.noop)。 - * @grammar Base.log( args... ) => undefined - * @method log - */ - log: (function() { - if ( window.console ) { - return bindFn( console.log, console ); - } - return noop; - })(), - - nextTick: (function() { - - return function( cb ) { - setTimeout( cb, 1 ); - }; - - // @bug 当浏览器不在当前窗口时就停了。 - // var next = window.requestAnimationFrame || - // window.webkitRequestAnimationFrame || - // window.mozRequestAnimationFrame || - // function( cb ) { - // window.setTimeout( cb, 1000 / 60 ); - // }; - - // // fix: Uncaught TypeError: Illegal invocation - // return bindFn( next, window ); - })(), - - /** - * 被[uncurrythis](http://www.2ality.com/2011/11/uncurrying-this.html)的数组slice方法。 - * 将用来将非数组对象转化成数组对象。 - * @grammar Base.slice( target, start[, end] ) => Array - * @method slice - * @example - * function doSomthing() { - * var args = Base.slice( arguments, 1 ); - * console.log( args ); - * } - * - * doSomthing( 'ignored', 'arg2', 'arg3' ); // => Array ["arg2", "arg3"] - */ - slice: uncurryThis( [].slice ), - - /** - * 生成唯一的ID - * @method guid - * @grammar Base.guid() => String - * @grammar Base.guid( prefx ) => String - */ - guid: (function() { - var counter = 0; - - return function( prefix ) { - var guid = (+new Date()).toString( 32 ), - i = 0; - - for ( ; i < 5; i++ ) { - guid += Math.floor( Math.random() * 65535 ).toString( 32 ); - } - - return (prefix || 'wu_') + guid + (counter++).toString( 32 ); - }; - })(), - - /** - * 格式化文件大小, 输出成带单位的字符串 - * @method formatSize - * @grammar Base.formatSize( size ) => String - * @grammar Base.formatSize( size, pointLength ) => String - * @grammar Base.formatSize( size, pointLength, units ) => String - * @param {Number} size 文件大小 - * @param {Number} [pointLength=2] 精确到的小数点数。 - * @param {Array} [units=[ 'B', 'K', 'M', 'G', 'TB' ]] 单位数组。从字节,到千字节,一直往上指定。如果单位数组里面只指定了到了K(千字节),同时文件大小大于M, 此方法的输出将还是显示成多少K. - * @example - * console.log( Base.formatSize( 100 ) ); // => 100B - * console.log( Base.formatSize( 1024 ) ); // => 1.00K - * console.log( Base.formatSize( 1024, 0 ) ); // => 1K - * console.log( Base.formatSize( 1024 * 1024 ) ); // => 1.00M - * console.log( Base.formatSize( 1024 * 1024 * 1024 ) ); // => 1.00G - * console.log( Base.formatSize( 1024 * 1024 * 1024, 0, ['B', 'KB', 'MB'] ) ); // => 1024MB - */ - formatSize: function( size, pointLength, units ) { - var unit; - - units = units || [ 'B', 'K', 'M', 'G', 'TB' ]; - - while ( (unit = units.shift()) && size > 1024 ) { - size = size / 1024; - } - - return (unit === 'B' ? size : size.toFixed( pointLength || 2 )) + - unit; - } - }; - }); - /** - * 事件处理类,可以独立使用,也可以扩展给对象使用。 - * @fileOverview Mediator - */ - define('mediator',[ - 'base' - ], function( Base ) { - var $ = Base.$, - slice = [].slice, - separator = /\s+/, - protos; - - // 根据条件过滤出事件handlers. - function findHandlers( arr, name, callback, context ) { - return $.grep( arr, function( handler ) { - return handler && - (!name || handler.e === name) && - (!callback || handler.cb === callback || - handler.cb._cb === callback) && - (!context || handler.ctx === context); - }); - } - - function eachEvent( events, callback, iterator ) { - // 不支持对象,只支持多个event用空格隔开 - $.each( (events || '').split( separator ), function( _, key ) { - iterator( key, callback ); - }); - } - - function triggerHanders( events, args ) { - var stoped = false, - i = -1, - len = events.length, - handler; - - while ( ++i < len ) { - handler = events[ i ]; - - if ( handler.cb.apply( handler.ctx2, args ) === false ) { - stoped = true; - break; - } - } - - return !stoped; - } - - protos = { - - /** - * 绑定事件。 - * - * `callback`方法在执行时,arguments将会来源于trigger的时候携带的参数。如 - * ```javascript - * var obj = {}; - * - * // 使得obj有事件行为 - * Mediator.installTo( obj ); - * - * obj.on( 'testa', function( arg1, arg2 ) { - * console.log( arg1, arg2 ); // => 'arg1', 'arg2' - * }); - * - * obj.trigger( 'testa', 'arg1', 'arg2' ); - * ``` - * - * 如果`callback`中,某一个方法`return false`了,则后续的其他`callback`都不会被执行到。 - * 切会影响到`trigger`方法的返回值,为`false`。 - * - * `on`还可以用来添加一个特殊事件`all`, 这样所有的事件触发都会响应到。同时此类`callback`中的arguments有一个不同处, - * 就是第一个参数为`type`,记录当前是什么事件在触发。此类`callback`的优先级比脚低,会再正常`callback`执行完后触发。 - * ```javascript - * obj.on( 'all', function( type, arg1, arg2 ) { - * console.log( type, arg1, arg2 ); // => 'testa', 'arg1', 'arg2' - * }); - * ``` - * - * @method on - * @grammar on( name, callback[, context] ) => self - * @param {String} name 事件名,支持多个事件用空格隔开 - * @param {Function} callback 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - * @class Mediator - */ - on: function( name, callback, context ) { - var me = this, - set; - - if ( !callback ) { - return this; - } - - set = this._events || (this._events = []); - - eachEvent( name, callback, function( name, callback ) { - var handler = { e: name }; - - handler.cb = callback; - handler.ctx = context; - handler.ctx2 = context || me; - handler.id = set.length; - - set.push( handler ); - }); - - return this; - }, - - /** - * 绑定事件,且当handler执行完后,自动解除绑定。 - * @method once - * @grammar once( name, callback[, context] ) => self - * @param {String} name 事件名 - * @param {Function} callback 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - */ - once: function( name, callback, context ) { - var me = this; - - if ( !callback ) { - return me; - } - - eachEvent( name, callback, function( name, callback ) { - var once = function() { - me.off( name, once ); - return callback.apply( context || me, arguments ); - }; - - once._cb = callback; - me.on( name, once, context ); - }); - - return me; - }, - - /** - * 解除事件绑定 - * @method off - * @grammar off( [name[, callback[, context] ] ] ) => self - * @param {String} [name] 事件名 - * @param {Function} [callback] 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - */ - off: function( name, cb, ctx ) { - var events = this._events; - - if ( !events ) { - return this; - } - - if ( !name && !cb && !ctx ) { - this._events = []; - return this; - } - - eachEvent( name, cb, function( name, cb ) { - $.each( findHandlers( events, name, cb, ctx ), function() { - delete events[ this.id ]; - }); - }); - - return this; - }, - - /** - * 触发事件 - * @method trigger - * @grammar trigger( name[, args...] ) => self - * @param {String} type 事件名 - * @param {*} [...] 任意参数 - * @return {Boolean} 如果handler中return false了,则返回false, 否则返回true - */ - trigger: function( type ) { - var args, events, allEvents; - - if ( !this._events || !type ) { - return this; - } - - args = slice.call( arguments, 1 ); - events = findHandlers( this._events, type ); - allEvents = findHandlers( this._events, 'all' ); - - return triggerHanders( events, args ) && - triggerHanders( allEvents, arguments ); - } - }; - - /** - * 中介者,它本身是个单例,但可以通过[installTo](#WebUploader:Mediator:installTo)方法,使任何对象具备事件行为。 - * 主要目的是负责模块与模块之间的合作,降低耦合度。 - * - * @class Mediator - */ - return $.extend({ - - /** - * 可以通过这个接口,使任何对象具备事件功能。 - * @method installTo - * @param {Object} obj 需要具备事件行为的对象。 - * @return {Object} 返回obj. - */ - installTo: function( obj ) { - return $.extend( obj, protos ); - } - - }, protos ); - }); - /** - * @fileOverview Uploader上传类 - */ - define('uploader',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$; - - /** - * 上传入口类。 - * @class Uploader - * @constructor - * @grammar new Uploader( opts ) => Uploader - * @example - * var uploader = WebUploader.Uploader({ - * swf: 'path_of_swf/Uploader.swf', - * - * // 开起分片上传。 - * chunked: true - * }); - */ - function Uploader( opts ) { - this.options = $.extend( true, {}, Uploader.options, opts ); - this._init( this.options ); - } - - // default Options - // widgets中有相应扩展 - Uploader.options = {}; - Mediator.installTo( Uploader.prototype ); - - // 批量添加纯命令式方法。 - $.each({ - upload: 'start-upload', - stop: 'stop-upload', - getFile: 'get-file', - getFiles: 'get-files', - addFile: 'add-file', - addFiles: 'add-file', - sort: 'sort-files', - removeFile: 'remove-file', - cancelFile: 'cancel-file', - skipFile: 'skip-file', - retry: 'retry', - isInProgress: 'is-in-progress', - makeThumb: 'make-thumb', - md5File: 'md5-file', - getDimension: 'get-dimension', - addButton: 'add-btn', - predictRuntimeType: 'predict-runtime-type', - refresh: 'refresh', - disable: 'disable', - enable: 'enable', - reset: 'reset' - }, function( fn, command ) { - Uploader.prototype[ fn ] = function() { - return this.request( command, arguments ); - }; - }); - - $.extend( Uploader.prototype, { - state: 'pending', - - _init: function( opts ) { - var me = this; - - me.request( 'init', opts, function() { - me.state = 'ready'; - me.trigger('ready'); - }); - }, - - /** - * 获取或者设置Uploader配置项。 - * @method option - * @grammar option( key ) => * - * @grammar option( key, val ) => self - * @example - * - * // 初始状态图片上传前不会压缩 - * var uploader = new WebUploader.Uploader({ - * compress: null; - * }); - * - * // 修改后图片上传前,尝试将图片压缩到1600 * 1600 - * uploader.option( 'compress', { - * width: 1600, - * height: 1600 - * }); - */ - option: function( key, val ) { - var opts = this.options; - - // setter - if ( arguments.length > 1 ) { - - if ( $.isPlainObject( val ) && - $.isPlainObject( opts[ key ] ) ) { - $.extend( opts[ key ], val ); - } else { - opts[ key ] = val; - } - - } else { // getter - return key ? opts[ key ] : opts; - } - }, - - /** - * 获取文件统计信息。返回一个包含一下信息的对象。 - * * `successNum` 上传成功的文件数 - * * `progressNum` 上传中的文件数 - * * `cancelNum` 被删除的文件数 - * * `invalidNum` 无效的文件数 - * * `uploadFailNum` 上传失败的文件数 - * * `queueNum` 还在队列中的文件数 - * * `interruptNum` 被暂停的文件数 - * @method getStats - * @grammar getStats() => Object - */ - getStats: function() { - // return this._mgr.getStats.apply( this._mgr, arguments ); - var stats = this.request('get-stats'); - - return stats ? { - successNum: stats.numOfSuccess, - progressNum: stats.numOfProgress, - - // who care? - // queueFailNum: 0, - cancelNum: stats.numOfCancel, - invalidNum: stats.numOfInvalid, - uploadFailNum: stats.numOfUploadFailed, - queueNum: stats.numOfQueue, - interruptNum: stats.numofInterrupt - } : {}; - }, - - // 需要重写此方法来来支持opts.onEvent和instance.onEvent的处理器 - trigger: function( type/*, args...*/ ) { - var args = [].slice.call( arguments, 1 ), - opts = this.options, - name = 'on' + type.substring( 0, 1 ).toUpperCase() + - type.substring( 1 ); - - if ( - // 调用通过on方法注册的handler. - Mediator.trigger.apply( this, arguments ) === false || - - // 调用opts.onEvent - $.isFunction( opts[ name ] ) && - opts[ name ].apply( this, args ) === false || - - // 调用this.onEvent - $.isFunction( this[ name ] ) && - this[ name ].apply( this, args ) === false || - - // 广播所有uploader的事件。 - Mediator.trigger.apply( Mediator, - [ this, type ].concat( args ) ) === false ) { - - return false; - } - - return true; - }, - - /** - * 销毁 webuploader 实例 - * @method destroy - * @grammar destroy() => undefined - */ - destroy: function() { - this.request( 'destroy', arguments ); - this.off(); - }, - - // widgets/widget.js将补充此方法的详细文档。 - request: Base.noop - }); - - /** - * 创建Uploader实例,等同于new Uploader( opts ); - * @method create - * @class Base - * @static - * @grammar Base.create( opts ) => Uploader - */ - Base.create = Uploader.create = function( opts ) { - return new Uploader( opts ); - }; - - // 暴露Uploader,可以通过它来扩展业务逻辑。 - Base.Uploader = Uploader; - - return Uploader; - }); - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/runtime',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$, - factories = {}, - - // 获取对象的第一个key - getFirstKey = function( obj ) { - for ( var key in obj ) { - if ( obj.hasOwnProperty( key ) ) { - return key; - } - } - return null; - }; - - // 接口类。 - function Runtime( options ) { - this.options = $.extend({ - container: document.body - }, options ); - this.uid = Base.guid('rt_'); - } - - $.extend( Runtime.prototype, { - - getContainer: function() { - var opts = this.options, - parent, container; - - if ( this._container ) { - return this._container; - } - - parent = $( opts.container || document.body ); - container = $( document.createElement('div') ); - - container.attr( 'id', 'rt_' + this.uid ); - container.css({ - position: 'absolute', - top: '0px', - left: '0px', - width: '1px', - height: '1px', - overflow: 'hidden' - }); - - parent.append( container ); - parent.addClass('webuploader-container'); - this._container = container; - this._parent = parent; - return container; - }, - - init: Base.noop, - exec: Base.noop, - - destroy: function() { - this._container && this._container.remove(); - this._parent && this._parent.removeClass('webuploader-container'); - this.off(); - } - }); - - Runtime.orders = 'html5,flash'; - - - /** - * 添加Runtime实现。 - * @param {String} type 类型 - * @param {Runtime} factory 具体Runtime实现。 - */ - Runtime.addRuntime = function( type, factory ) { - factories[ type ] = factory; - }; - - Runtime.hasRuntime = function( type ) { - return !!(type ? factories[ type ] : getFirstKey( factories )); - }; - - Runtime.create = function( opts, orders ) { - var type, runtime; - - orders = orders || Runtime.orders; - $.each( orders.split( /\s*,\s*/g ), function() { - if ( factories[ this ] ) { - type = this; - return false; - } - }); - - type = type || getFirstKey( factories ); - - if ( !type ) { - throw new Error('Runtime Error'); - } - - runtime = new factories[ type ]( opts ); - return runtime; - }; - - Mediator.installTo( Runtime.prototype ); - return Runtime; - }); - - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/client',[ - 'base', - 'mediator', - 'runtime/runtime' - ], function( Base, Mediator, Runtime ) { - - var cache; - - cache = (function() { - var obj = {}; - - return { - add: function( runtime ) { - obj[ runtime.uid ] = runtime; - }, - - get: function( ruid, standalone ) { - var i; - - if ( ruid ) { - return obj[ ruid ]; - } - - for ( i in obj ) { - // 有些类型不能重用,比如filepicker. - if ( standalone && obj[ i ].__standalone ) { - continue; - } - - return obj[ i ]; - } - - return null; - }, - - remove: function( runtime ) { - delete obj[ runtime.uid ]; - } - }; - })(); - - function RuntimeClient( component, standalone ) { - var deferred = Base.Deferred(), - runtime; - - this.uid = Base.guid('client_'); - - // 允许runtime没有初始化之前,注册一些方法在初始化后执行。 - this.runtimeReady = function( cb ) { - return deferred.done( cb ); - }; - - this.connectRuntime = function( opts, cb ) { - - // already connected. - if ( runtime ) { - throw new Error('already connected!'); - } - - deferred.done( cb ); - - if ( typeof opts === 'string' && cache.get( opts ) ) { - runtime = cache.get( opts ); - } - - // 像filePicker只能独立存在,不能公用。 - runtime = runtime || cache.get( null, standalone ); - - // 需要创建 - if ( !runtime ) { - runtime = Runtime.create( opts, opts.runtimeOrder ); - runtime.__promise = deferred.promise(); - runtime.once( 'ready', deferred.resolve ); - runtime.init(); - cache.add( runtime ); - runtime.__client = 1; - } else { - // 来自cache - Base.$.extend( runtime.options, opts ); - runtime.__promise.then( deferred.resolve ); - runtime.__client++; - } - - standalone && (runtime.__standalone = standalone); - return runtime; - }; - - this.getRuntime = function() { - return runtime; - }; - - this.disconnectRuntime = function() { - if ( !runtime ) { - return; - } - - runtime.__client--; - - if ( runtime.__client <= 0 ) { - cache.remove( runtime ); - delete runtime.__promise; - runtime.destroy(); - } - - runtime = null; - }; - - this.exec = function() { - if ( !runtime ) { - return; - } - - var args = Base.slice( arguments ); - component && args.unshift( component ); - - return runtime.exec.apply( this, args ); - }; - - this.getRuid = function() { - return runtime && runtime.uid; - }; - - this.destroy = (function( destroy ) { - return function() { - destroy && destroy.apply( this, arguments ); - this.trigger('destroy'); - this.off(); - this.exec('destroy'); - this.disconnectRuntime(); - }; - })( this.destroy ); - } - - Mediator.installTo( RuntimeClient.prototype ); - return RuntimeClient; - }); - /** - * @fileOverview 错误信息 - */ - define('lib/dnd',[ - 'base', - 'mediator', - 'runtime/client' - ], function( Base, Mediator, RuntimeClent ) { - - var $ = Base.$; - - function DragAndDrop( opts ) { - opts = this.options = $.extend({}, DragAndDrop.options, opts ); - - opts.container = $( opts.container ); - - if ( !opts.container.length ) { - return; - } - - RuntimeClent.call( this, 'DragAndDrop' ); - } - - DragAndDrop.options = { - accept: null, - disableGlobalDnd: false - }; - - Base.inherits( RuntimeClent, { - constructor: DragAndDrop, - - init: function() { - var me = this; - - me.connectRuntime( me.options, function() { - me.exec('init'); - me.trigger('ready'); - }); - } - }); - - Mediator.installTo( DragAndDrop.prototype ); - - return DragAndDrop; - }); - /** - * @fileOverview 组件基类。 - */ - define('widgets/widget',[ - 'base', - 'uploader' - ], function( Base, Uploader ) { - - var $ = Base.$, - _init = Uploader.prototype._init, - _destroy = Uploader.prototype.destroy, - IGNORE = {}, - widgetClass = []; - - function isArrayLike( obj ) { - if ( !obj ) { - return false; - } - - var length = obj.length, - type = $.type( obj ); - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === 'array' || type !== 'function' && type !== 'string' && - (length === 0 || typeof length === 'number' && length > 0 && - (length - 1) in obj); - } - - function Widget( uploader ) { - this.owner = uploader; - this.options = uploader.options; - } - - $.extend( Widget.prototype, { - - init: Base.noop, - - // 类Backbone的事件监听声明,监听uploader实例上的事件 - // widget直接无法监听事件,事件只能通过uploader来传递 - invoke: function( apiName, args ) { - - /* - { - 'make-thumb': 'makeThumb' - } - */ - var map = this.responseMap; - - // 如果无API响应声明则忽略 - if ( !map || !(apiName in map) || !(map[ apiName ] in this) || - !$.isFunction( this[ map[ apiName ] ] ) ) { - - return IGNORE; - } - - return this[ map[ apiName ] ].apply( this, args ); - - }, - - /** - * 发送命令。当传入`callback`或者`handler`中返回`promise`时。返回一个当所有`handler`中的promise都完成后完成的新`promise`。 - * @method request - * @grammar request( command, args ) => * | Promise - * @grammar request( command, args, callback ) => Promise - * @for Uploader - */ - request: function() { - return this.owner.request.apply( this.owner, arguments ); - } - }); - - // 扩展Uploader. - $.extend( Uploader.prototype, { - - /** - * @property {String | Array} [disableWidgets=undefined] - * @namespace options - * @for Uploader - * @description 默认所有 Uploader.register 了的 widget 都会被加载,如果禁用某一部分,请通过此 option 指定黑名单。 - */ - - // 覆写_init用来初始化widgets - _init: function() { - var me = this, - widgets = me._widgets = [], - deactives = me.options.disableWidgets || ''; - - $.each( widgetClass, function( _, klass ) { - (!deactives || !~deactives.indexOf( klass._name )) && - widgets.push( new klass( me ) ); - }); - - return _init.apply( me, arguments ); - }, - - request: function( apiName, args, callback ) { - var i = 0, - widgets = this._widgets, - len = widgets && widgets.length, - rlts = [], - dfds = [], - widget, rlt, promise, key; - - args = isArrayLike( args ) ? args : [ args ]; - - for ( ; i < len; i++ ) { - widget = widgets[ i ]; - rlt = widget.invoke( apiName, args ); - - if ( rlt !== IGNORE ) { - - // Deferred对象 - if ( Base.isPromise( rlt ) ) { - dfds.push( rlt ); - } else { - rlts.push( rlt ); - } - } - } - - // 如果有callback,则用异步方式。 - if ( callback || dfds.length ) { - promise = Base.when.apply( Base, dfds ); - key = promise.pipe ? 'pipe' : 'then'; - - // 很重要不能删除。删除了会死循环。 - // 保证执行顺序。让callback总是在下一个 tick 中执行。 - return promise[ key ](function() { - var deferred = Base.Deferred(), - args = arguments; - - if ( args.length === 1 ) { - args = args[ 0 ]; - } - - setTimeout(function() { - deferred.resolve( args ); - }, 1 ); - - return deferred.promise(); - })[ callback ? key : 'done' ]( callback || Base.noop ); - } else { - return rlts[ 0 ]; - } - }, - - destroy: function() { - _destroy.apply( this, arguments ); - this._widgets = null; - } - }); - - /** - * 添加组件 - * @grammar Uploader.register(proto); - * @grammar Uploader.register(map, proto); - * @param {object} responseMap API 名称与函数实现的映射 - * @param {object} proto 组件原型,构造函数通过 constructor 属性定义 - * @method Uploader.register - * @for Uploader - * @example - * Uploader.register({ - * 'make-thumb': 'makeThumb' - * }, { - * init: function( options ) {}, - * makeThumb: function() {} - * }); - * - * Uploader.register({ - * 'make-thumb': function() { - * - * } - * }); - */ - Uploader.register = Widget.register = function( responseMap, widgetProto ) { - var map = { init: 'init', destroy: 'destroy', name: 'anonymous' }, - klass; - - if ( arguments.length === 1 ) { - widgetProto = responseMap; - - // 自动生成 map 表。 - $.each(widgetProto, function(key) { - if ( key[0] === '_' || key === 'name' ) { - key === 'name' && (map.name = widgetProto.name); - return; - } - - map[key.replace(/[A-Z]/g, '-$&').toLowerCase()] = key; - }); - - } else { - map = $.extend( map, responseMap ); - } - - widgetProto.responseMap = map; - klass = Base.inherits( Widget, widgetProto ); - klass._name = map.name; - widgetClass.push( klass ); - - return klass; - }; - - /** - * 删除插件,只有在注册时指定了名字的才能被删除。 - * @grammar Uploader.unRegister(name); - * @param {string} name 组件名字 - * @method Uploader.unRegister - * @for Uploader - * @example - * - * Uploader.register({ - * name: 'custom', - * - * 'make-thumb': function() { - * - * } - * }); - * - * Uploader.unRegister('custom'); - */ - Uploader.unRegister = Widget.unRegister = function( name ) { - if ( !name || name === 'anonymous' ) { - return; - } - - // 删除指定的插件。 - for ( var i = widgetClass.length; i--; ) { - if ( widgetClass[i]._name === name ) { - widgetClass.splice(i, 1) - } - } - }; - - return Widget; - }); - /** - * @fileOverview DragAndDrop Widget。 - */ - define('widgets/filednd',[ - 'base', - 'uploader', - 'lib/dnd', - 'widgets/widget' - ], function( Base, Uploader, Dnd ) { - var $ = Base.$; - - Uploader.options.dnd = ''; - - /** - * @property {Selector} [dnd=undefined] 指定Drag And Drop拖拽的容器,如果不指定,则不启动。 - * @namespace options - * @for Uploader - */ - - /** - * @property {Selector} [disableGlobalDnd=false] 是否禁掉整个页面的拖拽功能,如果不禁用,图片拖进来的时候会默认被浏览器打开。 - * @namespace options - * @for Uploader - */ - - /** - * @event dndAccept - * @param {DataTransferItemList} items DataTransferItem - * @description 阻止此事件可以拒绝某些类型的文件拖入进来。目前只有 chrome 提供这样的 API,且只能通过 mime-type 验证。 - * @for Uploader - */ - return Uploader.register({ - name: 'dnd', - - init: function( opts ) { - - if ( !opts.dnd || - this.request('predict-runtime-type') !== 'html5' ) { - return; - } - - var me = this, - deferred = Base.Deferred(), - options = $.extend({}, { - disableGlobalDnd: opts.disableGlobalDnd, - container: opts.dnd, - accept: opts.accept - }), - dnd; - - this.dnd = dnd = new Dnd( options ); - - dnd.once( 'ready', deferred.resolve ); - dnd.on( 'drop', function( files ) { - me.request( 'add-file', [ files ]); - }); - - // 检测文件是否全部允许添加。 - dnd.on( 'accept', function( items ) { - return me.owner.trigger( 'dndAccept', items ); - }); - - dnd.init(); - - return deferred.promise(); - }, - - destroy: function() { - this.dnd && this.dnd.destroy(); - } - }); - }); - - /** - * @fileOverview 错误信息 - */ - define('lib/filepaste',[ - 'base', - 'mediator', - 'runtime/client' - ], function( Base, Mediator, RuntimeClent ) { - - var $ = Base.$; - - function FilePaste( opts ) { - opts = this.options = $.extend({}, opts ); - opts.container = $( opts.container || document.body ); - RuntimeClent.call( this, 'FilePaste' ); - } - - Base.inherits( RuntimeClent, { - constructor: FilePaste, - - init: function() { - var me = this; - - me.connectRuntime( me.options, function() { - me.exec('init'); - me.trigger('ready'); - }); - } - }); - - Mediator.installTo( FilePaste.prototype ); - - return FilePaste; - }); - /** - * @fileOverview 组件基类。 - */ - define('widgets/filepaste',[ - 'base', - 'uploader', - 'lib/filepaste', - 'widgets/widget' - ], function( Base, Uploader, FilePaste ) { - var $ = Base.$; - - /** - * @property {Selector} [paste=undefined] 指定监听paste事件的容器,如果不指定,不启用此功能。此功能为通过粘贴来添加截屏的图片。建议设置为`document.body`. - * @namespace options - * @for Uploader - */ - return Uploader.register({ - name: 'paste', - - init: function( opts ) { - - if ( !opts.paste || - this.request('predict-runtime-type') !== 'html5' ) { - return; - } - - var me = this, - deferred = Base.Deferred(), - options = $.extend({}, { - container: opts.paste, - accept: opts.accept - }), - paste; - - this.paste = paste = new FilePaste( options ); - - paste.once( 'ready', deferred.resolve ); - paste.on( 'paste', function( files ) { - me.owner.request( 'add-file', [ files ]); - }); - paste.init(); - - return deferred.promise(); - }, - - destroy: function() { - this.paste && this.paste.destroy(); - } - }); - }); - /** - * @fileOverview Blob - */ - define('lib/blob',[ - 'base', - 'runtime/client' - ], function( Base, RuntimeClient ) { - - function Blob( ruid, source ) { - var me = this; - - me.source = source; - me.ruid = ruid; - this.size = source.size || 0; - - // 如果没有指定 mimetype, 但是知道文件后缀。 - if ( !source.type && this.ext && - ~'jpg,jpeg,png,gif,bmp'.indexOf( this.ext ) ) { - this.type = 'image/' + (this.ext === 'jpg' ? 'jpeg' : this.ext); - } else { - this.type = source.type || 'application/octet-stream'; - } - - RuntimeClient.call( me, 'Blob' ); - this.uid = source.uid || this.uid; - - if ( ruid ) { - me.connectRuntime( ruid ); - } - } - - Base.inherits( RuntimeClient, { - constructor: Blob, - - slice: function( start, end ) { - return this.exec( 'slice', start, end ); - }, - - getSource: function() { - return this.source; - } - }); - - return Blob; - }); - /** - * 为了统一化Flash的File和HTML5的File而存在。 - * 以至于要调用Flash里面的File,也可以像调用HTML5版本的File一下。 - * @fileOverview File - */ - define('lib/file',[ - 'base', - 'lib/blob' - ], function( Base, Blob ) { - - var uid = 1, - rExt = /\.([^.]+)$/; - - function File( ruid, file ) { - var ext; - - this.name = file.name || ('untitled' + uid++); - ext = rExt.exec( file.name ) ? RegExp.$1.toLowerCase() : ''; - - // todo 支持其他类型文件的转换。 - // 如果有 mimetype, 但是文件名里面没有找出后缀规律 - if ( !ext && file.type ) { - ext = /\/(jpg|jpeg|png|gif|bmp)$/i.exec( file.type ) ? - RegExp.$1.toLowerCase() : ''; - this.name += '.' + ext; - } - - this.ext = ext; - this.lastModifiedDate = file.lastModifiedDate || - (new Date()).toLocaleString(); - - Blob.apply( this, arguments ); - } - - return Base.inherits( Blob, File ); - }); - - /** - * @fileOverview 错误信息 - */ - define('lib/filepicker',[ - 'base', - 'runtime/client', - 'lib/file' - ], function( Base, RuntimeClent, File ) { - - var $ = Base.$; - - function FilePicker( opts ) { - opts = this.options = $.extend({}, FilePicker.options, opts ); - - opts.container = $( opts.id ); - - if ( !opts.container.length ) { - throw new Error('按钮指定错误'); - } - - opts.innerHTML = opts.innerHTML || opts.label || - opts.container.html() || ''; - - opts.button = $( opts.button || document.createElement('div') ); - opts.button.html( opts.innerHTML ); - opts.container.html( opts.button ); - - RuntimeClent.call( this, 'FilePicker', true ); - } - - FilePicker.options = { - button: null, - container: null, - label: null, - innerHTML: null, - multiple: true, - accept: null, - name: 'file' - }; - - Base.inherits( RuntimeClent, { - constructor: FilePicker, - - init: function() { - var me = this, - opts = me.options, - button = opts.button; - - button.addClass('webuploader-pick'); - - me.on( 'all', function( type ) { - var files; - - switch ( type ) { - case 'mouseenter': - button.addClass('webuploader-pick-hover'); - break; - - case 'mouseleave': - button.removeClass('webuploader-pick-hover'); - break; - - case 'change': - files = me.exec('getFiles'); - me.trigger( 'select', $.map( files, function( file ) { - file = new File( me.getRuid(), file ); - - // 记录来源。 - file._refer = opts.container; - return file; - }), opts.container ); - break; - } - }); - - me.connectRuntime( opts, function() { - me.refresh(); - me.exec( 'init', opts ); - me.trigger('ready'); - }); - - this._resizeHandler = Base.bindFn( this.refresh, this ); - $( window ).on( 'resize', this._resizeHandler ); - }, - - refresh: function() { - var shimContainer = this.getRuntime().getContainer(), - button = this.options.button, - width = button.outerWidth ? - button.outerWidth() : button.width(), - - height = button.outerHeight ? - button.outerHeight() : button.height(), - - pos = button.offset(); - - width && height && shimContainer.css({ - bottom: 'auto', - right: 'auto', - width: width + 'px', - height: height + 'px' - }).offset( pos ); - }, - - enable: function() { - var btn = this.options.button; - - btn.removeClass('webuploader-pick-disable'); - this.refresh(); - }, - - disable: function() { - var btn = this.options.button; - - this.getRuntime().getContainer().css({ - top: '-99999px' - }); - - btn.addClass('webuploader-pick-disable'); - }, - - destroy: function() { - var btn = this.options.button; - $( window ).off( 'resize', this._resizeHandler ); - btn.removeClass('webuploader-pick-disable webuploader-pick-hover ' + - 'webuploader-pick'); - } - }); - - return FilePicker; - }); - - /** - * @fileOverview 文件选择相关 - */ - define('widgets/filepicker',[ - 'base', - 'uploader', - 'lib/filepicker', - 'widgets/widget' - ], function( Base, Uploader, FilePicker ) { - var $ = Base.$; - - $.extend( Uploader.options, { - - /** - * @property {Selector | Object} [pick=undefined] - * @namespace options - * @for Uploader - * @description 指定选择文件的按钮容器,不指定则不创建按钮。 - * - * * `id` {Seletor|dom} 指定选择文件的按钮容器,不指定则不创建按钮。**注意** 这里虽然写的是 id, 但是不是只支持 id, 还支持 class, 或者 dom 节点。 - * * `label` {String} 请采用 `innerHTML` 代替 - * * `innerHTML` {String} 指定按钮文字。不指定时优先从指定的容器中看是否自带文字。 - * * `multiple` {Boolean} 是否开起同时选择多个文件能力。 - */ - pick: null, - - /** - * @property {Arroy} [accept=null] - * @namespace options - * @for Uploader - * @description 指定接受哪些类型的文件。 由于目前还有ext转mimeType表,所以这里需要分开指定。 - * - * * `title` {String} 文字描述 - * * `extensions` {String} 允许的文件后缀,不带点,多个用逗号分割。 - * * `mimeTypes` {String} 多个用逗号分割。 - * - * 如: - * - * ``` - * { - * title: 'Images', - * extensions: 'gif,jpg,jpeg,bmp,png', - * mimeTypes: 'image/*' - * } - * ``` - */ - accept: null/*{ - title: 'Images', - extensions: 'gif,jpg,jpeg,bmp,png', - mimeTypes: 'image/*' - }*/ - }); - - return Uploader.register({ - name: 'picker', - - init: function( opts ) { - this.pickers = []; - return opts.pick && this.addBtn( opts.pick ); - }, - - refresh: function() { - $.each( this.pickers, function() { - this.refresh(); - }); - }, - - /** - * @method addButton - * @for Uploader - * @grammar addButton( pick ) => Promise - * @description - * 添加文件选择按钮,如果一个按钮不够,需要调用此方法来添加。参数跟[options.pick](#WebUploader:Uploader:options)一致。 - * @example - * uploader.addButton({ - * id: '#btnContainer', - * innerHTML: '选择文件' - * }); - */ - addBtn: function( pick ) { - var me = this, - opts = me.options, - accept = opts.accept, - promises = []; - - if ( !pick ) { - return; - } - - $.isPlainObject( pick ) || (pick = { - id: pick - }); - - $( pick.id ).each(function() { - var options, picker, deferred; - - deferred = Base.Deferred(); - - options = $.extend({}, pick, { - accept: $.isPlainObject( accept ) ? [ accept ] : accept, - swf: opts.swf, - runtimeOrder: opts.runtimeOrder, - id: this - }); - - picker = new FilePicker( options ); - - picker.once( 'ready', deferred.resolve ); - picker.on( 'select', function( files ) { - me.owner.request( 'add-file', [ files ]); - }); - picker.init(); - - me.pickers.push( picker ); - - promises.push( deferred.promise() ); - }); - - return Base.when.apply( Base, promises ); - }, - - disable: function() { - $.each( this.pickers, function() { - this.disable(); - }); - }, - - enable: function() { - $.each( this.pickers, function() { - this.enable(); - }); - }, - - destroy: function() { - $.each( this.pickers, function() { - this.destroy(); - }); - this.pickers = null; - } - }); - }); - /** - * @fileOverview 文件属性封装 - */ - define('file',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$, - idPrefix = 'WU_FILE_', - idSuffix = 0, - rExt = /\.([^.]+)$/, - statusMap = {}; - - function gid() { - return idPrefix + idSuffix++; - } - - /** - * 文件类 - * @class File - * @constructor 构造函数 - * @grammar new File( source ) => File - * @param {Lib.File} source [lib.File](#Lib.File)实例, 此source对象是带有Runtime信息的。 - */ - function WUFile( source ) { - - /** - * 文件名,包括扩展名(后缀) - * @property name - * @type {string} - */ - this.name = source.name || 'Untitled'; - - /** - * 文件体积(字节) - * @property size - * @type {uint} - * @default 0 - */ - this.size = source.size || 0; - - /** - * 文件MIMETYPE类型,与文件类型的对应关系请参考[http://t.cn/z8ZnFny](http://t.cn/z8ZnFny) - * @property type - * @type {string} - * @default 'application/octet-stream' - */ - this.type = source.type || 'application/octet-stream'; - - /** - * 文件最后修改日期 - * @property lastModifiedDate - * @type {int} - * @default 当前时间戳 - */ - this.lastModifiedDate = source.lastModifiedDate || (new Date() * 1); - - /** - * 文件ID,每个对象具有唯一ID,与文件名无关 - * @property id - * @type {string} - */ - this.id = gid(); - - /** - * 文件扩展名,通过文件名获取,例如test.png的扩展名为png - * @property ext - * @type {string} - */ - this.ext = rExt.exec( this.name ) ? RegExp.$1 : ''; - - - /** - * 状态文字说明。在不同的status语境下有不同的用途。 - * @property statusText - * @type {string} - */ - this.statusText = ''; - - // 存储文件状态,防止通过属性直接修改 - statusMap[ this.id ] = WUFile.Status.INITED; - - this.source = source; - this.loaded = 0; - - this.on( 'error', function( msg ) { - this.setStatus( WUFile.Status.ERROR, msg ); - }); - } - - $.extend( WUFile.prototype, { - - /** - * 设置状态,状态变化时会触发`change`事件。 - * @method setStatus - * @grammar setStatus( status[, statusText] ); - * @param {File.Status|String} status [文件状态值](#WebUploader:File:File.Status) - * @param {String} [statusText=''] 状态说明,常在error时使用,用http, abort,server等来标记是由于什么原因导致文件错误。 - */ - setStatus: function( status, text ) { - - var prevStatus = statusMap[ this.id ]; - - typeof text !== 'undefined' && (this.statusText = text); - - if ( status !== prevStatus ) { - statusMap[ this.id ] = status; - /** - * 文件状态变化 - * @event statuschange - */ - this.trigger( 'statuschange', status, prevStatus ); - } - - }, - - /** - * 获取文件状态 - * @return {File.Status} - * @example - 文件状态具体包括以下几种类型: - { - // 初始化 - INITED: 0, - // 已入队列 - QUEUED: 1, - // 正在上传 - PROGRESS: 2, - // 上传出错 - ERROR: 3, - // 上传成功 - COMPLETE: 4, - // 上传取消 - CANCELLED: 5 - } - */ - getStatus: function() { - return statusMap[ this.id ]; - }, - - /** - * 获取文件原始信息。 - * @return {*} - */ - getSource: function() { - return this.source; - }, - - destroy: function() { - this.off(); - delete statusMap[ this.id ]; - } - }); - - Mediator.installTo( WUFile.prototype ); - - /** - * 文件状态值,具体包括以下几种类型: - * * `inited` 初始状态 - * * `queued` 已经进入队列, 等待上传 - * * `progress` 上传中 - * * `complete` 上传完成。 - * * `error` 上传出错,可重试 - * * `interrupt` 上传中断,可续传。 - * * `invalid` 文件不合格,不能重试上传。会自动从队列中移除。 - * * `cancelled` 文件被移除。 - * @property {Object} Status - * @namespace File - * @class File - * @static - */ - WUFile.Status = { - INITED: 'inited', // 初始状态 - QUEUED: 'queued', // 已经进入队列, 等待上传 - PROGRESS: 'progress', // 上传中 - ERROR: 'error', // 上传出错,可重试 - COMPLETE: 'complete', // 上传完成。 - CANCELLED: 'cancelled', // 上传取消。 - INTERRUPT: 'interrupt', // 上传中断,可续传。 - INVALID: 'invalid' // 文件不合格,不能重试上传。 - }; - - return WUFile; - }); - - /** - * @fileOverview 文件队列 - */ - define('queue',[ - 'base', - 'mediator', - 'file' - ], function( Base, Mediator, WUFile ) { - - var $ = Base.$, - STATUS = WUFile.Status; - - /** - * 文件队列, 用来存储各个状态中的文件。 - * @class Queue - * @extends Mediator - */ - function Queue() { - - /** - * 统计文件数。 - * * `numOfQueue` 队列中的文件数。 - * * `numOfSuccess` 上传成功的文件数 - * * `numOfCancel` 被取消的文件数 - * * `numOfProgress` 正在上传中的文件数 - * * `numOfUploadFailed` 上传错误的文件数。 - * * `numOfInvalid` 无效的文件数。 - * * `numofDeleted` 被移除的文件数。 - * @property {Object} stats - */ - this.stats = { - numOfQueue: 0, - numOfSuccess: 0, - numOfCancel: 0, - numOfProgress: 0, - numOfUploadFailed: 0, - numOfInvalid: 0, - numofDeleted: 0, - numofInterrupt: 0 - }; - - // 上传队列,仅包括等待上传的文件 - this._queue = []; - - // 存储所有文件 - this._map = {}; - } - - $.extend( Queue.prototype, { - - /** - * 将新文件加入对队列尾部 - * - * @method append - * @param {File} file 文件对象 - */ - append: function( file ) { - this._queue.push( file ); - this._fileAdded( file ); - return this; - }, - - /** - * 将新文件加入对队列头部 - * - * @method prepend - * @param {File} file 文件对象 - */ - prepend: function( file ) { - this._queue.unshift( file ); - this._fileAdded( file ); - return this; - }, - - /** - * 获取文件对象 - * - * @method getFile - * @param {String} fileId 文件ID - * @return {File} - */ - getFile: function( fileId ) { - if ( typeof fileId !== 'string' ) { - return fileId; - } - return this._map[ fileId ]; - }, - - /** - * 从队列中取出一个指定状态的文件。 - * @grammar fetch( status ) => File - * @method fetch - * @param {String} status [文件状态值](#WebUploader:File:File.Status) - * @return {File} [File](#WebUploader:File) - */ - fetch: function( status ) { - var len = this._queue.length, - i, file; - - status = status || STATUS.QUEUED; - - for ( i = 0; i < len; i++ ) { - file = this._queue[ i ]; - - if ( status === file.getStatus() ) { - return file; - } - } - - return null; - }, - - /** - * 对队列进行排序,能够控制文件上传顺序。 - * @grammar sort( fn ) => undefined - * @method sort - * @param {Function} fn 排序方法 - */ - sort: function( fn ) { - if ( typeof fn === 'function' ) { - this._queue.sort( fn ); - } - }, - - /** - * 获取指定类型的文件列表, 列表中每一个成员为[File](#WebUploader:File)对象。 - * @grammar getFiles( [status1[, status2 ...]] ) => Array - * @method getFiles - * @param {String} [status] [文件状态值](#WebUploader:File:File.Status) - */ - getFiles: function() { - var sts = [].slice.call( arguments, 0 ), - ret = [], - i = 0, - len = this._queue.length, - file; - - for ( ; i < len; i++ ) { - file = this._queue[ i ]; - - if ( sts.length && !~$.inArray( file.getStatus(), sts ) ) { - continue; - } - - ret.push( file ); - } - - return ret; - }, - - /** - * 在队列中删除文件。 - * @grammar removeFile( file ) => Array - * @method removeFile - * @param {File} 文件对象。 - */ - removeFile: function( file ) { - var me = this, - existing = this._map[ file.id ]; - - if ( existing ) { - delete this._map[ file.id ]; - file.destroy(); - this.stats.numofDeleted++; - } - }, - - _fileAdded: function( file ) { - var me = this, - existing = this._map[ file.id ]; - - if ( !existing ) { - this._map[ file.id ] = file; - - file.on( 'statuschange', function( cur, pre ) { - me._onFileStatusChange( cur, pre ); - }); - } - }, - - _onFileStatusChange: function( curStatus, preStatus ) { - var stats = this.stats; - - switch ( preStatus ) { - case STATUS.PROGRESS: - stats.numOfProgress--; - break; - - case STATUS.QUEUED: - stats.numOfQueue --; - break; - - case STATUS.ERROR: - stats.numOfUploadFailed--; - break; - - case STATUS.INVALID: - stats.numOfInvalid--; - break; - - case STATUS.INTERRUPT: - stats.numofInterrupt--; - break; - } - - switch ( curStatus ) { - case STATUS.QUEUED: - stats.numOfQueue++; - break; - - case STATUS.PROGRESS: - stats.numOfProgress++; - break; - - case STATUS.ERROR: - stats.numOfUploadFailed++; - break; - - case STATUS.COMPLETE: - stats.numOfSuccess++; - break; - - case STATUS.CANCELLED: - stats.numOfCancel++; - break; - - - case STATUS.INVALID: - stats.numOfInvalid++; - break; - - case STATUS.INTERRUPT: - stats.numofInterrupt++; - break; - } - } - - }); - - Mediator.installTo( Queue.prototype ); - - return Queue; - }); - /** - * @fileOverview 队列 - */ - define('widgets/queue',[ - 'base', - 'uploader', - 'queue', - 'file', - 'lib/file', - 'runtime/client', - 'widgets/widget' - ], function( Base, Uploader, Queue, WUFile, File, RuntimeClient ) { - - var $ = Base.$, - rExt = /\.\w+$/, - Status = WUFile.Status; - - return Uploader.register({ - name: 'queue', - - init: function( opts ) { - var me = this, - deferred, len, i, item, arr, accept, runtime; - - if ( $.isPlainObject( opts.accept ) ) { - opts.accept = [ opts.accept ]; - } - - // accept中的中生成匹配正则。 - if ( opts.accept ) { - arr = []; - - for ( i = 0, len = opts.accept.length; i < len; i++ ) { - item = opts.accept[ i ].extensions; - item && arr.push( item ); - } - - if ( arr.length ) { - accept = '\\.' + arr.join(',') - .replace( /,/g, '$|\\.' ) - .replace( /\*/g, '.*' ) + '$'; - } - - me.accept = new RegExp( accept, 'i' ); - } - - me.queue = new Queue(); - me.stats = me.queue.stats; - - // 如果当前不是html5运行时,那就算了。 - // 不执行后续操作 - if ( this.request('predict-runtime-type') !== 'html5' ) { - return; - } - - // 创建一个 html5 运行时的 placeholder - // 以至于外部添加原生 File 对象的时候能正确包裹一下供 webuploader 使用。 - deferred = Base.Deferred(); - this.placeholder = runtime = new RuntimeClient('Placeholder'); - runtime.connectRuntime({ - runtimeOrder: 'html5' - }, function() { - me._ruid = runtime.getRuid(); - deferred.resolve(); - }); - return deferred.promise(); - }, - - - // 为了支持外部直接添加一个原生File对象。 - _wrapFile: function( file ) { - if ( !(file instanceof WUFile) ) { - - if ( !(file instanceof File) ) { - if ( !this._ruid ) { - throw new Error('Can\'t add external files.'); - } - file = new File( this._ruid, file ); - } - - file = new WUFile( file ); - } - - return file; - }, - - // 判断文件是否可以被加入队列 - acceptFile: function( file ) { - var invalid = !file || !file.size || this.accept && - - // 如果名字中有后缀,才做后缀白名单处理。 - rExt.exec( file.name ) && !this.accept.test( file.name ); - - return !invalid; - }, - - - /** - * @event beforeFileQueued - * @param {File} file File对象 - * @description 当文件被加入队列之前触发,此事件的handler返回值为`false`,则此文件不会被添加进入队列。 - * @for Uploader - */ - - /** - * @event fileQueued - * @param {File} file File对象 - * @description 当文件被加入队列以后触发。 - * @for Uploader - */ - - _addFile: function( file ) { - var me = this; - - file = me._wrapFile( file ); - - // 不过类型判断允许不允许,先派送 `beforeFileQueued` - if ( !me.owner.trigger( 'beforeFileQueued', file ) ) { - return; - } - - // 类型不匹配,则派送错误事件,并返回。 - if ( !me.acceptFile( file ) ) { - me.owner.trigger( 'error', 'Q_TYPE_DENIED', file ); - return; - } - - me.queue.append( file ); - me.owner.trigger( 'fileQueued', file ); - return file; - }, - - getFile: function( fileId ) { - return this.queue.getFile( fileId ); - }, - - /** - * @event filesQueued - * @param {File} files 数组,内容为原始File(lib/File)对象。 - * @description 当一批文件添加进队列以后触发。 - * @for Uploader - */ - - /** - * @property {Boolean} [auto=false] - * @namespace options - * @for Uploader - * @description 设置为 true 后,不需要手动调用上传,有文件选择即开始上传。 - * - */ - - /** - * @method addFiles - * @grammar addFiles( file ) => undefined - * @grammar addFiles( [file1, file2 ...] ) => undefined - * @param {Array of File or File} [files] Files 对象 数组 - * @description 添加文件到队列 - * @for Uploader - */ - addFile: function( files ) { - var me = this; - - if ( !files.length ) { - files = [ files ]; - } - - files = $.map( files, function( file ) { - return me._addFile( file ); - }); - - me.owner.trigger( 'filesQueued', files ); - - if ( me.options.auto ) { - setTimeout(function() { - me.request('start-upload'); - }, 20 ); - } - }, - - getStats: function() { - return this.stats; - }, - - /** - * @event fileDequeued - * @param {File} file File对象 - * @description 当文件被移除队列后触发。 - * @for Uploader - */ - - /** - * @method removeFile - * @grammar removeFile( file ) => undefined - * @grammar removeFile( id ) => undefined - * @grammar removeFile( file, true ) => undefined - * @grammar removeFile( id, true ) => undefined - * @param {File|id} file File对象或这File对象的id - * @description 移除某一文件, 默认只会标记文件状态为已取消,如果第二个参数为 `true` 则会从 queue 中移除。 - * @for Uploader - * @example - * - * $li.on('click', '.remove-this', function() { - * uploader.removeFile( file ); - * }) - */ - removeFile: function( file, remove ) { - var me = this; - - file = file.id ? file : me.queue.getFile( file ); - - this.request( 'cancel-file', file ); - - if ( remove ) { - this.queue.removeFile( file ); - } - }, - - /** - * @method getFiles - * @grammar getFiles() => Array - * @grammar getFiles( status1, status2, status... ) => Array - * @description 返回指定状态的文件集合,不传参数将返回所有状态的文件。 - * @for Uploader - * @example - * console.log( uploader.getFiles() ); // => all files - * console.log( uploader.getFiles('error') ) // => all error files. - */ - getFiles: function() { - return this.queue.getFiles.apply( this.queue, arguments ); - }, - - fetchFile: function() { - return this.queue.fetch.apply( this.queue, arguments ); - }, - - /** - * @method retry - * @grammar retry() => undefined - * @grammar retry( file ) => undefined - * @description 重试上传,重试指定文件,或者从出错的文件开始重新上传。 - * @for Uploader - * @example - * function retry() { - * uploader.retry(); - * } - */ - retry: function( file, noForceStart ) { - var me = this, - files, i, len; - - if ( file ) { - file = file.id ? file : me.queue.getFile( file ); - file.setStatus( Status.QUEUED ); - noForceStart || me.request('start-upload'); - return; - } - - files = me.queue.getFiles( Status.ERROR ); - i = 0; - len = files.length; - - for ( ; i < len; i++ ) { - file = files[ i ]; - file.setStatus( Status.QUEUED ); - } - - me.request('start-upload'); - }, - - /** - * @method sort - * @grammar sort( fn ) => undefined - * @description 排序队列中的文件,在上传之前调整可以控制上传顺序。 - * @for Uploader - */ - sortFiles: function() { - return this.queue.sort.apply( this.queue, arguments ); - }, - - /** - * @event reset - * @description 当 uploader 被重置的时候触发。 - * @for Uploader - */ - - /** - * @method reset - * @grammar reset() => undefined - * @description 重置uploader。目前只重置了队列。 - * @for Uploader - * @example - * uploader.reset(); - */ - reset: function() { - this.owner.trigger('reset'); - this.queue = new Queue(); - this.stats = this.queue.stats; - }, - - destroy: function() { - this.reset(); - this.placeholder && this.placeholder.destroy(); - } - }); - - }); - /** - * @fileOverview 添加获取Runtime相关信息的方法。 - */ - define('widgets/runtime',[ - 'uploader', - 'runtime/runtime', - 'widgets/widget' - ], function( Uploader, Runtime ) { - - Uploader.support = function() { - return Runtime.hasRuntime.apply( Runtime, arguments ); - }; - - /** - * @property {Object} [runtimeOrder=html5,flash] - * @namespace options - * @for Uploader - * @description 指定运行时启动顺序。默认会想尝试 html5 是否支持,如果支持则使用 html5, 否则则使用 flash. - * - * 可以将此值设置成 `flash`,来强制使用 flash 运行时。 - */ - - return Uploader.register({ - name: 'runtime', - - init: function() { - if ( !this.predictRuntimeType() ) { - throw Error('Runtime Error'); - } - }, - - /** - * 预测Uploader将采用哪个`Runtime` - * @grammar predictRuntimeType() => String - * @method predictRuntimeType - * @for Uploader - */ - predictRuntimeType: function() { - var orders = this.options.runtimeOrder || Runtime.orders, - type = this.type, - i, len; - - if ( !type ) { - orders = orders.split( /\s*,\s*/g ); - - for ( i = 0, len = orders.length; i < len; i++ ) { - if ( Runtime.hasRuntime( orders[ i ] ) ) { - this.type = type = orders[ i ]; - break; - } - } - } - - return type; - } - }); - }); - /** - * @fileOverview Transport - */ - define('lib/transport',[ - 'base', - 'runtime/client', - 'mediator' - ], function( Base, RuntimeClient, Mediator ) { - - var $ = Base.$; - - function Transport( opts ) { - var me = this; - - opts = me.options = $.extend( true, {}, Transport.options, opts || {} ); - RuntimeClient.call( this, 'Transport' ); - - this._blob = null; - this._formData = opts.formData || {}; - this._headers = opts.headers || {}; - - this.on( 'progress', this._timeout ); - this.on( 'load error', function() { - me.trigger( 'progress', 1 ); - clearTimeout( me._timer ); - }); - } - - Transport.options = { - server: '', - method: 'POST', - - // 跨域时,是否允许携带cookie, 只有html5 runtime才有效 - withCredentials: false, - fileVal: 'file', - timeout: 2 * 60 * 1000, // 2分钟 - formData: {}, - headers: {}, - sendAsBinary: false - }; - - $.extend( Transport.prototype, { - - // 添加Blob, 只能添加一次,最后一次有效。 - appendBlob: function( key, blob, filename ) { - var me = this, - opts = me.options; - - if ( me.getRuid() ) { - me.disconnectRuntime(); - } - - // 连接到blob归属的同一个runtime. - me.connectRuntime( blob.ruid, function() { - me.exec('init'); - }); - - me._blob = blob; - opts.fileVal = key || opts.fileVal; - opts.filename = filename || opts.filename; - }, - - // 添加其他字段 - append: function( key, value ) { - if ( typeof key === 'object' ) { - $.extend( this._formData, key ); - } else { - this._formData[ key ] = value; - } - }, - - setRequestHeader: function( key, value ) { - if ( typeof key === 'object' ) { - $.extend( this._headers, key ); - } else { - this._headers[ key ] = value; - } - }, - - send: function( method ) { - this.exec( 'send', method ); - this._timeout(); - }, - - abort: function() { - clearTimeout( this._timer ); - return this.exec('abort'); - }, - - destroy: function() { - this.trigger('destroy'); - this.off(); - this.exec('destroy'); - this.disconnectRuntime(); - }, - - getResponse: function() { - return this.exec('getResponse'); - }, - - getResponseAsJson: function() { - return this.exec('getResponseAsJson'); - }, - - getStatus: function() { - return this.exec('getStatus'); - }, - - _timeout: function() { - var me = this, - duration = me.options.timeout; - - if ( !duration ) { - return; - } - - clearTimeout( me._timer ); - me._timer = setTimeout(function() { - me.abort(); - me.trigger( 'error', 'timeout' ); - }, duration ); - } - - }); - - // 让Transport具备事件功能。 - Mediator.installTo( Transport.prototype ); - - return Transport; - }); - /** - * @fileOverview 负责文件上传相关。 - */ - define('widgets/upload',[ - 'base', - 'uploader', - 'file', - 'lib/transport', - 'widgets/widget' - ], function( Base, Uploader, WUFile, Transport ) { - - var $ = Base.$, - isPromise = Base.isPromise, - Status = WUFile.Status; - - // 添加默认配置项 - $.extend( Uploader.options, { - - - /** - * @property {Boolean} [prepareNextFile=false] - * @namespace options - * @for Uploader - * @description 是否允许在文件传输时提前把下一个文件准备好。 - * 对于一个文件的准备工作比较耗时,比如图片压缩,md5序列化。 - * 如果能提前在当前文件传输期处理,可以节省总体耗时。 - */ - prepareNextFile: false, - - /** - * @property {Boolean} [chunked=false] - * @namespace options - * @for Uploader - * @description 是否要分片处理大文件上传。 - */ - chunked: false, - - /** - * @property {Boolean} [chunkSize=5242880] - * @namespace options - * @for Uploader - * @description 如果要分片,分多大一片? 默认大小为5M. - */ - chunkSize: 5 * 1024 * 1024, - - /** - * @property {Boolean} [chunkRetry=2] - * @namespace options - * @for Uploader - * @description 如果某个分片由于网络问题出错,允许自动重传多少次? - */ - chunkRetry: 2, - - /** - * @property {Boolean} [threads=3] - * @namespace options - * @for Uploader - * @description 上传并发数。允许同时最大上传进程数。 - */ - threads: 3, - - - /** - * @property {Object} [formData={}] - * @namespace options - * @for Uploader - * @description 文件上传请求的参数表,每次发送都会发送此对象中的参数。 - */ - formData: {} - - /** - * @property {Object} [fileVal='file'] - * @namespace options - * @for Uploader - * @description 设置文件上传域的name。 - */ - - /** - * @property {Object} [method='POST'] - * @namespace options - * @for Uploader - * @description 文件上传方式,`POST`或者`GET`。 - */ - - /** - * @property {Object} [sendAsBinary=false] - * @namespace options - * @for Uploader - * @description 是否已二进制的流的方式发送文件,这样整个上传内容`php://input`都为文件内容, - * 其他参数在$_GET数组中。 - */ - }); - - // 负责将文件切片。 - function CuteFile( file, chunkSize ) { - var pending = [], - blob = file.source, - total = blob.size, - chunks = chunkSize ? Math.ceil( total / chunkSize ) : 1, - start = 0, - index = 0, - len, api; - - api = { - file: file, - - has: function() { - return !!pending.length; - }, - - shift: function() { - return pending.shift(); - }, - - unshift: function( block ) { - pending.unshift( block ); - } - }; - - while ( index < chunks ) { - len = Math.min( chunkSize, total - start ); - - pending.push({ - file: file, - start: start, - end: chunkSize ? (start + len) : total, - total: total, - chunks: chunks, - chunk: index++, - cuted: api - }); - start += len; - } - - file.blocks = pending.concat(); - file.remaning = pending.length; - - return api; - } - - Uploader.register({ - name: 'upload', - - init: function() { - var owner = this.owner, - me = this; - - this.runing = false; - this.progress = false; - - owner - .on( 'startUpload', function() { - me.progress = true; - }) - .on( 'uploadFinished', function() { - me.progress = false; - }); - - // 记录当前正在传的数据,跟threads相关 - this.pool = []; - - // 缓存分好片的文件。 - this.stack = []; - - // 缓存即将上传的文件。 - this.pending = []; - - // 跟踪还有多少分片在上传中但是没有完成上传。 - this.remaning = 0; - this.__tick = Base.bindFn( this._tick, this ); - - owner.on( 'uploadComplete', function( file ) { - - // 把其他块取消了。 - file.blocks && $.each( file.blocks, function( _, v ) { - v.transport && (v.transport.abort(), v.transport.destroy()); - delete v.transport; - }); - - delete file.blocks; - delete file.remaning; - }); - }, - - reset: function() { - this.request( 'stop-upload', true ); - this.runing = false; - this.pool = []; - this.stack = []; - this.pending = []; - this.remaning = 0; - this._trigged = false; - this._promise = null; - }, - - /** - * @event startUpload - * @description 当开始上传流程时触发。 - * @for Uploader - */ - - /** - * 开始上传。此方法可以从初始状态调用开始上传流程,也可以从暂停状态调用,继续上传流程。 - * - * 可以指定开始某一个文件。 - * @grammar upload() => undefined - * @grammar upload( file | fileId) => undefined - * @method upload - * @for Uploader - */ - startUpload: function(file) { - var me = this; - - // 移出invalid的文件 - $.each( me.request( 'get-files', Status.INVALID ), function() { - me.request( 'remove-file', this ); - }); - - // 如果指定了开始某个文件,则只开始指定文件。 - if ( file ) { - file = file.id ? file : me.request( 'get-file', file ); - - if (file.getStatus() === Status.INTERRUPT) { - $.each( me.pool, function( _, v ) { - - // 之前暂停过。 - if (v.file !== file) { - return; - } - - v.transport && v.transport.send(); - }); - - file.setStatus( Status.QUEUED ); - } else if (file.getStatus() === Status.PROGRESS) { - return; - } else { - file.setStatus( Status.QUEUED ); - } - } else { - $.each( me.request( 'get-files', [ Status.INITED ] ), function() { - this.setStatus( Status.QUEUED ); - }); - } - - if ( me.runing ) { - return; - } - - me.runing = true; - - var files = []; - - // 如果有暂停的,则续传 - $.each( me.pool, function( _, v ) { - var file = v.file; - - if ( file.getStatus() === Status.INTERRUPT ) { - files.push(file); - me._trigged = false; - v.transport && v.transport.send(); - } - }); - - var file; - while ( (file = files.shift()) ) { - file.setStatus( Status.PROGRESS ); - } - - file || $.each( me.request( 'get-files', - Status.INTERRUPT ), function() { - this.setStatus( Status.PROGRESS ); - }); - - me._trigged = false; - Base.nextTick( me.__tick ); - me.owner.trigger('startUpload'); - }, - - /** - * @event stopUpload - * @description 当开始上传流程暂停时触发。 - * @for Uploader - */ - - /** - * 暂停上传。第一个参数为是否中断上传当前正在上传的文件。 - * - * 如果第一个参数是文件,则只暂停指定文件。 - * @grammar stop() => undefined - * @grammar stop( true ) => undefined - * @grammar stop( file ) => undefined - * @method stop - * @for Uploader - */ - stopUpload: function( file, interrupt ) { - var me = this; - - if (file === true) { - interrupt = file; - file = null; - } - - if ( me.runing === false ) { - return; - } - - // 如果只是暂停某个文件。 - if ( file ) { - file = file.id ? file : me.request( 'get-file', file ); - - if ( file.getStatus() !== Status.PROGRESS && - file.getStatus() !== Status.QUEUED ) { - return; - } - - file.setStatus( Status.INTERRUPT ); - $.each( me.pool, function( _, v ) { - - // 只 abort 指定的文件。 - if (v.file !== file) { - return; - } - - v.transport && v.transport.abort(); - me._putback(v); - me._popBlock(v); - }); - - return Base.nextTick( me.__tick ); - } - - me.runing = false; - - if (this._promise && this._promise.file) { - this._promise.file.setStatus( Status.INTERRUPT ); - } - - interrupt && $.each( me.pool, function( _, v ) { - v.transport && v.transport.abort(); - v.file.setStatus( Status.INTERRUPT ); - }); - - me.owner.trigger('stopUpload'); - }, - - /** - * @method cancelFile - * @grammar cancelFile( file ) => undefined - * @grammar cancelFile( id ) => undefined - * @param {File|id} file File对象或这File对象的id - * @description 标记文件状态为已取消, 同时将中断文件传输。 - * @for Uploader - * @example - * - * $li.on('click', '.remove-this', function() { - * uploader.cancelFile( file ); - * }) - */ - cancelFile: function( file ) { - file = file.id ? file : this.request( 'get-file', file ); - - // 如果正在上传。 - file.blocks && $.each( file.blocks, function( _, v ) { - var _tr = v.transport; - - if ( _tr ) { - _tr.abort(); - _tr.destroy(); - delete v.transport; - } - }); - - file.setStatus( Status.CANCELLED ); - this.owner.trigger( 'fileDequeued', file ); - }, - - /** - * 判断`Uplaode`r是否正在上传中。 - * @grammar isInProgress() => Boolean - * @method isInProgress - * @for Uploader - */ - isInProgress: function() { - return !!this.progress; - }, - - _getStats: function() { - return this.request('get-stats'); - }, - - /** - * 掉过一个文件上传,直接标记指定文件为已上传状态。 - * @grammar skipFile( file ) => undefined - * @method skipFile - * @for Uploader - */ - skipFile: function( file, status ) { - file = file.id ? file : this.request( 'get-file', file ); - - file.setStatus( status || Status.COMPLETE ); - file.skipped = true; - - // 如果正在上传。 - file.blocks && $.each( file.blocks, function( _, v ) { - var _tr = v.transport; - - if ( _tr ) { - _tr.abort(); - _tr.destroy(); - delete v.transport; - } - }); - - this.owner.trigger( 'uploadSkip', file ); - }, - - /** - * @event uploadFinished - * @description 当所有文件上传结束时触发。 - * @for Uploader - */ - _tick: function() { - var me = this, - opts = me.options, - fn, val; - - // 上一个promise还没有结束,则等待完成后再执行。 - if ( me._promise ) { - return me._promise.always( me.__tick ); - } - - // 还有位置,且还有文件要处理的话。 - if ( me.pool.length < opts.threads && (val = me._nextBlock()) ) { - me._trigged = false; - - fn = function( val ) { - me._promise = null; - - // 有可能是reject过来的,所以要检测val的类型。 - val && val.file && me._startSend( val ); - Base.nextTick( me.__tick ); - }; - - me._promise = isPromise( val ) ? val.always( fn ) : fn( val ); - - // 没有要上传的了,且没有正在传输的了。 - } else if ( !me.remaning && !me._getStats().numOfQueue && - !me._getStats().numofInterrupt ) { - me.runing = false; - - me._trigged || Base.nextTick(function() { - me.owner.trigger('uploadFinished'); - }); - me._trigged = true; - } - }, - - _putback: function(block) { - var idx; - - block.cuted.unshift(block); - idx = this.stack.indexOf(block.cuted); - - if (!~idx) { - this.stack.unshift(block.cuted); - } - }, - - _getStack: function() { - var i = 0, - act; - - while ( (act = this.stack[ i++ ]) ) { - if ( act.has() && act.file.getStatus() === Status.PROGRESS ) { - return act; - } else if (!act.has() || - act.file.getStatus() !== Status.PROGRESS && - act.file.getStatus() !== Status.INTERRUPT ) { - - // 把已经处理完了的,或者,状态为非 progress(上传中)、 - // interupt(暂停中) 的移除。 - this.stack.splice( --i, 1 ); - } - } - - return null; - }, - - _nextBlock: function() { - var me = this, - opts = me.options, - act, next, done, preparing; - - // 如果当前文件还有没有需要传输的,则直接返回剩下的。 - if ( (act = this._getStack()) ) { - - // 是否提前准备下一个文件 - if ( opts.prepareNextFile && !me.pending.length ) { - me._prepareNextFile(); - } - - return act.shift(); - - // 否则,如果正在运行,则准备下一个文件,并等待完成后返回下个分片。 - } else if ( me.runing ) { - - // 如果缓存中有,则直接在缓存中取,没有则去queue中取。 - if ( !me.pending.length && me._getStats().numOfQueue ) { - me._prepareNextFile(); - } - - next = me.pending.shift(); - done = function( file ) { - if ( !file ) { - return null; - } - - act = CuteFile( file, opts.chunked ? opts.chunkSize : 0 ); - me.stack.push(act); - return act.shift(); - }; - - // 文件可能还在prepare中,也有可能已经完全准备好了。 - if ( isPromise( next) ) { - preparing = next.file; - next = next[ next.pipe ? 'pipe' : 'then' ]( done ); - next.file = preparing; - return next; - } - - return done( next ); - } - }, - - - /** - * @event uploadStart - * @param {File} file File对象 - * @description 某个文件开始上传前触发,一个文件只会触发一次。 - * @for Uploader - */ - _prepareNextFile: function() { - var me = this, - file = me.request('fetch-file'), - pending = me.pending, - promise; - - if ( file ) { - promise = me.request( 'before-send-file', file, function() { - - // 有可能文件被skip掉了。文件被skip掉后,状态坑定不是Queued. - if ( file.getStatus() === Status.PROGRESS || - file.getStatus() === Status.INTERRUPT ) { - return file; - } - - return me._finishFile( file ); - }); - - me.owner.trigger( 'uploadStart', file ); - file.setStatus( Status.PROGRESS ); - - promise.file = file; - - // 如果还在pending中,则替换成文件本身。 - promise.done(function() { - var idx = $.inArray( promise, pending ); - - ~idx && pending.splice( idx, 1, file ); - }); - - // befeore-send-file的钩子就有错误发生。 - promise.fail(function( reason ) { - file.setStatus( Status.ERROR, reason ); - me.owner.trigger( 'uploadError', file, reason ); - me.owner.trigger( 'uploadComplete', file ); - }); - - pending.push( promise ); - } - }, - - // 让出位置了,可以让其他分片开始上传 - _popBlock: function( block ) { - var idx = $.inArray( block, this.pool ); - - this.pool.splice( idx, 1 ); - block.file.remaning--; - this.remaning--; - }, - - // 开始上传,可以被掉过。如果promise被reject了,则表示跳过此分片。 - _startSend: function( block ) { - var me = this, - file = block.file, - promise; - - // 有可能在 before-send-file 的 promise 期间改变了文件状态。 - // 如:暂停,取消 - // 我们不能中断 promise, 但是可以在 promise 完后,不做上传操作。 - if ( file.getStatus() !== Status.PROGRESS ) { - - // 如果是中断,则还需要放回去。 - if (file.getStatus() === Status.INTERRUPT) { - me._putback(block); - } - - return; - } - - me.pool.push( block ); - me.remaning++; - - // 如果没有分片,则直接使用原始的。 - // 不会丢失content-type信息。 - block.blob = block.chunks === 1 ? file.source : - file.source.slice( block.start, block.end ); - - // hook, 每个分片发送之前可能要做些异步的事情。 - promise = me.request( 'before-send', block, function() { - - // 有可能文件已经上传出错了,所以不需要再传输了。 - if ( file.getStatus() === Status.PROGRESS ) { - me._doSend( block ); - } else { - me._popBlock( block ); - Base.nextTick( me.__tick ); - } - }); - - // 如果为fail了,则跳过此分片。 - promise.fail(function() { - if ( file.remaning === 1 ) { - me._finishFile( file ).always(function() { - block.percentage = 1; - me._popBlock( block ); - me.owner.trigger( 'uploadComplete', file ); - Base.nextTick( me.__tick ); - }); - } else { - block.percentage = 1; - me.updateFileProgress( file ); - me._popBlock( block ); - Base.nextTick( me.__tick ); - } - }); - }, - - - /** - * @event uploadBeforeSend - * @param {Object} object - * @param {Object} data 默认的上传参数,可以扩展此对象来控制上传参数。 - * @param {Object} headers 可以扩展此对象来控制上传头部。 - * @description 当某个文件的分块在发送前触发,主要用来询问是否要添加附带参数,大文件在开起分片上传的前提下此事件可能会触发多次。 - * @for Uploader - */ - - /** - * @event uploadAccept - * @param {Object} object - * @param {Object} ret 服务端的返回数据,json格式,如果服务端不是json格式,从ret._raw中取数据,自行解析。 - * @description 当某个文件上传到服务端响应后,会派送此事件来询问服务端响应是否有效。如果此事件handler返回值为`false`, 则此文件将派送`server`类型的`uploadError`事件。 - * @for Uploader - */ - - /** - * @event uploadProgress - * @param {File} file File对象 - * @param {Number} percentage 上传进度 - * @description 上传过程中触发,携带上传进度。 - * @for Uploader - */ - - - /** - * @event uploadError - * @param {File} file File对象 - * @param {String} reason 出错的code - * @description 当文件上传出错时触发。 - * @for Uploader - */ - - /** - * @event uploadSuccess - * @param {File} file File对象 - * @param {Object} response 服务端返回的数据 - * @description 当文件上传成功时触发。 - * @for Uploader - */ - - /** - * @event uploadComplete - * @param {File} [file] File对象 - * @description 不管成功或者失败,文件上传完成时触发。 - * @for Uploader - */ - - // 做上传操作。 - _doSend: function( block ) { - var me = this, - owner = me.owner, - opts = me.options, - file = block.file, - tr = new Transport( opts ), - data = $.extend({}, opts.formData ), - headers = $.extend({}, opts.headers ), - requestAccept, ret; - - block.transport = tr; - - tr.on( 'destroy', function() { - delete block.transport; - me._popBlock( block ); - Base.nextTick( me.__tick ); - }); - - // 广播上传进度。以文件为单位。 - tr.on( 'progress', function( percentage ) { - block.percentage = percentage; - me.updateFileProgress( file ); - }); - - // 用来询问,是否返回的结果是有错误的。 - requestAccept = function( reject ) { - var fn; - - ret = tr.getResponseAsJson() || {}; - ret._raw = tr.getResponse(); - fn = function( value ) { - reject = value; - }; - - // 服务端响应了,不代表成功了,询问是否响应正确。 - if ( !owner.trigger( 'uploadAccept', block, ret, fn ) ) { - reject = reject || 'server'; - } - - return reject; - }; - - // 尝试重试,然后广播文件上传出错。 - tr.on( 'error', function( type, flag ) { - block.retried = block.retried || 0; - - // 自动重试 - if ( block.chunks > 1 && ~'http,abort'.indexOf( type ) && - block.retried < opts.chunkRetry ) { - - block.retried++; - tr.send(); - - } else { - - // http status 500 ~ 600 - if ( !flag && type === 'server' ) { - type = requestAccept( type ); - } - - file.setStatus( Status.ERROR, type ); - owner.trigger( 'uploadError', file, type ); - owner.trigger( 'uploadComplete', file ); - } - }); - - // 上传成功 - tr.on( 'load', function() { - var reason; - - // 如果非预期,转向上传出错。 - if ( (reason = requestAccept()) ) { - tr.trigger( 'error', reason, true ); - return; - } - - // 全部上传完成。 - if ( file.remaning === 1 ) { - me._finishFile( file, ret ); - } else { - tr.destroy(); - } - }); - - // 配置默认的上传字段。 - data = $.extend( data, { - id: file.id, - name: file.name, - type: file.type, - lastModifiedDate: file.lastModifiedDate, - size: file.size - }); - - block.chunks > 1 && $.extend( data, { - chunks: block.chunks, - chunk: block.chunk - }); - - // 在发送之间可以添加字段什么的。。。 - // 如果默认的字段不够使用,可以通过监听此事件来扩展 - owner.trigger( 'uploadBeforeSend', block, data, headers ); - - // 开始发送。 - tr.appendBlob( opts.fileVal, block.blob, file.name ); - tr.append( data ); - tr.setRequestHeader( headers ); - tr.send(); - }, - - // 完成上传。 - _finishFile: function( file, ret, hds ) { - var owner = this.owner; - - return owner - .request( 'after-send-file', arguments, function() { - file.setStatus( Status.COMPLETE ); - owner.trigger( 'uploadSuccess', file, ret, hds ); - }) - .fail(function( reason ) { - - // 如果外部已经标记为invalid什么的,不再改状态。 - if ( file.getStatus() === Status.PROGRESS ) { - file.setStatus( Status.ERROR, reason ); - } - - owner.trigger( 'uploadError', file, reason ); - }) - .always(function() { - owner.trigger( 'uploadComplete', file ); - }); - }, - - updateFileProgress: function(file) { - var totalPercent = 0, - uploaded = 0; - - if (!file.blocks) { - return; - } - - $.each( file.blocks, function( _, v ) { - uploaded += (v.percentage || 0) * (v.end - v.start); - }); - - totalPercent = uploaded / file.size; - this.owner.trigger( 'uploadProgress', file, totalPercent || 0 ); - } - - }); - }); - /** - * @fileOverview 各种验证,包括文件总大小是否超出、单文件是否超出和文件是否重复。 - */ - - define('widgets/validator',[ - 'base', - 'uploader', - 'file', - 'widgets/widget' - ], function( Base, Uploader, WUFile ) { - - var $ = Base.$, - validators = {}, - api; - - /** - * @event error - * @param {String} type 错误类型。 - * @description 当validate不通过时,会以派送错误事件的形式通知调用者。通过`upload.on('error', handler)`可以捕获到此类错误,目前有以下错误会在特定的情况下派送错来。 - * - * * `Q_EXCEED_NUM_LIMIT` 在设置了`fileNumLimit`且尝试给`uploader`添加的文件数量超出这个值时派送。 - * * `Q_EXCEED_SIZE_LIMIT` 在设置了`Q_EXCEED_SIZE_LIMIT`且尝试给`uploader`添加的文件总大小超出这个值时派送。 - * * `Q_TYPE_DENIED` 当文件类型不满足时触发。。 - * @for Uploader - */ - - // 暴露给外面的api - api = { - - // 添加验证器 - addValidator: function( type, cb ) { - validators[ type ] = cb; - }, - - // 移除验证器 - removeValidator: function( type ) { - delete validators[ type ]; - } - }; - - // 在Uploader初始化的时候启动Validators的初始化 - Uploader.register({ - name: 'validator', - - init: function() { - var me = this; - Base.nextTick(function() { - $.each( validators, function() { - this.call( me.owner ); - }); - }); - } - }); - - /** - * @property {int} [fileNumLimit=undefined] - * @namespace options - * @for Uploader - * @description 验证文件总数量, 超出则不允许加入队列。 - */ - api.addValidator( 'fileNumLimit', function() { - var uploader = this, - opts = uploader.options, - count = 0, - max = parseInt( opts.fileNumLimit, 10 ), - flag = true; - - if ( !max ) { - return; - } - - uploader.on( 'beforeFileQueued', function( file ) { - - if ( count >= max && flag ) { - flag = false; - this.trigger( 'error', 'Q_EXCEED_NUM_LIMIT', max, file ); - setTimeout(function() { - flag = true; - }, 1 ); - } - - return count >= max ? false : true; - }); - - uploader.on( 'fileQueued', function() { - count++; - }); - - uploader.on( 'fileDequeued', function() { - count--; - }); - - uploader.on( 'reset', function() { - count = 0; - }); - }); - - - /** - * @property {int} [fileSizeLimit=undefined] - * @namespace options - * @for Uploader - * @description 验证文件总大小是否超出限制, 超出则不允许加入队列。 - */ - api.addValidator( 'fileSizeLimit', function() { - var uploader = this, - opts = uploader.options, - count = 0, - max = parseInt( opts.fileSizeLimit, 10 ), - flag = true; - - if ( !max ) { - return; - } - - uploader.on( 'beforeFileQueued', function( file ) { - var invalid = count + file.size > max; - - if ( invalid && flag ) { - flag = false; - this.trigger( 'error', 'Q_EXCEED_SIZE_LIMIT', max, file ); - setTimeout(function() { - flag = true; - }, 1 ); - } - - return invalid ? false : true; - }); - - uploader.on( 'fileQueued', function( file ) { - count += file.size; - }); - - uploader.on( 'fileDequeued', function( file ) { - count -= file.size; - }); - - uploader.on( 'reset', function() { - count = 0; - }); - }); - - /** - * @property {int} [fileSingleSizeLimit=undefined] - * @namespace options - * @for Uploader - * @description 验证单个文件大小是否超出限制, 超出则不允许加入队列。 - */ - api.addValidator( 'fileSingleSizeLimit', function() { - var uploader = this, - opts = uploader.options, - max = opts.fileSingleSizeLimit; - - if ( !max ) { - return; - } - - uploader.on( 'beforeFileQueued', function( file ) { - - if ( file.size > max ) { - file.setStatus( WUFile.Status.INVALID, 'exceed_size' ); - this.trigger( 'error', 'F_EXCEED_SIZE', max, file ); - return false; - } - - }); - - }); - - /** - * @property {Boolean} [duplicate=undefined] - * @namespace options - * @for Uploader - * @description 去重, 根据文件名字、文件大小和最后修改时间来生成hash Key. - */ - api.addValidator( 'duplicate', function() { - var uploader = this, - opts = uploader.options, - mapping = {}; - - if ( opts.duplicate ) { - return; - } - - function hashString( str ) { - var hash = 0, - i = 0, - len = str.length, - _char; - - for ( ; i < len; i++ ) { - _char = str.charCodeAt( i ); - hash = _char + (hash << 6) + (hash << 16) - hash; - } - - return hash; - } - - uploader.on( 'beforeFileQueued', function( file ) { - var hash = file.__hash || (file.__hash = hashString( file.name + - file.size + file.lastModifiedDate )); - - // 已经重复了 - if ( mapping[ hash ] ) { - this.trigger( 'error', 'F_DUPLICATE', file ); - return false; - } - }); - - uploader.on( 'fileQueued', function( file ) { - var hash = file.__hash; - - hash && (mapping[ hash ] = true); - }); - - uploader.on( 'fileDequeued', function( file ) { - var hash = file.__hash; - - hash && (delete mapping[ hash ]); - }); - - uploader.on( 'reset', function() { - mapping = {}; - }); - }); - - return api; - }); - - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/compbase',[],function() { - - function CompBase( owner, runtime ) { - - this.owner = owner; - this.options = owner.options; - - this.getRuntime = function() { - return runtime; - }; - - this.getRuid = function() { - return runtime.uid; - }; - - this.trigger = function() { - return owner.trigger.apply( owner, arguments ); - }; - } - - return CompBase; - }); - /** - * @fileOverview Html5Runtime - */ - define('runtime/html5/runtime',[ - 'base', - 'runtime/runtime', - 'runtime/compbase' - ], function( Base, Runtime, CompBase ) { - - var type = 'html5', - components = {}; - - function Html5Runtime() { - var pool = {}, - me = this, - destroy = this.destroy; - - Runtime.apply( me, arguments ); - me.type = type; - - - // 这个方法的调用者,实际上是RuntimeClient - me.exec = function( comp, fn/*, args...*/) { - var client = this, - uid = client.uid, - args = Base.slice( arguments, 2 ), - instance; - - if ( components[ comp ] ) { - instance = pool[ uid ] = pool[ uid ] || - new components[ comp ]( client, me ); - - if ( instance[ fn ] ) { - return instance[ fn ].apply( instance, args ); - } - } - }; - - me.destroy = function() { - // @todo 删除池子中的所有实例 - return destroy && destroy.apply( this, arguments ); - }; - } - - Base.inherits( Runtime, { - constructor: Html5Runtime, - - // 不需要连接其他程序,直接执行callback - init: function() { - var me = this; - setTimeout(function() { - me.trigger('ready'); - }, 1 ); - } - - }); - - // 注册Components - Html5Runtime.register = function( name, component ) { - var klass = components[ name ] = Base.inherits( CompBase, component ); - return klass; - }; - - // 注册html5运行时。 - // 只有在支持的前提下注册。 - if ( window.Blob && window.FileReader && window.DataView ) { - Runtime.addRuntime( type, Html5Runtime ); - } - - return Html5Runtime; - }); - /** - * @fileOverview Blob Html实现 - */ - define('runtime/html5/blob',[ - 'runtime/html5/runtime', - 'lib/blob' - ], function( Html5Runtime, Blob ) { - - return Html5Runtime.register( 'Blob', { - slice: function( start, end ) { - var blob = this.owner.source, - slice = blob.slice || blob.webkitSlice || blob.mozSlice; - - blob = slice.call( blob, start, end ); - - return new Blob( this.getRuid(), blob ); - } - }); - }); - /** - * @fileOverview FilePaste - */ - define('runtime/html5/dnd',[ - 'base', - 'runtime/html5/runtime', - 'lib/file' - ], function( Base, Html5Runtime, File ) { - - var $ = Base.$, - prefix = 'webuploader-dnd-'; - - return Html5Runtime.register( 'DragAndDrop', { - init: function() { - var elem = this.elem = this.options.container; - - this.dragEnterHandler = Base.bindFn( this._dragEnterHandler, this ); - this.dragOverHandler = Base.bindFn( this._dragOverHandler, this ); - this.dragLeaveHandler = Base.bindFn( this._dragLeaveHandler, this ); - this.dropHandler = Base.bindFn( this._dropHandler, this ); - this.dndOver = false; - - elem.on( 'dragenter', this.dragEnterHandler ); - elem.on( 'dragover', this.dragOverHandler ); - elem.on( 'dragleave', this.dragLeaveHandler ); - elem.on( 'drop', this.dropHandler ); - - if ( this.options.disableGlobalDnd ) { - $( document ).on( 'dragover', this.dragOverHandler ); - $( document ).on( 'drop', this.dropHandler ); - } - }, - - _dragEnterHandler: function( e ) { - var me = this, - denied = me._denied || false, - items; - - e = e.originalEvent || e; - - if ( !me.dndOver ) { - me.dndOver = true; - - // 注意只有 chrome 支持。 - items = e.dataTransfer.items; - - if ( items && items.length ) { - me._denied = denied = !me.trigger( 'accept', items ); - } - - me.elem.addClass( prefix + 'over' ); - me.elem[ denied ? 'addClass' : - 'removeClass' ]( prefix + 'denied' ); - } - - e.dataTransfer.dropEffect = denied ? 'none' : 'copy'; - - return false; - }, - - _dragOverHandler: function( e ) { - // 只处理框内的。 - var parentElem = this.elem.parent().get( 0 ); - if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) { - return false; - } - - clearTimeout( this._leaveTimer ); - this._dragEnterHandler.call( this, e ); - - return false; - }, - - _dragLeaveHandler: function() { - var me = this, - handler; - - handler = function() { - me.dndOver = false; - me.elem.removeClass( prefix + 'over ' + prefix + 'denied' ); - }; - - clearTimeout( me._leaveTimer ); - me._leaveTimer = setTimeout( handler, 100 ); - return false; - }, - - _dropHandler: function( e ) { - var me = this, - ruid = me.getRuid(), - parentElem = me.elem.parent().get( 0 ), - dataTransfer, data; - - // 只处理框内的。 - if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) { - return false; - } - - e = e.originalEvent || e; - dataTransfer = e.dataTransfer; - - // 如果是页面内拖拽,还不能处理,不阻止事件。 - // 此处 ie11 下会报参数错误, - try { - data = dataTransfer.getData('text/html'); - } catch( err ) { - } - - if ( data ) { - return; - } - - me._getTansferFiles( dataTransfer, function( results ) { - me.trigger( 'drop', $.map( results, function( file ) { - return new File( ruid, file ); - }) ); - }); - - me.dndOver = false; - me.elem.removeClass( prefix + 'over' ); - return false; - }, - - // 如果传入 callback 则去查看文件夹,否则只管当前文件夹。 - _getTansferFiles: function( dataTransfer, callback ) { - var results = [], - promises = [], - items, files, file, item, i, len, canAccessFolder; - - items = dataTransfer.items; - files = dataTransfer.files; - - canAccessFolder = !!(items && items[ 0 ].webkitGetAsEntry); - - for ( i = 0, len = files.length; i < len; i++ ) { - file = files[ i ]; - item = items && items[ i ]; - - if ( canAccessFolder && item.webkitGetAsEntry().isDirectory ) { - - promises.push( this._traverseDirectoryTree( - item.webkitGetAsEntry(), results ) ); - } else { - results.push( file ); - } - } - - Base.when.apply( Base, promises ).done(function() { - - if ( !results.length ) { - return; - } - - callback( results ); - }); - }, - - _traverseDirectoryTree: function( entry, results ) { - var deferred = Base.Deferred(), - me = this; - - if ( entry.isFile ) { - entry.file(function( file ) { - results.push( file ); - deferred.resolve(); - }); - } else if ( entry.isDirectory ) { - entry.createReader().readEntries(function( entries ) { - var len = entries.length, - promises = [], - arr = [], // 为了保证顺序。 - i; - - for ( i = 0; i < len; i++ ) { - promises.push( me._traverseDirectoryTree( - entries[ i ], arr ) ); - } - - Base.when.apply( Base, promises ).then(function() { - results.push.apply( results, arr ); - deferred.resolve(); - }, deferred.reject ); - }); - } - - return deferred.promise(); - }, - - destroy: function() { - var elem = this.elem; - - // 还没 init 就调用 destroy - if (!elem) { - return; - } - - elem.off( 'dragenter', this.dragEnterHandler ); - elem.off( 'dragover', this.dragOverHandler ); - elem.off( 'dragleave', this.dragLeaveHandler ); - elem.off( 'drop', this.dropHandler ); - - if ( this.options.disableGlobalDnd ) { - $( document ).off( 'dragover', this.dragOverHandler ); - $( document ).off( 'drop', this.dropHandler ); - } - } - }); - }); - - /** - * @fileOverview FilePaste - */ - define('runtime/html5/filepaste',[ - 'base', - 'runtime/html5/runtime', - 'lib/file' - ], function( Base, Html5Runtime, File ) { - - return Html5Runtime.register( 'FilePaste', { - init: function() { - var opts = this.options, - elem = this.elem = opts.container, - accept = '.*', - arr, i, len, item; - - // accetp的mimeTypes中生成匹配正则。 - if ( opts.accept ) { - arr = []; - - for ( i = 0, len = opts.accept.length; i < len; i++ ) { - item = opts.accept[ i ].mimeTypes; - item && arr.push( item ); - } - - if ( arr.length ) { - accept = arr.join(','); - accept = accept.replace( /,/g, '|' ).replace( /\*/g, '.*' ); - } - } - this.accept = accept = new RegExp( accept, 'i' ); - this.hander = Base.bindFn( this._pasteHander, this ); - elem.on( 'paste', this.hander ); - }, - - _pasteHander: function( e ) { - var allowed = [], - ruid = this.getRuid(), - items, item, blob, i, len; - - e = e.originalEvent || e; - items = e.clipboardData.items; - - for ( i = 0, len = items.length; i < len; i++ ) { - item = items[ i ]; - - if ( item.kind !== 'file' || !(blob = item.getAsFile()) ) { - continue; - } - - allowed.push( new File( ruid, blob ) ); - } - - if ( allowed.length ) { - // 不阻止非文件粘贴(文字粘贴)的事件冒泡 - e.preventDefault(); - e.stopPropagation(); - this.trigger( 'paste', allowed ); - } - }, - - destroy: function() { - this.elem.off( 'paste', this.hander ); - } - }); - }); - - /** - * @fileOverview FilePicker - */ - define('runtime/html5/filepicker',[ - 'base', - 'runtime/html5/runtime' - ], function( Base, Html5Runtime ) { - - var $ = Base.$; - - return Html5Runtime.register( 'FilePicker', { - init: function() { - var container = this.getRuntime().getContainer(), - me = this, - owner = me.owner, - opts = me.options, - label = this.label = $( document.createElement('label') ), - input = this.input = $( document.createElement('input') ), - arr, i, len, mouseHandler; - - input.attr( 'type', 'file' ); - input.attr( 'name', opts.name ); - input.addClass('webuploader-element-invisible'); - - label.on( 'click', function() { - input.trigger('click'); - }); - - label.css({ - opacity: 0, - width: '100%', - height: '100%', - display: 'block', - cursor: 'pointer', - background: '#ffffff' - }); - - if ( opts.multiple ) { - input.attr( 'multiple', 'multiple' ); - } - - // @todo Firefox不支持单独指定后缀 - if ( opts.accept && opts.accept.length > 0 ) { - arr = []; - - for ( i = 0, len = opts.accept.length; i < len; i++ ) { - arr.push( opts.accept[ i ].mimeTypes ); - } - - input.attr( 'accept', arr.join(',') ); - } - - container.append( input ); - container.append( label ); - - mouseHandler = function( e ) { - owner.trigger( e.type ); - }; - - input.on( 'change', function( e ) { - var fn = arguments.callee, - clone; - - me.files = e.target.files; - - // reset input - clone = this.cloneNode( true ); - clone.value = null; - this.parentNode.replaceChild( clone, this ); - - input.off(); - input = $( clone ).on( 'change', fn ) - .on( 'mouseenter mouseleave', mouseHandler ); - - owner.trigger('change'); - }); - - label.on( 'mouseenter mouseleave', mouseHandler ); - - }, - - - getFiles: function() { - return this.files; - }, - - destroy: function() { - this.input.off(); - this.label.off(); - } - }); - }); - /** - * @fileOverview Transport - * @todo 支持chunked传输,优势: - * 可以将大文件分成小块,挨个传输,可以提高大文件成功率,当失败的时候,也只需要重传那小部分, - * 而不需要重头再传一次。另外断点续传也需要用chunked方式。 - */ - define('runtime/html5/transport',[ - 'base', - 'runtime/html5/runtime' - ], function( Base, Html5Runtime ) { - - var noop = Base.noop, - $ = Base.$; - - return Html5Runtime.register( 'Transport', { - init: function() { - this._status = 0; - this._response = null; - }, - - send: function() { - var owner = this.owner, - opts = this.options, - xhr = this._initAjax(), - blob = owner._blob, - server = opts.server, - formData, binary, fr; - - if ( opts.sendAsBinary ) { - server += (/\?/.test( server ) ? '&' : '?') + - $.param( owner._formData ); - - binary = blob.getSource(); - } else { - formData = new FormData(); - $.each( owner._formData, function( k, v ) { - formData.append( k, v ); - }); - - formData.append( opts.fileVal, blob.getSource(), - opts.filename || owner._formData.name || '' ); - } - - if ( opts.withCredentials && 'withCredentials' in xhr ) { - xhr.open( opts.method, server, true ); - xhr.withCredentials = true; - } else { - xhr.open( opts.method, server ); - } - - this._setRequestHeader( xhr, opts.headers ); - - if ( binary ) { - // 强制设置成 content-type 为文件流。 - xhr.overrideMimeType && - xhr.overrideMimeType('application/octet-stream'); - - // android直接发送blob会导致服务端接收到的是空文件。 - // bug详情。 - // https://code.google.com/p/android/issues/detail?id=39882 - // 所以先用fileReader读取出来再通过arraybuffer的方式发送。 - if ( Base.os.android ) { - fr = new FileReader(); - - fr.onload = function() { - xhr.send( this.result ); - fr = fr.onload = null; - }; - - fr.readAsArrayBuffer( binary ); - } else { - xhr.send( binary ); - } - } else { - xhr.send( formData ); - } - }, - - getResponse: function() { - return this._response; - }, - - getResponseAsJson: function() { - return this._parseJson( this._response ); - }, - - getStatus: function() { - return this._status; - }, - - abort: function() { - var xhr = this._xhr; - - if ( xhr ) { - xhr.upload.onprogress = noop; - xhr.onreadystatechange = noop; - xhr.abort(); - - this._xhr = xhr = null; - } - }, - - destroy: function() { - this.abort(); - }, - - _initAjax: function() { - var me = this, - xhr = new XMLHttpRequest(), - opts = this.options; - - if ( opts.withCredentials && !('withCredentials' in xhr) && - typeof XDomainRequest !== 'undefined' ) { - xhr = new XDomainRequest(); - } - - xhr.upload.onprogress = function( e ) { - var percentage = 0; - - if ( e.lengthComputable ) { - percentage = e.loaded / e.total; - } - - return me.trigger( 'progress', percentage ); - }; - - xhr.onreadystatechange = function() { - - if ( xhr.readyState !== 4 ) { - return; - } - - xhr.upload.onprogress = noop; - xhr.onreadystatechange = noop; - me._xhr = null; - me._status = xhr.status; - - if ( xhr.status >= 200 && xhr.status < 300 ) { - me._response = xhr.responseText; - return me.trigger('load'); - } else if ( xhr.status >= 500 && xhr.status < 600 ) { - me._response = xhr.responseText; - return me.trigger( 'error', 'server' ); - } - - - return me.trigger( 'error', me._status ? 'http' : 'abort' ); - }; - - me._xhr = xhr; - return xhr; - }, - - _setRequestHeader: function( xhr, headers ) { - $.each( headers, function( key, val ) { - xhr.setRequestHeader( key, val ); - }); - }, - - _parseJson: function( str ) { - var json; - - try { - json = JSON.parse( str ); - } catch ( ex ) { - json = {}; - } - - return json; - } - }); - }); - /** - * @fileOverview FlashRuntime - */ - define('runtime/flash/runtime',[ - 'base', - 'runtime/runtime', - 'runtime/compbase' - ], function( Base, Runtime, CompBase ) { - - var $ = Base.$, - type = 'flash', - components = {}; - - - function getFlashVersion() { - var version; - - try { - version = navigator.plugins[ 'Shockwave Flash' ]; - version = version.description; - } catch ( ex ) { - try { - version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash') - .GetVariable('$version'); - } catch ( ex2 ) { - version = '0.0'; - } - } - version = version.match( /\d+/g ); - return parseFloat( version[ 0 ] + '.' + version[ 1 ], 10 ); - } - - function FlashRuntime() { - var pool = {}, - clients = {}, - destroy = this.destroy, - me = this, - jsreciver = Base.guid('webuploader_'); - - Runtime.apply( me, arguments ); - me.type = type; - - - // 这个方法的调用者,实际上是RuntimeClient - me.exec = function( comp, fn/*, args...*/ ) { - var client = this, - uid = client.uid, - args = Base.slice( arguments, 2 ), - instance; - - clients[ uid ] = client; - - if ( components[ comp ] ) { - if ( !pool[ uid ] ) { - pool[ uid ] = new components[ comp ]( client, me ); - } - - instance = pool[ uid ]; - - if ( instance[ fn ] ) { - return instance[ fn ].apply( instance, args ); - } - } - - return me.flashExec.apply( client, arguments ); - }; - - function handler( evt, obj ) { - var type = evt.type || evt, - parts, uid; - - parts = type.split('::'); - uid = parts[ 0 ]; - type = parts[ 1 ]; - - // console.log.apply( console, arguments ); - - if ( type === 'Ready' && uid === me.uid ) { - me.trigger('ready'); - } else if ( clients[ uid ] ) { - clients[ uid ].trigger( type.toLowerCase(), evt, obj ); - } - - // Base.log( evt, obj ); - } - - // flash的接受器。 - window[ jsreciver ] = function() { - var args = arguments; - - // 为了能捕获得到。 - setTimeout(function() { - handler.apply( null, args ); - }, 1 ); - }; - - this.jsreciver = jsreciver; - - this.destroy = function() { - // @todo 删除池子中的所有实例 - return destroy && destroy.apply( this, arguments ); - }; - - this.flashExec = function( comp, fn ) { - var flash = me.getFlash(), - args = Base.slice( arguments, 2 ); - - return flash.exec( this.uid, comp, fn, args ); - }; - - // @todo - } - - Base.inherits( Runtime, { - constructor: FlashRuntime, - - init: function() { - var container = this.getContainer(), - opts = this.options, - html; - - // if not the minimal height, shims are not initialized - // in older browsers (e.g FF3.6, IE6,7,8, Safari 4.0,5.0, etc) - container.css({ - position: 'absolute', - top: '-8px', - left: '-8px', - width: '9px', - height: '9px', - overflow: 'hidden' - }); - - // insert flash object - html = '' + - '' + - '' + - '' + - ''; - - container.html( html ); - }, - - getFlash: function() { - if ( this._flash ) { - return this._flash; - } - - this._flash = $( '#' + this.uid ).get( 0 ); - return this._flash; - } - - }); - - FlashRuntime.register = function( name, component ) { - component = components[ name ] = Base.inherits( CompBase, $.extend({ - - // @todo fix this later - flashExec: function() { - var owner = this.owner, - runtime = this.getRuntime(); - - return runtime.flashExec.apply( owner, arguments ); - } - }, component ) ); - - return component; - }; - - if ( getFlashVersion() >= 11.4 ) { - Runtime.addRuntime( type, FlashRuntime ); - } - - return FlashRuntime; - }); - /** - * @fileOverview FilePicker - */ - define('runtime/flash/filepicker',[ - 'base', - 'runtime/flash/runtime' - ], function( Base, FlashRuntime ) { - var $ = Base.$; - - return FlashRuntime.register( 'FilePicker', { - init: function( opts ) { - var copy = $.extend({}, opts ), - len, i; - - // 修复Flash再没有设置title的情况下无法弹出flash文件选择框的bug. - len = copy.accept && copy.accept.length; - for ( i = 0; i < len; i++ ) { - if ( !copy.accept[ i ].title ) { - copy.accept[ i ].title = 'Files'; - } - } - - delete copy.button; - delete copy.id; - delete copy.container; - - this.flashExec( 'FilePicker', 'init', copy ); - }, - - destroy: function() { - this.flashExec( 'FilePicker', 'destroy' ); - } - }); - }); - /** - * @fileOverview Transport flash实现 - */ - define('runtime/flash/transport',[ - 'base', - 'runtime/flash/runtime', - 'runtime/client' - ], function( Base, FlashRuntime, RuntimeClient ) { - var $ = Base.$; - - return FlashRuntime.register( 'Transport', { - init: function() { - this._status = 0; - this._response = null; - this._responseJson = null; - }, - - send: function() { - var owner = this.owner, - opts = this.options, - xhr = this._initAjax(), - blob = owner._blob, - server = opts.server, - binary; - - xhr.connectRuntime( blob.ruid ); - - if ( opts.sendAsBinary ) { - server += (/\?/.test( server ) ? '&' : '?') + - $.param( owner._formData ); - - binary = blob.uid; - } else { - $.each( owner._formData, function( k, v ) { - xhr.exec( 'append', k, v ); - }); - - xhr.exec( 'appendBlob', opts.fileVal, blob.uid, - opts.filename || owner._formData.name || '' ); - } - - this._setRequestHeader( xhr, opts.headers ); - xhr.exec( 'send', { - method: opts.method, - url: server, - forceURLStream: opts.forceURLStream, - mimeType: 'application/octet-stream' - }, binary ); - }, - - getStatus: function() { - return this._status; - }, - - getResponse: function() { - return this._response || ''; - }, - - getResponseAsJson: function() { - return this._responseJson; - }, - - abort: function() { - var xhr = this._xhr; - - if ( xhr ) { - xhr.exec('abort'); - xhr.destroy(); - this._xhr = xhr = null; - } - }, - - destroy: function() { - this.abort(); - }, - - _initAjax: function() { - var me = this, - xhr = new RuntimeClient('XMLHttpRequest'); - - xhr.on( 'uploadprogress progress', function( e ) { - var percent = e.loaded / e.total; - percent = Math.min( 1, Math.max( 0, percent ) ); - return me.trigger( 'progress', percent ); - }); - - xhr.on( 'load', function() { - var status = xhr.exec('getStatus'), - readBody = false, - err = '', - p; - - xhr.off(); - me._xhr = null; - - if ( status >= 200 && status < 300 ) { - readBody = true; - } else if ( status >= 500 && status < 600 ) { - readBody = true; - err = 'server'; - } else { - err = 'http'; - } - - if ( readBody ) { - me._response = xhr.exec('getResponse'); - me._response = decodeURIComponent( me._response ); - - // flash 处理可能存在 bug, 没辙只能靠 js 了 - // try { - // me._responseJson = xhr.exec('getResponseAsJson'); - // } catch ( error ) { - - p = window.JSON && window.JSON.parse || function( s ) { - try { - return new Function('return ' + s).call(); - } catch ( err ) { - return {}; - } - }; - me._responseJson = me._response ? p(me._response) : {}; - - // } - } - - xhr.destroy(); - xhr = null; - - return err ? me.trigger( 'error', err ) : me.trigger('load'); - }); - - xhr.on( 'error', function() { - xhr.off(); - me._xhr = null; - me.trigger( 'error', 'http' ); - }); - - me._xhr = xhr; - return xhr; - }, - - _setRequestHeader: function( xhr, headers ) { - $.each( headers, function( key, val ) { - xhr.exec( 'setRequestHeader', key, val ); - }); - } - }); - }); - /** - * @fileOverview Blob Html实现 - */ - define('runtime/flash/blob',[ - 'runtime/flash/runtime', - 'lib/blob' - ], function( FlashRuntime, Blob ) { - - return FlashRuntime.register( 'Blob', { - slice: function( start, end ) { - var blob = this.flashExec( 'Blob', 'slice', start, end ); - - return new Blob( blob.uid, blob ); - } - }); - }); - /** - * @fileOverview 没有图像处理的版本。 - */ - define('preset/withoutimage',[ - 'base', - - // widgets - 'widgets/filednd', - 'widgets/filepaste', - 'widgets/filepicker', - 'widgets/queue', - 'widgets/runtime', - 'widgets/upload', - 'widgets/validator', - - // runtimes - // html5 - 'runtime/html5/blob', - 'runtime/html5/dnd', - 'runtime/html5/filepaste', - 'runtime/html5/filepicker', - 'runtime/html5/transport', - - // flash - 'runtime/flash/filepicker', - 'runtime/flash/transport', - 'runtime/flash/blob' - ], function( Base ) { - return Base; - }); - define('webuploader',[ - 'preset/withoutimage' - ], function( preset ) { - return preset; - }); - return require('webuploader'); -}); diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.noimage.min.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.noimage.min.js deleted file mode 100644 index 1eaca480..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.noimage.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* WebUploader 0.1.5 */!function(a,b){var c,d={},e=function(a,b){var c,d,e;if("string"==typeof a)return h(a);for(c=[],d=a.length,e=0;d>e;e++)c.push(h(a[e]));return b.apply(null,c)},f=function(a,b,c){2===arguments.length&&(c=b,b=null),e(b||[],function(){g(a,c,arguments)})},g=function(a,b,c){var f,g={exports:b};"function"==typeof b&&(c.length||(c=[e,g.exports,g]),f=b.apply(null,c),void 0!==f&&(g.exports=f)),d[a]=g.exports},h=function(b){var c=d[b]||a[b];if(!c)throw new Error("`"+b+"` is undefined");return c},i=function(a){var b,c,e,f,g,h;h=function(a){return a&&a.charAt(0).toUpperCase()+a.substr(1)};for(b in d)if(c=a,d.hasOwnProperty(b)){for(e=b.split("/"),g=h(e.pop());f=h(e.shift());)c[f]=c[f]||{},c=c[f];c[g]=d[b]}return a},j=function(c){return a.__dollar=c,i(b(a,f,e))};"object"==typeof module&&"object"==typeof module.exports?module.exports=j():"function"==typeof define&&define.amd?define(["jquery"],j):(c=a.WebUploader,a.WebUploader=j(),a.WebUploader.noConflict=function(){a.WebUploader=c})}(window,function(a,b,c){return b("dollar-third",[],function(){var b=a.__dollar||a.jQuery||a.Zepto;if(!b)throw new Error("jQuery or Zepto not found!");return b}),b("dollar",["dollar-third"],function(a){return a}),b("promise-third",["dollar"],function(a){return{Deferred:a.Deferred,when:a.when,isPromise:function(a){return a&&"function"==typeof a.then}}}),b("promise",["promise-third"],function(a){return a}),b("base",["dollar","promise"],function(b,c){function d(a){return function(){return h.apply(a,arguments)}}function e(a,b){return function(){return a.apply(b,arguments)}}function f(a){var b;return Object.create?Object.create(a):(b=function(){},b.prototype=a,new b)}var g=function(){},h=Function.call;return{version:"0.1.5",$:b,Deferred:c.Deferred,isPromise:c.isPromise,when:c.when,browser:function(a){var b={},c=a.match(/WebKit\/([\d.]+)/),d=a.match(/Chrome\/([\d.]+)/)||a.match(/CriOS\/([\d.]+)/),e=a.match(/MSIE\s([\d\.]+)/)||a.match(/(?:trident)(?:.*rv:([\w.]+))?/i),f=a.match(/Firefox\/([\d.]+)/),g=a.match(/Safari\/([\d.]+)/),h=a.match(/OPR\/([\d.]+)/);return c&&(b.webkit=parseFloat(c[1])),d&&(b.chrome=parseFloat(d[1])),e&&(b.ie=parseFloat(e[1])),f&&(b.firefox=parseFloat(f[1])),g&&(b.safari=parseFloat(g[1])),h&&(b.opera=parseFloat(h[1])),b}(navigator.userAgent),os:function(a){var b={},c=a.match(/(?:Android);?[\s\/]+([\d.]+)?/),d=a.match(/(?:iPad|iPod|iPhone).*OS\s([\d_]+)/);return c&&(b.android=parseFloat(c[1])),d&&(b.ios=parseFloat(d[1].replace(/_/g,"."))),b}(navigator.userAgent),inherits:function(a,c,d){var e;return"function"==typeof c?(e=c,c=null):e=c&&c.hasOwnProperty("constructor")?c.constructor:function(){return a.apply(this,arguments)},b.extend(!0,e,a,d||{}),e.__super__=a.prototype,e.prototype=f(a.prototype),c&&b.extend(!0,e.prototype,c),e},noop:g,bindFn:e,log:function(){return a.console?e(console.log,console):g}(),nextTick:function(){return function(a){setTimeout(a,1)}}(),slice:d([].slice),guid:function(){var a=0;return function(b){for(var c=(+new Date).toString(32),d=0;5>d;d++)c+=Math.floor(65535*Math.random()).toString(32);return(b||"wu_")+c+(a++).toString(32)}}(),formatSize:function(a,b,c){var d;for(c=c||["B","K","M","G","TB"];(d=c.shift())&&a>1024;)a/=1024;return("B"===d?a:a.toFixed(b||2))+d}}}),b("mediator",["base"],function(a){function b(a,b,c,d){return f.grep(a,function(a){return!(!a||b&&a.e!==b||c&&a.cb!==c&&a.cb._cb!==c||d&&a.ctx!==d)})}function c(a,b,c){f.each((a||"").split(h),function(a,d){c(d,b)})}function d(a,b){for(var c,d=!1,e=-1,f=a.length;++e1?void(d.isPlainObject(b)&&d.isPlainObject(c[a])?d.extend(c[a],b):c[a]=b):a?c[a]:c},getStats:function(){var a=this.request("get-stats");return a?{successNum:a.numOfSuccess,progressNum:a.numOfProgress,cancelNum:a.numOfCancel,invalidNum:a.numOfInvalid,uploadFailNum:a.numOfUploadFailed,queueNum:a.numOfQueue,interruptNum:a.numofInterrupt}:{}},trigger:function(a){var c=[].slice.call(arguments,1),e=this.options,f="on"+a.substring(0,1).toUpperCase()+a.substring(1);return b.trigger.apply(this,arguments)===!1||d.isFunction(e[f])&&e[f].apply(this,c)===!1||d.isFunction(this[f])&&this[f].apply(this,c)===!1||b.trigger.apply(b,[this,a].concat(c))===!1?!1:!0},destroy:function(){this.request("destroy",arguments),this.off()},request:a.noop}),a.create=c.create=function(a){return new c(a)},a.Uploader=c,c}),b("runtime/runtime",["base","mediator"],function(a,b){function c(b){this.options=d.extend({container:document.body},b),this.uid=a.guid("rt_")}var d=a.$,e={},f=function(a){for(var b in a)if(a.hasOwnProperty(b))return b;return null};return d.extend(c.prototype,{getContainer:function(){var a,b,c=this.options;return this._container?this._container:(a=d(c.container||document.body),b=d(document.createElement("div")),b.attr("id","rt_"+this.uid),b.css({position:"absolute",top:"0px",left:"0px",width:"1px",height:"1px",overflow:"hidden"}),a.append(b),a.addClass("webuploader-container"),this._container=b,this._parent=a,b)},init:a.noop,exec:a.noop,destroy:function(){this._container&&this._container.remove(),this._parent&&this._parent.removeClass("webuploader-container"),this.off()}}),c.orders="html5,flash",c.addRuntime=function(a,b){e[a]=b},c.hasRuntime=function(a){return!!(a?e[a]:f(e))},c.create=function(a,b){var g,h;if(b=b||c.orders,d.each(b.split(/\s*,\s*/g),function(){return e[this]?(g=this,!1):void 0}),g=g||f(e),!g)throw new Error("Runtime Error");return h=new e[g](a)},b.installTo(c.prototype),c}),b("runtime/client",["base","mediator","runtime/runtime"],function(a,b,c){function d(b,d){var f,g=a.Deferred();this.uid=a.guid("client_"),this.runtimeReady=function(a){return g.done(a)},this.connectRuntime=function(b,h){if(f)throw new Error("already connected!");return g.done(h),"string"==typeof b&&e.get(b)&&(f=e.get(b)),f=f||e.get(null,d),f?(a.$.extend(f.options,b),f.__promise.then(g.resolve),f.__client++):(f=c.create(b,b.runtimeOrder),f.__promise=g.promise(),f.once("ready",g.resolve),f.init(),e.add(f),f.__client=1),d&&(f.__standalone=d),f},this.getRuntime=function(){return f},this.disconnectRuntime=function(){f&&(f.__client--,f.__client<=0&&(e.remove(f),delete f.__promise,f.destroy()),f=null)},this.exec=function(){if(f){var c=a.slice(arguments);return b&&c.unshift(b),f.exec.apply(this,c)}},this.getRuid=function(){return f&&f.uid},this.destroy=function(a){return function(){a&&a.apply(this,arguments),this.trigger("destroy"),this.off(),this.exec("destroy"),this.disconnectRuntime()}}(this.destroy)}var e;return e=function(){var a={};return{add:function(b){a[b.uid]=b},get:function(b,c){var d;if(b)return a[b];for(d in a)if(!c||!a[d].__standalone)return a[d];return null},remove:function(b){delete a[b.uid]}}}(),b.installTo(d.prototype),d}),b("lib/dnd",["base","mediator","runtime/client"],function(a,b,c){function d(a){a=this.options=e.extend({},d.options,a),a.container=e(a.container),a.container.length&&c.call(this,"DragAndDrop")}var e=a.$;return d.options={accept:null,disableGlobalDnd:!1},a.inherits(c,{constructor:d,init:function(){var a=this;a.connectRuntime(a.options,function(){a.exec("init"),a.trigger("ready")})}}),b.installTo(d.prototype),d}),b("widgets/widget",["base","uploader"],function(a,b){function c(a){if(!a)return!1;var b=a.length,c=e.type(a);return 1===a.nodeType&&b?!0:"array"===c||"function"!==c&&"string"!==c&&(0===b||"number"==typeof b&&b>0&&b-1 in a)}function d(a){this.owner=a,this.options=a.options}var e=a.$,f=b.prototype._init,g=b.prototype.destroy,h={},i=[];return e.extend(d.prototype,{init:a.noop,invoke:function(a,b){var c=this.responseMap;return c&&a in c&&c[a]in this&&e.isFunction(this[c[a]])?this[c[a]].apply(this,b):h},request:function(){return this.owner.request.apply(this.owner,arguments)}}),e.extend(b.prototype,{_init:function(){var a=this,b=a._widgets=[],c=a.options.disableWidgets||"";return e.each(i,function(d,e){(!c||!~c.indexOf(e._name))&&b.push(new e(a))}),f.apply(a,arguments)},request:function(b,d,e){var f,g,i,j,k=0,l=this._widgets,m=l&&l.length,n=[],o=[];for(d=c(d)?d:[d];m>k;k++)f=l[k],g=f.invoke(b,d),g!==h&&(a.isPromise(g)?o.push(g):n.push(g));return e||o.length?(i=a.when.apply(a,o),j=i.pipe?"pipe":"then",i[j](function(){var b=a.Deferred(),c=arguments;return 1===c.length&&(c=c[0]),setTimeout(function(){b.resolve(c)},1),b.promise()})[e?j:"done"](e||a.noop)):n[0]},destroy:function(){g.apply(this,arguments),this._widgets=null}}),b.register=d.register=function(b,c){var f,g={init:"init",destroy:"destroy",name:"anonymous"};return 1===arguments.length?(c=b,e.each(c,function(a){return"_"===a[0]||"name"===a?void("name"===a&&(g.name=c.name)):void(g[a.replace(/[A-Z]/g,"-$&").toLowerCase()]=a)})):g=e.extend(g,b),c.responseMap=g,f=a.inherits(d,c),f._name=g.name,i.push(f),f},b.unRegister=d.unRegister=function(a){if(a&&"anonymous"!==a)for(var b=i.length;b--;)i[b]._name===a&&i.splice(b,1)},d}),b("widgets/filednd",["base","uploader","lib/dnd","widgets/widget"],function(a,b,c){var d=a.$;return b.options.dnd="",b.register({name:"dnd",init:function(b){if(b.dnd&&"html5"===this.request("predict-runtime-type")){var e,f=this,g=a.Deferred(),h=d.extend({},{disableGlobalDnd:b.disableGlobalDnd,container:b.dnd,accept:b.accept});return this.dnd=e=new c(h),e.once("ready",g.resolve),e.on("drop",function(a){f.request("add-file",[a])}),e.on("accept",function(a){return f.owner.trigger("dndAccept",a)}),e.init(),g.promise()}},destroy:function(){this.dnd&&this.dnd.destroy()}})}),b("lib/filepaste",["base","mediator","runtime/client"],function(a,b,c){function d(a){a=this.options=e.extend({},a),a.container=e(a.container||document.body),c.call(this,"FilePaste")}var e=a.$;return a.inherits(c,{constructor:d,init:function(){var a=this;a.connectRuntime(a.options,function(){a.exec("init"),a.trigger("ready")})}}),b.installTo(d.prototype),d}),b("widgets/filepaste",["base","uploader","lib/filepaste","widgets/widget"],function(a,b,c){var d=a.$;return b.register({name:"paste",init:function(b){if(b.paste&&"html5"===this.request("predict-runtime-type")){var e,f=this,g=a.Deferred(),h=d.extend({},{container:b.paste,accept:b.accept});return this.paste=e=new c(h),e.once("ready",g.resolve),e.on("paste",function(a){f.owner.request("add-file",[a])}),e.init(),g.promise()}},destroy:function(){this.paste&&this.paste.destroy()}})}),b("lib/blob",["base","runtime/client"],function(a,b){function c(a,c){var d=this;d.source=c,d.ruid=a,this.size=c.size||0,this.type=!c.type&&this.ext&&~"jpg,jpeg,png,gif,bmp".indexOf(this.ext)?"image/"+("jpg"===this.ext?"jpeg":this.ext):c.type||"application/octet-stream",b.call(d,"Blob"),this.uid=c.uid||this.uid,a&&d.connectRuntime(a)}return a.inherits(b,{constructor:c,slice:function(a,b){return this.exec("slice",a,b)},getSource:function(){return this.source}}),c}),b("lib/file",["base","lib/blob"],function(a,b){function c(a,c){var f;this.name=c.name||"untitled"+d++,f=e.exec(c.name)?RegExp.$1.toLowerCase():"",!f&&c.type&&(f=/\/(jpg|jpeg|png|gif|bmp)$/i.exec(c.type)?RegExp.$1.toLowerCase():"",this.name+="."+f),this.ext=f,this.lastModifiedDate=c.lastModifiedDate||(new Date).toLocaleString(),b.apply(this,arguments)}var d=1,e=/\.([^.]+)$/;return a.inherits(b,c)}),b("lib/filepicker",["base","runtime/client","lib/file"],function(b,c,d){function e(a){if(a=this.options=f.extend({},e.options,a),a.container=f(a.id),!a.container.length)throw new Error("按钮指定错误");a.innerHTML=a.innerHTML||a.label||a.container.html()||"",a.button=f(a.button||document.createElement("div")),a.button.html(a.innerHTML),a.container.html(a.button),c.call(this,"FilePicker",!0)}var f=b.$;return e.options={button:null,container:null,label:null,innerHTML:null,multiple:!0,accept:null,name:"file"},b.inherits(c,{constructor:e,init:function(){var c=this,e=c.options,g=e.button;g.addClass("webuploader-pick"),c.on("all",function(a){var b;switch(a){case"mouseenter":g.addClass("webuploader-pick-hover");break;case"mouseleave":g.removeClass("webuploader-pick-hover");break;case"change":b=c.exec("getFiles"),c.trigger("select",f.map(b,function(a){return a=new d(c.getRuid(),a),a._refer=e.container,a}),e.container)}}),c.connectRuntime(e,function(){c.refresh(),c.exec("init",e),c.trigger("ready")}),this._resizeHandler=b.bindFn(this.refresh,this),f(a).on("resize",this._resizeHandler)},refresh:function(){var a=this.getRuntime().getContainer(),b=this.options.button,c=b.outerWidth?b.outerWidth():b.width(),d=b.outerHeight?b.outerHeight():b.height(),e=b.offset();c&&d&&a.css({bottom:"auto",right:"auto",width:c+"px",height:d+"px"}).offset(e)},enable:function(){var a=this.options.button;a.removeClass("webuploader-pick-disable"),this.refresh()},disable:function(){var a=this.options.button;this.getRuntime().getContainer().css({top:"-99999px"}),a.addClass("webuploader-pick-disable")},destroy:function(){var b=this.options.button;f(a).off("resize",this._resizeHandler),b.removeClass("webuploader-pick-disable webuploader-pick-hover webuploader-pick")}}),e}),b("widgets/filepicker",["base","uploader","lib/filepicker","widgets/widget"],function(a,b,c){var d=a.$;return d.extend(b.options,{pick:null,accept:null}),b.register({name:"picker",init:function(a){return this.pickers=[],a.pick&&this.addBtn(a.pick)},refresh:function(){d.each(this.pickers,function(){this.refresh()})},addBtn:function(b){var e=this,f=e.options,g=f.accept,h=[];if(b)return d.isPlainObject(b)||(b={id:b}),d(b.id).each(function(){var i,j,k;k=a.Deferred(),i=d.extend({},b,{accept:d.isPlainObject(g)?[g]:g,swf:f.swf,runtimeOrder:f.runtimeOrder,id:this}),j=new c(i),j.once("ready",k.resolve),j.on("select",function(a){e.owner.request("add-file",[a])}),j.init(),e.pickers.push(j),h.push(k.promise())}),a.when.apply(a,h)},disable:function(){d.each(this.pickers,function(){this.disable()})},enable:function(){d.each(this.pickers,function(){this.enable()})},destroy:function(){d.each(this.pickers,function(){this.destroy()}),this.pickers=null}})}),b("file",["base","mediator"],function(a,b){function c(){return f+g++}function d(a){this.name=a.name||"Untitled",this.size=a.size||0,this.type=a.type||"application/octet-stream",this.lastModifiedDate=a.lastModifiedDate||1*new Date,this.id=c(),this.ext=h.exec(this.name)?RegExp.$1:"",this.statusText="",i[this.id]=d.Status.INITED,this.source=a,this.loaded=0,this.on("error",function(a){this.setStatus(d.Status.ERROR,a)})}var e=a.$,f="WU_FILE_",g=0,h=/\.([^.]+)$/,i={};return e.extend(d.prototype,{setStatus:function(a,b){var c=i[this.id];"undefined"!=typeof b&&(this.statusText=b),a!==c&&(i[this.id]=a,this.trigger("statuschange",a,c))},getStatus:function(){return i[this.id]},getSource:function(){return this.source},destroy:function(){this.off(),delete i[this.id]}}),b.installTo(d.prototype),d.Status={INITED:"inited",QUEUED:"queued",PROGRESS:"progress",ERROR:"error",COMPLETE:"complete",CANCELLED:"cancelled",INTERRUPT:"interrupt",INVALID:"invalid"},d}),b("queue",["base","mediator","file"],function(a,b,c){function d(){this.stats={numOfQueue:0,numOfSuccess:0,numOfCancel:0,numOfProgress:0,numOfUploadFailed:0,numOfInvalid:0,numofDeleted:0,numofInterrupt:0},this._queue=[],this._map={}}var e=a.$,f=c.Status;return e.extend(d.prototype,{append:function(a){return this._queue.push(a),this._fileAdded(a),this},prepend:function(a){return this._queue.unshift(a),this._fileAdded(a),this},getFile:function(a){return"string"!=typeof a?a:this._map[a]},fetch:function(a){var b,c,d=this._queue.length;for(a=a||f.QUEUED,b=0;d>b;b++)if(c=this._queue[b],a===c.getStatus())return c;return null},sort:function(a){"function"==typeof a&&this._queue.sort(a)},getFiles:function(){for(var a,b=[].slice.call(arguments,0),c=[],d=0,f=this._queue.length;f>d;d++)a=this._queue[d],(!b.length||~e.inArray(a.getStatus(),b))&&c.push(a);return c},removeFile:function(a){var b=this._map[a.id];b&&(delete this._map[a.id],a.destroy(),this.stats.numofDeleted++)},_fileAdded:function(a){var b=this,c=this._map[a.id];c||(this._map[a.id]=a,a.on("statuschange",function(a,c){b._onFileStatusChange(a,c)}))},_onFileStatusChange:function(a,b){var c=this.stats;switch(b){case f.PROGRESS:c.numOfProgress--;break;case f.QUEUED:c.numOfQueue--;break;case f.ERROR:c.numOfUploadFailed--;break;case f.INVALID:c.numOfInvalid--;break;case f.INTERRUPT:c.numofInterrupt--}switch(a){case f.QUEUED:c.numOfQueue++;break;case f.PROGRESS:c.numOfProgress++;break;case f.ERROR:c.numOfUploadFailed++;break;case f.COMPLETE:c.numOfSuccess++;break;case f.CANCELLED:c.numOfCancel++;break;case f.INVALID:c.numOfInvalid++;break;case f.INTERRUPT:c.numofInterrupt++}}}),b.installTo(d.prototype),d}),b("widgets/queue",["base","uploader","queue","file","lib/file","runtime/client","widgets/widget"],function(a,b,c,d,e,f){var g=a.$,h=/\.\w+$/,i=d.Status;return b.register({name:"queue",init:function(b){var d,e,h,i,j,k,l,m=this;if(g.isPlainObject(b.accept)&&(b.accept=[b.accept]),b.accept){for(j=[],h=0,e=b.accept.length;e>h;h++)i=b.accept[h].extensions,i&&j.push(i);j.length&&(k="\\."+j.join(",").replace(/,/g,"$|\\.").replace(/\*/g,".*")+"$"),m.accept=new RegExp(k,"i")}return m.queue=new c,m.stats=m.queue.stats,"html5"===this.request("predict-runtime-type")?(d=a.Deferred(),this.placeholder=l=new f("Placeholder"),l.connectRuntime({runtimeOrder:"html5"},function(){m._ruid=l.getRuid(),d.resolve()}),d.promise()):void 0},_wrapFile:function(a){if(!(a instanceof d)){if(!(a instanceof e)){if(!this._ruid)throw new Error("Can't add external files.");a=new e(this._ruid,a)}a=new d(a)}return a},acceptFile:function(a){var b=!a||!a.size||this.accept&&h.exec(a.name)&&!this.accept.test(a.name);return!b},_addFile:function(a){var b=this;return a=b._wrapFile(a),b.owner.trigger("beforeFileQueued",a)?b.acceptFile(a)?(b.queue.append(a),b.owner.trigger("fileQueued",a),a):void b.owner.trigger("error","Q_TYPE_DENIED",a):void 0},getFile:function(a){return this.queue.getFile(a)},addFile:function(a){var b=this;a.length||(a=[a]),a=g.map(a,function(a){return b._addFile(a)}),b.owner.trigger("filesQueued",a),b.options.auto&&setTimeout(function(){b.request("start-upload")},20)},getStats:function(){return this.stats},removeFile:function(a,b){var c=this;a=a.id?a:c.queue.getFile(a),this.request("cancel-file",a),b&&this.queue.removeFile(a)},getFiles:function(){return this.queue.getFiles.apply(this.queue,arguments)},fetchFile:function(){return this.queue.fetch.apply(this.queue,arguments)},retry:function(a,b){var c,d,e,f=this;if(a)return a=a.id?a:f.queue.getFile(a),a.setStatus(i.QUEUED),void(b||f.request("start-upload"));for(c=f.queue.getFiles(i.ERROR),d=0,e=c.length;e>d;d++)a=c[d],a.setStatus(i.QUEUED);f.request("start-upload")},sortFiles:function(){return this.queue.sort.apply(this.queue,arguments)},reset:function(){this.owner.trigger("reset"),this.queue=new c,this.stats=this.queue.stats},destroy:function(){this.reset(),this.placeholder&&this.placeholder.destroy()}})}),b("widgets/runtime",["uploader","runtime/runtime","widgets/widget"],function(a,b){return a.support=function(){return b.hasRuntime.apply(b,arguments)},a.register({name:"runtime",init:function(){if(!this.predictRuntimeType())throw Error("Runtime Error")},predictRuntimeType:function(){var a,c,d=this.options.runtimeOrder||b.orders,e=this.type;if(!e)for(d=d.split(/\s*,\s*/g),a=0,c=d.length;c>a;a++)if(b.hasRuntime(d[a])){this.type=e=d[a];break}return e}})}),b("lib/transport",["base","runtime/client","mediator"],function(a,b,c){function d(a){var c=this;a=c.options=e.extend(!0,{},d.options,a||{}),b.call(this,"Transport"),this._blob=null,this._formData=a.formData||{},this._headers=a.headers||{},this.on("progress",this._timeout),this.on("load error",function(){c.trigger("progress",1),clearTimeout(c._timer)})}var e=a.$;return d.options={server:"",method:"POST",withCredentials:!1,fileVal:"file",timeout:12e4,formData:{},headers:{},sendAsBinary:!1},e.extend(d.prototype,{appendBlob:function(a,b,c){var d=this,e=d.options;d.getRuid()&&d.disconnectRuntime(),d.connectRuntime(b.ruid,function(){d.exec("init")}),d._blob=b,e.fileVal=a||e.fileVal,e.filename=c||e.filename},append:function(a,b){"object"==typeof a?e.extend(this._formData,a):this._formData[a]=b},setRequestHeader:function(a,b){"object"==typeof a?e.extend(this._headers,a):this._headers[a]=b},send:function(a){this.exec("send",a),this._timeout()},abort:function(){return clearTimeout(this._timer),this.exec("abort")},destroy:function(){this.trigger("destroy"),this.off(),this.exec("destroy"),this.disconnectRuntime()},getResponse:function(){return this.exec("getResponse")},getResponseAsJson:function(){return this.exec("getResponseAsJson")},getStatus:function(){return this.exec("getStatus")},_timeout:function(){var a=this,b=a.options.timeout;b&&(clearTimeout(a._timer),a._timer=setTimeout(function(){a.abort(),a.trigger("error","timeout")},b))}}),c.installTo(d.prototype),d}),b("widgets/upload",["base","uploader","file","lib/transport","widgets/widget"],function(a,b,c,d){function e(a,b){var c,d,e=[],f=a.source,g=f.size,h=b?Math.ceil(g/b):1,i=0,j=0;for(d={file:a,has:function(){return!!e.length},shift:function(){return e.shift()},unshift:function(a){e.unshift(a)}};h>j;)c=Math.min(b,g-i),e.push({file:a,start:i,end:b?i+c:g,total:g,chunks:h,chunk:j++,cuted:d}),i+=c;return a.blocks=e.concat(),a.remaning=e.length,d}var f=a.$,g=a.isPromise,h=c.Status;f.extend(b.options,{prepareNextFile:!1,chunked:!1,chunkSize:5242880,chunkRetry:2,threads:3,formData:{}}),b.register({name:"upload",init:function(){var b=this.owner,c=this;this.runing=!1,this.progress=!1,b.on("startUpload",function(){c.progress=!0}).on("uploadFinished",function(){c.progress=!1}),this.pool=[],this.stack=[],this.pending=[],this.remaning=0,this.__tick=a.bindFn(this._tick,this),b.on("uploadComplete",function(a){a.blocks&&f.each(a.blocks,function(a,b){b.transport&&(b.transport.abort(),b.transport.destroy()),delete b.transport}),delete a.blocks,delete a.remaning})},reset:function(){this.request("stop-upload",!0),this.runing=!1,this.pool=[],this.stack=[],this.pending=[],this.remaning=0,this._trigged=!1,this._promise=null},startUpload:function(b){var c=this;if(f.each(c.request("get-files",h.INVALID),function(){c.request("remove-file",this)}),b)if(b=b.id?b:c.request("get-file",b),b.getStatus()===h.INTERRUPT)f.each(c.pool,function(a,c){c.file===b&&c.transport&&c.transport.send()}),b.setStatus(h.QUEUED);else{if(b.getStatus()===h.PROGRESS)return;b.setStatus(h.QUEUED)}else f.each(c.request("get-files",[h.INITED]),function(){this.setStatus(h.QUEUED)});if(!c.runing){c.runing=!0;var d=[];f.each(c.pool,function(a,b){var e=b.file;e.getStatus()===h.INTERRUPT&&(d.push(e),c._trigged=!1,b.transport&&b.transport.send())});for(var b;b=d.shift();)b.setStatus(h.PROGRESS);b||f.each(c.request("get-files",h.INTERRUPT),function(){this.setStatus(h.PROGRESS)}),c._trigged=!1,a.nextTick(c.__tick),c.owner.trigger("startUpload")}},stopUpload:function(b,c){var d=this;if(b===!0&&(c=b,b=null),d.runing!==!1){if(b){if(b=b.id?b:d.request("get-file",b),b.getStatus()!==h.PROGRESS&&b.getStatus()!==h.QUEUED)return;return b.setStatus(h.INTERRUPT),f.each(d.pool,function(a,c){c.file===b&&(c.transport&&c.transport.abort(),d._putback(c),d._popBlock(c))}),a.nextTick(d.__tick)}d.runing=!1,this._promise&&this._promise.file&&this._promise.file.setStatus(h.INTERRUPT),c&&f.each(d.pool,function(a,b){b.transport&&b.transport.abort(),b.file.setStatus(h.INTERRUPT)}),d.owner.trigger("stopUpload")}},cancelFile:function(a){a=a.id?a:this.request("get-file",a),a.blocks&&f.each(a.blocks,function(a,b){var c=b.transport;c&&(c.abort(),c.destroy(),delete b.transport)}),a.setStatus(h.CANCELLED),this.owner.trigger("fileDequeued",a)},isInProgress:function(){return!!this.progress},_getStats:function(){return this.request("get-stats")},skipFile:function(a,b){a=a.id?a:this.request("get-file",a),a.setStatus(b||h.COMPLETE),a.skipped=!0,a.blocks&&f.each(a.blocks,function(a,b){var c=b.transport;c&&(c.abort(),c.destroy(),delete b.transport)}),this.owner.trigger("uploadSkip",a)},_tick:function(){var b,c,d=this,e=d.options;return d._promise?d._promise.always(d.__tick):void(d.pool.length1&&~"http,abort".indexOf(a)&&b.retried1&&f.extend(m,{chunks:b.chunks,chunk:b.chunk}),i.trigger("uploadBeforeSend",b,m,n),l.appendBlob(j.fileVal,b.blob,k.name),l.append(m),l.setRequestHeader(n),l.send()},_finishFile:function(a,b,c){var d=this.owner;return d.request("after-send-file",arguments,function(){a.setStatus(h.COMPLETE),d.trigger("uploadSuccess",a,b,c)}).fail(function(b){a.getStatus()===h.PROGRESS&&a.setStatus(h.ERROR,b),d.trigger("uploadError",a,b)}).always(function(){d.trigger("uploadComplete",a)})},updateFileProgress:function(a){var b=0,c=0;a.blocks&&(f.each(a.blocks,function(a,b){c+=(b.percentage||0)*(b.end-b.start)}),b=c/a.size,this.owner.trigger("uploadProgress",a,b||0))}})}),b("widgets/validator",["base","uploader","file","widgets/widget"],function(a,b,c){var d,e=a.$,f={};return d={addValidator:function(a,b){f[a]=b},removeValidator:function(a){delete f[a]}},b.register({name:"validator",init:function(){var b=this;a.nextTick(function(){e.each(f,function(){this.call(b.owner)})})}}),d.addValidator("fileNumLimit",function(){var a=this,b=a.options,c=0,d=parseInt(b.fileNumLimit,10),e=!0;d&&(a.on("beforeFileQueued",function(a){return c>=d&&e&&(e=!1,this.trigger("error","Q_EXCEED_NUM_LIMIT",d,a),setTimeout(function(){e=!0},1)),c>=d?!1:!0}),a.on("fileQueued",function(){c++}),a.on("fileDequeued",function(){c--}),a.on("reset",function(){c=0}))}),d.addValidator("fileSizeLimit",function(){var a=this,b=a.options,c=0,d=parseInt(b.fileSizeLimit,10),e=!0;d&&(a.on("beforeFileQueued",function(a){var b=c+a.size>d;return b&&e&&(e=!1,this.trigger("error","Q_EXCEED_SIZE_LIMIT",d,a),setTimeout(function(){e=!0},1)),b?!1:!0}),a.on("fileQueued",function(a){c+=a.size}),a.on("fileDequeued",function(a){c-=a.size}),a.on("reset",function(){c=0}))}),d.addValidator("fileSingleSizeLimit",function(){var a=this,b=a.options,d=b.fileSingleSizeLimit;d&&a.on("beforeFileQueued",function(a){return a.size>d?(a.setStatus(c.Status.INVALID,"exceed_size"),this.trigger("error","F_EXCEED_SIZE",d,a),!1):void 0})}),d.addValidator("duplicate",function(){function a(a){for(var b,c=0,d=0,e=a.length;e>d;d++)b=a.charCodeAt(d),c=b+(c<<6)+(c<<16)-c;return c}var b=this,c=b.options,d={};c.duplicate||(b.on("beforeFileQueued",function(b){var c=b.__hash||(b.__hash=a(b.name+b.size+b.lastModifiedDate));return d[c]?(this.trigger("error","F_DUPLICATE",b),!1):void 0}),b.on("fileQueued",function(a){var b=a.__hash;b&&(d[b]=!0)}),b.on("fileDequeued",function(a){var b=a.__hash;b&&delete d[b]}),b.on("reset",function(){d={}}))}),d}),b("runtime/compbase",[],function(){function a(a,b){this.owner=a,this.options=a.options,this.getRuntime=function(){return b},this.getRuid=function(){return b.uid},this.trigger=function(){return a.trigger.apply(a,arguments)}}return a}),b("runtime/html5/runtime",["base","runtime/runtime","runtime/compbase"],function(b,c,d){function e(){var a={},d=this,e=this.destroy;c.apply(d,arguments),d.type=f,d.exec=function(c,e){var f,h=this,i=h.uid,j=b.slice(arguments,2);return g[c]&&(f=a[i]=a[i]||new g[c](h,d),f[e])?f[e].apply(f,j):void 0},d.destroy=function(){return e&&e.apply(this,arguments)}}var f="html5",g={};return b.inherits(c,{constructor:e,init:function(){var a=this;setTimeout(function(){a.trigger("ready")},1)}}),e.register=function(a,c){var e=g[a]=b.inherits(d,c);return e},a.Blob&&a.FileReader&&a.DataView&&c.addRuntime(f,e),e}),b("runtime/html5/blob",["runtime/html5/runtime","lib/blob"],function(a,b){return a.register("Blob",{slice:function(a,c){var d=this.owner.source,e=d.slice||d.webkitSlice||d.mozSlice; -return d=e.call(d,a,c),new b(this.getRuid(),d)}})}),b("runtime/html5/dnd",["base","runtime/html5/runtime","lib/file"],function(a,b,c){var d=a.$,e="webuploader-dnd-";return b.register("DragAndDrop",{init:function(){var b=this.elem=this.options.container;this.dragEnterHandler=a.bindFn(this._dragEnterHandler,this),this.dragOverHandler=a.bindFn(this._dragOverHandler,this),this.dragLeaveHandler=a.bindFn(this._dragLeaveHandler,this),this.dropHandler=a.bindFn(this._dropHandler,this),this.dndOver=!1,b.on("dragenter",this.dragEnterHandler),b.on("dragover",this.dragOverHandler),b.on("dragleave",this.dragLeaveHandler),b.on("drop",this.dropHandler),this.options.disableGlobalDnd&&(d(document).on("dragover",this.dragOverHandler),d(document).on("drop",this.dropHandler))},_dragEnterHandler:function(a){var b,c=this,d=c._denied||!1;return a=a.originalEvent||a,c.dndOver||(c.dndOver=!0,b=a.dataTransfer.items,b&&b.length&&(c._denied=d=!c.trigger("accept",b)),c.elem.addClass(e+"over"),c.elem[d?"addClass":"removeClass"](e+"denied")),a.dataTransfer.dropEffect=d?"none":"copy",!1},_dragOverHandler:function(a){var b=this.elem.parent().get(0);return b&&!d.contains(b,a.currentTarget)?!1:(clearTimeout(this._leaveTimer),this._dragEnterHandler.call(this,a),!1)},_dragLeaveHandler:function(){var a,b=this;return a=function(){b.dndOver=!1,b.elem.removeClass(e+"over "+e+"denied")},clearTimeout(b._leaveTimer),b._leaveTimer=setTimeout(a,100),!1},_dropHandler:function(a){var b,f,g=this,h=g.getRuid(),i=g.elem.parent().get(0);if(i&&!d.contains(i,a.currentTarget))return!1;a=a.originalEvent||a,b=a.dataTransfer;try{f=b.getData("text/html")}catch(j){}return f?void 0:(g._getTansferFiles(b,function(a){g.trigger("drop",d.map(a,function(a){return new c(h,a)}))}),g.dndOver=!1,g.elem.removeClass(e+"over"),!1)},_getTansferFiles:function(b,c){var d,e,f,g,h,i,j,k=[],l=[];for(d=b.items,e=b.files,j=!(!d||!d[0].webkitGetAsEntry),h=0,i=e.length;i>h;h++)f=e[h],g=d&&d[h],j&&g.webkitGetAsEntry().isDirectory?l.push(this._traverseDirectoryTree(g.webkitGetAsEntry(),k)):k.push(f);a.when.apply(a,l).done(function(){k.length&&c(k)})},_traverseDirectoryTree:function(b,c){var d=a.Deferred(),e=this;return b.isFile?b.file(function(a){c.push(a),d.resolve()}):b.isDirectory&&b.createReader().readEntries(function(b){var f,g=b.length,h=[],i=[];for(f=0;g>f;f++)h.push(e._traverseDirectoryTree(b[f],i));a.when.apply(a,h).then(function(){c.push.apply(c,i),d.resolve()},d.reject)}),d.promise()},destroy:function(){var a=this.elem;a&&(a.off("dragenter",this.dragEnterHandler),a.off("dragover",this.dragOverHandler),a.off("dragleave",this.dragLeaveHandler),a.off("drop",this.dropHandler),this.options.disableGlobalDnd&&(d(document).off("dragover",this.dragOverHandler),d(document).off("drop",this.dropHandler)))}})}),b("runtime/html5/filepaste",["base","runtime/html5/runtime","lib/file"],function(a,b,c){return b.register("FilePaste",{init:function(){var b,c,d,e,f=this.options,g=this.elem=f.container,h=".*";if(f.accept){for(b=[],c=0,d=f.accept.length;d>c;c++)e=f.accept[c].mimeTypes,e&&b.push(e);b.length&&(h=b.join(","),h=h.replace(/,/g,"|").replace(/\*/g,".*"))}this.accept=h=new RegExp(h,"i"),this.hander=a.bindFn(this._pasteHander,this),g.on("paste",this.hander)},_pasteHander:function(a){var b,d,e,f,g,h=[],i=this.getRuid();for(a=a.originalEvent||a,b=a.clipboardData.items,f=0,g=b.length;g>f;f++)d=b[f],"file"===d.kind&&(e=d.getAsFile())&&h.push(new c(i,e));h.length&&(a.preventDefault(),a.stopPropagation(),this.trigger("paste",h))},destroy:function(){this.elem.off("paste",this.hander)}})}),b("runtime/html5/filepicker",["base","runtime/html5/runtime"],function(a,b){var c=a.$;return b.register("FilePicker",{init:function(){var a,b,d,e,f=this.getRuntime().getContainer(),g=this,h=g.owner,i=g.options,j=this.label=c(document.createElement("label")),k=this.input=c(document.createElement("input"));if(k.attr("type","file"),k.attr("name",i.name),k.addClass("webuploader-element-invisible"),j.on("click",function(){k.trigger("click")}),j.css({opacity:0,width:"100%",height:"100%",display:"block",cursor:"pointer",background:"#ffffff"}),i.multiple&&k.attr("multiple","multiple"),i.accept&&i.accept.length>0){for(a=[],b=0,d=i.accept.length;d>b;b++)a.push(i.accept[b].mimeTypes);k.attr("accept",a.join(","))}f.append(k),f.append(j),e=function(a){h.trigger(a.type)},k.on("change",function(a){var b,d=arguments.callee;g.files=a.target.files,b=this.cloneNode(!0),b.value=null,this.parentNode.replaceChild(b,this),k.off(),k=c(b).on("change",d).on("mouseenter mouseleave",e),h.trigger("change")}),j.on("mouseenter mouseleave",e)},getFiles:function(){return this.files},destroy:function(){this.input.off(),this.label.off()}})}),b("runtime/html5/transport",["base","runtime/html5/runtime"],function(a,b){var c=a.noop,d=a.$;return b.register("Transport",{init:function(){this._status=0,this._response=null},send:function(){var b,c,e,f=this.owner,g=this.options,h=this._initAjax(),i=f._blob,j=g.server;g.sendAsBinary?(j+=(/\?/.test(j)?"&":"?")+d.param(f._formData),c=i.getSource()):(b=new FormData,d.each(f._formData,function(a,c){b.append(a,c)}),b.append(g.fileVal,i.getSource(),g.filename||f._formData.name||"")),g.withCredentials&&"withCredentials"in h?(h.open(g.method,j,!0),h.withCredentials=!0):h.open(g.method,j),this._setRequestHeader(h,g.headers),c?(h.overrideMimeType&&h.overrideMimeType("application/octet-stream"),a.os.android?(e=new FileReader,e.onload=function(){h.send(this.result),e=e.onload=null},e.readAsArrayBuffer(c)):h.send(c)):h.send(b)},getResponse:function(){return this._response},getResponseAsJson:function(){return this._parseJson(this._response)},getStatus:function(){return this._status},abort:function(){var a=this._xhr;a&&(a.upload.onprogress=c,a.onreadystatechange=c,a.abort(),this._xhr=a=null)},destroy:function(){this.abort()},_initAjax:function(){var a=this,b=new XMLHttpRequest,d=this.options;return!d.withCredentials||"withCredentials"in b||"undefined"==typeof XDomainRequest||(b=new XDomainRequest),b.upload.onprogress=function(b){var c=0;return b.lengthComputable&&(c=b.loaded/b.total),a.trigger("progress",c)},b.onreadystatechange=function(){return 4===b.readyState?(b.upload.onprogress=c,b.onreadystatechange=c,a._xhr=null,a._status=b.status,b.status>=200&&b.status<300?(a._response=b.responseText,a.trigger("load")):b.status>=500&&b.status<600?(a._response=b.responseText,a.trigger("error","server")):a.trigger("error",a._status?"http":"abort")):void 0},a._xhr=b,b},_setRequestHeader:function(a,b){d.each(b,function(b,c){a.setRequestHeader(b,c)})},_parseJson:function(a){var b;try{b=JSON.parse(a)}catch(c){b={}}return b}})}),b("runtime/flash/runtime",["base","runtime/runtime","runtime/compbase"],function(b,c,d){function e(){var a;try{a=navigator.plugins["Shockwave Flash"],a=a.description}catch(b){try{a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")}catch(c){a="0.0"}}return a=a.match(/\d+/g),parseFloat(a[0]+"."+a[1],10)}function f(){function d(a,b){var c,d,e=a.type||a;c=e.split("::"),d=c[0],e=c[1],"Ready"===e&&d===j.uid?j.trigger("ready"):f[d]&&f[d].trigger(e.toLowerCase(),a,b)}var e={},f={},g=this.destroy,j=this,k=b.guid("webuploader_");c.apply(j,arguments),j.type=h,j.exec=function(a,c){var d,g=this,h=g.uid,k=b.slice(arguments,2);return f[h]=g,i[a]&&(e[h]||(e[h]=new i[a](g,j)),d=e[h],d[c])?d[c].apply(d,k):j.flashExec.apply(g,arguments)},a[k]=function(){var a=arguments;setTimeout(function(){d.apply(null,a)},1)},this.jsreciver=k,this.destroy=function(){return g&&g.apply(this,arguments)},this.flashExec=function(a,c){var d=j.getFlash(),e=b.slice(arguments,2);return d.exec(this.uid,a,c,e)}}var g=b.$,h="flash",i={};return b.inherits(c,{constructor:f,init:function(){var a,c=this.getContainer(),d=this.options;c.css({position:"absolute",top:"-8px",left:"-8px",width:"9px",height:"9px",overflow:"hidden"}),a='',c.html(a)},getFlash:function(){return this._flash?this._flash:(this._flash=g("#"+this.uid).get(0),this._flash)}}),f.register=function(a,c){return c=i[a]=b.inherits(d,g.extend({flashExec:function(){var a=this.owner,b=this.getRuntime();return b.flashExec.apply(a,arguments)}},c))},e()>=11.4&&c.addRuntime(h,f),f}),b("runtime/flash/filepicker",["base","runtime/flash/runtime"],function(a,b){var c=a.$;return b.register("FilePicker",{init:function(a){var b,d,e=c.extend({},a);for(b=e.accept&&e.accept.length,d=0;b>d;d++)e.accept[d].title||(e.accept[d].title="Files");delete e.button,delete e.id,delete e.container,this.flashExec("FilePicker","init",e)},destroy:function(){this.flashExec("FilePicker","destroy")}})}),b("runtime/flash/transport",["base","runtime/flash/runtime","runtime/client"],function(b,c,d){var e=b.$;return c.register("Transport",{init:function(){this._status=0,this._response=null,this._responseJson=null},send:function(){var a,b=this.owner,c=this.options,d=this._initAjax(),f=b._blob,g=c.server;d.connectRuntime(f.ruid),c.sendAsBinary?(g+=(/\?/.test(g)?"&":"?")+e.param(b._formData),a=f.uid):(e.each(b._formData,function(a,b){d.exec("append",a,b)}),d.exec("appendBlob",c.fileVal,f.uid,c.filename||b._formData.name||"")),this._setRequestHeader(d,c.headers),d.exec("send",{method:c.method,url:g,forceURLStream:c.forceURLStream,mimeType:"application/octet-stream"},a)},getStatus:function(){return this._status},getResponse:function(){return this._response||""},getResponseAsJson:function(){return this._responseJson},abort:function(){var a=this._xhr;a&&(a.exec("abort"),a.destroy(),this._xhr=a=null)},destroy:function(){this.abort()},_initAjax:function(){var b=this,c=new d("XMLHttpRequest");return c.on("uploadprogress progress",function(a){var c=a.loaded/a.total;return c=Math.min(1,Math.max(0,c)),b.trigger("progress",c)}),c.on("load",function(){var d,e=c.exec("getStatus"),f=!1,g="";return c.off(),b._xhr=null,e>=200&&300>e?f=!0:e>=500&&600>e?(f=!0,g="server"):g="http",f&&(b._response=c.exec("getResponse"),b._response=decodeURIComponent(b._response),d=a.JSON&&a.JSON.parse||function(a){try{return new Function("return "+a).call()}catch(b){return{}}},b._responseJson=b._response?d(b._response):{}),c.destroy(),c=null,g?b.trigger("error",g):b.trigger("load")}),c.on("error",function(){c.off(),b._xhr=null,b.trigger("error","http")}),b._xhr=c,c},_setRequestHeader:function(a,b){e.each(b,function(b,c){a.exec("setRequestHeader",b,c)})}})}),b("runtime/flash/blob",["runtime/flash/runtime","lib/blob"],function(a,b){return a.register("Blob",{slice:function(a,c){var d=this.flashExec("Blob","slice",a,c);return new b(d.uid,d)}})}),b("preset/withoutimage",["base","widgets/filednd","widgets/filepaste","widgets/filepicker","widgets/queue","widgets/runtime","widgets/upload","widgets/validator","runtime/html5/blob","runtime/html5/dnd","runtime/html5/filepaste","runtime/html5/filepicker","runtime/html5/transport","runtime/flash/filepicker","runtime/flash/transport","runtime/flash/blob"],function(a){return a}),b("webuploader",["preset/withoutimage"],function(a){return a}),c("webuploader")}); \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.nolog.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.nolog.js deleted file mode 100644 index 294e9e03..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.nolog.js +++ /dev/null @@ -1,8012 +0,0 @@ -/*! WebUploader 0.1.5 */ - - -/** - * @fileOverview 让内部各个部件的代码可以用[amd](https://github.com/amdjs/amdjs-api/wiki/AMD)模块定义方式组织起来。 - * - * AMD API 内部的简单不完全实现,请忽略。只有当WebUploader被合并成一个文件的时候才会引入。 - */ -(function( root, factory ) { - var modules = {}, - - // 内部require, 简单不完全实现。 - // https://github.com/amdjs/amdjs-api/wiki/require - _require = function( deps, callback ) { - var args, len, i; - - // 如果deps不是数组,则直接返回指定module - if ( typeof deps === 'string' ) { - return getModule( deps ); - } else { - args = []; - for( len = deps.length, i = 0; i < len; i++ ) { - args.push( getModule( deps[ i ] ) ); - } - - return callback.apply( null, args ); - } - }, - - // 内部define,暂时不支持不指定id. - _define = function( id, deps, factory ) { - if ( arguments.length === 2 ) { - factory = deps; - deps = null; - } - - _require( deps || [], function() { - setModule( id, factory, arguments ); - }); - }, - - // 设置module, 兼容CommonJs写法。 - setModule = function( id, factory, args ) { - var module = { - exports: factory - }, - returned; - - if ( typeof factory === 'function' ) { - args.length || (args = [ _require, module.exports, module ]); - returned = factory.apply( null, args ); - returned !== undefined && (module.exports = returned); - } - - modules[ id ] = module.exports; - }, - - // 根据id获取module - getModule = function( id ) { - var module = modules[ id ] || root[ id ]; - - if ( !module ) { - throw new Error( '`' + id + '` is undefined' ); - } - - return module; - }, - - // 将所有modules,将路径ids装换成对象。 - exportsTo = function( obj ) { - var key, host, parts, part, last, ucFirst; - - // make the first character upper case. - ucFirst = function( str ) { - return str && (str.charAt( 0 ).toUpperCase() + str.substr( 1 )); - }; - - for ( key in modules ) { - host = obj; - - if ( !modules.hasOwnProperty( key ) ) { - continue; - } - - parts = key.split('/'); - last = ucFirst( parts.pop() ); - - while( (part = ucFirst( parts.shift() )) ) { - host[ part ] = host[ part ] || {}; - host = host[ part ]; - } - - host[ last ] = modules[ key ]; - } - - return obj; - }, - - makeExport = function( dollar ) { - root.__dollar = dollar; - - // exports every module. - return exportsTo( factory( root, _define, _require ) ); - }, - - origin; - - if ( typeof module === 'object' && typeof module.exports === 'object' ) { - - // For CommonJS and CommonJS-like environments where a proper window is present, - module.exports = makeExport(); - } else if ( typeof define === 'function' && define.amd ) { - - // Allow using this built library as an AMD module - // in another project. That other project will only - // see this AMD call, not the internal modules in - // the closure below. - define([ 'jquery' ], makeExport ); - } else { - - // Browser globals case. Just assign the - // result to a property on the global. - origin = root.WebUploader; - root.WebUploader = makeExport(); - root.WebUploader.noConflict = function() { - root.WebUploader = origin; - }; - } -})( window, function( window, define, require ) { - - - /** - * @fileOverview jQuery or Zepto - */ - define('dollar-third',[],function() { - var $ = window.__dollar || window.jQuery || window.Zepto; - - if ( !$ ) { - throw new Error('jQuery or Zepto not found!'); - } - - return $; - }); - /** - * @fileOverview Dom 操作相关 - */ - define('dollar',[ - 'dollar-third' - ], function( _ ) { - return _; - }); - /** - * @fileOverview 使用jQuery的Promise - */ - define('promise-third',[ - 'dollar' - ], function( $ ) { - return { - Deferred: $.Deferred, - when: $.when, - - isPromise: function( anything ) { - return anything && typeof anything.then === 'function'; - } - }; - }); - /** - * @fileOverview Promise/A+ - */ - define('promise',[ - 'promise-third' - ], function( _ ) { - return _; - }); - /** - * @fileOverview 基础类方法。 - */ - - /** - * Web Uploader内部类的详细说明,以下提及的功能类,都可以在`WebUploader`这个变量中访问到。 - * - * As you know, Web Uploader的每个文件都是用过[AMD](https://github.com/amdjs/amdjs-api/wiki/AMD)规范中的`define`组织起来的, 每个Module都会有个module id. - * 默认module id为该文件的路径,而此路径将会转化成名字空间存放在WebUploader中。如: - * - * * module `base`:WebUploader.Base - * * module `file`: WebUploader.File - * * module `lib/dnd`: WebUploader.Lib.Dnd - * * module `runtime/html5/dnd`: WebUploader.Runtime.Html5.Dnd - * - * - * 以下文档中对类的使用可能省略掉了`WebUploader`前缀。 - * @module WebUploader - * @title WebUploader API文档 - */ - define('base',[ - 'dollar', - 'promise' - ], function( $, promise ) { - - var noop = function() {}, - call = Function.call; - - // http://jsperf.com/uncurrythis - // 反科里化 - function uncurryThis( fn ) { - return function() { - return call.apply( fn, arguments ); - }; - } - - function bindFn( fn, context ) { - return function() { - return fn.apply( context, arguments ); - }; - } - - function createObject( proto ) { - var f; - - if ( Object.create ) { - return Object.create( proto ); - } else { - f = function() {}; - f.prototype = proto; - return new f(); - } - } - - - /** - * 基础类,提供一些简单常用的方法。 - * @class Base - */ - return { - - /** - * @property {String} version 当前版本号。 - */ - version: '0.1.5', - - /** - * @property {jQuery|Zepto} $ 引用依赖的jQuery或者Zepto对象。 - */ - $: $, - - Deferred: promise.Deferred, - - isPromise: promise.isPromise, - - when: promise.when, - - /** - * @description 简单的浏览器检查结果。 - * - * * `webkit` webkit版本号,如果浏览器为非webkit内核,此属性为`undefined`。 - * * `chrome` chrome浏览器版本号,如果浏览器为chrome,此属性为`undefined`。 - * * `ie` ie浏览器版本号,如果浏览器为非ie,此属性为`undefined`。**暂不支持ie10+** - * * `firefox` firefox浏览器版本号,如果浏览器为非firefox,此属性为`undefined`。 - * * `safari` safari浏览器版本号,如果浏览器为非safari,此属性为`undefined`。 - * * `opera` opera浏览器版本号,如果浏览器为非opera,此属性为`undefined`。 - * - * @property {Object} [browser] - */ - browser: (function( ua ) { - var ret = {}, - webkit = ua.match( /WebKit\/([\d.]+)/ ), - chrome = ua.match( /Chrome\/([\d.]+)/ ) || - ua.match( /CriOS\/([\d.]+)/ ), - - ie = ua.match( /MSIE\s([\d\.]+)/ ) || - ua.match( /(?:trident)(?:.*rv:([\w.]+))?/i ), - firefox = ua.match( /Firefox\/([\d.]+)/ ), - safari = ua.match( /Safari\/([\d.]+)/ ), - opera = ua.match( /OPR\/([\d.]+)/ ); - - webkit && (ret.webkit = parseFloat( webkit[ 1 ] )); - chrome && (ret.chrome = parseFloat( chrome[ 1 ] )); - ie && (ret.ie = parseFloat( ie[ 1 ] )); - firefox && (ret.firefox = parseFloat( firefox[ 1 ] )); - safari && (ret.safari = parseFloat( safari[ 1 ] )); - opera && (ret.opera = parseFloat( opera[ 1 ] )); - - return ret; - })( navigator.userAgent ), - - /** - * @description 操作系统检查结果。 - * - * * `android` 如果在android浏览器环境下,此值为对应的android版本号,否则为`undefined`。 - * * `ios` 如果在ios浏览器环境下,此值为对应的ios版本号,否则为`undefined`。 - * @property {Object} [os] - */ - os: (function( ua ) { - var ret = {}, - - // osx = !!ua.match( /\(Macintosh\; Intel / ), - android = ua.match( /(?:Android);?[\s\/]+([\d.]+)?/ ), - ios = ua.match( /(?:iPad|iPod|iPhone).*OS\s([\d_]+)/ ); - - // osx && (ret.osx = true); - android && (ret.android = parseFloat( android[ 1 ] )); - ios && (ret.ios = parseFloat( ios[ 1 ].replace( /_/g, '.' ) )); - - return ret; - })( navigator.userAgent ), - - /** - * 实现类与类之间的继承。 - * @method inherits - * @grammar Base.inherits( super ) => child - * @grammar Base.inherits( super, protos ) => child - * @grammar Base.inherits( super, protos, statics ) => child - * @param {Class} super 父类 - * @param {Object | Function} [protos] 子类或者对象。如果对象中包含constructor,子类将是用此属性值。 - * @param {Function} [protos.constructor] 子类构造器,不指定的话将创建个临时的直接执行父类构造器的方法。 - * @param {Object} [statics] 静态属性或方法。 - * @return {Class} 返回子类。 - * @example - * function Person() { - * console.log( 'Super' ); - * } - * Person.prototype.hello = function() { - * console.log( 'hello' ); - * }; - * - * var Manager = Base.inherits( Person, { - * world: function() { - * console.log( 'World' ); - * } - * }); - * - * // 因为没有指定构造器,父类的构造器将会执行。 - * var instance = new Manager(); // => Super - * - * // 继承子父类的方法 - * instance.hello(); // => hello - * instance.world(); // => World - * - * // 子类的__super__属性指向父类 - * console.log( Manager.__super__ === Person ); // => true - */ - inherits: function( Super, protos, staticProtos ) { - var child; - - if ( typeof protos === 'function' ) { - child = protos; - protos = null; - } else if ( protos && protos.hasOwnProperty('constructor') ) { - child = protos.constructor; - } else { - child = function() { - return Super.apply( this, arguments ); - }; - } - - // 复制静态方法 - $.extend( true, child, Super, staticProtos || {} ); - - /* jshint camelcase: false */ - - // 让子类的__super__属性指向父类。 - child.__super__ = Super.prototype; - - // 构建原型,添加原型方法或属性。 - // 暂时用Object.create实现。 - child.prototype = createObject( Super.prototype ); - protos && $.extend( true, child.prototype, protos ); - - return child; - }, - - /** - * 一个不做任何事情的方法。可以用来赋值给默认的callback. - * @method noop - */ - noop: noop, - - /** - * 返回一个新的方法,此方法将已指定的`context`来执行。 - * @grammar Base.bindFn( fn, context ) => Function - * @method bindFn - * @example - * var doSomething = function() { - * console.log( this.name ); - * }, - * obj = { - * name: 'Object Name' - * }, - * aliasFn = Base.bind( doSomething, obj ); - * - * aliasFn(); // => Object Name - * - */ - bindFn: bindFn, - - /** - * 引用Console.log如果存在的话,否则引用一个[空函数noop](#WebUploader:Base.noop)。 - * @grammar Base.log( args... ) => undefined - * @method log - */ - log: (function() { - if ( window.console ) { - return bindFn( console.log, console ); - } - return noop; - })(), - - nextTick: (function() { - - return function( cb ) { - setTimeout( cb, 1 ); - }; - - // @bug 当浏览器不在当前窗口时就停了。 - // var next = window.requestAnimationFrame || - // window.webkitRequestAnimationFrame || - // window.mozRequestAnimationFrame || - // function( cb ) { - // window.setTimeout( cb, 1000 / 60 ); - // }; - - // // fix: Uncaught TypeError: Illegal invocation - // return bindFn( next, window ); - })(), - - /** - * 被[uncurrythis](http://www.2ality.com/2011/11/uncurrying-this.html)的数组slice方法。 - * 将用来将非数组对象转化成数组对象。 - * @grammar Base.slice( target, start[, end] ) => Array - * @method slice - * @example - * function doSomthing() { - * var args = Base.slice( arguments, 1 ); - * console.log( args ); - * } - * - * doSomthing( 'ignored', 'arg2', 'arg3' ); // => Array ["arg2", "arg3"] - */ - slice: uncurryThis( [].slice ), - - /** - * 生成唯一的ID - * @method guid - * @grammar Base.guid() => String - * @grammar Base.guid( prefx ) => String - */ - guid: (function() { - var counter = 0; - - return function( prefix ) { - var guid = (+new Date()).toString( 32 ), - i = 0; - - for ( ; i < 5; i++ ) { - guid += Math.floor( Math.random() * 65535 ).toString( 32 ); - } - - return (prefix || 'wu_') + guid + (counter++).toString( 32 ); - }; - })(), - - /** - * 格式化文件大小, 输出成带单位的字符串 - * @method formatSize - * @grammar Base.formatSize( size ) => String - * @grammar Base.formatSize( size, pointLength ) => String - * @grammar Base.formatSize( size, pointLength, units ) => String - * @param {Number} size 文件大小 - * @param {Number} [pointLength=2] 精确到的小数点数。 - * @param {Array} [units=[ 'B', 'K', 'M', 'G', 'TB' ]] 单位数组。从字节,到千字节,一直往上指定。如果单位数组里面只指定了到了K(千字节),同时文件大小大于M, 此方法的输出将还是显示成多少K. - * @example - * console.log( Base.formatSize( 100 ) ); // => 100B - * console.log( Base.formatSize( 1024 ) ); // => 1.00K - * console.log( Base.formatSize( 1024, 0 ) ); // => 1K - * console.log( Base.formatSize( 1024 * 1024 ) ); // => 1.00M - * console.log( Base.formatSize( 1024 * 1024 * 1024 ) ); // => 1.00G - * console.log( Base.formatSize( 1024 * 1024 * 1024, 0, ['B', 'KB', 'MB'] ) ); // => 1024MB - */ - formatSize: function( size, pointLength, units ) { - var unit; - - units = units || [ 'B', 'K', 'M', 'G', 'TB' ]; - - while ( (unit = units.shift()) && size > 1024 ) { - size = size / 1024; - } - - return (unit === 'B' ? size : size.toFixed( pointLength || 2 )) + - unit; - } - }; - }); - /** - * 事件处理类,可以独立使用,也可以扩展给对象使用。 - * @fileOverview Mediator - */ - define('mediator',[ - 'base' - ], function( Base ) { - var $ = Base.$, - slice = [].slice, - separator = /\s+/, - protos; - - // 根据条件过滤出事件handlers. - function findHandlers( arr, name, callback, context ) { - return $.grep( arr, function( handler ) { - return handler && - (!name || handler.e === name) && - (!callback || handler.cb === callback || - handler.cb._cb === callback) && - (!context || handler.ctx === context); - }); - } - - function eachEvent( events, callback, iterator ) { - // 不支持对象,只支持多个event用空格隔开 - $.each( (events || '').split( separator ), function( _, key ) { - iterator( key, callback ); - }); - } - - function triggerHanders( events, args ) { - var stoped = false, - i = -1, - len = events.length, - handler; - - while ( ++i < len ) { - handler = events[ i ]; - - if ( handler.cb.apply( handler.ctx2, args ) === false ) { - stoped = true; - break; - } - } - - return !stoped; - } - - protos = { - - /** - * 绑定事件。 - * - * `callback`方法在执行时,arguments将会来源于trigger的时候携带的参数。如 - * ```javascript - * var obj = {}; - * - * // 使得obj有事件行为 - * Mediator.installTo( obj ); - * - * obj.on( 'testa', function( arg1, arg2 ) { - * console.log( arg1, arg2 ); // => 'arg1', 'arg2' - * }); - * - * obj.trigger( 'testa', 'arg1', 'arg2' ); - * ``` - * - * 如果`callback`中,某一个方法`return false`了,则后续的其他`callback`都不会被执行到。 - * 切会影响到`trigger`方法的返回值,为`false`。 - * - * `on`还可以用来添加一个特殊事件`all`, 这样所有的事件触发都会响应到。同时此类`callback`中的arguments有一个不同处, - * 就是第一个参数为`type`,记录当前是什么事件在触发。此类`callback`的优先级比脚低,会再正常`callback`执行完后触发。 - * ```javascript - * obj.on( 'all', function( type, arg1, arg2 ) { - * console.log( type, arg1, arg2 ); // => 'testa', 'arg1', 'arg2' - * }); - * ``` - * - * @method on - * @grammar on( name, callback[, context] ) => self - * @param {String} name 事件名,支持多个事件用空格隔开 - * @param {Function} callback 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - * @class Mediator - */ - on: function( name, callback, context ) { - var me = this, - set; - - if ( !callback ) { - return this; - } - - set = this._events || (this._events = []); - - eachEvent( name, callback, function( name, callback ) { - var handler = { e: name }; - - handler.cb = callback; - handler.ctx = context; - handler.ctx2 = context || me; - handler.id = set.length; - - set.push( handler ); - }); - - return this; - }, - - /** - * 绑定事件,且当handler执行完后,自动解除绑定。 - * @method once - * @grammar once( name, callback[, context] ) => self - * @param {String} name 事件名 - * @param {Function} callback 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - */ - once: function( name, callback, context ) { - var me = this; - - if ( !callback ) { - return me; - } - - eachEvent( name, callback, function( name, callback ) { - var once = function() { - me.off( name, once ); - return callback.apply( context || me, arguments ); - }; - - once._cb = callback; - me.on( name, once, context ); - }); - - return me; - }, - - /** - * 解除事件绑定 - * @method off - * @grammar off( [name[, callback[, context] ] ] ) => self - * @param {String} [name] 事件名 - * @param {Function} [callback] 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - */ - off: function( name, cb, ctx ) { - var events = this._events; - - if ( !events ) { - return this; - } - - if ( !name && !cb && !ctx ) { - this._events = []; - return this; - } - - eachEvent( name, cb, function( name, cb ) { - $.each( findHandlers( events, name, cb, ctx ), function() { - delete events[ this.id ]; - }); - }); - - return this; - }, - - /** - * 触发事件 - * @method trigger - * @grammar trigger( name[, args...] ) => self - * @param {String} type 事件名 - * @param {*} [...] 任意参数 - * @return {Boolean} 如果handler中return false了,则返回false, 否则返回true - */ - trigger: function( type ) { - var args, events, allEvents; - - if ( !this._events || !type ) { - return this; - } - - args = slice.call( arguments, 1 ); - events = findHandlers( this._events, type ); - allEvents = findHandlers( this._events, 'all' ); - - return triggerHanders( events, args ) && - triggerHanders( allEvents, arguments ); - } - }; - - /** - * 中介者,它本身是个单例,但可以通过[installTo](#WebUploader:Mediator:installTo)方法,使任何对象具备事件行为。 - * 主要目的是负责模块与模块之间的合作,降低耦合度。 - * - * @class Mediator - */ - return $.extend({ - - /** - * 可以通过这个接口,使任何对象具备事件功能。 - * @method installTo - * @param {Object} obj 需要具备事件行为的对象。 - * @return {Object} 返回obj. - */ - installTo: function( obj ) { - return $.extend( obj, protos ); - } - - }, protos ); - }); - /** - * @fileOverview Uploader上传类 - */ - define('uploader',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$; - - /** - * 上传入口类。 - * @class Uploader - * @constructor - * @grammar new Uploader( opts ) => Uploader - * @example - * var uploader = WebUploader.Uploader({ - * swf: 'path_of_swf/Uploader.swf', - * - * // 开起分片上传。 - * chunked: true - * }); - */ - function Uploader( opts ) { - this.options = $.extend( true, {}, Uploader.options, opts ); - this._init( this.options ); - } - - // default Options - // widgets中有相应扩展 - Uploader.options = {}; - Mediator.installTo( Uploader.prototype ); - - // 批量添加纯命令式方法。 - $.each({ - upload: 'start-upload', - stop: 'stop-upload', - getFile: 'get-file', - getFiles: 'get-files', - addFile: 'add-file', - addFiles: 'add-file', - sort: 'sort-files', - removeFile: 'remove-file', - cancelFile: 'cancel-file', - skipFile: 'skip-file', - retry: 'retry', - isInProgress: 'is-in-progress', - makeThumb: 'make-thumb', - md5File: 'md5-file', - getDimension: 'get-dimension', - addButton: 'add-btn', - predictRuntimeType: 'predict-runtime-type', - refresh: 'refresh', - disable: 'disable', - enable: 'enable', - reset: 'reset' - }, function( fn, command ) { - Uploader.prototype[ fn ] = function() { - return this.request( command, arguments ); - }; - }); - - $.extend( Uploader.prototype, { - state: 'pending', - - _init: function( opts ) { - var me = this; - - me.request( 'init', opts, function() { - me.state = 'ready'; - me.trigger('ready'); - }); - }, - - /** - * 获取或者设置Uploader配置项。 - * @method option - * @grammar option( key ) => * - * @grammar option( key, val ) => self - * @example - * - * // 初始状态图片上传前不会压缩 - * var uploader = new WebUploader.Uploader({ - * compress: null; - * }); - * - * // 修改后图片上传前,尝试将图片压缩到1600 * 1600 - * uploader.option( 'compress', { - * width: 1600, - * height: 1600 - * }); - */ - option: function( key, val ) { - var opts = this.options; - - // setter - if ( arguments.length > 1 ) { - - if ( $.isPlainObject( val ) && - $.isPlainObject( opts[ key ] ) ) { - $.extend( opts[ key ], val ); - } else { - opts[ key ] = val; - } - - } else { // getter - return key ? opts[ key ] : opts; - } - }, - - /** - * 获取文件统计信息。返回一个包含一下信息的对象。 - * * `successNum` 上传成功的文件数 - * * `progressNum` 上传中的文件数 - * * `cancelNum` 被删除的文件数 - * * `invalidNum` 无效的文件数 - * * `uploadFailNum` 上传失败的文件数 - * * `queueNum` 还在队列中的文件数 - * * `interruptNum` 被暂停的文件数 - * @method getStats - * @grammar getStats() => Object - */ - getStats: function() { - // return this._mgr.getStats.apply( this._mgr, arguments ); - var stats = this.request('get-stats'); - - return stats ? { - successNum: stats.numOfSuccess, - progressNum: stats.numOfProgress, - - // who care? - // queueFailNum: 0, - cancelNum: stats.numOfCancel, - invalidNum: stats.numOfInvalid, - uploadFailNum: stats.numOfUploadFailed, - queueNum: stats.numOfQueue, - interruptNum: stats.numofInterrupt - } : {}; - }, - - // 需要重写此方法来来支持opts.onEvent和instance.onEvent的处理器 - trigger: function( type/*, args...*/ ) { - var args = [].slice.call( arguments, 1 ), - opts = this.options, - name = 'on' + type.substring( 0, 1 ).toUpperCase() + - type.substring( 1 ); - - if ( - // 调用通过on方法注册的handler. - Mediator.trigger.apply( this, arguments ) === false || - - // 调用opts.onEvent - $.isFunction( opts[ name ] ) && - opts[ name ].apply( this, args ) === false || - - // 调用this.onEvent - $.isFunction( this[ name ] ) && - this[ name ].apply( this, args ) === false || - - // 广播所有uploader的事件。 - Mediator.trigger.apply( Mediator, - [ this, type ].concat( args ) ) === false ) { - - return false; - } - - return true; - }, - - /** - * 销毁 webuploader 实例 - * @method destroy - * @grammar destroy() => undefined - */ - destroy: function() { - this.request( 'destroy', arguments ); - this.off(); - }, - - // widgets/widget.js将补充此方法的详细文档。 - request: Base.noop - }); - - /** - * 创建Uploader实例,等同于new Uploader( opts ); - * @method create - * @class Base - * @static - * @grammar Base.create( opts ) => Uploader - */ - Base.create = Uploader.create = function( opts ) { - return new Uploader( opts ); - }; - - // 暴露Uploader,可以通过它来扩展业务逻辑。 - Base.Uploader = Uploader; - - return Uploader; - }); - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/runtime',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$, - factories = {}, - - // 获取对象的第一个key - getFirstKey = function( obj ) { - for ( var key in obj ) { - if ( obj.hasOwnProperty( key ) ) { - return key; - } - } - return null; - }; - - // 接口类。 - function Runtime( options ) { - this.options = $.extend({ - container: document.body - }, options ); - this.uid = Base.guid('rt_'); - } - - $.extend( Runtime.prototype, { - - getContainer: function() { - var opts = this.options, - parent, container; - - if ( this._container ) { - return this._container; - } - - parent = $( opts.container || document.body ); - container = $( document.createElement('div') ); - - container.attr( 'id', 'rt_' + this.uid ); - container.css({ - position: 'absolute', - top: '0px', - left: '0px', - width: '1px', - height: '1px', - overflow: 'hidden' - }); - - parent.append( container ); - parent.addClass('webuploader-container'); - this._container = container; - this._parent = parent; - return container; - }, - - init: Base.noop, - exec: Base.noop, - - destroy: function() { - this._container && this._container.remove(); - this._parent && this._parent.removeClass('webuploader-container'); - this.off(); - } - }); - - Runtime.orders = 'html5,flash'; - - - /** - * 添加Runtime实现。 - * @param {String} type 类型 - * @param {Runtime} factory 具体Runtime实现。 - */ - Runtime.addRuntime = function( type, factory ) { - factories[ type ] = factory; - }; - - Runtime.hasRuntime = function( type ) { - return !!(type ? factories[ type ] : getFirstKey( factories )); - }; - - Runtime.create = function( opts, orders ) { - var type, runtime; - - orders = orders || Runtime.orders; - $.each( orders.split( /\s*,\s*/g ), function() { - if ( factories[ this ] ) { - type = this; - return false; - } - }); - - type = type || getFirstKey( factories ); - - if ( !type ) { - throw new Error('Runtime Error'); - } - - runtime = new factories[ type ]( opts ); - return runtime; - }; - - Mediator.installTo( Runtime.prototype ); - return Runtime; - }); - - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/client',[ - 'base', - 'mediator', - 'runtime/runtime' - ], function( Base, Mediator, Runtime ) { - - var cache; - - cache = (function() { - var obj = {}; - - return { - add: function( runtime ) { - obj[ runtime.uid ] = runtime; - }, - - get: function( ruid, standalone ) { - var i; - - if ( ruid ) { - return obj[ ruid ]; - } - - for ( i in obj ) { - // 有些类型不能重用,比如filepicker. - if ( standalone && obj[ i ].__standalone ) { - continue; - } - - return obj[ i ]; - } - - return null; - }, - - remove: function( runtime ) { - delete obj[ runtime.uid ]; - } - }; - })(); - - function RuntimeClient( component, standalone ) { - var deferred = Base.Deferred(), - runtime; - - this.uid = Base.guid('client_'); - - // 允许runtime没有初始化之前,注册一些方法在初始化后执行。 - this.runtimeReady = function( cb ) { - return deferred.done( cb ); - }; - - this.connectRuntime = function( opts, cb ) { - - // already connected. - if ( runtime ) { - throw new Error('already connected!'); - } - - deferred.done( cb ); - - if ( typeof opts === 'string' && cache.get( opts ) ) { - runtime = cache.get( opts ); - } - - // 像filePicker只能独立存在,不能公用。 - runtime = runtime || cache.get( null, standalone ); - - // 需要创建 - if ( !runtime ) { - runtime = Runtime.create( opts, opts.runtimeOrder ); - runtime.__promise = deferred.promise(); - runtime.once( 'ready', deferred.resolve ); - runtime.init(); - cache.add( runtime ); - runtime.__client = 1; - } else { - // 来自cache - Base.$.extend( runtime.options, opts ); - runtime.__promise.then( deferred.resolve ); - runtime.__client++; - } - - standalone && (runtime.__standalone = standalone); - return runtime; - }; - - this.getRuntime = function() { - return runtime; - }; - - this.disconnectRuntime = function() { - if ( !runtime ) { - return; - } - - runtime.__client--; - - if ( runtime.__client <= 0 ) { - cache.remove( runtime ); - delete runtime.__promise; - runtime.destroy(); - } - - runtime = null; - }; - - this.exec = function() { - if ( !runtime ) { - return; - } - - var args = Base.slice( arguments ); - component && args.unshift( component ); - - return runtime.exec.apply( this, args ); - }; - - this.getRuid = function() { - return runtime && runtime.uid; - }; - - this.destroy = (function( destroy ) { - return function() { - destroy && destroy.apply( this, arguments ); - this.trigger('destroy'); - this.off(); - this.exec('destroy'); - this.disconnectRuntime(); - }; - })( this.destroy ); - } - - Mediator.installTo( RuntimeClient.prototype ); - return RuntimeClient; - }); - /** - * @fileOverview 错误信息 - */ - define('lib/dnd',[ - 'base', - 'mediator', - 'runtime/client' - ], function( Base, Mediator, RuntimeClent ) { - - var $ = Base.$; - - function DragAndDrop( opts ) { - opts = this.options = $.extend({}, DragAndDrop.options, opts ); - - opts.container = $( opts.container ); - - if ( !opts.container.length ) { - return; - } - - RuntimeClent.call( this, 'DragAndDrop' ); - } - - DragAndDrop.options = { - accept: null, - disableGlobalDnd: false - }; - - Base.inherits( RuntimeClent, { - constructor: DragAndDrop, - - init: function() { - var me = this; - - me.connectRuntime( me.options, function() { - me.exec('init'); - me.trigger('ready'); - }); - } - }); - - Mediator.installTo( DragAndDrop.prototype ); - - return DragAndDrop; - }); - /** - * @fileOverview 组件基类。 - */ - define('widgets/widget',[ - 'base', - 'uploader' - ], function( Base, Uploader ) { - - var $ = Base.$, - _init = Uploader.prototype._init, - _destroy = Uploader.prototype.destroy, - IGNORE = {}, - widgetClass = []; - - function isArrayLike( obj ) { - if ( !obj ) { - return false; - } - - var length = obj.length, - type = $.type( obj ); - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === 'array' || type !== 'function' && type !== 'string' && - (length === 0 || typeof length === 'number' && length > 0 && - (length - 1) in obj); - } - - function Widget( uploader ) { - this.owner = uploader; - this.options = uploader.options; - } - - $.extend( Widget.prototype, { - - init: Base.noop, - - // 类Backbone的事件监听声明,监听uploader实例上的事件 - // widget直接无法监听事件,事件只能通过uploader来传递 - invoke: function( apiName, args ) { - - /* - { - 'make-thumb': 'makeThumb' - } - */ - var map = this.responseMap; - - // 如果无API响应声明则忽略 - if ( !map || !(apiName in map) || !(map[ apiName ] in this) || - !$.isFunction( this[ map[ apiName ] ] ) ) { - - return IGNORE; - } - - return this[ map[ apiName ] ].apply( this, args ); - - }, - - /** - * 发送命令。当传入`callback`或者`handler`中返回`promise`时。返回一个当所有`handler`中的promise都完成后完成的新`promise`。 - * @method request - * @grammar request( command, args ) => * | Promise - * @grammar request( command, args, callback ) => Promise - * @for Uploader - */ - request: function() { - return this.owner.request.apply( this.owner, arguments ); - } - }); - - // 扩展Uploader. - $.extend( Uploader.prototype, { - - /** - * @property {String | Array} [disableWidgets=undefined] - * @namespace options - * @for Uploader - * @description 默认所有 Uploader.register 了的 widget 都会被加载,如果禁用某一部分,请通过此 option 指定黑名单。 - */ - - // 覆写_init用来初始化widgets - _init: function() { - var me = this, - widgets = me._widgets = [], - deactives = me.options.disableWidgets || ''; - - $.each( widgetClass, function( _, klass ) { - (!deactives || !~deactives.indexOf( klass._name )) && - widgets.push( new klass( me ) ); - }); - - return _init.apply( me, arguments ); - }, - - request: function( apiName, args, callback ) { - var i = 0, - widgets = this._widgets, - len = widgets && widgets.length, - rlts = [], - dfds = [], - widget, rlt, promise, key; - - args = isArrayLike( args ) ? args : [ args ]; - - for ( ; i < len; i++ ) { - widget = widgets[ i ]; - rlt = widget.invoke( apiName, args ); - - if ( rlt !== IGNORE ) { - - // Deferred对象 - if ( Base.isPromise( rlt ) ) { - dfds.push( rlt ); - } else { - rlts.push( rlt ); - } - } - } - - // 如果有callback,则用异步方式。 - if ( callback || dfds.length ) { - promise = Base.when.apply( Base, dfds ); - key = promise.pipe ? 'pipe' : 'then'; - - // 很重要不能删除。删除了会死循环。 - // 保证执行顺序。让callback总是在下一个 tick 中执行。 - return promise[ key ](function() { - var deferred = Base.Deferred(), - args = arguments; - - if ( args.length === 1 ) { - args = args[ 0 ]; - } - - setTimeout(function() { - deferred.resolve( args ); - }, 1 ); - - return deferred.promise(); - })[ callback ? key : 'done' ]( callback || Base.noop ); - } else { - return rlts[ 0 ]; - } - }, - - destroy: function() { - _destroy.apply( this, arguments ); - this._widgets = null; - } - }); - - /** - * 添加组件 - * @grammar Uploader.register(proto); - * @grammar Uploader.register(map, proto); - * @param {object} responseMap API 名称与函数实现的映射 - * @param {object} proto 组件原型,构造函数通过 constructor 属性定义 - * @method Uploader.register - * @for Uploader - * @example - * Uploader.register({ - * 'make-thumb': 'makeThumb' - * }, { - * init: function( options ) {}, - * makeThumb: function() {} - * }); - * - * Uploader.register({ - * 'make-thumb': function() { - * - * } - * }); - */ - Uploader.register = Widget.register = function( responseMap, widgetProto ) { - var map = { init: 'init', destroy: 'destroy', name: 'anonymous' }, - klass; - - if ( arguments.length === 1 ) { - widgetProto = responseMap; - - // 自动生成 map 表。 - $.each(widgetProto, function(key) { - if ( key[0] === '_' || key === 'name' ) { - key === 'name' && (map.name = widgetProto.name); - return; - } - - map[key.replace(/[A-Z]/g, '-$&').toLowerCase()] = key; - }); - - } else { - map = $.extend( map, responseMap ); - } - - widgetProto.responseMap = map; - klass = Base.inherits( Widget, widgetProto ); - klass._name = map.name; - widgetClass.push( klass ); - - return klass; - }; - - /** - * 删除插件,只有在注册时指定了名字的才能被删除。 - * @grammar Uploader.unRegister(name); - * @param {string} name 组件名字 - * @method Uploader.unRegister - * @for Uploader - * @example - * - * Uploader.register({ - * name: 'custom', - * - * 'make-thumb': function() { - * - * } - * }); - * - * Uploader.unRegister('custom'); - */ - Uploader.unRegister = Widget.unRegister = function( name ) { - if ( !name || name === 'anonymous' ) { - return; - } - - // 删除指定的插件。 - for ( var i = widgetClass.length; i--; ) { - if ( widgetClass[i]._name === name ) { - widgetClass.splice(i, 1) - } - } - }; - - return Widget; - }); - /** - * @fileOverview DragAndDrop Widget。 - */ - define('widgets/filednd',[ - 'base', - 'uploader', - 'lib/dnd', - 'widgets/widget' - ], function( Base, Uploader, Dnd ) { - var $ = Base.$; - - Uploader.options.dnd = ''; - - /** - * @property {Selector} [dnd=undefined] 指定Drag And Drop拖拽的容器,如果不指定,则不启动。 - * @namespace options - * @for Uploader - */ - - /** - * @property {Selector} [disableGlobalDnd=false] 是否禁掉整个页面的拖拽功能,如果不禁用,图片拖进来的时候会默认被浏览器打开。 - * @namespace options - * @for Uploader - */ - - /** - * @event dndAccept - * @param {DataTransferItemList} items DataTransferItem - * @description 阻止此事件可以拒绝某些类型的文件拖入进来。目前只有 chrome 提供这样的 API,且只能通过 mime-type 验证。 - * @for Uploader - */ - return Uploader.register({ - name: 'dnd', - - init: function( opts ) { - - if ( !opts.dnd || - this.request('predict-runtime-type') !== 'html5' ) { - return; - } - - var me = this, - deferred = Base.Deferred(), - options = $.extend({}, { - disableGlobalDnd: opts.disableGlobalDnd, - container: opts.dnd, - accept: opts.accept - }), - dnd; - - this.dnd = dnd = new Dnd( options ); - - dnd.once( 'ready', deferred.resolve ); - dnd.on( 'drop', function( files ) { - me.request( 'add-file', [ files ]); - }); - - // 检测文件是否全部允许添加。 - dnd.on( 'accept', function( items ) { - return me.owner.trigger( 'dndAccept', items ); - }); - - dnd.init(); - - return deferred.promise(); - }, - - destroy: function() { - this.dnd && this.dnd.destroy(); - } - }); - }); - - /** - * @fileOverview 错误信息 - */ - define('lib/filepaste',[ - 'base', - 'mediator', - 'runtime/client' - ], function( Base, Mediator, RuntimeClent ) { - - var $ = Base.$; - - function FilePaste( opts ) { - opts = this.options = $.extend({}, opts ); - opts.container = $( opts.container || document.body ); - RuntimeClent.call( this, 'FilePaste' ); - } - - Base.inherits( RuntimeClent, { - constructor: FilePaste, - - init: function() { - var me = this; - - me.connectRuntime( me.options, function() { - me.exec('init'); - me.trigger('ready'); - }); - } - }); - - Mediator.installTo( FilePaste.prototype ); - - return FilePaste; - }); - /** - * @fileOverview 组件基类。 - */ - define('widgets/filepaste',[ - 'base', - 'uploader', - 'lib/filepaste', - 'widgets/widget' - ], function( Base, Uploader, FilePaste ) { - var $ = Base.$; - - /** - * @property {Selector} [paste=undefined] 指定监听paste事件的容器,如果不指定,不启用此功能。此功能为通过粘贴来添加截屏的图片。建议设置为`document.body`. - * @namespace options - * @for Uploader - */ - return Uploader.register({ - name: 'paste', - - init: function( opts ) { - - if ( !opts.paste || - this.request('predict-runtime-type') !== 'html5' ) { - return; - } - - var me = this, - deferred = Base.Deferred(), - options = $.extend({}, { - container: opts.paste, - accept: opts.accept - }), - paste; - - this.paste = paste = new FilePaste( options ); - - paste.once( 'ready', deferred.resolve ); - paste.on( 'paste', function( files ) { - me.owner.request( 'add-file', [ files ]); - }); - paste.init(); - - return deferred.promise(); - }, - - destroy: function() { - this.paste && this.paste.destroy(); - } - }); - }); - /** - * @fileOverview Blob - */ - define('lib/blob',[ - 'base', - 'runtime/client' - ], function( Base, RuntimeClient ) { - - function Blob( ruid, source ) { - var me = this; - - me.source = source; - me.ruid = ruid; - this.size = source.size || 0; - - // 如果没有指定 mimetype, 但是知道文件后缀。 - if ( !source.type && this.ext && - ~'jpg,jpeg,png,gif,bmp'.indexOf( this.ext ) ) { - this.type = 'image/' + (this.ext === 'jpg' ? 'jpeg' : this.ext); - } else { - this.type = source.type || 'application/octet-stream'; - } - - RuntimeClient.call( me, 'Blob' ); - this.uid = source.uid || this.uid; - - if ( ruid ) { - me.connectRuntime( ruid ); - } - } - - Base.inherits( RuntimeClient, { - constructor: Blob, - - slice: function( start, end ) { - return this.exec( 'slice', start, end ); - }, - - getSource: function() { - return this.source; - } - }); - - return Blob; - }); - /** - * 为了统一化Flash的File和HTML5的File而存在。 - * 以至于要调用Flash里面的File,也可以像调用HTML5版本的File一下。 - * @fileOverview File - */ - define('lib/file',[ - 'base', - 'lib/blob' - ], function( Base, Blob ) { - - var uid = 1, - rExt = /\.([^.]+)$/; - - function File( ruid, file ) { - var ext; - - this.name = file.name || ('untitled' + uid++); - ext = rExt.exec( file.name ) ? RegExp.$1.toLowerCase() : ''; - - // todo 支持其他类型文件的转换。 - // 如果有 mimetype, 但是文件名里面没有找出后缀规律 - if ( !ext && file.type ) { - ext = /\/(jpg|jpeg|png|gif|bmp)$/i.exec( file.type ) ? - RegExp.$1.toLowerCase() : ''; - this.name += '.' + ext; - } - - this.ext = ext; - this.lastModifiedDate = file.lastModifiedDate || - (new Date()).toLocaleString(); - - Blob.apply( this, arguments ); - } - - return Base.inherits( Blob, File ); - }); - - /** - * @fileOverview 错误信息 - */ - define('lib/filepicker',[ - 'base', - 'runtime/client', - 'lib/file' - ], function( Base, RuntimeClent, File ) { - - var $ = Base.$; - - function FilePicker( opts ) { - opts = this.options = $.extend({}, FilePicker.options, opts ); - - opts.container = $( opts.id ); - - if ( !opts.container.length ) { - throw new Error('按钮指定错误'); - } - - opts.innerHTML = opts.innerHTML || opts.label || - opts.container.html() || ''; - - opts.button = $( opts.button || document.createElement('div') ); - opts.button.html( opts.innerHTML ); - opts.container.html( opts.button ); - - RuntimeClent.call( this, 'FilePicker', true ); - } - - FilePicker.options = { - button: null, - container: null, - label: null, - innerHTML: null, - multiple: true, - accept: null, - name: 'file' - }; - - Base.inherits( RuntimeClent, { - constructor: FilePicker, - - init: function() { - var me = this, - opts = me.options, - button = opts.button; - - button.addClass('webuploader-pick'); - - me.on( 'all', function( type ) { - var files; - - switch ( type ) { - case 'mouseenter': - button.addClass('webuploader-pick-hover'); - break; - - case 'mouseleave': - button.removeClass('webuploader-pick-hover'); - break; - - case 'change': - files = me.exec('getFiles'); - me.trigger( 'select', $.map( files, function( file ) { - file = new File( me.getRuid(), file ); - - // 记录来源。 - file._refer = opts.container; - return file; - }), opts.container ); - break; - } - }); - - me.connectRuntime( opts, function() { - me.refresh(); - me.exec( 'init', opts ); - me.trigger('ready'); - }); - - this._resizeHandler = Base.bindFn( this.refresh, this ); - $( window ).on( 'resize', this._resizeHandler ); - }, - - refresh: function() { - var shimContainer = this.getRuntime().getContainer(), - button = this.options.button, - width = button.outerWidth ? - button.outerWidth() : button.width(), - - height = button.outerHeight ? - button.outerHeight() : button.height(), - - pos = button.offset(); - - width && height && shimContainer.css({ - bottom: 'auto', - right: 'auto', - width: width + 'px', - height: height + 'px' - }).offset( pos ); - }, - - enable: function() { - var btn = this.options.button; - - btn.removeClass('webuploader-pick-disable'); - this.refresh(); - }, - - disable: function() { - var btn = this.options.button; - - this.getRuntime().getContainer().css({ - top: '-99999px' - }); - - btn.addClass('webuploader-pick-disable'); - }, - - destroy: function() { - var btn = this.options.button; - $( window ).off( 'resize', this._resizeHandler ); - btn.removeClass('webuploader-pick-disable webuploader-pick-hover ' + - 'webuploader-pick'); - } - }); - - return FilePicker; - }); - - /** - * @fileOverview 文件选择相关 - */ - define('widgets/filepicker',[ - 'base', - 'uploader', - 'lib/filepicker', - 'widgets/widget' - ], function( Base, Uploader, FilePicker ) { - var $ = Base.$; - - $.extend( Uploader.options, { - - /** - * @property {Selector | Object} [pick=undefined] - * @namespace options - * @for Uploader - * @description 指定选择文件的按钮容器,不指定则不创建按钮。 - * - * * `id` {Seletor|dom} 指定选择文件的按钮容器,不指定则不创建按钮。**注意** 这里虽然写的是 id, 但是不是只支持 id, 还支持 class, 或者 dom 节点。 - * * `label` {String} 请采用 `innerHTML` 代替 - * * `innerHTML` {String} 指定按钮文字。不指定时优先从指定的容器中看是否自带文字。 - * * `multiple` {Boolean} 是否开起同时选择多个文件能力。 - */ - pick: null, - - /** - * @property {Arroy} [accept=null] - * @namespace options - * @for Uploader - * @description 指定接受哪些类型的文件。 由于目前还有ext转mimeType表,所以这里需要分开指定。 - * - * * `title` {String} 文字描述 - * * `extensions` {String} 允许的文件后缀,不带点,多个用逗号分割。 - * * `mimeTypes` {String} 多个用逗号分割。 - * - * 如: - * - * ``` - * { - * title: 'Images', - * extensions: 'gif,jpg,jpeg,bmp,png', - * mimeTypes: 'image/*' - * } - * ``` - */ - accept: null/*{ - title: 'Images', - extensions: 'gif,jpg,jpeg,bmp,png', - mimeTypes: 'image/*' - }*/ - }); - - return Uploader.register({ - name: 'picker', - - init: function( opts ) { - this.pickers = []; - return opts.pick && this.addBtn( opts.pick ); - }, - - refresh: function() { - $.each( this.pickers, function() { - this.refresh(); - }); - }, - - /** - * @method addButton - * @for Uploader - * @grammar addButton( pick ) => Promise - * @description - * 添加文件选择按钮,如果一个按钮不够,需要调用此方法来添加。参数跟[options.pick](#WebUploader:Uploader:options)一致。 - * @example - * uploader.addButton({ - * id: '#btnContainer', - * innerHTML: '选择文件' - * }); - */ - addBtn: function( pick ) { - var me = this, - opts = me.options, - accept = opts.accept, - promises = []; - - if ( !pick ) { - return; - } - - $.isPlainObject( pick ) || (pick = { - id: pick - }); - - $( pick.id ).each(function() { - var options, picker, deferred; - - deferred = Base.Deferred(); - - options = $.extend({}, pick, { - accept: $.isPlainObject( accept ) ? [ accept ] : accept, - swf: opts.swf, - runtimeOrder: opts.runtimeOrder, - id: this - }); - - picker = new FilePicker( options ); - - picker.once( 'ready', deferred.resolve ); - picker.on( 'select', function( files ) { - me.owner.request( 'add-file', [ files ]); - }); - picker.init(); - - me.pickers.push( picker ); - - promises.push( deferred.promise() ); - }); - - return Base.when.apply( Base, promises ); - }, - - disable: function() { - $.each( this.pickers, function() { - this.disable(); - }); - }, - - enable: function() { - $.each( this.pickers, function() { - this.enable(); - }); - }, - - destroy: function() { - $.each( this.pickers, function() { - this.destroy(); - }); - this.pickers = null; - } - }); - }); - /** - * @fileOverview Image - */ - define('lib/image',[ - 'base', - 'runtime/client', - 'lib/blob' - ], function( Base, RuntimeClient, Blob ) { - var $ = Base.$; - - // 构造器。 - function Image( opts ) { - this.options = $.extend({}, Image.options, opts ); - RuntimeClient.call( this, 'Image' ); - - this.on( 'load', function() { - this._info = this.exec('info'); - this._meta = this.exec('meta'); - }); - } - - // 默认选项。 - Image.options = { - - // 默认的图片处理质量 - quality: 90, - - // 是否裁剪 - crop: false, - - // 是否保留头部信息 - preserveHeaders: false, - - // 是否允许放大。 - allowMagnify: false - }; - - // 继承RuntimeClient. - Base.inherits( RuntimeClient, { - constructor: Image, - - info: function( val ) { - - // setter - if ( val ) { - this._info = val; - return this; - } - - // getter - return this._info; - }, - - meta: function( val ) { - - // setter - if ( val ) { - this._meta = val; - return this; - } - - // getter - return this._meta; - }, - - loadFromBlob: function( blob ) { - var me = this, - ruid = blob.getRuid(); - - this.connectRuntime( ruid, function() { - me.exec( 'init', me.options ); - me.exec( 'loadFromBlob', blob ); - }); - }, - - resize: function() { - var args = Base.slice( arguments ); - return this.exec.apply( this, [ 'resize' ].concat( args ) ); - }, - - crop: function() { - var args = Base.slice( arguments ); - return this.exec.apply( this, [ 'crop' ].concat( args ) ); - }, - - getAsDataUrl: function( type ) { - return this.exec( 'getAsDataUrl', type ); - }, - - getAsBlob: function( type ) { - var blob = this.exec( 'getAsBlob', type ); - - return new Blob( this.getRuid(), blob ); - } - }); - - return Image; - }); - /** - * @fileOverview 图片操作, 负责预览图片和上传前压缩图片 - */ - define('widgets/image',[ - 'base', - 'uploader', - 'lib/image', - 'widgets/widget' - ], function( Base, Uploader, Image ) { - - var $ = Base.$, - throttle; - - // 根据要处理的文件大小来节流,一次不能处理太多,会卡。 - throttle = (function( max ) { - var occupied = 0, - waiting = [], - tick = function() { - var item; - - while ( waiting.length && occupied < max ) { - item = waiting.shift(); - occupied += item[ 0 ]; - item[ 1 ](); - } - }; - - return function( emiter, size, cb ) { - waiting.push([ size, cb ]); - emiter.once( 'destroy', function() { - occupied -= size; - setTimeout( tick, 1 ); - }); - setTimeout( tick, 1 ); - }; - })( 5 * 1024 * 1024 ); - - $.extend( Uploader.options, { - - /** - * @property {Object} [thumb] - * @namespace options - * @for Uploader - * @description 配置生成缩略图的选项。 - * - * 默认为: - * - * ```javascript - * { - * width: 110, - * height: 110, - * - * // 图片质量,只有type为`image/jpeg`的时候才有效。 - * quality: 70, - * - * // 是否允许放大,如果想要生成小图的时候不失真,此选项应该设置为false. - * allowMagnify: true, - * - * // 是否允许裁剪。 - * crop: true, - * - * // 为空的话则保留原有图片格式。 - * // 否则强制转换成指定的类型。 - * type: 'image/jpeg' - * } - * ``` - */ - thumb: { - width: 110, - height: 110, - quality: 70, - allowMagnify: true, - crop: true, - preserveHeaders: false, - - // 为空的话则保留原有图片格式。 - // 否则强制转换成指定的类型。 - // IE 8下面 base64 大小不能超过 32K 否则预览失败,而非 jpeg 编码的图片很可 - // 能会超过 32k, 所以这里设置成预览的时候都是 image/jpeg - type: 'image/jpeg' - }, - - /** - * @property {Object} [compress] - * @namespace options - * @for Uploader - * @description 配置压缩的图片的选项。如果此选项为`false`, 则图片在上传前不进行压缩。 - * - * 默认为: - * - * ```javascript - * { - * width: 1600, - * height: 1600, - * - * // 图片质量,只有type为`image/jpeg`的时候才有效。 - * quality: 90, - * - * // 是否允许放大,如果想要生成小图的时候不失真,此选项应该设置为false. - * allowMagnify: false, - * - * // 是否允许裁剪。 - * crop: false, - * - * // 是否保留头部meta信息。 - * preserveHeaders: true, - * - * // 如果发现压缩后文件大小比原来还大,则使用原来图片 - * // 此属性可能会影响图片自动纠正功能 - * noCompressIfLarger: false, - * - * // 单位字节,如果图片大小小于此值,不会采用压缩。 - * compressSize: 0 - * } - * ``` - */ - compress: { - width: 1600, - height: 1600, - quality: 90, - allowMagnify: false, - crop: false, - preserveHeaders: true - } - }); - - return Uploader.register({ - - name: 'image', - - - /** - * 生成缩略图,此过程为异步,所以需要传入`callback`。 - * 通常情况在图片加入队里后调用此方法来生成预览图以增强交互效果。 - * - * 当 width 或者 height 的值介于 0 - 1 时,被当成百分比使用。 - * - * `callback`中可以接收到两个参数。 - * * 第一个为error,如果生成缩略图有错误,此error将为真。 - * * 第二个为ret, 缩略图的Data URL值。 - * - * **注意** - * Date URL在IE6/7中不支持,所以不用调用此方法了,直接显示一张暂不支持预览图片好了。 - * 也可以借助服务端,将 base64 数据传给服务端,生成一个临时文件供预览。 - * - * @method makeThumb - * @grammar makeThumb( file, callback ) => undefined - * @grammar makeThumb( file, callback, width, height ) => undefined - * @for Uploader - * @example - * - * uploader.on( 'fileQueued', function( file ) { - * var $li = ...; - * - * uploader.makeThumb( file, function( error, ret ) { - * if ( error ) { - * $li.text('预览错误'); - * } else { - * $li.append(''); - * } - * }); - * - * }); - */ - makeThumb: function( file, cb, width, height ) { - var opts, image; - - file = this.request( 'get-file', file ); - - // 只预览图片格式。 - if ( !file.type.match( /^image/ ) ) { - cb( true ); - return; - } - - opts = $.extend({}, this.options.thumb ); - - // 如果传入的是object. - if ( $.isPlainObject( width ) ) { - opts = $.extend( opts, width ); - width = null; - } - - width = width || opts.width; - height = height || opts.height; - - image = new Image( opts ); - - image.once( 'load', function() { - file._info = file._info || image.info(); - file._meta = file._meta || image.meta(); - - // 如果 width 的值介于 0 - 1 - // 说明设置的是百分比。 - if ( width <= 1 && width > 0 ) { - width = file._info.width * width; - } - - // 同样的规则应用于 height - if ( height <= 1 && height > 0 ) { - height = file._info.height * height; - } - - image.resize( width, height ); - }); - - // 当 resize 完后 - image.once( 'complete', function() { - cb( false, image.getAsDataUrl( opts.type ) ); - image.destroy(); - }); - - image.once( 'error', function( reason ) { - cb( reason || true ); - image.destroy(); - }); - - throttle( image, file.source.size, function() { - file._info && image.info( file._info ); - file._meta && image.meta( file._meta ); - image.loadFromBlob( file.source ); - }); - }, - - beforeSendFile: function( file ) { - var opts = this.options.compress || this.options.resize, - compressSize = opts && opts.compressSize || 0, - noCompressIfLarger = opts && opts.noCompressIfLarger || false, - image, deferred; - - file = this.request( 'get-file', file ); - - // 只压缩 jpeg 图片格式。 - // gif 可能会丢失针 - // bmp png 基本上尺寸都不大,且压缩比比较小。 - if ( !opts || !~'image/jpeg,image/jpg'.indexOf( file.type ) || - file.size < compressSize || - file._compressed ) { - return; - } - - opts = $.extend({}, opts ); - deferred = Base.Deferred(); - - image = new Image( opts ); - - deferred.always(function() { - image.destroy(); - image = null; - }); - image.once( 'error', deferred.reject ); - image.once( 'load', function() { - var width = opts.width, - height = opts.height; - - file._info = file._info || image.info(); - file._meta = file._meta || image.meta(); - - // 如果 width 的值介于 0 - 1 - // 说明设置的是百分比。 - if ( width <= 1 && width > 0 ) { - width = file._info.width * width; - } - - // 同样的规则应用于 height - if ( height <= 1 && height > 0 ) { - height = file._info.height * height; - } - - image.resize( width, height ); - }); - - image.once( 'complete', function() { - var blob, size; - - // 移动端 UC / qq 浏览器的无图模式下 - // ctx.getImageData 处理大图的时候会报 Exception - // INDEX_SIZE_ERR: DOM Exception 1 - try { - blob = image.getAsBlob( opts.type ); - - size = file.size; - - // 如果压缩后,比原来还大则不用压缩后的。 - if ( !noCompressIfLarger || blob.size < size ) { - // file.source.destroy && file.source.destroy(); - file.source = blob; - file.size = blob.size; - - file.trigger( 'resize', blob.size, size ); - } - - // 标记,避免重复压缩。 - file._compressed = true; - deferred.resolve(); - } catch ( e ) { - // 出错了直接继续,让其上传原始图片 - deferred.resolve(); - } - }); - - file._info && image.info( file._info ); - file._meta && image.meta( file._meta ); - - image.loadFromBlob( file.source ); - return deferred.promise(); - } - }); - }); - /** - * @fileOverview 文件属性封装 - */ - define('file',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$, - idPrefix = 'WU_FILE_', - idSuffix = 0, - rExt = /\.([^.]+)$/, - statusMap = {}; - - function gid() { - return idPrefix + idSuffix++; - } - - /** - * 文件类 - * @class File - * @constructor 构造函数 - * @grammar new File( source ) => File - * @param {Lib.File} source [lib.File](#Lib.File)实例, 此source对象是带有Runtime信息的。 - */ - function WUFile( source ) { - - /** - * 文件名,包括扩展名(后缀) - * @property name - * @type {string} - */ - this.name = source.name || 'Untitled'; - - /** - * 文件体积(字节) - * @property size - * @type {uint} - * @default 0 - */ - this.size = source.size || 0; - - /** - * 文件MIMETYPE类型,与文件类型的对应关系请参考[http://t.cn/z8ZnFny](http://t.cn/z8ZnFny) - * @property type - * @type {string} - * @default 'application/octet-stream' - */ - this.type = source.type || 'application/octet-stream'; - - /** - * 文件最后修改日期 - * @property lastModifiedDate - * @type {int} - * @default 当前时间戳 - */ - this.lastModifiedDate = source.lastModifiedDate || (new Date() * 1); - - /** - * 文件ID,每个对象具有唯一ID,与文件名无关 - * @property id - * @type {string} - */ - this.id = gid(); - - /** - * 文件扩展名,通过文件名获取,例如test.png的扩展名为png - * @property ext - * @type {string} - */ - this.ext = rExt.exec( this.name ) ? RegExp.$1 : ''; - - - /** - * 状态文字说明。在不同的status语境下有不同的用途。 - * @property statusText - * @type {string} - */ - this.statusText = ''; - - // 存储文件状态,防止通过属性直接修改 - statusMap[ this.id ] = WUFile.Status.INITED; - - this.source = source; - this.loaded = 0; - - this.on( 'error', function( msg ) { - this.setStatus( WUFile.Status.ERROR, msg ); - }); - } - - $.extend( WUFile.prototype, { - - /** - * 设置状态,状态变化时会触发`change`事件。 - * @method setStatus - * @grammar setStatus( status[, statusText] ); - * @param {File.Status|String} status [文件状态值](#WebUploader:File:File.Status) - * @param {String} [statusText=''] 状态说明,常在error时使用,用http, abort,server等来标记是由于什么原因导致文件错误。 - */ - setStatus: function( status, text ) { - - var prevStatus = statusMap[ this.id ]; - - typeof text !== 'undefined' && (this.statusText = text); - - if ( status !== prevStatus ) { - statusMap[ this.id ] = status; - /** - * 文件状态变化 - * @event statuschange - */ - this.trigger( 'statuschange', status, prevStatus ); - } - - }, - - /** - * 获取文件状态 - * @return {File.Status} - * @example - 文件状态具体包括以下几种类型: - { - // 初始化 - INITED: 0, - // 已入队列 - QUEUED: 1, - // 正在上传 - PROGRESS: 2, - // 上传出错 - ERROR: 3, - // 上传成功 - COMPLETE: 4, - // 上传取消 - CANCELLED: 5 - } - */ - getStatus: function() { - return statusMap[ this.id ]; - }, - - /** - * 获取文件原始信息。 - * @return {*} - */ - getSource: function() { - return this.source; - }, - - destroy: function() { - this.off(); - delete statusMap[ this.id ]; - } - }); - - Mediator.installTo( WUFile.prototype ); - - /** - * 文件状态值,具体包括以下几种类型: - * * `inited` 初始状态 - * * `queued` 已经进入队列, 等待上传 - * * `progress` 上传中 - * * `complete` 上传完成。 - * * `error` 上传出错,可重试 - * * `interrupt` 上传中断,可续传。 - * * `invalid` 文件不合格,不能重试上传。会自动从队列中移除。 - * * `cancelled` 文件被移除。 - * @property {Object} Status - * @namespace File - * @class File - * @static - */ - WUFile.Status = { - INITED: 'inited', // 初始状态 - QUEUED: 'queued', // 已经进入队列, 等待上传 - PROGRESS: 'progress', // 上传中 - ERROR: 'error', // 上传出错,可重试 - COMPLETE: 'complete', // 上传完成。 - CANCELLED: 'cancelled', // 上传取消。 - INTERRUPT: 'interrupt', // 上传中断,可续传。 - INVALID: 'invalid' // 文件不合格,不能重试上传。 - }; - - return WUFile; - }); - - /** - * @fileOverview 文件队列 - */ - define('queue',[ - 'base', - 'mediator', - 'file' - ], function( Base, Mediator, WUFile ) { - - var $ = Base.$, - STATUS = WUFile.Status; - - /** - * 文件队列, 用来存储各个状态中的文件。 - * @class Queue - * @extends Mediator - */ - function Queue() { - - /** - * 统计文件数。 - * * `numOfQueue` 队列中的文件数。 - * * `numOfSuccess` 上传成功的文件数 - * * `numOfCancel` 被取消的文件数 - * * `numOfProgress` 正在上传中的文件数 - * * `numOfUploadFailed` 上传错误的文件数。 - * * `numOfInvalid` 无效的文件数。 - * * `numofDeleted` 被移除的文件数。 - * @property {Object} stats - */ - this.stats = { - numOfQueue: 0, - numOfSuccess: 0, - numOfCancel: 0, - numOfProgress: 0, - numOfUploadFailed: 0, - numOfInvalid: 0, - numofDeleted: 0, - numofInterrupt: 0 - }; - - // 上传队列,仅包括等待上传的文件 - this._queue = []; - - // 存储所有文件 - this._map = {}; - } - - $.extend( Queue.prototype, { - - /** - * 将新文件加入对队列尾部 - * - * @method append - * @param {File} file 文件对象 - */ - append: function( file ) { - this._queue.push( file ); - this._fileAdded( file ); - return this; - }, - - /** - * 将新文件加入对队列头部 - * - * @method prepend - * @param {File} file 文件对象 - */ - prepend: function( file ) { - this._queue.unshift( file ); - this._fileAdded( file ); - return this; - }, - - /** - * 获取文件对象 - * - * @method getFile - * @param {String} fileId 文件ID - * @return {File} - */ - getFile: function( fileId ) { - if ( typeof fileId !== 'string' ) { - return fileId; - } - return this._map[ fileId ]; - }, - - /** - * 从队列中取出一个指定状态的文件。 - * @grammar fetch( status ) => File - * @method fetch - * @param {String} status [文件状态值](#WebUploader:File:File.Status) - * @return {File} [File](#WebUploader:File) - */ - fetch: function( status ) { - var len = this._queue.length, - i, file; - - status = status || STATUS.QUEUED; - - for ( i = 0; i < len; i++ ) { - file = this._queue[ i ]; - - if ( status === file.getStatus() ) { - return file; - } - } - - return null; - }, - - /** - * 对队列进行排序,能够控制文件上传顺序。 - * @grammar sort( fn ) => undefined - * @method sort - * @param {Function} fn 排序方法 - */ - sort: function( fn ) { - if ( typeof fn === 'function' ) { - this._queue.sort( fn ); - } - }, - - /** - * 获取指定类型的文件列表, 列表中每一个成员为[File](#WebUploader:File)对象。 - * @grammar getFiles( [status1[, status2 ...]] ) => Array - * @method getFiles - * @param {String} [status] [文件状态值](#WebUploader:File:File.Status) - */ - getFiles: function() { - var sts = [].slice.call( arguments, 0 ), - ret = [], - i = 0, - len = this._queue.length, - file; - - for ( ; i < len; i++ ) { - file = this._queue[ i ]; - - if ( sts.length && !~$.inArray( file.getStatus(), sts ) ) { - continue; - } - - ret.push( file ); - } - - return ret; - }, - - /** - * 在队列中删除文件。 - * @grammar removeFile( file ) => Array - * @method removeFile - * @param {File} 文件对象。 - */ - removeFile: function( file ) { - var me = this, - existing = this._map[ file.id ]; - - if ( existing ) { - delete this._map[ file.id ]; - file.destroy(); - this.stats.numofDeleted++; - } - }, - - _fileAdded: function( file ) { - var me = this, - existing = this._map[ file.id ]; - - if ( !existing ) { - this._map[ file.id ] = file; - - file.on( 'statuschange', function( cur, pre ) { - me._onFileStatusChange( cur, pre ); - }); - } - }, - - _onFileStatusChange: function( curStatus, preStatus ) { - var stats = this.stats; - - switch ( preStatus ) { - case STATUS.PROGRESS: - stats.numOfProgress--; - break; - - case STATUS.QUEUED: - stats.numOfQueue --; - break; - - case STATUS.ERROR: - stats.numOfUploadFailed--; - break; - - case STATUS.INVALID: - stats.numOfInvalid--; - break; - - case STATUS.INTERRUPT: - stats.numofInterrupt--; - break; - } - - switch ( curStatus ) { - case STATUS.QUEUED: - stats.numOfQueue++; - break; - - case STATUS.PROGRESS: - stats.numOfProgress++; - break; - - case STATUS.ERROR: - stats.numOfUploadFailed++; - break; - - case STATUS.COMPLETE: - stats.numOfSuccess++; - break; - - case STATUS.CANCELLED: - stats.numOfCancel++; - break; - - - case STATUS.INVALID: - stats.numOfInvalid++; - break; - - case STATUS.INTERRUPT: - stats.numofInterrupt++; - break; - } - } - - }); - - Mediator.installTo( Queue.prototype ); - - return Queue; - }); - /** - * @fileOverview 队列 - */ - define('widgets/queue',[ - 'base', - 'uploader', - 'queue', - 'file', - 'lib/file', - 'runtime/client', - 'widgets/widget' - ], function( Base, Uploader, Queue, WUFile, File, RuntimeClient ) { - - var $ = Base.$, - rExt = /\.\w+$/, - Status = WUFile.Status; - - return Uploader.register({ - name: 'queue', - - init: function( opts ) { - var me = this, - deferred, len, i, item, arr, accept, runtime; - - if ( $.isPlainObject( opts.accept ) ) { - opts.accept = [ opts.accept ]; - } - - // accept中的中生成匹配正则。 - if ( opts.accept ) { - arr = []; - - for ( i = 0, len = opts.accept.length; i < len; i++ ) { - item = opts.accept[ i ].extensions; - item && arr.push( item ); - } - - if ( arr.length ) { - accept = '\\.' + arr.join(',') - .replace( /,/g, '$|\\.' ) - .replace( /\*/g, '.*' ) + '$'; - } - - me.accept = new RegExp( accept, 'i' ); - } - - me.queue = new Queue(); - me.stats = me.queue.stats; - - // 如果当前不是html5运行时,那就算了。 - // 不执行后续操作 - if ( this.request('predict-runtime-type') !== 'html5' ) { - return; - } - - // 创建一个 html5 运行时的 placeholder - // 以至于外部添加原生 File 对象的时候能正确包裹一下供 webuploader 使用。 - deferred = Base.Deferred(); - this.placeholder = runtime = new RuntimeClient('Placeholder'); - runtime.connectRuntime({ - runtimeOrder: 'html5' - }, function() { - me._ruid = runtime.getRuid(); - deferred.resolve(); - }); - return deferred.promise(); - }, - - - // 为了支持外部直接添加一个原生File对象。 - _wrapFile: function( file ) { - if ( !(file instanceof WUFile) ) { - - if ( !(file instanceof File) ) { - if ( !this._ruid ) { - throw new Error('Can\'t add external files.'); - } - file = new File( this._ruid, file ); - } - - file = new WUFile( file ); - } - - return file; - }, - - // 判断文件是否可以被加入队列 - acceptFile: function( file ) { - var invalid = !file || !file.size || this.accept && - - // 如果名字中有后缀,才做后缀白名单处理。 - rExt.exec( file.name ) && !this.accept.test( file.name ); - - return !invalid; - }, - - - /** - * @event beforeFileQueued - * @param {File} file File对象 - * @description 当文件被加入队列之前触发,此事件的handler返回值为`false`,则此文件不会被添加进入队列。 - * @for Uploader - */ - - /** - * @event fileQueued - * @param {File} file File对象 - * @description 当文件被加入队列以后触发。 - * @for Uploader - */ - - _addFile: function( file ) { - var me = this; - - file = me._wrapFile( file ); - - // 不过类型判断允许不允许,先派送 `beforeFileQueued` - if ( !me.owner.trigger( 'beforeFileQueued', file ) ) { - return; - } - - // 类型不匹配,则派送错误事件,并返回。 - if ( !me.acceptFile( file ) ) { - me.owner.trigger( 'error', 'Q_TYPE_DENIED', file ); - return; - } - - me.queue.append( file ); - me.owner.trigger( 'fileQueued', file ); - return file; - }, - - getFile: function( fileId ) { - return this.queue.getFile( fileId ); - }, - - /** - * @event filesQueued - * @param {File} files 数组,内容为原始File(lib/File)对象。 - * @description 当一批文件添加进队列以后触发。 - * @for Uploader - */ - - /** - * @property {Boolean} [auto=false] - * @namespace options - * @for Uploader - * @description 设置为 true 后,不需要手动调用上传,有文件选择即开始上传。 - * - */ - - /** - * @method addFiles - * @grammar addFiles( file ) => undefined - * @grammar addFiles( [file1, file2 ...] ) => undefined - * @param {Array of File or File} [files] Files 对象 数组 - * @description 添加文件到队列 - * @for Uploader - */ - addFile: function( files ) { - var me = this; - - if ( !files.length ) { - files = [ files ]; - } - - files = $.map( files, function( file ) { - return me._addFile( file ); - }); - - me.owner.trigger( 'filesQueued', files ); - - if ( me.options.auto ) { - setTimeout(function() { - me.request('start-upload'); - }, 20 ); - } - }, - - getStats: function() { - return this.stats; - }, - - /** - * @event fileDequeued - * @param {File} file File对象 - * @description 当文件被移除队列后触发。 - * @for Uploader - */ - - /** - * @method removeFile - * @grammar removeFile( file ) => undefined - * @grammar removeFile( id ) => undefined - * @grammar removeFile( file, true ) => undefined - * @grammar removeFile( id, true ) => undefined - * @param {File|id} file File对象或这File对象的id - * @description 移除某一文件, 默认只会标记文件状态为已取消,如果第二个参数为 `true` 则会从 queue 中移除。 - * @for Uploader - * @example - * - * $li.on('click', '.remove-this', function() { - * uploader.removeFile( file ); - * }) - */ - removeFile: function( file, remove ) { - var me = this; - - file = file.id ? file : me.queue.getFile( file ); - - this.request( 'cancel-file', file ); - - if ( remove ) { - this.queue.removeFile( file ); - } - }, - - /** - * @method getFiles - * @grammar getFiles() => Array - * @grammar getFiles( status1, status2, status... ) => Array - * @description 返回指定状态的文件集合,不传参数将返回所有状态的文件。 - * @for Uploader - * @example - * console.log( uploader.getFiles() ); // => all files - * console.log( uploader.getFiles('error') ) // => all error files. - */ - getFiles: function() { - return this.queue.getFiles.apply( this.queue, arguments ); - }, - - fetchFile: function() { - return this.queue.fetch.apply( this.queue, arguments ); - }, - - /** - * @method retry - * @grammar retry() => undefined - * @grammar retry( file ) => undefined - * @description 重试上传,重试指定文件,或者从出错的文件开始重新上传。 - * @for Uploader - * @example - * function retry() { - * uploader.retry(); - * } - */ - retry: function( file, noForceStart ) { - var me = this, - files, i, len; - - if ( file ) { - file = file.id ? file : me.queue.getFile( file ); - file.setStatus( Status.QUEUED ); - noForceStart || me.request('start-upload'); - return; - } - - files = me.queue.getFiles( Status.ERROR ); - i = 0; - len = files.length; - - for ( ; i < len; i++ ) { - file = files[ i ]; - file.setStatus( Status.QUEUED ); - } - - me.request('start-upload'); - }, - - /** - * @method sort - * @grammar sort( fn ) => undefined - * @description 排序队列中的文件,在上传之前调整可以控制上传顺序。 - * @for Uploader - */ - sortFiles: function() { - return this.queue.sort.apply( this.queue, arguments ); - }, - - /** - * @event reset - * @description 当 uploader 被重置的时候触发。 - * @for Uploader - */ - - /** - * @method reset - * @grammar reset() => undefined - * @description 重置uploader。目前只重置了队列。 - * @for Uploader - * @example - * uploader.reset(); - */ - reset: function() { - this.owner.trigger('reset'); - this.queue = new Queue(); - this.stats = this.queue.stats; - }, - - destroy: function() { - this.reset(); - this.placeholder && this.placeholder.destroy(); - } - }); - - }); - /** - * @fileOverview 添加获取Runtime相关信息的方法。 - */ - define('widgets/runtime',[ - 'uploader', - 'runtime/runtime', - 'widgets/widget' - ], function( Uploader, Runtime ) { - - Uploader.support = function() { - return Runtime.hasRuntime.apply( Runtime, arguments ); - }; - - /** - * @property {Object} [runtimeOrder=html5,flash] - * @namespace options - * @for Uploader - * @description 指定运行时启动顺序。默认会想尝试 html5 是否支持,如果支持则使用 html5, 否则则使用 flash. - * - * 可以将此值设置成 `flash`,来强制使用 flash 运行时。 - */ - - return Uploader.register({ - name: 'runtime', - - init: function() { - if ( !this.predictRuntimeType() ) { - throw Error('Runtime Error'); - } - }, - - /** - * 预测Uploader将采用哪个`Runtime` - * @grammar predictRuntimeType() => String - * @method predictRuntimeType - * @for Uploader - */ - predictRuntimeType: function() { - var orders = this.options.runtimeOrder || Runtime.orders, - type = this.type, - i, len; - - if ( !type ) { - orders = orders.split( /\s*,\s*/g ); - - for ( i = 0, len = orders.length; i < len; i++ ) { - if ( Runtime.hasRuntime( orders[ i ] ) ) { - this.type = type = orders[ i ]; - break; - } - } - } - - return type; - } - }); - }); - /** - * @fileOverview Transport - */ - define('lib/transport',[ - 'base', - 'runtime/client', - 'mediator' - ], function( Base, RuntimeClient, Mediator ) { - - var $ = Base.$; - - function Transport( opts ) { - var me = this; - - opts = me.options = $.extend( true, {}, Transport.options, opts || {} ); - RuntimeClient.call( this, 'Transport' ); - - this._blob = null; - this._formData = opts.formData || {}; - this._headers = opts.headers || {}; - - this.on( 'progress', this._timeout ); - this.on( 'load error', function() { - me.trigger( 'progress', 1 ); - clearTimeout( me._timer ); - }); - } - - Transport.options = { - server: '', - method: 'POST', - - // 跨域时,是否允许携带cookie, 只有html5 runtime才有效 - withCredentials: false, - fileVal: 'file', - timeout: 2 * 60 * 1000, // 2分钟 - formData: {}, - headers: {}, - sendAsBinary: false - }; - - $.extend( Transport.prototype, { - - // 添加Blob, 只能添加一次,最后一次有效。 - appendBlob: function( key, blob, filename ) { - var me = this, - opts = me.options; - - if ( me.getRuid() ) { - me.disconnectRuntime(); - } - - // 连接到blob归属的同一个runtime. - me.connectRuntime( blob.ruid, function() { - me.exec('init'); - }); - - me._blob = blob; - opts.fileVal = key || opts.fileVal; - opts.filename = filename || opts.filename; - }, - - // 添加其他字段 - append: function( key, value ) { - if ( typeof key === 'object' ) { - $.extend( this._formData, key ); - } else { - this._formData[ key ] = value; - } - }, - - setRequestHeader: function( key, value ) { - if ( typeof key === 'object' ) { - $.extend( this._headers, key ); - } else { - this._headers[ key ] = value; - } - }, - - send: function( method ) { - this.exec( 'send', method ); - this._timeout(); - }, - - abort: function() { - clearTimeout( this._timer ); - return this.exec('abort'); - }, - - destroy: function() { - this.trigger('destroy'); - this.off(); - this.exec('destroy'); - this.disconnectRuntime(); - }, - - getResponse: function() { - return this.exec('getResponse'); - }, - - getResponseAsJson: function() { - return this.exec('getResponseAsJson'); - }, - - getStatus: function() { - return this.exec('getStatus'); - }, - - _timeout: function() { - var me = this, - duration = me.options.timeout; - - if ( !duration ) { - return; - } - - clearTimeout( me._timer ); - me._timer = setTimeout(function() { - me.abort(); - me.trigger( 'error', 'timeout' ); - }, duration ); - } - - }); - - // 让Transport具备事件功能。 - Mediator.installTo( Transport.prototype ); - - return Transport; - }); - /** - * @fileOverview 负责文件上传相关。 - */ - define('widgets/upload',[ - 'base', - 'uploader', - 'file', - 'lib/transport', - 'widgets/widget' - ], function( Base, Uploader, WUFile, Transport ) { - - var $ = Base.$, - isPromise = Base.isPromise, - Status = WUFile.Status; - - // 添加默认配置项 - $.extend( Uploader.options, { - - - /** - * @property {Boolean} [prepareNextFile=false] - * @namespace options - * @for Uploader - * @description 是否允许在文件传输时提前把下一个文件准备好。 - * 对于一个文件的准备工作比较耗时,比如图片压缩,md5序列化。 - * 如果能提前在当前文件传输期处理,可以节省总体耗时。 - */ - prepareNextFile: false, - - /** - * @property {Boolean} [chunked=false] - * @namespace options - * @for Uploader - * @description 是否要分片处理大文件上传。 - */ - chunked: false, - - /** - * @property {Boolean} [chunkSize=5242880] - * @namespace options - * @for Uploader - * @description 如果要分片,分多大一片? 默认大小为5M. - */ - chunkSize: 5 * 1024 * 1024, - - /** - * @property {Boolean} [chunkRetry=2] - * @namespace options - * @for Uploader - * @description 如果某个分片由于网络问题出错,允许自动重传多少次? - */ - chunkRetry: 2, - - /** - * @property {Boolean} [threads=3] - * @namespace options - * @for Uploader - * @description 上传并发数。允许同时最大上传进程数。 - */ - threads: 3, - - - /** - * @property {Object} [formData={}] - * @namespace options - * @for Uploader - * @description 文件上传请求的参数表,每次发送都会发送此对象中的参数。 - */ - formData: {} - - /** - * @property {Object} [fileVal='file'] - * @namespace options - * @for Uploader - * @description 设置文件上传域的name。 - */ - - /** - * @property {Object} [method='POST'] - * @namespace options - * @for Uploader - * @description 文件上传方式,`POST`或者`GET`。 - */ - - /** - * @property {Object} [sendAsBinary=false] - * @namespace options - * @for Uploader - * @description 是否已二进制的流的方式发送文件,这样整个上传内容`php://input`都为文件内容, - * 其他参数在$_GET数组中。 - */ - }); - - // 负责将文件切片。 - function CuteFile( file, chunkSize ) { - var pending = [], - blob = file.source, - total = blob.size, - chunks = chunkSize ? Math.ceil( total / chunkSize ) : 1, - start = 0, - index = 0, - len, api; - - api = { - file: file, - - has: function() { - return !!pending.length; - }, - - shift: function() { - return pending.shift(); - }, - - unshift: function( block ) { - pending.unshift( block ); - } - }; - - while ( index < chunks ) { - len = Math.min( chunkSize, total - start ); - - pending.push({ - file: file, - start: start, - end: chunkSize ? (start + len) : total, - total: total, - chunks: chunks, - chunk: index++, - cuted: api - }); - start += len; - } - - file.blocks = pending.concat(); - file.remaning = pending.length; - - return api; - } - - Uploader.register({ - name: 'upload', - - init: function() { - var owner = this.owner, - me = this; - - this.runing = false; - this.progress = false; - - owner - .on( 'startUpload', function() { - me.progress = true; - }) - .on( 'uploadFinished', function() { - me.progress = false; - }); - - // 记录当前正在传的数据,跟threads相关 - this.pool = []; - - // 缓存分好片的文件。 - this.stack = []; - - // 缓存即将上传的文件。 - this.pending = []; - - // 跟踪还有多少分片在上传中但是没有完成上传。 - this.remaning = 0; - this.__tick = Base.bindFn( this._tick, this ); - - owner.on( 'uploadComplete', function( file ) { - - // 把其他块取消了。 - file.blocks && $.each( file.blocks, function( _, v ) { - v.transport && (v.transport.abort(), v.transport.destroy()); - delete v.transport; - }); - - delete file.blocks; - delete file.remaning; - }); - }, - - reset: function() { - this.request( 'stop-upload', true ); - this.runing = false; - this.pool = []; - this.stack = []; - this.pending = []; - this.remaning = 0; - this._trigged = false; - this._promise = null; - }, - - /** - * @event startUpload - * @description 当开始上传流程时触发。 - * @for Uploader - */ - - /** - * 开始上传。此方法可以从初始状态调用开始上传流程,也可以从暂停状态调用,继续上传流程。 - * - * 可以指定开始某一个文件。 - * @grammar upload() => undefined - * @grammar upload( file | fileId) => undefined - * @method upload - * @for Uploader - */ - startUpload: function(file) { - var me = this; - - // 移出invalid的文件 - $.each( me.request( 'get-files', Status.INVALID ), function() { - me.request( 'remove-file', this ); - }); - - // 如果指定了开始某个文件,则只开始指定文件。 - if ( file ) { - file = file.id ? file : me.request( 'get-file', file ); - - if (file.getStatus() === Status.INTERRUPT) { - $.each( me.pool, function( _, v ) { - - // 之前暂停过。 - if (v.file !== file) { - return; - } - - v.transport && v.transport.send(); - }); - - file.setStatus( Status.QUEUED ); - } else if (file.getStatus() === Status.PROGRESS) { - return; - } else { - file.setStatus( Status.QUEUED ); - } - } else { - $.each( me.request( 'get-files', [ Status.INITED ] ), function() { - this.setStatus( Status.QUEUED ); - }); - } - - if ( me.runing ) { - return; - } - - me.runing = true; - - var files = []; - - // 如果有暂停的,则续传 - $.each( me.pool, function( _, v ) { - var file = v.file; - - if ( file.getStatus() === Status.INTERRUPT ) { - files.push(file); - me._trigged = false; - v.transport && v.transport.send(); - } - }); - - var file; - while ( (file = files.shift()) ) { - file.setStatus( Status.PROGRESS ); - } - - file || $.each( me.request( 'get-files', - Status.INTERRUPT ), function() { - this.setStatus( Status.PROGRESS ); - }); - - me._trigged = false; - Base.nextTick( me.__tick ); - me.owner.trigger('startUpload'); - }, - - /** - * @event stopUpload - * @description 当开始上传流程暂停时触发。 - * @for Uploader - */ - - /** - * 暂停上传。第一个参数为是否中断上传当前正在上传的文件。 - * - * 如果第一个参数是文件,则只暂停指定文件。 - * @grammar stop() => undefined - * @grammar stop( true ) => undefined - * @grammar stop( file ) => undefined - * @method stop - * @for Uploader - */ - stopUpload: function( file, interrupt ) { - var me = this; - - if (file === true) { - interrupt = file; - file = null; - } - - if ( me.runing === false ) { - return; - } - - // 如果只是暂停某个文件。 - if ( file ) { - file = file.id ? file : me.request( 'get-file', file ); - - if ( file.getStatus() !== Status.PROGRESS && - file.getStatus() !== Status.QUEUED ) { - return; - } - - file.setStatus( Status.INTERRUPT ); - $.each( me.pool, function( _, v ) { - - // 只 abort 指定的文件。 - if (v.file !== file) { - return; - } - - v.transport && v.transport.abort(); - me._putback(v); - me._popBlock(v); - }); - - return Base.nextTick( me.__tick ); - } - - me.runing = false; - - if (this._promise && this._promise.file) { - this._promise.file.setStatus( Status.INTERRUPT ); - } - - interrupt && $.each( me.pool, function( _, v ) { - v.transport && v.transport.abort(); - v.file.setStatus( Status.INTERRUPT ); - }); - - me.owner.trigger('stopUpload'); - }, - - /** - * @method cancelFile - * @grammar cancelFile( file ) => undefined - * @grammar cancelFile( id ) => undefined - * @param {File|id} file File对象或这File对象的id - * @description 标记文件状态为已取消, 同时将中断文件传输。 - * @for Uploader - * @example - * - * $li.on('click', '.remove-this', function() { - * uploader.cancelFile( file ); - * }) - */ - cancelFile: function( file ) { - file = file.id ? file : this.request( 'get-file', file ); - - // 如果正在上传。 - file.blocks && $.each( file.blocks, function( _, v ) { - var _tr = v.transport; - - if ( _tr ) { - _tr.abort(); - _tr.destroy(); - delete v.transport; - } - }); - - file.setStatus( Status.CANCELLED ); - this.owner.trigger( 'fileDequeued', file ); - }, - - /** - * 判断`Uplaode`r是否正在上传中。 - * @grammar isInProgress() => Boolean - * @method isInProgress - * @for Uploader - */ - isInProgress: function() { - return !!this.progress; - }, - - _getStats: function() { - return this.request('get-stats'); - }, - - /** - * 掉过一个文件上传,直接标记指定文件为已上传状态。 - * @grammar skipFile( file ) => undefined - * @method skipFile - * @for Uploader - */ - skipFile: function( file, status ) { - file = file.id ? file : this.request( 'get-file', file ); - - file.setStatus( status || Status.COMPLETE ); - file.skipped = true; - - // 如果正在上传。 - file.blocks && $.each( file.blocks, function( _, v ) { - var _tr = v.transport; - - if ( _tr ) { - _tr.abort(); - _tr.destroy(); - delete v.transport; - } - }); - - this.owner.trigger( 'uploadSkip', file ); - }, - - /** - * @event uploadFinished - * @description 当所有文件上传结束时触发。 - * @for Uploader - */ - _tick: function() { - var me = this, - opts = me.options, - fn, val; - - // 上一个promise还没有结束,则等待完成后再执行。 - if ( me._promise ) { - return me._promise.always( me.__tick ); - } - - // 还有位置,且还有文件要处理的话。 - if ( me.pool.length < opts.threads && (val = me._nextBlock()) ) { - me._trigged = false; - - fn = function( val ) { - me._promise = null; - - // 有可能是reject过来的,所以要检测val的类型。 - val && val.file && me._startSend( val ); - Base.nextTick( me.__tick ); - }; - - me._promise = isPromise( val ) ? val.always( fn ) : fn( val ); - - // 没有要上传的了,且没有正在传输的了。 - } else if ( !me.remaning && !me._getStats().numOfQueue && - !me._getStats().numofInterrupt ) { - me.runing = false; - - me._trigged || Base.nextTick(function() { - me.owner.trigger('uploadFinished'); - }); - me._trigged = true; - } - }, - - _putback: function(block) { - var idx; - - block.cuted.unshift(block); - idx = this.stack.indexOf(block.cuted); - - if (!~idx) { - this.stack.unshift(block.cuted); - } - }, - - _getStack: function() { - var i = 0, - act; - - while ( (act = this.stack[ i++ ]) ) { - if ( act.has() && act.file.getStatus() === Status.PROGRESS ) { - return act; - } else if (!act.has() || - act.file.getStatus() !== Status.PROGRESS && - act.file.getStatus() !== Status.INTERRUPT ) { - - // 把已经处理完了的,或者,状态为非 progress(上传中)、 - // interupt(暂停中) 的移除。 - this.stack.splice( --i, 1 ); - } - } - - return null; - }, - - _nextBlock: function() { - var me = this, - opts = me.options, - act, next, done, preparing; - - // 如果当前文件还有没有需要传输的,则直接返回剩下的。 - if ( (act = this._getStack()) ) { - - // 是否提前准备下一个文件 - if ( opts.prepareNextFile && !me.pending.length ) { - me._prepareNextFile(); - } - - return act.shift(); - - // 否则,如果正在运行,则准备下一个文件,并等待完成后返回下个分片。 - } else if ( me.runing ) { - - // 如果缓存中有,则直接在缓存中取,没有则去queue中取。 - if ( !me.pending.length && me._getStats().numOfQueue ) { - me._prepareNextFile(); - } - - next = me.pending.shift(); - done = function( file ) { - if ( !file ) { - return null; - } - - act = CuteFile( file, opts.chunked ? opts.chunkSize : 0 ); - me.stack.push(act); - return act.shift(); - }; - - // 文件可能还在prepare中,也有可能已经完全准备好了。 - if ( isPromise( next) ) { - preparing = next.file; - next = next[ next.pipe ? 'pipe' : 'then' ]( done ); - next.file = preparing; - return next; - } - - return done( next ); - } - }, - - - /** - * @event uploadStart - * @param {File} file File对象 - * @description 某个文件开始上传前触发,一个文件只会触发一次。 - * @for Uploader - */ - _prepareNextFile: function() { - var me = this, - file = me.request('fetch-file'), - pending = me.pending, - promise; - - if ( file ) { - promise = me.request( 'before-send-file', file, function() { - - // 有可能文件被skip掉了。文件被skip掉后,状态坑定不是Queued. - if ( file.getStatus() === Status.PROGRESS || - file.getStatus() === Status.INTERRUPT ) { - return file; - } - - return me._finishFile( file ); - }); - - me.owner.trigger( 'uploadStart', file ); - file.setStatus( Status.PROGRESS ); - - promise.file = file; - - // 如果还在pending中,则替换成文件本身。 - promise.done(function() { - var idx = $.inArray( promise, pending ); - - ~idx && pending.splice( idx, 1, file ); - }); - - // befeore-send-file的钩子就有错误发生。 - promise.fail(function( reason ) { - file.setStatus( Status.ERROR, reason ); - me.owner.trigger( 'uploadError', file, reason ); - me.owner.trigger( 'uploadComplete', file ); - }); - - pending.push( promise ); - } - }, - - // 让出位置了,可以让其他分片开始上传 - _popBlock: function( block ) { - var idx = $.inArray( block, this.pool ); - - this.pool.splice( idx, 1 ); - block.file.remaning--; - this.remaning--; - }, - - // 开始上传,可以被掉过。如果promise被reject了,则表示跳过此分片。 - _startSend: function( block ) { - var me = this, - file = block.file, - promise; - - // 有可能在 before-send-file 的 promise 期间改变了文件状态。 - // 如:暂停,取消 - // 我们不能中断 promise, 但是可以在 promise 完后,不做上传操作。 - if ( file.getStatus() !== Status.PROGRESS ) { - - // 如果是中断,则还需要放回去。 - if (file.getStatus() === Status.INTERRUPT) { - me._putback(block); - } - - return; - } - - me.pool.push( block ); - me.remaning++; - - // 如果没有分片,则直接使用原始的。 - // 不会丢失content-type信息。 - block.blob = block.chunks === 1 ? file.source : - file.source.slice( block.start, block.end ); - - // hook, 每个分片发送之前可能要做些异步的事情。 - promise = me.request( 'before-send', block, function() { - - // 有可能文件已经上传出错了,所以不需要再传输了。 - if ( file.getStatus() === Status.PROGRESS ) { - me._doSend( block ); - } else { - me._popBlock( block ); - Base.nextTick( me.__tick ); - } - }); - - // 如果为fail了,则跳过此分片。 - promise.fail(function() { - if ( file.remaning === 1 ) { - me._finishFile( file ).always(function() { - block.percentage = 1; - me._popBlock( block ); - me.owner.trigger( 'uploadComplete', file ); - Base.nextTick( me.__tick ); - }); - } else { - block.percentage = 1; - me.updateFileProgress( file ); - me._popBlock( block ); - Base.nextTick( me.__tick ); - } - }); - }, - - - /** - * @event uploadBeforeSend - * @param {Object} object - * @param {Object} data 默认的上传参数,可以扩展此对象来控制上传参数。 - * @param {Object} headers 可以扩展此对象来控制上传头部。 - * @description 当某个文件的分块在发送前触发,主要用来询问是否要添加附带参数,大文件在开起分片上传的前提下此事件可能会触发多次。 - * @for Uploader - */ - - /** - * @event uploadAccept - * @param {Object} object - * @param {Object} ret 服务端的返回数据,json格式,如果服务端不是json格式,从ret._raw中取数据,自行解析。 - * @description 当某个文件上传到服务端响应后,会派送此事件来询问服务端响应是否有效。如果此事件handler返回值为`false`, 则此文件将派送`server`类型的`uploadError`事件。 - * @for Uploader - */ - - /** - * @event uploadProgress - * @param {File} file File对象 - * @param {Number} percentage 上传进度 - * @description 上传过程中触发,携带上传进度。 - * @for Uploader - */ - - - /** - * @event uploadError - * @param {File} file File对象 - * @param {String} reason 出错的code - * @description 当文件上传出错时触发。 - * @for Uploader - */ - - /** - * @event uploadSuccess - * @param {File} file File对象 - * @param {Object} response 服务端返回的数据 - * @description 当文件上传成功时触发。 - * @for Uploader - */ - - /** - * @event uploadComplete - * @param {File} [file] File对象 - * @description 不管成功或者失败,文件上传完成时触发。 - * @for Uploader - */ - - // 做上传操作。 - _doSend: function( block ) { - var me = this, - owner = me.owner, - opts = me.options, - file = block.file, - tr = new Transport( opts ), - data = $.extend({}, opts.formData ), - headers = $.extend({}, opts.headers ), - requestAccept, ret; - - block.transport = tr; - - tr.on( 'destroy', function() { - delete block.transport; - me._popBlock( block ); - Base.nextTick( me.__tick ); - }); - - // 广播上传进度。以文件为单位。 - tr.on( 'progress', function( percentage ) { - block.percentage = percentage; - me.updateFileProgress( file ); - }); - - // 用来询问,是否返回的结果是有错误的。 - requestAccept = function( reject ) { - var fn; - - ret = tr.getResponseAsJson() || {}; - ret._raw = tr.getResponse(); - fn = function( value ) { - reject = value; - }; - - // 服务端响应了,不代表成功了,询问是否响应正确。 - if ( !owner.trigger( 'uploadAccept', block, ret, fn ) ) { - reject = reject || 'server'; - } - - return reject; - }; - - // 尝试重试,然后广播文件上传出错。 - tr.on( 'error', function( type, flag ) { - block.retried = block.retried || 0; - - // 自动重试 - if ( block.chunks > 1 && ~'http,abort'.indexOf( type ) && - block.retried < opts.chunkRetry ) { - - block.retried++; - tr.send(); - - } else { - - // http status 500 ~ 600 - if ( !flag && type === 'server' ) { - type = requestAccept( type ); - } - - file.setStatus( Status.ERROR, type ); - owner.trigger( 'uploadError', file, type ); - owner.trigger( 'uploadComplete', file ); - } - }); - - // 上传成功 - tr.on( 'load', function() { - var reason; - - // 如果非预期,转向上传出错。 - if ( (reason = requestAccept()) ) { - tr.trigger( 'error', reason, true ); - return; - } - - // 全部上传完成。 - if ( file.remaning === 1 ) { - me._finishFile( file, ret ); - } else { - tr.destroy(); - } - }); - - // 配置默认的上传字段。 - data = $.extend( data, { - id: file.id, - name: file.name, - type: file.type, - lastModifiedDate: file.lastModifiedDate, - size: file.size - }); - - block.chunks > 1 && $.extend( data, { - chunks: block.chunks, - chunk: block.chunk - }); - - // 在发送之间可以添加字段什么的。。。 - // 如果默认的字段不够使用,可以通过监听此事件来扩展 - owner.trigger( 'uploadBeforeSend', block, data, headers ); - - // 开始发送。 - tr.appendBlob( opts.fileVal, block.blob, file.name ); - tr.append( data ); - tr.setRequestHeader( headers ); - tr.send(); - }, - - // 完成上传。 - _finishFile: function( file, ret, hds ) { - var owner = this.owner; - - return owner - .request( 'after-send-file', arguments, function() { - file.setStatus( Status.COMPLETE ); - owner.trigger( 'uploadSuccess', file, ret, hds ); - }) - .fail(function( reason ) { - - // 如果外部已经标记为invalid什么的,不再改状态。 - if ( file.getStatus() === Status.PROGRESS ) { - file.setStatus( Status.ERROR, reason ); - } - - owner.trigger( 'uploadError', file, reason ); - }) - .always(function() { - owner.trigger( 'uploadComplete', file ); - }); - }, - - updateFileProgress: function(file) { - var totalPercent = 0, - uploaded = 0; - - if (!file.blocks) { - return; - } - - $.each( file.blocks, function( _, v ) { - uploaded += (v.percentage || 0) * (v.end - v.start); - }); - - totalPercent = uploaded / file.size; - this.owner.trigger( 'uploadProgress', file, totalPercent || 0 ); - } - - }); - }); - /** - * @fileOverview 各种验证,包括文件总大小是否超出、单文件是否超出和文件是否重复。 - */ - - define('widgets/validator',[ - 'base', - 'uploader', - 'file', - 'widgets/widget' - ], function( Base, Uploader, WUFile ) { - - var $ = Base.$, - validators = {}, - api; - - /** - * @event error - * @param {String} type 错误类型。 - * @description 当validate不通过时,会以派送错误事件的形式通知调用者。通过`upload.on('error', handler)`可以捕获到此类错误,目前有以下错误会在特定的情况下派送错来。 - * - * * `Q_EXCEED_NUM_LIMIT` 在设置了`fileNumLimit`且尝试给`uploader`添加的文件数量超出这个值时派送。 - * * `Q_EXCEED_SIZE_LIMIT` 在设置了`Q_EXCEED_SIZE_LIMIT`且尝试给`uploader`添加的文件总大小超出这个值时派送。 - * * `Q_TYPE_DENIED` 当文件类型不满足时触发。。 - * @for Uploader - */ - - // 暴露给外面的api - api = { - - // 添加验证器 - addValidator: function( type, cb ) { - validators[ type ] = cb; - }, - - // 移除验证器 - removeValidator: function( type ) { - delete validators[ type ]; - } - }; - - // 在Uploader初始化的时候启动Validators的初始化 - Uploader.register({ - name: 'validator', - - init: function() { - var me = this; - Base.nextTick(function() { - $.each( validators, function() { - this.call( me.owner ); - }); - }); - } - }); - - /** - * @property {int} [fileNumLimit=undefined] - * @namespace options - * @for Uploader - * @description 验证文件总数量, 超出则不允许加入队列。 - */ - api.addValidator( 'fileNumLimit', function() { - var uploader = this, - opts = uploader.options, - count = 0, - max = parseInt( opts.fileNumLimit, 10 ), - flag = true; - - if ( !max ) { - return; - } - - uploader.on( 'beforeFileQueued', function( file ) { - - if ( count >= max && flag ) { - flag = false; - this.trigger( 'error', 'Q_EXCEED_NUM_LIMIT', max, file ); - setTimeout(function() { - flag = true; - }, 1 ); - } - - return count >= max ? false : true; - }); - - uploader.on( 'fileQueued', function() { - count++; - }); - - uploader.on( 'fileDequeued', function() { - count--; - }); - - uploader.on( 'reset', function() { - count = 0; - }); - }); - - - /** - * @property {int} [fileSizeLimit=undefined] - * @namespace options - * @for Uploader - * @description 验证文件总大小是否超出限制, 超出则不允许加入队列。 - */ - api.addValidator( 'fileSizeLimit', function() { - var uploader = this, - opts = uploader.options, - count = 0, - max = parseInt( opts.fileSizeLimit, 10 ), - flag = true; - - if ( !max ) { - return; - } - - uploader.on( 'beforeFileQueued', function( file ) { - var invalid = count + file.size > max; - - if ( invalid && flag ) { - flag = false; - this.trigger( 'error', 'Q_EXCEED_SIZE_LIMIT', max, file ); - setTimeout(function() { - flag = true; - }, 1 ); - } - - return invalid ? false : true; - }); - - uploader.on( 'fileQueued', function( file ) { - count += file.size; - }); - - uploader.on( 'fileDequeued', function( file ) { - count -= file.size; - }); - - uploader.on( 'reset', function() { - count = 0; - }); - }); - - /** - * @property {int} [fileSingleSizeLimit=undefined] - * @namespace options - * @for Uploader - * @description 验证单个文件大小是否超出限制, 超出则不允许加入队列。 - */ - api.addValidator( 'fileSingleSizeLimit', function() { - var uploader = this, - opts = uploader.options, - max = opts.fileSingleSizeLimit; - - if ( !max ) { - return; - } - - uploader.on( 'beforeFileQueued', function( file ) { - - if ( file.size > max ) { - file.setStatus( WUFile.Status.INVALID, 'exceed_size' ); - this.trigger( 'error', 'F_EXCEED_SIZE', max, file ); - return false; - } - - }); - - }); - - /** - * @property {Boolean} [duplicate=undefined] - * @namespace options - * @for Uploader - * @description 去重, 根据文件名字、文件大小和最后修改时间来生成hash Key. - */ - api.addValidator( 'duplicate', function() { - var uploader = this, - opts = uploader.options, - mapping = {}; - - if ( opts.duplicate ) { - return; - } - - function hashString( str ) { - var hash = 0, - i = 0, - len = str.length, - _char; - - for ( ; i < len; i++ ) { - _char = str.charCodeAt( i ); - hash = _char + (hash << 6) + (hash << 16) - hash; - } - - return hash; - } - - uploader.on( 'beforeFileQueued', function( file ) { - var hash = file.__hash || (file.__hash = hashString( file.name + - file.size + file.lastModifiedDate )); - - // 已经重复了 - if ( mapping[ hash ] ) { - this.trigger( 'error', 'F_DUPLICATE', file ); - return false; - } - }); - - uploader.on( 'fileQueued', function( file ) { - var hash = file.__hash; - - hash && (mapping[ hash ] = true); - }); - - uploader.on( 'fileDequeued', function( file ) { - var hash = file.__hash; - - hash && (delete mapping[ hash ]); - }); - - uploader.on( 'reset', function() { - mapping = {}; - }); - }); - - return api; - }); - - /** - * @fileOverview Md5 - */ - define('lib/md5',[ - 'runtime/client', - 'mediator' - ], function( RuntimeClient, Mediator ) { - - function Md5() { - RuntimeClient.call( this, 'Md5' ); - } - - // 让 Md5 具备事件功能。 - Mediator.installTo( Md5.prototype ); - - Md5.prototype.loadFromBlob = function( blob ) { - var me = this; - - if ( me.getRuid() ) { - me.disconnectRuntime(); - } - - // 连接到blob归属的同一个runtime. - me.connectRuntime( blob.ruid, function() { - me.exec('init'); - me.exec( 'loadFromBlob', blob ); - }); - }; - - Md5.prototype.getResult = function() { - return this.exec('getResult'); - }; - - return Md5; - }); - /** - * @fileOverview 图片操作, 负责预览图片和上传前压缩图片 - */ - define('widgets/md5',[ - 'base', - 'uploader', - 'lib/md5', - 'lib/blob', - 'widgets/widget' - ], function( Base, Uploader, Md5, Blob ) { - - return Uploader.register({ - name: 'md5', - - - /** - * 计算文件 md5 值,返回一个 promise 对象,可以监听 progress 进度。 - * - * - * @method md5File - * @grammar md5File( file[, start[, end]] ) => promise - * @for Uploader - * @example - * - * uploader.on( 'fileQueued', function( file ) { - * var $li = ...; - * - * uploader.md5File( file ) - * - * // 及时显示进度 - * .progress(function(percentage) { - * console.log('Percentage:', percentage); - * }) - * - * // 完成 - * .then(function(val) { - * console.log('md5 result:', val); - * }); - * - * }); - */ - md5File: function( file, start, end ) { - var md5 = new Md5(), - deferred = Base.Deferred(), - blob = (file instanceof Blob) ? file : - this.request( 'get-file', file ).source; - - md5.on( 'progress load', function( e ) { - e = e || {}; - deferred.notify( e.total ? e.loaded / e.total : 1 ); - }); - - md5.on( 'complete', function() { - deferred.resolve( md5.getResult() ); - }); - - md5.on( 'error', function( reason ) { - deferred.reject( reason ); - }); - - if ( arguments.length > 1 ) { - start = start || 0; - end = end || 0; - start < 0 && (start = blob.size + start); - end < 0 && (end = blob.size + end); - end = Math.min( end, blob.size ); - blob = blob.slice( start, end ); - } - - md5.loadFromBlob( blob ); - - return deferred.promise(); - } - }); - }); - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/compbase',[],function() { - - function CompBase( owner, runtime ) { - - this.owner = owner; - this.options = owner.options; - - this.getRuntime = function() { - return runtime; - }; - - this.getRuid = function() { - return runtime.uid; - }; - - this.trigger = function() { - return owner.trigger.apply( owner, arguments ); - }; - } - - return CompBase; - }); - /** - * @fileOverview Html5Runtime - */ - define('runtime/html5/runtime',[ - 'base', - 'runtime/runtime', - 'runtime/compbase' - ], function( Base, Runtime, CompBase ) { - - var type = 'html5', - components = {}; - - function Html5Runtime() { - var pool = {}, - me = this, - destroy = this.destroy; - - Runtime.apply( me, arguments ); - me.type = type; - - - // 这个方法的调用者,实际上是RuntimeClient - me.exec = function( comp, fn/*, args...*/) { - var client = this, - uid = client.uid, - args = Base.slice( arguments, 2 ), - instance; - - if ( components[ comp ] ) { - instance = pool[ uid ] = pool[ uid ] || - new components[ comp ]( client, me ); - - if ( instance[ fn ] ) { - return instance[ fn ].apply( instance, args ); - } - } - }; - - me.destroy = function() { - // @todo 删除池子中的所有实例 - return destroy && destroy.apply( this, arguments ); - }; - } - - Base.inherits( Runtime, { - constructor: Html5Runtime, - - // 不需要连接其他程序,直接执行callback - init: function() { - var me = this; - setTimeout(function() { - me.trigger('ready'); - }, 1 ); - } - - }); - - // 注册Components - Html5Runtime.register = function( name, component ) { - var klass = components[ name ] = Base.inherits( CompBase, component ); - return klass; - }; - - // 注册html5运行时。 - // 只有在支持的前提下注册。 - if ( window.Blob && window.FileReader && window.DataView ) { - Runtime.addRuntime( type, Html5Runtime ); - } - - return Html5Runtime; - }); - /** - * @fileOverview Blob Html实现 - */ - define('runtime/html5/blob',[ - 'runtime/html5/runtime', - 'lib/blob' - ], function( Html5Runtime, Blob ) { - - return Html5Runtime.register( 'Blob', { - slice: function( start, end ) { - var blob = this.owner.source, - slice = blob.slice || blob.webkitSlice || blob.mozSlice; - - blob = slice.call( blob, start, end ); - - return new Blob( this.getRuid(), blob ); - } - }); - }); - /** - * @fileOverview FilePaste - */ - define('runtime/html5/dnd',[ - 'base', - 'runtime/html5/runtime', - 'lib/file' - ], function( Base, Html5Runtime, File ) { - - var $ = Base.$, - prefix = 'webuploader-dnd-'; - - return Html5Runtime.register( 'DragAndDrop', { - init: function() { - var elem = this.elem = this.options.container; - - this.dragEnterHandler = Base.bindFn( this._dragEnterHandler, this ); - this.dragOverHandler = Base.bindFn( this._dragOverHandler, this ); - this.dragLeaveHandler = Base.bindFn( this._dragLeaveHandler, this ); - this.dropHandler = Base.bindFn( this._dropHandler, this ); - this.dndOver = false; - - elem.on( 'dragenter', this.dragEnterHandler ); - elem.on( 'dragover', this.dragOverHandler ); - elem.on( 'dragleave', this.dragLeaveHandler ); - elem.on( 'drop', this.dropHandler ); - - if ( this.options.disableGlobalDnd ) { - $( document ).on( 'dragover', this.dragOverHandler ); - $( document ).on( 'drop', this.dropHandler ); - } - }, - - _dragEnterHandler: function( e ) { - var me = this, - denied = me._denied || false, - items; - - e = e.originalEvent || e; - - if ( !me.dndOver ) { - me.dndOver = true; - - // 注意只有 chrome 支持。 - items = e.dataTransfer.items; - - if ( items && items.length ) { - me._denied = denied = !me.trigger( 'accept', items ); - } - - me.elem.addClass( prefix + 'over' ); - me.elem[ denied ? 'addClass' : - 'removeClass' ]( prefix + 'denied' ); - } - - e.dataTransfer.dropEffect = denied ? 'none' : 'copy'; - - return false; - }, - - _dragOverHandler: function( e ) { - // 只处理框内的。 - var parentElem = this.elem.parent().get( 0 ); - if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) { - return false; - } - - clearTimeout( this._leaveTimer ); - this._dragEnterHandler.call( this, e ); - - return false; - }, - - _dragLeaveHandler: function() { - var me = this, - handler; - - handler = function() { - me.dndOver = false; - me.elem.removeClass( prefix + 'over ' + prefix + 'denied' ); - }; - - clearTimeout( me._leaveTimer ); - me._leaveTimer = setTimeout( handler, 100 ); - return false; - }, - - _dropHandler: function( e ) { - var me = this, - ruid = me.getRuid(), - parentElem = me.elem.parent().get( 0 ), - dataTransfer, data; - - // 只处理框内的。 - if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) { - return false; - } - - e = e.originalEvent || e; - dataTransfer = e.dataTransfer; - - // 如果是页面内拖拽,还不能处理,不阻止事件。 - // 此处 ie11 下会报参数错误, - try { - data = dataTransfer.getData('text/html'); - } catch( err ) { - } - - if ( data ) { - return; - } - - me._getTansferFiles( dataTransfer, function( results ) { - me.trigger( 'drop', $.map( results, function( file ) { - return new File( ruid, file ); - }) ); - }); - - me.dndOver = false; - me.elem.removeClass( prefix + 'over' ); - return false; - }, - - // 如果传入 callback 则去查看文件夹,否则只管当前文件夹。 - _getTansferFiles: function( dataTransfer, callback ) { - var results = [], - promises = [], - items, files, file, item, i, len, canAccessFolder; - - items = dataTransfer.items; - files = dataTransfer.files; - - canAccessFolder = !!(items && items[ 0 ].webkitGetAsEntry); - - for ( i = 0, len = files.length; i < len; i++ ) { - file = files[ i ]; - item = items && items[ i ]; - - if ( canAccessFolder && item.webkitGetAsEntry().isDirectory ) { - - promises.push( this._traverseDirectoryTree( - item.webkitGetAsEntry(), results ) ); - } else { - results.push( file ); - } - } - - Base.when.apply( Base, promises ).done(function() { - - if ( !results.length ) { - return; - } - - callback( results ); - }); - }, - - _traverseDirectoryTree: function( entry, results ) { - var deferred = Base.Deferred(), - me = this; - - if ( entry.isFile ) { - entry.file(function( file ) { - results.push( file ); - deferred.resolve(); - }); - } else if ( entry.isDirectory ) { - entry.createReader().readEntries(function( entries ) { - var len = entries.length, - promises = [], - arr = [], // 为了保证顺序。 - i; - - for ( i = 0; i < len; i++ ) { - promises.push( me._traverseDirectoryTree( - entries[ i ], arr ) ); - } - - Base.when.apply( Base, promises ).then(function() { - results.push.apply( results, arr ); - deferred.resolve(); - }, deferred.reject ); - }); - } - - return deferred.promise(); - }, - - destroy: function() { - var elem = this.elem; - - // 还没 init 就调用 destroy - if (!elem) { - return; - } - - elem.off( 'dragenter', this.dragEnterHandler ); - elem.off( 'dragover', this.dragOverHandler ); - elem.off( 'dragleave', this.dragLeaveHandler ); - elem.off( 'drop', this.dropHandler ); - - if ( this.options.disableGlobalDnd ) { - $( document ).off( 'dragover', this.dragOverHandler ); - $( document ).off( 'drop', this.dropHandler ); - } - } - }); - }); - - /** - * @fileOverview FilePaste - */ - define('runtime/html5/filepaste',[ - 'base', - 'runtime/html5/runtime', - 'lib/file' - ], function( Base, Html5Runtime, File ) { - - return Html5Runtime.register( 'FilePaste', { - init: function() { - var opts = this.options, - elem = this.elem = opts.container, - accept = '.*', - arr, i, len, item; - - // accetp的mimeTypes中生成匹配正则。 - if ( opts.accept ) { - arr = []; - - for ( i = 0, len = opts.accept.length; i < len; i++ ) { - item = opts.accept[ i ].mimeTypes; - item && arr.push( item ); - } - - if ( arr.length ) { - accept = arr.join(','); - accept = accept.replace( /,/g, '|' ).replace( /\*/g, '.*' ); - } - } - this.accept = accept = new RegExp( accept, 'i' ); - this.hander = Base.bindFn( this._pasteHander, this ); - elem.on( 'paste', this.hander ); - }, - - _pasteHander: function( e ) { - var allowed = [], - ruid = this.getRuid(), - items, item, blob, i, len; - - e = e.originalEvent || e; - items = e.clipboardData.items; - - for ( i = 0, len = items.length; i < len; i++ ) { - item = items[ i ]; - - if ( item.kind !== 'file' || !(blob = item.getAsFile()) ) { - continue; - } - - allowed.push( new File( ruid, blob ) ); - } - - if ( allowed.length ) { - // 不阻止非文件粘贴(文字粘贴)的事件冒泡 - e.preventDefault(); - e.stopPropagation(); - this.trigger( 'paste', allowed ); - } - }, - - destroy: function() { - this.elem.off( 'paste', this.hander ); - } - }); - }); - - /** - * @fileOverview FilePicker - */ - define('runtime/html5/filepicker',[ - 'base', - 'runtime/html5/runtime' - ], function( Base, Html5Runtime ) { - - var $ = Base.$; - - return Html5Runtime.register( 'FilePicker', { - init: function() { - var container = this.getRuntime().getContainer(), - me = this, - owner = me.owner, - opts = me.options, - label = this.label = $( document.createElement('label') ), - input = this.input = $( document.createElement('input') ), - arr, i, len, mouseHandler; - - input.attr( 'type', 'file' ); - input.attr( 'name', opts.name ); - input.addClass('webuploader-element-invisible'); - - label.on( 'click', function() { - input.trigger('click'); - }); - - label.css({ - opacity: 0, - width: '100%', - height: '100%', - display: 'block', - cursor: 'pointer', - background: '#ffffff' - }); - - if ( opts.multiple ) { - input.attr( 'multiple', 'multiple' ); - } - - // @todo Firefox不支持单独指定后缀 - if ( opts.accept && opts.accept.length > 0 ) { - arr = []; - - for ( i = 0, len = opts.accept.length; i < len; i++ ) { - arr.push( opts.accept[ i ].mimeTypes ); - } - - input.attr( 'accept', arr.join(',') ); - } - - container.append( input ); - container.append( label ); - - mouseHandler = function( e ) { - owner.trigger( e.type ); - }; - - input.on( 'change', function( e ) { - var fn = arguments.callee, - clone; - - me.files = e.target.files; - - // reset input - clone = this.cloneNode( true ); - clone.value = null; - this.parentNode.replaceChild( clone, this ); - - input.off(); - input = $( clone ).on( 'change', fn ) - .on( 'mouseenter mouseleave', mouseHandler ); - - owner.trigger('change'); - }); - - label.on( 'mouseenter mouseleave', mouseHandler ); - - }, - - - getFiles: function() { - return this.files; - }, - - destroy: function() { - this.input.off(); - this.label.off(); - } - }); - }); - /** - * Terms: - * - * Uint8Array, FileReader, BlobBuilder, atob, ArrayBuffer - * @fileOverview Image控件 - */ - define('runtime/html5/util',[ - 'base' - ], function( Base ) { - - var urlAPI = window.createObjectURL && window || - window.URL && URL.revokeObjectURL && URL || - window.webkitURL, - createObjectURL = Base.noop, - revokeObjectURL = createObjectURL; - - if ( urlAPI ) { - - // 更安全的方式调用,比如android里面就能把context改成其他的对象。 - createObjectURL = function() { - return urlAPI.createObjectURL.apply( urlAPI, arguments ); - }; - - revokeObjectURL = function() { - return urlAPI.revokeObjectURL.apply( urlAPI, arguments ); - }; - } - - return { - createObjectURL: createObjectURL, - revokeObjectURL: revokeObjectURL, - - dataURL2Blob: function( dataURI ) { - var byteStr, intArray, ab, i, mimetype, parts; - - parts = dataURI.split(','); - - if ( ~parts[ 0 ].indexOf('base64') ) { - byteStr = atob( parts[ 1 ] ); - } else { - byteStr = decodeURIComponent( parts[ 1 ] ); - } - - ab = new ArrayBuffer( byteStr.length ); - intArray = new Uint8Array( ab ); - - for ( i = 0; i < byteStr.length; i++ ) { - intArray[ i ] = byteStr.charCodeAt( i ); - } - - mimetype = parts[ 0 ].split(':')[ 1 ].split(';')[ 0 ]; - - return this.arrayBufferToBlob( ab, mimetype ); - }, - - dataURL2ArrayBuffer: function( dataURI ) { - var byteStr, intArray, i, parts; - - parts = dataURI.split(','); - - if ( ~parts[ 0 ].indexOf('base64') ) { - byteStr = atob( parts[ 1 ] ); - } else { - byteStr = decodeURIComponent( parts[ 1 ] ); - } - - intArray = new Uint8Array( byteStr.length ); - - for ( i = 0; i < byteStr.length; i++ ) { - intArray[ i ] = byteStr.charCodeAt( i ); - } - - return intArray.buffer; - }, - - arrayBufferToBlob: function( buffer, type ) { - var builder = window.BlobBuilder || window.WebKitBlobBuilder, - bb; - - // android不支持直接new Blob, 只能借助blobbuilder. - if ( builder ) { - bb = new builder(); - bb.append( buffer ); - return bb.getBlob( type ); - } - - return new Blob([ buffer ], type ? { type: type } : {} ); - }, - - // 抽出来主要是为了解决android下面canvas.toDataUrl不支持jpeg. - // 你得到的结果是png. - canvasToDataUrl: function( canvas, type, quality ) { - return canvas.toDataURL( type, quality / 100 ); - }, - - // imagemeat会复写这个方法,如果用户选择加载那个文件了的话。 - parseMeta: function( blob, callback ) { - callback( false, {}); - }, - - // imagemeat会复写这个方法,如果用户选择加载那个文件了的话。 - updateImageHead: function( data ) { - return data; - } - }; - }); - /** - * Terms: - * - * Uint8Array, FileReader, BlobBuilder, atob, ArrayBuffer - * @fileOverview Image控件 - */ - define('runtime/html5/imagemeta',[ - 'runtime/html5/util' - ], function( Util ) { - - var api; - - api = { - parsers: { - 0xffe1: [] - }, - - maxMetaDataSize: 262144, - - parse: function( blob, cb ) { - var me = this, - fr = new FileReader(); - - fr.onload = function() { - cb( false, me._parse( this.result ) ); - fr = fr.onload = fr.onerror = null; - }; - - fr.onerror = function( e ) { - cb( e.message ); - fr = fr.onload = fr.onerror = null; - }; - - blob = blob.slice( 0, me.maxMetaDataSize ); - fr.readAsArrayBuffer( blob.getSource() ); - }, - - _parse: function( buffer, noParse ) { - if ( buffer.byteLength < 6 ) { - return; - } - - var dataview = new DataView( buffer ), - offset = 2, - maxOffset = dataview.byteLength - 4, - headLength = offset, - ret = {}, - markerBytes, markerLength, parsers, i; - - if ( dataview.getUint16( 0 ) === 0xffd8 ) { - - while ( offset < maxOffset ) { - markerBytes = dataview.getUint16( offset ); - - if ( markerBytes >= 0xffe0 && markerBytes <= 0xffef || - markerBytes === 0xfffe ) { - - markerLength = dataview.getUint16( offset + 2 ) + 2; - - if ( offset + markerLength > dataview.byteLength ) { - break; - } - - parsers = api.parsers[ markerBytes ]; - - if ( !noParse && parsers ) { - for ( i = 0; i < parsers.length; i += 1 ) { - parsers[ i ].call( api, dataview, offset, - markerLength, ret ); - } - } - - offset += markerLength; - headLength = offset; - } else { - break; - } - } - - if ( headLength > 6 ) { - if ( buffer.slice ) { - ret.imageHead = buffer.slice( 2, headLength ); - } else { - // Workaround for IE10, which does not yet - // support ArrayBuffer.slice: - ret.imageHead = new Uint8Array( buffer ) - .subarray( 2, headLength ); - } - } - } - - return ret; - }, - - updateImageHead: function( buffer, head ) { - var data = this._parse( buffer, true ), - buf1, buf2, bodyoffset; - - - bodyoffset = 2; - if ( data.imageHead ) { - bodyoffset = 2 + data.imageHead.byteLength; - } - - if ( buffer.slice ) { - buf2 = buffer.slice( bodyoffset ); - } else { - buf2 = new Uint8Array( buffer ).subarray( bodyoffset ); - } - - buf1 = new Uint8Array( head.byteLength + 2 + buf2.byteLength ); - - buf1[ 0 ] = 0xFF; - buf1[ 1 ] = 0xD8; - buf1.set( new Uint8Array( head ), 2 ); - buf1.set( new Uint8Array( buf2 ), head.byteLength + 2 ); - - return buf1.buffer; - } - }; - - Util.parseMeta = function() { - return api.parse.apply( api, arguments ); - }; - - Util.updateImageHead = function() { - return api.updateImageHead.apply( api, arguments ); - }; - - return api; - }); - /** - * 代码来自于:https://github.com/blueimp/JavaScript-Load-Image - * 暂时项目中只用了orientation. - * - * 去除了 Exif Sub IFD Pointer, GPS Info IFD Pointer, Exif Thumbnail. - * @fileOverview EXIF解析 - */ - - // Sample - // ==================================== - // Make : Apple - // Model : iPhone 4S - // Orientation : 1 - // XResolution : 72 [72/1] - // YResolution : 72 [72/1] - // ResolutionUnit : 2 - // Software : QuickTime 7.7.1 - // DateTime : 2013:09:01 22:53:55 - // ExifIFDPointer : 190 - // ExposureTime : 0.058823529411764705 [1/17] - // FNumber : 2.4 [12/5] - // ExposureProgram : Normal program - // ISOSpeedRatings : 800 - // ExifVersion : 0220 - // DateTimeOriginal : 2013:09:01 22:52:51 - // DateTimeDigitized : 2013:09:01 22:52:51 - // ComponentsConfiguration : YCbCr - // ShutterSpeedValue : 4.058893515764426 - // ApertureValue : 2.5260688216892597 [4845/1918] - // BrightnessValue : -0.3126686601998395 - // MeteringMode : Pattern - // Flash : Flash did not fire, compulsory flash mode - // FocalLength : 4.28 [107/25] - // SubjectArea : [4 values] - // FlashpixVersion : 0100 - // ColorSpace : 1 - // PixelXDimension : 2448 - // PixelYDimension : 3264 - // SensingMethod : One-chip color area sensor - // ExposureMode : 0 - // WhiteBalance : Auto white balance - // FocalLengthIn35mmFilm : 35 - // SceneCaptureType : Standard - define('runtime/html5/imagemeta/exif',[ - 'base', - 'runtime/html5/imagemeta' - ], function( Base, ImageMeta ) { - - var EXIF = {}; - - EXIF.ExifMap = function() { - return this; - }; - - EXIF.ExifMap.prototype.map = { - 'Orientation': 0x0112 - }; - - EXIF.ExifMap.prototype.get = function( id ) { - return this[ id ] || this[ this.map[ id ] ]; - }; - - EXIF.exifTagTypes = { - // byte, 8-bit unsigned int: - 1: { - getValue: function( dataView, dataOffset ) { - return dataView.getUint8( dataOffset ); - }, - size: 1 - }, - - // ascii, 8-bit byte: - 2: { - getValue: function( dataView, dataOffset ) { - return String.fromCharCode( dataView.getUint8( dataOffset ) ); - }, - size: 1, - ascii: true - }, - - // short, 16 bit int: - 3: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getUint16( dataOffset, littleEndian ); - }, - size: 2 - }, - - // long, 32 bit int: - 4: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getUint32( dataOffset, littleEndian ); - }, - size: 4 - }, - - // rational = two long values, - // first is numerator, second is denominator: - 5: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getUint32( dataOffset, littleEndian ) / - dataView.getUint32( dataOffset + 4, littleEndian ); - }, - size: 8 - }, - - // slong, 32 bit signed int: - 9: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getInt32( dataOffset, littleEndian ); - }, - size: 4 - }, - - // srational, two slongs, first is numerator, second is denominator: - 10: { - getValue: function( dataView, dataOffset, littleEndian ) { - return dataView.getInt32( dataOffset, littleEndian ) / - dataView.getInt32( dataOffset + 4, littleEndian ); - }, - size: 8 - } - }; - - // undefined, 8-bit byte, value depending on field: - EXIF.exifTagTypes[ 7 ] = EXIF.exifTagTypes[ 1 ]; - - EXIF.getExifValue = function( dataView, tiffOffset, offset, type, length, - littleEndian ) { - - var tagType = EXIF.exifTagTypes[ type ], - tagSize, dataOffset, values, i, str, c; - - if ( !tagType ) { - Base.log('Invalid Exif data: Invalid tag type.'); - return; - } - - tagSize = tagType.size * length; - - // Determine if the value is contained in the dataOffset bytes, - // or if the value at the dataOffset is a pointer to the actual data: - dataOffset = tagSize > 4 ? tiffOffset + dataView.getUint32( offset + 8, - littleEndian ) : (offset + 8); - - if ( dataOffset + tagSize > dataView.byteLength ) { - Base.log('Invalid Exif data: Invalid data offset.'); - return; - } - - if ( length === 1 ) { - return tagType.getValue( dataView, dataOffset, littleEndian ); - } - - values = []; - - for ( i = 0; i < length; i += 1 ) { - values[ i ] = tagType.getValue( dataView, - dataOffset + i * tagType.size, littleEndian ); - } - - if ( tagType.ascii ) { - str = ''; - - // Concatenate the chars: - for ( i = 0; i < values.length; i += 1 ) { - c = values[ i ]; - - // Ignore the terminating NULL byte(s): - if ( c === '\u0000' ) { - break; - } - str += c; - } - - return str; - } - return values; - }; - - EXIF.parseExifTag = function( dataView, tiffOffset, offset, littleEndian, - data ) { - - var tag = dataView.getUint16( offset, littleEndian ); - data.exif[ tag ] = EXIF.getExifValue( dataView, tiffOffset, offset, - dataView.getUint16( offset + 2, littleEndian ), // tag type - dataView.getUint32( offset + 4, littleEndian ), // tag length - littleEndian ); - }; - - EXIF.parseExifTags = function( dataView, tiffOffset, dirOffset, - littleEndian, data ) { - - var tagsNumber, dirEndOffset, i; - - if ( dirOffset + 6 > dataView.byteLength ) { - Base.log('Invalid Exif data: Invalid directory offset.'); - return; - } - - tagsNumber = dataView.getUint16( dirOffset, littleEndian ); - dirEndOffset = dirOffset + 2 + 12 * tagsNumber; - - if ( dirEndOffset + 4 > dataView.byteLength ) { - Base.log('Invalid Exif data: Invalid directory size.'); - return; - } - - for ( i = 0; i < tagsNumber; i += 1 ) { - this.parseExifTag( dataView, tiffOffset, - dirOffset + 2 + 12 * i, // tag offset - littleEndian, data ); - } - - // Return the offset to the next directory: - return dataView.getUint32( dirEndOffset, littleEndian ); - }; - - // EXIF.getExifThumbnail = function(dataView, offset, length) { - // var hexData, - // i, - // b; - // if (!length || offset + length > dataView.byteLength) { - // Base.log('Invalid Exif data: Invalid thumbnail data.'); - // return; - // } - // hexData = []; - // for (i = 0; i < length; i += 1) { - // b = dataView.getUint8(offset + i); - // hexData.push((b < 16 ? '0' : '') + b.toString(16)); - // } - // return 'data:image/jpeg,%' + hexData.join('%'); - // }; - - EXIF.parseExifData = function( dataView, offset, length, data ) { - - var tiffOffset = offset + 10, - littleEndian, dirOffset; - - // Check for the ASCII code for "Exif" (0x45786966): - if ( dataView.getUint32( offset + 4 ) !== 0x45786966 ) { - // No Exif data, might be XMP data instead - return; - } - if ( tiffOffset + 8 > dataView.byteLength ) { - Base.log('Invalid Exif data: Invalid segment size.'); - return; - } - - // Check for the two null bytes: - if ( dataView.getUint16( offset + 8 ) !== 0x0000 ) { - Base.log('Invalid Exif data: Missing byte alignment offset.'); - return; - } - - // Check the byte alignment: - switch ( dataView.getUint16( tiffOffset ) ) { - case 0x4949: - littleEndian = true; - break; - - case 0x4D4D: - littleEndian = false; - break; - - default: - Base.log('Invalid Exif data: Invalid byte alignment marker.'); - return; - } - - // Check for the TIFF tag marker (0x002A): - if ( dataView.getUint16( tiffOffset + 2, littleEndian ) !== 0x002A ) { - Base.log('Invalid Exif data: Missing TIFF marker.'); - return; - } - - // Retrieve the directory offset bytes, usually 0x00000008 or 8 decimal: - dirOffset = dataView.getUint32( tiffOffset + 4, littleEndian ); - // Create the exif object to store the tags: - data.exif = new EXIF.ExifMap(); - // Parse the tags of the main image directory and retrieve the - // offset to the next directory, usually the thumbnail directory: - dirOffset = EXIF.parseExifTags( dataView, tiffOffset, - tiffOffset + dirOffset, littleEndian, data ); - - // 尝试读取缩略图 - // if ( dirOffset ) { - // thumbnailData = {exif: {}}; - // dirOffset = EXIF.parseExifTags( - // dataView, - // tiffOffset, - // tiffOffset + dirOffset, - // littleEndian, - // thumbnailData - // ); - - // // Check for JPEG Thumbnail offset: - // if (thumbnailData.exif[0x0201]) { - // data.exif.Thumbnail = EXIF.getExifThumbnail( - // dataView, - // tiffOffset + thumbnailData.exif[0x0201], - // thumbnailData.exif[0x0202] // Thumbnail data length - // ); - // } - // } - }; - - ImageMeta.parsers[ 0xffe1 ].push( EXIF.parseExifData ); - return EXIF; - }); - /** - * 这个方式性能不行,但是可以解决android里面的toDataUrl的bug - * android里面toDataUrl('image/jpege')得到的结果却是png. - * - * 所以这里没辙,只能借助这个工具 - * @fileOverview jpeg encoder - */ - define('runtime/html5/jpegencoder',[], function( require, exports, module ) { - - /* - Copyright (c) 2008, Adobe Systems Incorporated - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of Adobe Systems Incorporated nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - /* - JPEG encoder ported to JavaScript and optimized by Andreas Ritter, www.bytestrom.eu, 11/2009 - - Basic GUI blocking jpeg encoder - */ - - function JPEGEncoder(quality) { - var self = this; - var fround = Math.round; - var ffloor = Math.floor; - var YTable = new Array(64); - var UVTable = new Array(64); - var fdtbl_Y = new Array(64); - var fdtbl_UV = new Array(64); - var YDC_HT; - var UVDC_HT; - var YAC_HT; - var UVAC_HT; - - var bitcode = new Array(65535); - var category = new Array(65535); - var outputfDCTQuant = new Array(64); - var DU = new Array(64); - var byteout = []; - var bytenew = 0; - var bytepos = 7; - - var YDU = new Array(64); - var UDU = new Array(64); - var VDU = new Array(64); - var clt = new Array(256); - var RGB_YUV_TABLE = new Array(2048); - var currentQuality; - - var ZigZag = [ - 0, 1, 5, 6,14,15,27,28, - 2, 4, 7,13,16,26,29,42, - 3, 8,12,17,25,30,41,43, - 9,11,18,24,31,40,44,53, - 10,19,23,32,39,45,52,54, - 20,22,33,38,46,51,55,60, - 21,34,37,47,50,56,59,61, - 35,36,48,49,57,58,62,63 - ]; - - var std_dc_luminance_nrcodes = [0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0]; - var std_dc_luminance_values = [0,1,2,3,4,5,6,7,8,9,10,11]; - var std_ac_luminance_nrcodes = [0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,0x7d]; - var std_ac_luminance_values = [ - 0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12, - 0x21,0x31,0x41,0x06,0x13,0x51,0x61,0x07, - 0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08, - 0x23,0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0, - 0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16, - 0x17,0x18,0x19,0x1a,0x25,0x26,0x27,0x28, - 0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39, - 0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49, - 0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59, - 0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69, - 0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79, - 0x7a,0x83,0x84,0x85,0x86,0x87,0x88,0x89, - 0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98, - 0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7, - 0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6, - 0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5, - 0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4, - 0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2, - 0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea, - 0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8, - 0xf9,0xfa - ]; - - var std_dc_chrominance_nrcodes = [0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0]; - var std_dc_chrominance_values = [0,1,2,3,4,5,6,7,8,9,10,11]; - var std_ac_chrominance_nrcodes = [0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,0x77]; - var std_ac_chrominance_values = [ - 0x00,0x01,0x02,0x03,0x11,0x04,0x05,0x21, - 0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71, - 0x13,0x22,0x32,0x81,0x08,0x14,0x42,0x91, - 0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0, - 0x15,0x62,0x72,0xd1,0x0a,0x16,0x24,0x34, - 0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26, - 0x27,0x28,0x29,0x2a,0x35,0x36,0x37,0x38, - 0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48, - 0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58, - 0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68, - 0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78, - 0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87, - 0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96, - 0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5, - 0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4, - 0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3, - 0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2, - 0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda, - 0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9, - 0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8, - 0xf9,0xfa - ]; - - function initQuantTables(sf){ - var YQT = [ - 16, 11, 10, 16, 24, 40, 51, 61, - 12, 12, 14, 19, 26, 58, 60, 55, - 14, 13, 16, 24, 40, 57, 69, 56, - 14, 17, 22, 29, 51, 87, 80, 62, - 18, 22, 37, 56, 68,109,103, 77, - 24, 35, 55, 64, 81,104,113, 92, - 49, 64, 78, 87,103,121,120,101, - 72, 92, 95, 98,112,100,103, 99 - ]; - - for (var i = 0; i < 64; i++) { - var t = ffloor((YQT[i]*sf+50)/100); - if (t < 1) { - t = 1; - } else if (t > 255) { - t = 255; - } - YTable[ZigZag[i]] = t; - } - var UVQT = [ - 17, 18, 24, 47, 99, 99, 99, 99, - 18, 21, 26, 66, 99, 99, 99, 99, - 24, 26, 56, 99, 99, 99, 99, 99, - 47, 66, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99 - ]; - for (var j = 0; j < 64; j++) { - var u = ffloor((UVQT[j]*sf+50)/100); - if (u < 1) { - u = 1; - } else if (u > 255) { - u = 255; - } - UVTable[ZigZag[j]] = u; - } - var aasf = [ - 1.0, 1.387039845, 1.306562965, 1.175875602, - 1.0, 0.785694958, 0.541196100, 0.275899379 - ]; - var k = 0; - for (var row = 0; row < 8; row++) - { - for (var col = 0; col < 8; col++) - { - fdtbl_Y[k] = (1.0 / (YTable [ZigZag[k]] * aasf[row] * aasf[col] * 8.0)); - fdtbl_UV[k] = (1.0 / (UVTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0)); - k++; - } - } - } - - function computeHuffmanTbl(nrcodes, std_table){ - var codevalue = 0; - var pos_in_table = 0; - var HT = new Array(); - for (var k = 1; k <= 16; k++) { - for (var j = 1; j <= nrcodes[k]; j++) { - HT[std_table[pos_in_table]] = []; - HT[std_table[pos_in_table]][0] = codevalue; - HT[std_table[pos_in_table]][1] = k; - pos_in_table++; - codevalue++; - } - codevalue*=2; - } - return HT; - } - - function initHuffmanTbl() - { - YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes,std_dc_luminance_values); - UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes,std_dc_chrominance_values); - YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes,std_ac_luminance_values); - UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes,std_ac_chrominance_values); - } - - function initCategoryNumber() - { - var nrlower = 1; - var nrupper = 2; - for (var cat = 1; cat <= 15; cat++) { - //Positive numbers - for (var nr = nrlower; nr>0] = 38470 * i; - RGB_YUV_TABLE[(i+ 512)>>0] = 7471 * i + 0x8000; - RGB_YUV_TABLE[(i+ 768)>>0] = -11059 * i; - RGB_YUV_TABLE[(i+1024)>>0] = -21709 * i; - RGB_YUV_TABLE[(i+1280)>>0] = 32768 * i + 0x807FFF; - RGB_YUV_TABLE[(i+1536)>>0] = -27439 * i; - RGB_YUV_TABLE[(i+1792)>>0] = - 5329 * i; - } - } - - // IO functions - function writeBits(bs) - { - var value = bs[0]; - var posval = bs[1]-1; - while ( posval >= 0 ) { - if (value & (1 << posval) ) { - bytenew |= (1 << bytepos); - } - posval--; - bytepos--; - if (bytepos < 0) { - if (bytenew == 0xFF) { - writeByte(0xFF); - writeByte(0); - } - else { - writeByte(bytenew); - } - bytepos=7; - bytenew=0; - } - } - } - - function writeByte(value) - { - byteout.push(clt[value]); // write char directly instead of converting later - } - - function writeWord(value) - { - writeByte((value>>8)&0xFF); - writeByte((value )&0xFF); - } - - // DCT & quantization core - function fDCTQuant(data, fdtbl) - { - var d0, d1, d2, d3, d4, d5, d6, d7; - /* Pass 1: process rows. */ - var dataOff=0; - var i; - var I8 = 8; - var I64 = 64; - for (i=0; i 0.0) ? ((fDCTQuant + 0.5)|0) : ((fDCTQuant - 0.5)|0); - //outputfDCTQuant[i] = fround(fDCTQuant); - - } - return outputfDCTQuant; - } - - function writeAPP0() - { - writeWord(0xFFE0); // marker - writeWord(16); // length - writeByte(0x4A); // J - writeByte(0x46); // F - writeByte(0x49); // I - writeByte(0x46); // F - writeByte(0); // = "JFIF",'\0' - writeByte(1); // versionhi - writeByte(1); // versionlo - writeByte(0); // xyunits - writeWord(1); // xdensity - writeWord(1); // ydensity - writeByte(0); // thumbnwidth - writeByte(0); // thumbnheight - } - - function writeSOF0(width, height) - { - writeWord(0xFFC0); // marker - writeWord(17); // length, truecolor YUV JPG - writeByte(8); // precision - writeWord(height); - writeWord(width); - writeByte(3); // nrofcomponents - writeByte(1); // IdY - writeByte(0x11); // HVY - writeByte(0); // QTY - writeByte(2); // IdU - writeByte(0x11); // HVU - writeByte(1); // QTU - writeByte(3); // IdV - writeByte(0x11); // HVV - writeByte(1); // QTV - } - - function writeDQT() - { - writeWord(0xFFDB); // marker - writeWord(132); // length - writeByte(0); - for (var i=0; i<64; i++) { - writeByte(YTable[i]); - } - writeByte(1); - for (var j=0; j<64; j++) { - writeByte(UVTable[j]); - } - } - - function writeDHT() - { - writeWord(0xFFC4); // marker - writeWord(0x01A2); // length - - writeByte(0); // HTYDCinfo - for (var i=0; i<16; i++) { - writeByte(std_dc_luminance_nrcodes[i+1]); - } - for (var j=0; j<=11; j++) { - writeByte(std_dc_luminance_values[j]); - } - - writeByte(0x10); // HTYACinfo - for (var k=0; k<16; k++) { - writeByte(std_ac_luminance_nrcodes[k+1]); - } - for (var l=0; l<=161; l++) { - writeByte(std_ac_luminance_values[l]); - } - - writeByte(1); // HTUDCinfo - for (var m=0; m<16; m++) { - writeByte(std_dc_chrominance_nrcodes[m+1]); - } - for (var n=0; n<=11; n++) { - writeByte(std_dc_chrominance_values[n]); - } - - writeByte(0x11); // HTUACinfo - for (var o=0; o<16; o++) { - writeByte(std_ac_chrominance_nrcodes[o+1]); - } - for (var p=0; p<=161; p++) { - writeByte(std_ac_chrominance_values[p]); - } - } - - function writeSOS() - { - writeWord(0xFFDA); // marker - writeWord(12); // length - writeByte(3); // nrofcomponents - writeByte(1); // IdY - writeByte(0); // HTY - writeByte(2); // IdU - writeByte(0x11); // HTU - writeByte(3); // IdV - writeByte(0x11); // HTV - writeByte(0); // Ss - writeByte(0x3f); // Se - writeByte(0); // Bf - } - - function processDU(CDU, fdtbl, DC, HTDC, HTAC){ - var EOB = HTAC[0x00]; - var M16zeroes = HTAC[0xF0]; - var pos; - var I16 = 16; - var I63 = 63; - var I64 = 64; - var DU_DCT = fDCTQuant(CDU, fdtbl); - //ZigZag reorder - for (var j=0;j0)&&(DU[end0pos]==0); end0pos--) {}; - //end0pos = first element in reverse order !=0 - if ( end0pos == 0) { - writeBits(EOB); - return DC; - } - var i = 1; - var lng; - while ( i <= end0pos ) { - var startpos = i; - for (; (DU[i]==0) && (i<=end0pos); ++i) {} - var nrzeroes = i-startpos; - if ( nrzeroes >= I16 ) { - lng = nrzeroes>>4; - for (var nrmarker=1; nrmarker <= lng; ++nrmarker) - writeBits(M16zeroes); - nrzeroes = nrzeroes&0xF; - } - pos = 32767+DU[i]; - writeBits(HTAC[(nrzeroes<<4)+category[pos]]); - writeBits(bitcode[pos]); - i++; - } - if ( end0pos != I63 ) { - writeBits(EOB); - } - return DC; - } - - function initCharLookupTable(){ - var sfcc = String.fromCharCode; - for(var i=0; i < 256; i++){ ///// ACHTUNG // 255 - clt[i] = sfcc(i); - } - } - - this.encode = function(image,quality) // image data object - { - // var time_start = new Date().getTime(); - - if(quality) setQuality(quality); - - // Initialize bit writer - byteout = new Array(); - bytenew=0; - bytepos=7; - - // Add JPEG headers - writeWord(0xFFD8); // SOI - writeAPP0(); - writeDQT(); - writeSOF0(image.width,image.height); - writeDHT(); - writeSOS(); - - - // Encode 8x8 macroblocks - var DCY=0; - var DCU=0; - var DCV=0; - - bytenew=0; - bytepos=7; - - - this.encode.displayName = "_encode_"; - - var imageData = image.data; - var width = image.width; - var height = image.height; - - var quadWidth = width*4; - var tripleWidth = width*3; - - var x, y = 0; - var r, g, b; - var start,p, col,row,pos; - while(y < height){ - x = 0; - while(x < quadWidth){ - start = quadWidth * y + x; - p = start; - col = -1; - row = 0; - - for(pos=0; pos < 64; pos++){ - row = pos >> 3;// /8 - col = ( pos & 7 ) * 4; // %8 - p = start + ( row * quadWidth ) + col; - - if(y+row >= height){ // padding bottom - p-= (quadWidth*(y+1+row-height)); - } - - if(x+col >= quadWidth){ // padding right - p-= ((x+col) - quadWidth +4) - } - - r = imageData[ p++ ]; - g = imageData[ p++ ]; - b = imageData[ p++ ]; - - - /* // calculate YUV values dynamically - YDU[pos]=((( 0.29900)*r+( 0.58700)*g+( 0.11400)*b))-128; //-0x80 - UDU[pos]=(((-0.16874)*r+(-0.33126)*g+( 0.50000)*b)); - VDU[pos]=((( 0.50000)*r+(-0.41869)*g+(-0.08131)*b)); - */ - - // use lookup table (slightly faster) - YDU[pos] = ((RGB_YUV_TABLE[r] + RGB_YUV_TABLE[(g + 256)>>0] + RGB_YUV_TABLE[(b + 512)>>0]) >> 16)-128; - UDU[pos] = ((RGB_YUV_TABLE[(r + 768)>>0] + RGB_YUV_TABLE[(g + 1024)>>0] + RGB_YUV_TABLE[(b + 1280)>>0]) >> 16)-128; - VDU[pos] = ((RGB_YUV_TABLE[(r + 1280)>>0] + RGB_YUV_TABLE[(g + 1536)>>0] + RGB_YUV_TABLE[(b + 1792)>>0]) >> 16)-128; - - } - - DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT); - DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT); - DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT); - x+=32; - } - y+=8; - } - - - //////////////////////////////////////////////////////////////// - - // Do the bit alignment of the EOI marker - if ( bytepos >= 0 ) { - var fillbits = []; - fillbits[1] = bytepos+1; - fillbits[0] = (1<<(bytepos+1))-1; - writeBits(fillbits); - } - - writeWord(0xFFD9); //EOI - - var jpegDataUri = 'data:image/jpeg;base64,' + btoa(byteout.join('')); - - byteout = []; - - // benchmarking - // var duration = new Date().getTime() - time_start; - // console.log('Encoding time: '+ currentQuality + 'ms'); - // - - return jpegDataUri - } - - function setQuality(quality){ - if (quality <= 0) { - quality = 1; - } - if (quality > 100) { - quality = 100; - } - - if(currentQuality == quality) return // don't recalc if unchanged - - var sf = 0; - if (quality < 50) { - sf = Math.floor(5000 / quality); - } else { - sf = Math.floor(200 - quality*2); - } - - initQuantTables(sf); - currentQuality = quality; - // console.log('Quality set to: '+quality +'%'); - } - - function init(){ - // var time_start = new Date().getTime(); - if(!quality) quality = 50; - // Create tables - initCharLookupTable() - initHuffmanTbl(); - initCategoryNumber(); - initRGBYUVTable(); - - setQuality(quality); - // var duration = new Date().getTime() - time_start; - // console.log('Initialization '+ duration + 'ms'); - } - - init(); - - }; - - JPEGEncoder.encode = function( data, quality ) { - var encoder = new JPEGEncoder( quality ); - - return encoder.encode( data ); - } - - return JPEGEncoder; - }); - /** - * @fileOverview Fix android canvas.toDataUrl bug. - */ - define('runtime/html5/androidpatch',[ - 'runtime/html5/util', - 'runtime/html5/jpegencoder', - 'base' - ], function( Util, encoder, Base ) { - var origin = Util.canvasToDataUrl, - supportJpeg; - - Util.canvasToDataUrl = function( canvas, type, quality ) { - var ctx, w, h, fragement, parts; - - // 非android手机直接跳过。 - if ( !Base.os.android ) { - return origin.apply( null, arguments ); - } - - // 检测是否canvas支持jpeg导出,根据数据格式来判断。 - // JPEG 前两位分别是:255, 216 - if ( type === 'image/jpeg' && typeof supportJpeg === 'undefined' ) { - fragement = origin.apply( null, arguments ); - - parts = fragement.split(','); - - if ( ~parts[ 0 ].indexOf('base64') ) { - fragement = atob( parts[ 1 ] ); - } else { - fragement = decodeURIComponent( parts[ 1 ] ); - } - - fragement = fragement.substring( 0, 2 ); - - supportJpeg = fragement.charCodeAt( 0 ) === 255 && - fragement.charCodeAt( 1 ) === 216; - } - - // 只有在android环境下才修复 - if ( type === 'image/jpeg' && !supportJpeg ) { - w = canvas.width; - h = canvas.height; - ctx = canvas.getContext('2d'); - - return encoder.encode( ctx.getImageData( 0, 0, w, h ), quality ); - } - - return origin.apply( null, arguments ); - }; - }); - /** - * @fileOverview Image - */ - define('runtime/html5/image',[ - 'base', - 'runtime/html5/runtime', - 'runtime/html5/util' - ], function( Base, Html5Runtime, Util ) { - - var BLANK = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D'; - - return Html5Runtime.register( 'Image', { - - // flag: 标记是否被修改过。 - modified: false, - - init: function() { - var me = this, - img = new Image(); - - img.onload = function() { - - me._info = { - type: me.type, - width: this.width, - height: this.height - }; - - // 读取meta信息。 - if ( !me._metas && 'image/jpeg' === me.type ) { - Util.parseMeta( me._blob, function( error, ret ) { - me._metas = ret; - me.owner.trigger('load'); - }); - } else { - me.owner.trigger('load'); - } - }; - - img.onerror = function() { - me.owner.trigger('error'); - }; - - me._img = img; - }, - - loadFromBlob: function( blob ) { - var me = this, - img = me._img; - - me._blob = blob; - me.type = blob.type; - img.src = Util.createObjectURL( blob.getSource() ); - me.owner.once( 'load', function() { - Util.revokeObjectURL( img.src ); - }); - }, - - resize: function( width, height ) { - var canvas = this._canvas || - (this._canvas = document.createElement('canvas')); - - this._resize( this._img, canvas, width, height ); - this._blob = null; // 没用了,可以删掉了。 - this.modified = true; - this.owner.trigger( 'complete', 'resize' ); - }, - - crop: function( x, y, w, h, s ) { - var cvs = this._canvas || - (this._canvas = document.createElement('canvas')), - opts = this.options, - img = this._img, - iw = img.naturalWidth, - ih = img.naturalHeight, - orientation = this.getOrientation(); - - s = s || 1; - - // todo 解决 orientation 的问题。 - // values that require 90 degree rotation - // if ( ~[ 5, 6, 7, 8 ].indexOf( orientation ) ) { - - // switch ( orientation ) { - // case 6: - // tmp = x; - // x = y; - // y = iw * s - tmp - w; - // console.log(ih * s, tmp, w) - // break; - // } - - // (w ^= h, h ^= w, w ^= h); - // } - - cvs.width = w; - cvs.height = h; - - opts.preserveHeaders || this._rotate2Orientaion( cvs, orientation ); - this._renderImageToCanvas( cvs, img, -x, -y, iw * s, ih * s ); - - this._blob = null; // 没用了,可以删掉了。 - this.modified = true; - this.owner.trigger( 'complete', 'crop' ); - }, - - getAsBlob: function( type ) { - var blob = this._blob, - opts = this.options, - canvas; - - type = type || this.type; - - // blob需要重新生成。 - if ( this.modified || this.type !== type ) { - canvas = this._canvas; - - if ( type === 'image/jpeg' ) { - - blob = Util.canvasToDataUrl( canvas, type, opts.quality ); - - if ( opts.preserveHeaders && this._metas && - this._metas.imageHead ) { - - blob = Util.dataURL2ArrayBuffer( blob ); - blob = Util.updateImageHead( blob, - this._metas.imageHead ); - blob = Util.arrayBufferToBlob( blob, type ); - return blob; - } - } else { - blob = Util.canvasToDataUrl( canvas, type ); - } - - blob = Util.dataURL2Blob( blob ); - } - - return blob; - }, - - getAsDataUrl: function( type ) { - var opts = this.options; - - type = type || this.type; - - if ( type === 'image/jpeg' ) { - return Util.canvasToDataUrl( this._canvas, type, opts.quality ); - } else { - return this._canvas.toDataURL( type ); - } - }, - - getOrientation: function() { - return this._metas && this._metas.exif && - this._metas.exif.get('Orientation') || 1; - }, - - info: function( val ) { - - // setter - if ( val ) { - this._info = val; - return this; - } - - // getter - return this._info; - }, - - meta: function( val ) { - - // setter - if ( val ) { - this._meta = val; - return this; - } - - // getter - return this._meta; - }, - - destroy: function() { - var canvas = this._canvas; - this._img.onload = null; - - if ( canvas ) { - canvas.getContext('2d') - .clearRect( 0, 0, canvas.width, canvas.height ); - canvas.width = canvas.height = 0; - this._canvas = null; - } - - // 释放内存。非常重要,否则释放不了image的内存。 - this._img.src = BLANK; - this._img = this._blob = null; - }, - - _resize: function( img, cvs, width, height ) { - var opts = this.options, - naturalWidth = img.width, - naturalHeight = img.height, - orientation = this.getOrientation(), - scale, w, h, x, y; - - // values that require 90 degree rotation - if ( ~[ 5, 6, 7, 8 ].indexOf( orientation ) ) { - - // 交换width, height的值。 - width ^= height; - height ^= width; - width ^= height; - } - - scale = Math[ opts.crop ? 'max' : 'min' ]( width / naturalWidth, - height / naturalHeight ); - - // 不允许放大。 - opts.allowMagnify || (scale = Math.min( 1, scale )); - - w = naturalWidth * scale; - h = naturalHeight * scale; - - if ( opts.crop ) { - cvs.width = width; - cvs.height = height; - } else { - cvs.width = w; - cvs.height = h; - } - - x = (cvs.width - w) / 2; - y = (cvs.height - h) / 2; - - opts.preserveHeaders || this._rotate2Orientaion( cvs, orientation ); - - this._renderImageToCanvas( cvs, img, x, y, w, h ); - }, - - _rotate2Orientaion: function( canvas, orientation ) { - var width = canvas.width, - height = canvas.height, - ctx = canvas.getContext('2d'); - - switch ( orientation ) { - case 5: - case 6: - case 7: - case 8: - canvas.width = height; - canvas.height = width; - break; - } - - switch ( orientation ) { - case 2: // horizontal flip - ctx.translate( width, 0 ); - ctx.scale( -1, 1 ); - break; - - case 3: // 180 rotate left - ctx.translate( width, height ); - ctx.rotate( Math.PI ); - break; - - case 4: // vertical flip - ctx.translate( 0, height ); - ctx.scale( 1, -1 ); - break; - - case 5: // vertical flip + 90 rotate right - ctx.rotate( 0.5 * Math.PI ); - ctx.scale( 1, -1 ); - break; - - case 6: // 90 rotate right - ctx.rotate( 0.5 * Math.PI ); - ctx.translate( 0, -height ); - break; - - case 7: // horizontal flip + 90 rotate right - ctx.rotate( 0.5 * Math.PI ); - ctx.translate( width, -height ); - ctx.scale( -1, 1 ); - break; - - case 8: // 90 rotate left - ctx.rotate( -0.5 * Math.PI ); - ctx.translate( -width, 0 ); - break; - } - }, - - // https://github.com/stomita/ios-imagefile-megapixel/ - // blob/master/src/megapix-image.js - _renderImageToCanvas: (function() { - - // 如果不是ios, 不需要这么复杂! - if ( !Base.os.ios ) { - return function( canvas ) { - var args = Base.slice( arguments, 1 ), - ctx = canvas.getContext('2d'); - - ctx.drawImage.apply( ctx, args ); - }; - } - - /** - * Detecting vertical squash in loaded image. - * Fixes a bug which squash image vertically while drawing into - * canvas for some images. - */ - function detectVerticalSquash( img, iw, ih ) { - var canvas = document.createElement('canvas'), - ctx = canvas.getContext('2d'), - sy = 0, - ey = ih, - py = ih, - data, alpha, ratio; - - - canvas.width = 1; - canvas.height = ih; - ctx.drawImage( img, 0, 0 ); - data = ctx.getImageData( 0, 0, 1, ih ).data; - - // search image edge pixel position in case - // it is squashed vertically. - while ( py > sy ) { - alpha = data[ (py - 1) * 4 + 3 ]; - - if ( alpha === 0 ) { - ey = py; - } else { - sy = py; - } - - py = (ey + sy) >> 1; - } - - ratio = (py / ih); - return (ratio === 0) ? 1 : ratio; - } - - // fix ie7 bug - // http://stackoverflow.com/questions/11929099/ - // html5-canvas-drawimage-ratio-bug-ios - if ( Base.os.ios >= 7 ) { - return function( canvas, img, x, y, w, h ) { - var iw = img.naturalWidth, - ih = img.naturalHeight, - vertSquashRatio = detectVerticalSquash( img, iw, ih ); - - return canvas.getContext('2d').drawImage( img, 0, 0, - iw * vertSquashRatio, ih * vertSquashRatio, - x, y, w, h ); - }; - } - - /** - * Detect subsampling in loaded image. - * In iOS, larger images than 2M pixels may be - * subsampled in rendering. - */ - function detectSubsampling( img ) { - var iw = img.naturalWidth, - ih = img.naturalHeight, - canvas, ctx; - - // subsampling may happen overmegapixel image - if ( iw * ih > 1024 * 1024 ) { - canvas = document.createElement('canvas'); - canvas.width = canvas.height = 1; - ctx = canvas.getContext('2d'); - ctx.drawImage( img, -iw + 1, 0 ); - - // subsampled image becomes half smaller in rendering size. - // check alpha channel value to confirm image is covering - // edge pixel or not. if alpha value is 0 - // image is not covering, hence subsampled. - return ctx.getImageData( 0, 0, 1, 1 ).data[ 3 ] === 0; - } else { - return false; - } - } - - - return function( canvas, img, x, y, width, height ) { - var iw = img.naturalWidth, - ih = img.naturalHeight, - ctx = canvas.getContext('2d'), - subsampled = detectSubsampling( img ), - doSquash = this.type === 'image/jpeg', - d = 1024, - sy = 0, - dy = 0, - tmpCanvas, tmpCtx, vertSquashRatio, dw, dh, sx, dx; - - if ( subsampled ) { - iw /= 2; - ih /= 2; - } - - ctx.save(); - tmpCanvas = document.createElement('canvas'); - tmpCanvas.width = tmpCanvas.height = d; - - tmpCtx = tmpCanvas.getContext('2d'); - vertSquashRatio = doSquash ? - detectVerticalSquash( img, iw, ih ) : 1; - - dw = Math.ceil( d * width / iw ); - dh = Math.ceil( d * height / ih / vertSquashRatio ); - - while ( sy < ih ) { - sx = 0; - dx = 0; - while ( sx < iw ) { - tmpCtx.clearRect( 0, 0, d, d ); - tmpCtx.drawImage( img, -sx, -sy ); - ctx.drawImage( tmpCanvas, 0, 0, d, d, - x + dx, y + dy, dw, dh ); - sx += d; - dx += dw; - } - sy += d; - dy += dh; - } - ctx.restore(); - tmpCanvas = tmpCtx = null; - }; - })() - }); - }); - /** - * @fileOverview Transport - * @todo 支持chunked传输,优势: - * 可以将大文件分成小块,挨个传输,可以提高大文件成功率,当失败的时候,也只需要重传那小部分, - * 而不需要重头再传一次。另外断点续传也需要用chunked方式。 - */ - define('runtime/html5/transport',[ - 'base', - 'runtime/html5/runtime' - ], function( Base, Html5Runtime ) { - - var noop = Base.noop, - $ = Base.$; - - return Html5Runtime.register( 'Transport', { - init: function() { - this._status = 0; - this._response = null; - }, - - send: function() { - var owner = this.owner, - opts = this.options, - xhr = this._initAjax(), - blob = owner._blob, - server = opts.server, - formData, binary, fr; - - if ( opts.sendAsBinary ) { - server += (/\?/.test( server ) ? '&' : '?') + - $.param( owner._formData ); - - binary = blob.getSource(); - } else { - formData = new FormData(); - $.each( owner._formData, function( k, v ) { - formData.append( k, v ); - }); - - formData.append( opts.fileVal, blob.getSource(), - opts.filename || owner._formData.name || '' ); - } - - if ( opts.withCredentials && 'withCredentials' in xhr ) { - xhr.open( opts.method, server, true ); - xhr.withCredentials = true; - } else { - xhr.open( opts.method, server ); - } - - this._setRequestHeader( xhr, opts.headers ); - - if ( binary ) { - // 强制设置成 content-type 为文件流。 - xhr.overrideMimeType && - xhr.overrideMimeType('application/octet-stream'); - - // android直接发送blob会导致服务端接收到的是空文件。 - // bug详情。 - // https://code.google.com/p/android/issues/detail?id=39882 - // 所以先用fileReader读取出来再通过arraybuffer的方式发送。 - if ( Base.os.android ) { - fr = new FileReader(); - - fr.onload = function() { - xhr.send( this.result ); - fr = fr.onload = null; - }; - - fr.readAsArrayBuffer( binary ); - } else { - xhr.send( binary ); - } - } else { - xhr.send( formData ); - } - }, - - getResponse: function() { - return this._response; - }, - - getResponseAsJson: function() { - return this._parseJson( this._response ); - }, - - getStatus: function() { - return this._status; - }, - - abort: function() { - var xhr = this._xhr; - - if ( xhr ) { - xhr.upload.onprogress = noop; - xhr.onreadystatechange = noop; - xhr.abort(); - - this._xhr = xhr = null; - } - }, - - destroy: function() { - this.abort(); - }, - - _initAjax: function() { - var me = this, - xhr = new XMLHttpRequest(), - opts = this.options; - - if ( opts.withCredentials && !('withCredentials' in xhr) && - typeof XDomainRequest !== 'undefined' ) { - xhr = new XDomainRequest(); - } - - xhr.upload.onprogress = function( e ) { - var percentage = 0; - - if ( e.lengthComputable ) { - percentage = e.loaded / e.total; - } - - return me.trigger( 'progress', percentage ); - }; - - xhr.onreadystatechange = function() { - - if ( xhr.readyState !== 4 ) { - return; - } - - xhr.upload.onprogress = noop; - xhr.onreadystatechange = noop; - me._xhr = null; - me._status = xhr.status; - - if ( xhr.status >= 200 && xhr.status < 300 ) { - me._response = xhr.responseText; - return me.trigger('load'); - } else if ( xhr.status >= 500 && xhr.status < 600 ) { - me._response = xhr.responseText; - return me.trigger( 'error', 'server' ); - } - - - return me.trigger( 'error', me._status ? 'http' : 'abort' ); - }; - - me._xhr = xhr; - return xhr; - }, - - _setRequestHeader: function( xhr, headers ) { - $.each( headers, function( key, val ) { - xhr.setRequestHeader( key, val ); - }); - }, - - _parseJson: function( str ) { - var json; - - try { - json = JSON.parse( str ); - } catch ( ex ) { - json = {}; - } - - return json; - } - }); - }); - /** - * @fileOverview Transport flash实现 - */ - define('runtime/html5/md5',[ - 'runtime/html5/runtime' - ], function( FlashRuntime ) { - - /* - * Fastest md5 implementation around (JKM md5) - * Credits: Joseph Myers - * - * @see http://www.myersdaily.org/joseph/javascript/md5-text.html - * @see http://jsperf.com/md5-shootout/7 - */ - - /* this function is much faster, - so if possible we use it. Some IEs - are the only ones I know of that - need the idiotic second function, - generated by an if clause. */ - var add32 = function (a, b) { - return (a + b) & 0xFFFFFFFF; - }, - - cmn = function (q, a, b, x, s, t) { - a = add32(add32(a, q), add32(x, t)); - return add32((a << s) | (a >>> (32 - s)), b); - }, - - ff = function (a, b, c, d, x, s, t) { - return cmn((b & c) | ((~b) & d), a, b, x, s, t); - }, - - gg = function (a, b, c, d, x, s, t) { - return cmn((b & d) | (c & (~d)), a, b, x, s, t); - }, - - hh = function (a, b, c, d, x, s, t) { - return cmn(b ^ c ^ d, a, b, x, s, t); - }, - - ii = function (a, b, c, d, x, s, t) { - return cmn(c ^ (b | (~d)), a, b, x, s, t); - }, - - md5cycle = function (x, k) { - var a = x[0], - b = x[1], - c = x[2], - d = x[3]; - - a = ff(a, b, c, d, k[0], 7, -680876936); - d = ff(d, a, b, c, k[1], 12, -389564586); - c = ff(c, d, a, b, k[2], 17, 606105819); - b = ff(b, c, d, a, k[3], 22, -1044525330); - a = ff(a, b, c, d, k[4], 7, -176418897); - d = ff(d, a, b, c, k[5], 12, 1200080426); - c = ff(c, d, a, b, k[6], 17, -1473231341); - b = ff(b, c, d, a, k[7], 22, -45705983); - a = ff(a, b, c, d, k[8], 7, 1770035416); - d = ff(d, a, b, c, k[9], 12, -1958414417); - c = ff(c, d, a, b, k[10], 17, -42063); - b = ff(b, c, d, a, k[11], 22, -1990404162); - a = ff(a, b, c, d, k[12], 7, 1804603682); - d = ff(d, a, b, c, k[13], 12, -40341101); - c = ff(c, d, a, b, k[14], 17, -1502002290); - b = ff(b, c, d, a, k[15], 22, 1236535329); - - a = gg(a, b, c, d, k[1], 5, -165796510); - d = gg(d, a, b, c, k[6], 9, -1069501632); - c = gg(c, d, a, b, k[11], 14, 643717713); - b = gg(b, c, d, a, k[0], 20, -373897302); - a = gg(a, b, c, d, k[5], 5, -701558691); - d = gg(d, a, b, c, k[10], 9, 38016083); - c = gg(c, d, a, b, k[15], 14, -660478335); - b = gg(b, c, d, a, k[4], 20, -405537848); - a = gg(a, b, c, d, k[9], 5, 568446438); - d = gg(d, a, b, c, k[14], 9, -1019803690); - c = gg(c, d, a, b, k[3], 14, -187363961); - b = gg(b, c, d, a, k[8], 20, 1163531501); - a = gg(a, b, c, d, k[13], 5, -1444681467); - d = gg(d, a, b, c, k[2], 9, -51403784); - c = gg(c, d, a, b, k[7], 14, 1735328473); - b = gg(b, c, d, a, k[12], 20, -1926607734); - - a = hh(a, b, c, d, k[5], 4, -378558); - d = hh(d, a, b, c, k[8], 11, -2022574463); - c = hh(c, d, a, b, k[11], 16, 1839030562); - b = hh(b, c, d, a, k[14], 23, -35309556); - a = hh(a, b, c, d, k[1], 4, -1530992060); - d = hh(d, a, b, c, k[4], 11, 1272893353); - c = hh(c, d, a, b, k[7], 16, -155497632); - b = hh(b, c, d, a, k[10], 23, -1094730640); - a = hh(a, b, c, d, k[13], 4, 681279174); - d = hh(d, a, b, c, k[0], 11, -358537222); - c = hh(c, d, a, b, k[3], 16, -722521979); - b = hh(b, c, d, a, k[6], 23, 76029189); - a = hh(a, b, c, d, k[9], 4, -640364487); - d = hh(d, a, b, c, k[12], 11, -421815835); - c = hh(c, d, a, b, k[15], 16, 530742520); - b = hh(b, c, d, a, k[2], 23, -995338651); - - a = ii(a, b, c, d, k[0], 6, -198630844); - d = ii(d, a, b, c, k[7], 10, 1126891415); - c = ii(c, d, a, b, k[14], 15, -1416354905); - b = ii(b, c, d, a, k[5], 21, -57434055); - a = ii(a, b, c, d, k[12], 6, 1700485571); - d = ii(d, a, b, c, k[3], 10, -1894986606); - c = ii(c, d, a, b, k[10], 15, -1051523); - b = ii(b, c, d, a, k[1], 21, -2054922799); - a = ii(a, b, c, d, k[8], 6, 1873313359); - d = ii(d, a, b, c, k[15], 10, -30611744); - c = ii(c, d, a, b, k[6], 15, -1560198380); - b = ii(b, c, d, a, k[13], 21, 1309151649); - a = ii(a, b, c, d, k[4], 6, -145523070); - d = ii(d, a, b, c, k[11], 10, -1120210379); - c = ii(c, d, a, b, k[2], 15, 718787259); - b = ii(b, c, d, a, k[9], 21, -343485551); - - x[0] = add32(a, x[0]); - x[1] = add32(b, x[1]); - x[2] = add32(c, x[2]); - x[3] = add32(d, x[3]); - }, - - /* there needs to be support for Unicode here, - * unless we pretend that we can redefine the MD-5 - * algorithm for multi-byte characters (perhaps - * by adding every four 16-bit characters and - * shortening the sum to 32 bits). Otherwise - * I suggest performing MD-5 as if every character - * was two bytes--e.g., 0040 0025 = @%--but then - * how will an ordinary MD-5 sum be matched? - * There is no way to standardize text to something - * like UTF-8 before transformation; speed cost is - * utterly prohibitive. The JavaScript standard - * itself needs to look at this: it should start - * providing access to strings as preformed UTF-8 - * 8-bit unsigned value arrays. - */ - md5blk = function (s) { - var md5blks = [], - i; /* Andy King said do it this way. */ - - for (i = 0; i < 64; i += 4) { - md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24); - } - return md5blks; - }, - - md5blk_array = function (a) { - var md5blks = [], - i; /* Andy King said do it this way. */ - - for (i = 0; i < 64; i += 4) { - md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24); - } - return md5blks; - }, - - md51 = function (s) { - var n = s.length, - state = [1732584193, -271733879, -1732584194, 271733878], - i, - length, - tail, - tmp, - lo, - hi; - - for (i = 64; i <= n; i += 64) { - md5cycle(state, md5blk(s.substring(i - 64, i))); - } - s = s.substring(i - 64); - length = s.length; - tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - for (i = 0; i < length; i += 1) { - tail[i >> 2] |= s.charCodeAt(i) << ((i % 4) << 3); - } - tail[i >> 2] |= 0x80 << ((i % 4) << 3); - if (i > 55) { - md5cycle(state, tail); - for (i = 0; i < 16; i += 1) { - tail[i] = 0; - } - } - - // Beware that the final length might not fit in 32 bits so we take care of that - tmp = n * 8; - tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/); - lo = parseInt(tmp[2], 16); - hi = parseInt(tmp[1], 16) || 0; - - tail[14] = lo; - tail[15] = hi; - - md5cycle(state, tail); - return state; - }, - - md51_array = function (a) { - var n = a.length, - state = [1732584193, -271733879, -1732584194, 271733878], - i, - length, - tail, - tmp, - lo, - hi; - - for (i = 64; i <= n; i += 64) { - md5cycle(state, md5blk_array(a.subarray(i - 64, i))); - } - - // Not sure if it is a bug, however IE10 will always produce a sub array of length 1 - // containing the last element of the parent array if the sub array specified starts - // beyond the length of the parent array - weird. - // https://connect.microsoft.com/IE/feedback/details/771452/typed-array-subarray-issue - a = (i - 64) < n ? a.subarray(i - 64) : new Uint8Array(0); - - length = a.length; - tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - for (i = 0; i < length; i += 1) { - tail[i >> 2] |= a[i] << ((i % 4) << 3); - } - - tail[i >> 2] |= 0x80 << ((i % 4) << 3); - if (i > 55) { - md5cycle(state, tail); - for (i = 0; i < 16; i += 1) { - tail[i] = 0; - } - } - - // Beware that the final length might not fit in 32 bits so we take care of that - tmp = n * 8; - tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/); - lo = parseInt(tmp[2], 16); - hi = parseInt(tmp[1], 16) || 0; - - tail[14] = lo; - tail[15] = hi; - - md5cycle(state, tail); - - return state; - }, - - hex_chr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'], - - rhex = function (n) { - var s = '', - j; - for (j = 0; j < 4; j += 1) { - s += hex_chr[(n >> (j * 8 + 4)) & 0x0F] + hex_chr[(n >> (j * 8)) & 0x0F]; - } - return s; - }, - - hex = function (x) { - var i; - for (i = 0; i < x.length; i += 1) { - x[i] = rhex(x[i]); - } - return x.join(''); - }, - - md5 = function (s) { - return hex(md51(s)); - }, - - - - //////////////////////////////////////////////////////////////////////////// - - /** - * SparkMD5 OOP implementation. - * - * Use this class to perform an incremental md5, otherwise use the - * static methods instead. - */ - SparkMD5 = function () { - // call reset to init the instance - this.reset(); - }; - - - // In some cases the fast add32 function cannot be used.. - if (md5('hello') !== '5d41402abc4b2a76b9719d911017c592') { - add32 = function (x, y) { - var lsw = (x & 0xFFFF) + (y & 0xFFFF), - msw = (x >> 16) + (y >> 16) + (lsw >> 16); - return (msw << 16) | (lsw & 0xFFFF); - }; - } - - - /** - * Appends a string. - * A conversion will be applied if an utf8 string is detected. - * - * @param {String} str The string to be appended - * - * @return {SparkMD5} The instance itself - */ - SparkMD5.prototype.append = function (str) { - // converts the string to utf8 bytes if necessary - if (/[\u0080-\uFFFF]/.test(str)) { - str = unescape(encodeURIComponent(str)); - } - - // then append as binary - this.appendBinary(str); - - return this; - }; - - /** - * Appends a binary string. - * - * @param {String} contents The binary string to be appended - * - * @return {SparkMD5} The instance itself - */ - SparkMD5.prototype.appendBinary = function (contents) { - this._buff += contents; - this._length += contents.length; - - var length = this._buff.length, - i; - - for (i = 64; i <= length; i += 64) { - md5cycle(this._state, md5blk(this._buff.substring(i - 64, i))); - } - - this._buff = this._buff.substr(i - 64); - - return this; - }; - - /** - * Finishes the incremental computation, reseting the internal state and - * returning the result. - * Use the raw parameter to obtain the raw result instead of the hex one. - * - * @param {Boolean} raw True to get the raw result, false to get the hex result - * - * @return {String|Array} The result - */ - SparkMD5.prototype.end = function (raw) { - var buff = this._buff, - length = buff.length, - i, - tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - ret; - - for (i = 0; i < length; i += 1) { - tail[i >> 2] |= buff.charCodeAt(i) << ((i % 4) << 3); - } - - this._finish(tail, length); - ret = !!raw ? this._state : hex(this._state); - - this.reset(); - - return ret; - }; - - /** - * Finish the final calculation based on the tail. - * - * @param {Array} tail The tail (will be modified) - * @param {Number} length The length of the remaining buffer - */ - SparkMD5.prototype._finish = function (tail, length) { - var i = length, - tmp, - lo, - hi; - - tail[i >> 2] |= 0x80 << ((i % 4) << 3); - if (i > 55) { - md5cycle(this._state, tail); - for (i = 0; i < 16; i += 1) { - tail[i] = 0; - } - } - - // Do the final computation based on the tail and length - // Beware that the final length may not fit in 32 bits so we take care of that - tmp = this._length * 8; - tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/); - lo = parseInt(tmp[2], 16); - hi = parseInt(tmp[1], 16) || 0; - - tail[14] = lo; - tail[15] = hi; - md5cycle(this._state, tail); - }; - - /** - * Resets the internal state of the computation. - * - * @return {SparkMD5} The instance itself - */ - SparkMD5.prototype.reset = function () { - this._buff = ""; - this._length = 0; - this._state = [1732584193, -271733879, -1732584194, 271733878]; - - return this; - }; - - /** - * Releases memory used by the incremental buffer and other aditional - * resources. If you plan to use the instance again, use reset instead. - */ - SparkMD5.prototype.destroy = function () { - delete this._state; - delete this._buff; - delete this._length; - }; - - - /** - * Performs the md5 hash on a string. - * A conversion will be applied if utf8 string is detected. - * - * @param {String} str The string - * @param {Boolean} raw True to get the raw result, false to get the hex result - * - * @return {String|Array} The result - */ - SparkMD5.hash = function (str, raw) { - // converts the string to utf8 bytes if necessary - if (/[\u0080-\uFFFF]/.test(str)) { - str = unescape(encodeURIComponent(str)); - } - - var hash = md51(str); - - return !!raw ? hash : hex(hash); - }; - - /** - * Performs the md5 hash on a binary string. - * - * @param {String} content The binary string - * @param {Boolean} raw True to get the raw result, false to get the hex result - * - * @return {String|Array} The result - */ - SparkMD5.hashBinary = function (content, raw) { - var hash = md51(content); - - return !!raw ? hash : hex(hash); - }; - - /** - * SparkMD5 OOP implementation for array buffers. - * - * Use this class to perform an incremental md5 ONLY for array buffers. - */ - SparkMD5.ArrayBuffer = function () { - // call reset to init the instance - this.reset(); - }; - - //////////////////////////////////////////////////////////////////////////// - - /** - * Appends an array buffer. - * - * @param {ArrayBuffer} arr The array to be appended - * - * @return {SparkMD5.ArrayBuffer} The instance itself - */ - SparkMD5.ArrayBuffer.prototype.append = function (arr) { - // TODO: we could avoid the concatenation here but the algorithm would be more complex - // if you find yourself needing extra performance, please make a PR. - var buff = this._concatArrayBuffer(this._buff, arr), - length = buff.length, - i; - - this._length += arr.byteLength; - - for (i = 64; i <= length; i += 64) { - md5cycle(this._state, md5blk_array(buff.subarray(i - 64, i))); - } - - // Avoids IE10 weirdness (documented above) - this._buff = (i - 64) < length ? buff.subarray(i - 64) : new Uint8Array(0); - - return this; - }; - - /** - * Finishes the incremental computation, reseting the internal state and - * returning the result. - * Use the raw parameter to obtain the raw result instead of the hex one. - * - * @param {Boolean} raw True to get the raw result, false to get the hex result - * - * @return {String|Array} The result - */ - SparkMD5.ArrayBuffer.prototype.end = function (raw) { - var buff = this._buff, - length = buff.length, - tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - i, - ret; - - for (i = 0; i < length; i += 1) { - tail[i >> 2] |= buff[i] << ((i % 4) << 3); - } - - this._finish(tail, length); - ret = !!raw ? this._state : hex(this._state); - - this.reset(); - - return ret; - }; - - SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish; - - /** - * Resets the internal state of the computation. - * - * @return {SparkMD5.ArrayBuffer} The instance itself - */ - SparkMD5.ArrayBuffer.prototype.reset = function () { - this._buff = new Uint8Array(0); - this._length = 0; - this._state = [1732584193, -271733879, -1732584194, 271733878]; - - return this; - }; - - /** - * Releases memory used by the incremental buffer and other aditional - * resources. If you plan to use the instance again, use reset instead. - */ - SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy; - - /** - * Concats two array buffers, returning a new one. - * - * @param {ArrayBuffer} first The first array buffer - * @param {ArrayBuffer} second The second array buffer - * - * @return {ArrayBuffer} The new array buffer - */ - SparkMD5.ArrayBuffer.prototype._concatArrayBuffer = function (first, second) { - var firstLength = first.length, - result = new Uint8Array(firstLength + second.byteLength); - - result.set(first); - result.set(new Uint8Array(second), firstLength); - - return result; - }; - - /** - * Performs the md5 hash on an array buffer. - * - * @param {ArrayBuffer} arr The array buffer - * @param {Boolean} raw True to get the raw result, false to get the hex result - * - * @return {String|Array} The result - */ - SparkMD5.ArrayBuffer.hash = function (arr, raw) { - var hash = md51_array(new Uint8Array(arr)); - - return !!raw ? hash : hex(hash); - }; - - return FlashRuntime.register( 'Md5', { - init: function() { - // do nothing. - }, - - loadFromBlob: function( file ) { - var blob = file.getSource(), - chunkSize = 2 * 1024 * 1024, - chunks = Math.ceil( blob.size / chunkSize ), - chunk = 0, - owner = this.owner, - spark = new SparkMD5.ArrayBuffer(), - me = this, - blobSlice = blob.mozSlice || blob.webkitSlice || blob.slice, - loadNext, fr; - - fr = new FileReader(); - - loadNext = function() { - var start, end; - - start = chunk * chunkSize; - end = Math.min( start + chunkSize, blob.size ); - - fr.onload = function( e ) { - spark.append( e.target.result ); - owner.trigger( 'progress', { - total: file.size, - loaded: end - }); - }; - - fr.onloadend = function() { - fr.onloadend = fr.onload = null; - - if ( ++chunk < chunks ) { - setTimeout( loadNext, 1 ); - } else { - setTimeout(function(){ - owner.trigger('load'); - me.result = spark.end(); - loadNext = file = blob = spark = null; - owner.trigger('complete'); - }, 50 ); - } - }; - - fr.readAsArrayBuffer( blobSlice.call( blob, start, end ) ); - }; - - loadNext(); - }, - - getResult: function() { - return this.result; - } - }); - }); - /** - * @fileOverview FlashRuntime - */ - define('runtime/flash/runtime',[ - 'base', - 'runtime/runtime', - 'runtime/compbase' - ], function( Base, Runtime, CompBase ) { - - var $ = Base.$, - type = 'flash', - components = {}; - - - function getFlashVersion() { - var version; - - try { - version = navigator.plugins[ 'Shockwave Flash' ]; - version = version.description; - } catch ( ex ) { - try { - version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash') - .GetVariable('$version'); - } catch ( ex2 ) { - version = '0.0'; - } - } - version = version.match( /\d+/g ); - return parseFloat( version[ 0 ] + '.' + version[ 1 ], 10 ); - } - - function FlashRuntime() { - var pool = {}, - clients = {}, - destroy = this.destroy, - me = this, - jsreciver = Base.guid('webuploader_'); - - Runtime.apply( me, arguments ); - me.type = type; - - - // 这个方法的调用者,实际上是RuntimeClient - me.exec = function( comp, fn/*, args...*/ ) { - var client = this, - uid = client.uid, - args = Base.slice( arguments, 2 ), - instance; - - clients[ uid ] = client; - - if ( components[ comp ] ) { - if ( !pool[ uid ] ) { - pool[ uid ] = new components[ comp ]( client, me ); - } - - instance = pool[ uid ]; - - if ( instance[ fn ] ) { - return instance[ fn ].apply( instance, args ); - } - } - - return me.flashExec.apply( client, arguments ); - }; - - function handler( evt, obj ) { - var type = evt.type || evt, - parts, uid; - - parts = type.split('::'); - uid = parts[ 0 ]; - type = parts[ 1 ]; - - // console.log.apply( console, arguments ); - - if ( type === 'Ready' && uid === me.uid ) { - me.trigger('ready'); - } else if ( clients[ uid ] ) { - clients[ uid ].trigger( type.toLowerCase(), evt, obj ); - } - - // Base.log( evt, obj ); - } - - // flash的接受器。 - window[ jsreciver ] = function() { - var args = arguments; - - // 为了能捕获得到。 - setTimeout(function() { - handler.apply( null, args ); - }, 1 ); - }; - - this.jsreciver = jsreciver; - - this.destroy = function() { - // @todo 删除池子中的所有实例 - return destroy && destroy.apply( this, arguments ); - }; - - this.flashExec = function( comp, fn ) { - var flash = me.getFlash(), - args = Base.slice( arguments, 2 ); - - return flash.exec( this.uid, comp, fn, args ); - }; - - // @todo - } - - Base.inherits( Runtime, { - constructor: FlashRuntime, - - init: function() { - var container = this.getContainer(), - opts = this.options, - html; - - // if not the minimal height, shims are not initialized - // in older browsers (e.g FF3.6, IE6,7,8, Safari 4.0,5.0, etc) - container.css({ - position: 'absolute', - top: '-8px', - left: '-8px', - width: '9px', - height: '9px', - overflow: 'hidden' - }); - - // insert flash object - html = '' + - '' + - '' + - '' + - ''; - - container.html( html ); - }, - - getFlash: function() { - if ( this._flash ) { - return this._flash; - } - - this._flash = $( '#' + this.uid ).get( 0 ); - return this._flash; - } - - }); - - FlashRuntime.register = function( name, component ) { - component = components[ name ] = Base.inherits( CompBase, $.extend({ - - // @todo fix this later - flashExec: function() { - var owner = this.owner, - runtime = this.getRuntime(); - - return runtime.flashExec.apply( owner, arguments ); - } - }, component ) ); - - return component; - }; - - if ( getFlashVersion() >= 11.4 ) { - Runtime.addRuntime( type, FlashRuntime ); - } - - return FlashRuntime; - }); - /** - * @fileOverview FilePicker - */ - define('runtime/flash/filepicker',[ - 'base', - 'runtime/flash/runtime' - ], function( Base, FlashRuntime ) { - var $ = Base.$; - - return FlashRuntime.register( 'FilePicker', { - init: function( opts ) { - var copy = $.extend({}, opts ), - len, i; - - // 修复Flash再没有设置title的情况下无法弹出flash文件选择框的bug. - len = copy.accept && copy.accept.length; - for ( i = 0; i < len; i++ ) { - if ( !copy.accept[ i ].title ) { - copy.accept[ i ].title = 'Files'; - } - } - - delete copy.button; - delete copy.id; - delete copy.container; - - this.flashExec( 'FilePicker', 'init', copy ); - }, - - destroy: function() { - this.flashExec( 'FilePicker', 'destroy' ); - } - }); - }); - /** - * @fileOverview 图片压缩 - */ - define('runtime/flash/image',[ - 'runtime/flash/runtime' - ], function( FlashRuntime ) { - - return FlashRuntime.register( 'Image', { - // init: function( options ) { - // var owner = this.owner; - - // this.flashExec( 'Image', 'init', options ); - // owner.on( 'load', function() { - // debugger; - // }); - // }, - - loadFromBlob: function( blob ) { - var owner = this.owner; - - owner.info() && this.flashExec( 'Image', 'info', owner.info() ); - owner.meta() && this.flashExec( 'Image', 'meta', owner.meta() ); - - this.flashExec( 'Image', 'loadFromBlob', blob.uid ); - } - }); - }); - /** - * @fileOverview Transport flash实现 - */ - define('runtime/flash/transport',[ - 'base', - 'runtime/flash/runtime', - 'runtime/client' - ], function( Base, FlashRuntime, RuntimeClient ) { - var $ = Base.$; - - return FlashRuntime.register( 'Transport', { - init: function() { - this._status = 0; - this._response = null; - this._responseJson = null; - }, - - send: function() { - var owner = this.owner, - opts = this.options, - xhr = this._initAjax(), - blob = owner._blob, - server = opts.server, - binary; - - xhr.connectRuntime( blob.ruid ); - - if ( opts.sendAsBinary ) { - server += (/\?/.test( server ) ? '&' : '?') + - $.param( owner._formData ); - - binary = blob.uid; - } else { - $.each( owner._formData, function( k, v ) { - xhr.exec( 'append', k, v ); - }); - - xhr.exec( 'appendBlob', opts.fileVal, blob.uid, - opts.filename || owner._formData.name || '' ); - } - - this._setRequestHeader( xhr, opts.headers ); - xhr.exec( 'send', { - method: opts.method, - url: server, - forceURLStream: opts.forceURLStream, - mimeType: 'application/octet-stream' - }, binary ); - }, - - getStatus: function() { - return this._status; - }, - - getResponse: function() { - return this._response || ''; - }, - - getResponseAsJson: function() { - return this._responseJson; - }, - - abort: function() { - var xhr = this._xhr; - - if ( xhr ) { - xhr.exec('abort'); - xhr.destroy(); - this._xhr = xhr = null; - } - }, - - destroy: function() { - this.abort(); - }, - - _initAjax: function() { - var me = this, - xhr = new RuntimeClient('XMLHttpRequest'); - - xhr.on( 'uploadprogress progress', function( e ) { - var percent = e.loaded / e.total; - percent = Math.min( 1, Math.max( 0, percent ) ); - return me.trigger( 'progress', percent ); - }); - - xhr.on( 'load', function() { - var status = xhr.exec('getStatus'), - readBody = false, - err = '', - p; - - xhr.off(); - me._xhr = null; - - if ( status >= 200 && status < 300 ) { - readBody = true; - } else if ( status >= 500 && status < 600 ) { - readBody = true; - err = 'server'; - } else { - err = 'http'; - } - - if ( readBody ) { - me._response = xhr.exec('getResponse'); - me._response = decodeURIComponent( me._response ); - - // flash 处理可能存在 bug, 没辙只能靠 js 了 - // try { - // me._responseJson = xhr.exec('getResponseAsJson'); - // } catch ( error ) { - - p = window.JSON && window.JSON.parse || function( s ) { - try { - return new Function('return ' + s).call(); - } catch ( err ) { - return {}; - } - }; - me._responseJson = me._response ? p(me._response) : {}; - - // } - } - - xhr.destroy(); - xhr = null; - - return err ? me.trigger( 'error', err ) : me.trigger('load'); - }); - - xhr.on( 'error', function() { - xhr.off(); - me._xhr = null; - me.trigger( 'error', 'http' ); - }); - - me._xhr = xhr; - return xhr; - }, - - _setRequestHeader: function( xhr, headers ) { - $.each( headers, function( key, val ) { - xhr.exec( 'setRequestHeader', key, val ); - }); - } - }); - }); - /** - * @fileOverview Blob Html实现 - */ - define('runtime/flash/blob',[ - 'runtime/flash/runtime', - 'lib/blob' - ], function( FlashRuntime, Blob ) { - - return FlashRuntime.register( 'Blob', { - slice: function( start, end ) { - var blob = this.flashExec( 'Blob', 'slice', start, end ); - - return new Blob( blob.uid, blob ); - } - }); - }); - /** - * @fileOverview Md5 flash实现 - */ - define('runtime/flash/md5',[ - 'runtime/flash/runtime' - ], function( FlashRuntime ) { - - return FlashRuntime.register( 'Md5', { - init: function() { - // do nothing. - }, - - loadFromBlob: function( blob ) { - return this.flashExec( 'Md5', 'loadFromBlob', blob.uid ); - } - }); - }); - /** - * @fileOverview 完全版本。 - */ - define('preset/all',[ - 'base', - - // widgets - 'widgets/filednd', - 'widgets/filepaste', - 'widgets/filepicker', - 'widgets/image', - 'widgets/queue', - 'widgets/runtime', - 'widgets/upload', - 'widgets/validator', - 'widgets/md5', - - // runtimes - // html5 - 'runtime/html5/blob', - 'runtime/html5/dnd', - 'runtime/html5/filepaste', - 'runtime/html5/filepicker', - 'runtime/html5/imagemeta/exif', - 'runtime/html5/androidpatch', - 'runtime/html5/image', - 'runtime/html5/transport', - 'runtime/html5/md5', - - // flash - 'runtime/flash/filepicker', - 'runtime/flash/image', - 'runtime/flash/transport', - 'runtime/flash/blob', - 'runtime/flash/md5' - ], function( Base ) { - return Base; - }); - define('webuploader',[ - 'preset/all' - ], function( preset ) { - return preset; - }); - return require('webuploader'); -}); diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.nolog.min.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.nolog.min.js deleted file mode 100644 index a4ee44b3..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.nolog.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* WebUploader 0.1.5 */!function(a,b){var c,d={},e=function(a,b){var c,d,e;if("string"==typeof a)return h(a);for(c=[],d=a.length,e=0;d>e;e++)c.push(h(a[e]));return b.apply(null,c)},f=function(a,b,c){2===arguments.length&&(c=b,b=null),e(b||[],function(){g(a,c,arguments)})},g=function(a,b,c){var f,g={exports:b};"function"==typeof b&&(c.length||(c=[e,g.exports,g]),f=b.apply(null,c),void 0!==f&&(g.exports=f)),d[a]=g.exports},h=function(b){var c=d[b]||a[b];if(!c)throw new Error("`"+b+"` is undefined");return c},i=function(a){var b,c,e,f,g,h;h=function(a){return a&&a.charAt(0).toUpperCase()+a.substr(1)};for(b in d)if(c=a,d.hasOwnProperty(b)){for(e=b.split("/"),g=h(e.pop());f=h(e.shift());)c[f]=c[f]||{},c=c[f];c[g]=d[b]}return a},j=function(c){return a.__dollar=c,i(b(a,f,e))};"object"==typeof module&&"object"==typeof module.exports?module.exports=j():"function"==typeof define&&define.amd?define(["jquery"],j):(c=a.WebUploader,a.WebUploader=j(),a.WebUploader.noConflict=function(){a.WebUploader=c})}(window,function(a,b,c){return b("dollar-third",[],function(){var b=a.__dollar||a.jQuery||a.Zepto;if(!b)throw new Error("jQuery or Zepto not found!");return b}),b("dollar",["dollar-third"],function(a){return a}),b("promise-third",["dollar"],function(a){return{Deferred:a.Deferred,when:a.when,isPromise:function(a){return a&&"function"==typeof a.then}}}),b("promise",["promise-third"],function(a){return a}),b("base",["dollar","promise"],function(b,c){function d(a){return function(){return h.apply(a,arguments)}}function e(a,b){return function(){return a.apply(b,arguments)}}function f(a){var b;return Object.create?Object.create(a):(b=function(){},b.prototype=a,new b)}var g=function(){},h=Function.call;return{version:"0.1.5",$:b,Deferred:c.Deferred,isPromise:c.isPromise,when:c.when,browser:function(a){var b={},c=a.match(/WebKit\/([\d.]+)/),d=a.match(/Chrome\/([\d.]+)/)||a.match(/CriOS\/([\d.]+)/),e=a.match(/MSIE\s([\d\.]+)/)||a.match(/(?:trident)(?:.*rv:([\w.]+))?/i),f=a.match(/Firefox\/([\d.]+)/),g=a.match(/Safari\/([\d.]+)/),h=a.match(/OPR\/([\d.]+)/);return c&&(b.webkit=parseFloat(c[1])),d&&(b.chrome=parseFloat(d[1])),e&&(b.ie=parseFloat(e[1])),f&&(b.firefox=parseFloat(f[1])),g&&(b.safari=parseFloat(g[1])),h&&(b.opera=parseFloat(h[1])),b}(navigator.userAgent),os:function(a){var b={},c=a.match(/(?:Android);?[\s\/]+([\d.]+)?/),d=a.match(/(?:iPad|iPod|iPhone).*OS\s([\d_]+)/);return c&&(b.android=parseFloat(c[1])),d&&(b.ios=parseFloat(d[1].replace(/_/g,"."))),b}(navigator.userAgent),inherits:function(a,c,d){var e;return"function"==typeof c?(e=c,c=null):e=c&&c.hasOwnProperty("constructor")?c.constructor:function(){return a.apply(this,arguments)},b.extend(!0,e,a,d||{}),e.__super__=a.prototype,e.prototype=f(a.prototype),c&&b.extend(!0,e.prototype,c),e},noop:g,bindFn:e,log:function(){return a.console?e(console.log,console):g}(),nextTick:function(){return function(a){setTimeout(a,1)}}(),slice:d([].slice),guid:function(){var a=0;return function(b){for(var c=(+new Date).toString(32),d=0;5>d;d++)c+=Math.floor(65535*Math.random()).toString(32);return(b||"wu_")+c+(a++).toString(32)}}(),formatSize:function(a,b,c){var d;for(c=c||["B","K","M","G","TB"];(d=c.shift())&&a>1024;)a/=1024;return("B"===d?a:a.toFixed(b||2))+d}}}),b("mediator",["base"],function(a){function b(a,b,c,d){return f.grep(a,function(a){return!(!a||b&&a.e!==b||c&&a.cb!==c&&a.cb._cb!==c||d&&a.ctx!==d)})}function c(a,b,c){f.each((a||"").split(h),function(a,d){c(d,b)})}function d(a,b){for(var c,d=!1,e=-1,f=a.length;++e1?void(d.isPlainObject(b)&&d.isPlainObject(c[a])?d.extend(c[a],b):c[a]=b):a?c[a]:c},getStats:function(){var a=this.request("get-stats");return a?{successNum:a.numOfSuccess,progressNum:a.numOfProgress,cancelNum:a.numOfCancel,invalidNum:a.numOfInvalid,uploadFailNum:a.numOfUploadFailed,queueNum:a.numOfQueue,interruptNum:a.numofInterrupt}:{}},trigger:function(a){var c=[].slice.call(arguments,1),e=this.options,f="on"+a.substring(0,1).toUpperCase()+a.substring(1);return b.trigger.apply(this,arguments)===!1||d.isFunction(e[f])&&e[f].apply(this,c)===!1||d.isFunction(this[f])&&this[f].apply(this,c)===!1||b.trigger.apply(b,[this,a].concat(c))===!1?!1:!0},destroy:function(){this.request("destroy",arguments),this.off()},request:a.noop}),a.create=c.create=function(a){return new c(a)},a.Uploader=c,c}),b("runtime/runtime",["base","mediator"],function(a,b){function c(b){this.options=d.extend({container:document.body},b),this.uid=a.guid("rt_")}var d=a.$,e={},f=function(a){for(var b in a)if(a.hasOwnProperty(b))return b;return null};return d.extend(c.prototype,{getContainer:function(){var a,b,c=this.options;return this._container?this._container:(a=d(c.container||document.body),b=d(document.createElement("div")),b.attr("id","rt_"+this.uid),b.css({position:"absolute",top:"0px",left:"0px",width:"1px",height:"1px",overflow:"hidden"}),a.append(b),a.addClass("webuploader-container"),this._container=b,this._parent=a,b)},init:a.noop,exec:a.noop,destroy:function(){this._container&&this._container.remove(),this._parent&&this._parent.removeClass("webuploader-container"),this.off()}}),c.orders="html5,flash",c.addRuntime=function(a,b){e[a]=b},c.hasRuntime=function(a){return!!(a?e[a]:f(e))},c.create=function(a,b){var g,h;if(b=b||c.orders,d.each(b.split(/\s*,\s*/g),function(){return e[this]?(g=this,!1):void 0}),g=g||f(e),!g)throw new Error("Runtime Error");return h=new e[g](a)},b.installTo(c.prototype),c}),b("runtime/client",["base","mediator","runtime/runtime"],function(a,b,c){function d(b,d){var f,g=a.Deferred();this.uid=a.guid("client_"),this.runtimeReady=function(a){return g.done(a)},this.connectRuntime=function(b,h){if(f)throw new Error("already connected!");return g.done(h),"string"==typeof b&&e.get(b)&&(f=e.get(b)),f=f||e.get(null,d),f?(a.$.extend(f.options,b),f.__promise.then(g.resolve),f.__client++):(f=c.create(b,b.runtimeOrder),f.__promise=g.promise(),f.once("ready",g.resolve),f.init(),e.add(f),f.__client=1),d&&(f.__standalone=d),f},this.getRuntime=function(){return f},this.disconnectRuntime=function(){f&&(f.__client--,f.__client<=0&&(e.remove(f),delete f.__promise,f.destroy()),f=null)},this.exec=function(){if(f){var c=a.slice(arguments);return b&&c.unshift(b),f.exec.apply(this,c)}},this.getRuid=function(){return f&&f.uid},this.destroy=function(a){return function(){a&&a.apply(this,arguments),this.trigger("destroy"),this.off(),this.exec("destroy"),this.disconnectRuntime()}}(this.destroy)}var e;return e=function(){var a={};return{add:function(b){a[b.uid]=b},get:function(b,c){var d;if(b)return a[b];for(d in a)if(!c||!a[d].__standalone)return a[d];return null},remove:function(b){delete a[b.uid]}}}(),b.installTo(d.prototype),d}),b("lib/dnd",["base","mediator","runtime/client"],function(a,b,c){function d(a){a=this.options=e.extend({},d.options,a),a.container=e(a.container),a.container.length&&c.call(this,"DragAndDrop")}var e=a.$;return d.options={accept:null,disableGlobalDnd:!1},a.inherits(c,{constructor:d,init:function(){var a=this;a.connectRuntime(a.options,function(){a.exec("init"),a.trigger("ready")})}}),b.installTo(d.prototype),d}),b("widgets/widget",["base","uploader"],function(a,b){function c(a){if(!a)return!1;var b=a.length,c=e.type(a);return 1===a.nodeType&&b?!0:"array"===c||"function"!==c&&"string"!==c&&(0===b||"number"==typeof b&&b>0&&b-1 in a)}function d(a){this.owner=a,this.options=a.options}var e=a.$,f=b.prototype._init,g=b.prototype.destroy,h={},i=[];return e.extend(d.prototype,{init:a.noop,invoke:function(a,b){var c=this.responseMap;return c&&a in c&&c[a]in this&&e.isFunction(this[c[a]])?this[c[a]].apply(this,b):h},request:function(){return this.owner.request.apply(this.owner,arguments)}}),e.extend(b.prototype,{_init:function(){var a=this,b=a._widgets=[],c=a.options.disableWidgets||"";return e.each(i,function(d,e){(!c||!~c.indexOf(e._name))&&b.push(new e(a))}),f.apply(a,arguments)},request:function(b,d,e){var f,g,i,j,k=0,l=this._widgets,m=l&&l.length,n=[],o=[];for(d=c(d)?d:[d];m>k;k++)f=l[k],g=f.invoke(b,d),g!==h&&(a.isPromise(g)?o.push(g):n.push(g));return e||o.length?(i=a.when.apply(a,o),j=i.pipe?"pipe":"then",i[j](function(){var b=a.Deferred(),c=arguments;return 1===c.length&&(c=c[0]),setTimeout(function(){b.resolve(c)},1),b.promise()})[e?j:"done"](e||a.noop)):n[0]},destroy:function(){g.apply(this,arguments),this._widgets=null}}),b.register=d.register=function(b,c){var f,g={init:"init",destroy:"destroy",name:"anonymous"};return 1===arguments.length?(c=b,e.each(c,function(a){return"_"===a[0]||"name"===a?void("name"===a&&(g.name=c.name)):void(g[a.replace(/[A-Z]/g,"-$&").toLowerCase()]=a)})):g=e.extend(g,b),c.responseMap=g,f=a.inherits(d,c),f._name=g.name,i.push(f),f},b.unRegister=d.unRegister=function(a){if(a&&"anonymous"!==a)for(var b=i.length;b--;)i[b]._name===a&&i.splice(b,1)},d}),b("widgets/filednd",["base","uploader","lib/dnd","widgets/widget"],function(a,b,c){var d=a.$;return b.options.dnd="",b.register({name:"dnd",init:function(b){if(b.dnd&&"html5"===this.request("predict-runtime-type")){var e,f=this,g=a.Deferred(),h=d.extend({},{disableGlobalDnd:b.disableGlobalDnd,container:b.dnd,accept:b.accept});return this.dnd=e=new c(h),e.once("ready",g.resolve),e.on("drop",function(a){f.request("add-file",[a])}),e.on("accept",function(a){return f.owner.trigger("dndAccept",a)}),e.init(),g.promise()}},destroy:function(){this.dnd&&this.dnd.destroy()}})}),b("lib/filepaste",["base","mediator","runtime/client"],function(a,b,c){function d(a){a=this.options=e.extend({},a),a.container=e(a.container||document.body),c.call(this,"FilePaste")}var e=a.$;return a.inherits(c,{constructor:d,init:function(){var a=this;a.connectRuntime(a.options,function(){a.exec("init"),a.trigger("ready")})}}),b.installTo(d.prototype),d}),b("widgets/filepaste",["base","uploader","lib/filepaste","widgets/widget"],function(a,b,c){var d=a.$;return b.register({name:"paste",init:function(b){if(b.paste&&"html5"===this.request("predict-runtime-type")){var e,f=this,g=a.Deferred(),h=d.extend({},{container:b.paste,accept:b.accept});return this.paste=e=new c(h),e.once("ready",g.resolve),e.on("paste",function(a){f.owner.request("add-file",[a])}),e.init(),g.promise()}},destroy:function(){this.paste&&this.paste.destroy()}})}),b("lib/blob",["base","runtime/client"],function(a,b){function c(a,c){var d=this;d.source=c,d.ruid=a,this.size=c.size||0,this.type=!c.type&&this.ext&&~"jpg,jpeg,png,gif,bmp".indexOf(this.ext)?"image/"+("jpg"===this.ext?"jpeg":this.ext):c.type||"application/octet-stream",b.call(d,"Blob"),this.uid=c.uid||this.uid,a&&d.connectRuntime(a)}return a.inherits(b,{constructor:c,slice:function(a,b){return this.exec("slice",a,b)},getSource:function(){return this.source}}),c}),b("lib/file",["base","lib/blob"],function(a,b){function c(a,c){var f;this.name=c.name||"untitled"+d++,f=e.exec(c.name)?RegExp.$1.toLowerCase():"",!f&&c.type&&(f=/\/(jpg|jpeg|png|gif|bmp)$/i.exec(c.type)?RegExp.$1.toLowerCase():"",this.name+="."+f),this.ext=f,this.lastModifiedDate=c.lastModifiedDate||(new Date).toLocaleString(),b.apply(this,arguments)}var d=1,e=/\.([^.]+)$/;return a.inherits(b,c)}),b("lib/filepicker",["base","runtime/client","lib/file"],function(b,c,d){function e(a){if(a=this.options=f.extend({},e.options,a),a.container=f(a.id),!a.container.length)throw new Error("按钮指定错误");a.innerHTML=a.innerHTML||a.label||a.container.html()||"",a.button=f(a.button||document.createElement("div")),a.button.html(a.innerHTML),a.container.html(a.button),c.call(this,"FilePicker",!0)}var f=b.$;return e.options={button:null,container:null,label:null,innerHTML:null,multiple:!0,accept:null,name:"file"},b.inherits(c,{constructor:e,init:function(){var c=this,e=c.options,g=e.button;g.addClass("webuploader-pick"),c.on("all",function(a){var b;switch(a){case"mouseenter":g.addClass("webuploader-pick-hover");break;case"mouseleave":g.removeClass("webuploader-pick-hover");break;case"change":b=c.exec("getFiles"),c.trigger("select",f.map(b,function(a){return a=new d(c.getRuid(),a),a._refer=e.container,a}),e.container)}}),c.connectRuntime(e,function(){c.refresh(),c.exec("init",e),c.trigger("ready")}),this._resizeHandler=b.bindFn(this.refresh,this),f(a).on("resize",this._resizeHandler)},refresh:function(){var a=this.getRuntime().getContainer(),b=this.options.button,c=b.outerWidth?b.outerWidth():b.width(),d=b.outerHeight?b.outerHeight():b.height(),e=b.offset();c&&d&&a.css({bottom:"auto",right:"auto",width:c+"px",height:d+"px"}).offset(e)},enable:function(){var a=this.options.button;a.removeClass("webuploader-pick-disable"),this.refresh()},disable:function(){var a=this.options.button;this.getRuntime().getContainer().css({top:"-99999px"}),a.addClass("webuploader-pick-disable")},destroy:function(){var b=this.options.button;f(a).off("resize",this._resizeHandler),b.removeClass("webuploader-pick-disable webuploader-pick-hover webuploader-pick")}}),e}),b("widgets/filepicker",["base","uploader","lib/filepicker","widgets/widget"],function(a,b,c){var d=a.$;return d.extend(b.options,{pick:null,accept:null}),b.register({name:"picker",init:function(a){return this.pickers=[],a.pick&&this.addBtn(a.pick)},refresh:function(){d.each(this.pickers,function(){this.refresh()})},addBtn:function(b){var e=this,f=e.options,g=f.accept,h=[];if(b)return d.isPlainObject(b)||(b={id:b}),d(b.id).each(function(){var i,j,k;k=a.Deferred(),i=d.extend({},b,{accept:d.isPlainObject(g)?[g]:g,swf:f.swf,runtimeOrder:f.runtimeOrder,id:this}),j=new c(i),j.once("ready",k.resolve),j.on("select",function(a){e.owner.request("add-file",[a])}),j.init(),e.pickers.push(j),h.push(k.promise())}),a.when.apply(a,h)},disable:function(){d.each(this.pickers,function(){this.disable()})},enable:function(){d.each(this.pickers,function(){this.enable()})},destroy:function(){d.each(this.pickers,function(){this.destroy()}),this.pickers=null}})}),b("lib/image",["base","runtime/client","lib/blob"],function(a,b,c){function d(a){this.options=e.extend({},d.options,a),b.call(this,"Image"),this.on("load",function(){this._info=this.exec("info"),this._meta=this.exec("meta")})}var e=a.$;return d.options={quality:90,crop:!1,preserveHeaders:!1,allowMagnify:!1},a.inherits(b,{constructor:d,info:function(a){return a?(this._info=a,this):this._info},meta:function(a){return a?(this._meta=a,this):this._meta},loadFromBlob:function(a){var b=this,c=a.getRuid();this.connectRuntime(c,function(){b.exec("init",b.options),b.exec("loadFromBlob",a)})},resize:function(){var b=a.slice(arguments);return this.exec.apply(this,["resize"].concat(b))},crop:function(){var b=a.slice(arguments);return this.exec.apply(this,["crop"].concat(b))},getAsDataUrl:function(a){return this.exec("getAsDataUrl",a)},getAsBlob:function(a){var b=this.exec("getAsBlob",a);return new c(this.getRuid(),b)}}),d}),b("widgets/image",["base","uploader","lib/image","widgets/widget"],function(a,b,c){var d,e=a.$;return d=function(a){var b=0,c=[],d=function(){for(var d;c.length&&a>b;)d=c.shift(),b+=d[0],d[1]()};return function(a,e,f){c.push([e,f]),a.once("destroy",function(){b-=e,setTimeout(d,1)}),setTimeout(d,1)}}(5242880),e.extend(b.options,{thumb:{width:110,height:110,quality:70,allowMagnify:!0,crop:!0,preserveHeaders:!1,type:"image/jpeg"},compress:{width:1600,height:1600,quality:90,allowMagnify:!1,crop:!1,preserveHeaders:!0}}),b.register({name:"image",makeThumb:function(a,b,f,g){var h,i;return a=this.request("get-file",a),a.type.match(/^image/)?(h=e.extend({},this.options.thumb),e.isPlainObject(f)&&(h=e.extend(h,f),f=null),f=f||h.width,g=g||h.height,i=new c(h),i.once("load",function(){a._info=a._info||i.info(),a._meta=a._meta||i.meta(),1>=f&&f>0&&(f=a._info.width*f),1>=g&&g>0&&(g=a._info.height*g),i.resize(f,g)}),i.once("complete",function(){b(!1,i.getAsDataUrl(h.type)),i.destroy()}),i.once("error",function(a){b(a||!0),i.destroy()}),void d(i,a.source.size,function(){a._info&&i.info(a._info),a._meta&&i.meta(a._meta),i.loadFromBlob(a.source)})):void b(!0)},beforeSendFile:function(b){var d,f,g=this.options.compress||this.options.resize,h=g&&g.compressSize||0,i=g&&g.noCompressIfLarger||!1;return b=this.request("get-file",b),!g||!~"image/jpeg,image/jpg".indexOf(b.type)||b.size=a&&a>0&&(a=b._info.width*a),1>=c&&c>0&&(c=b._info.height*c),d.resize(a,c)}),d.once("complete",function(){var a,c;try{a=d.getAsBlob(g.type),c=b.size,(!i||a.sizeb;b++)if(c=this._queue[b],a===c.getStatus())return c;return null},sort:function(a){"function"==typeof a&&this._queue.sort(a)},getFiles:function(){for(var a,b=[].slice.call(arguments,0),c=[],d=0,f=this._queue.length;f>d;d++)a=this._queue[d],(!b.length||~e.inArray(a.getStatus(),b))&&c.push(a);return c},removeFile:function(a){var b=this._map[a.id];b&&(delete this._map[a.id],a.destroy(),this.stats.numofDeleted++)},_fileAdded:function(a){var b=this,c=this._map[a.id];c||(this._map[a.id]=a,a.on("statuschange",function(a,c){b._onFileStatusChange(a,c)}))},_onFileStatusChange:function(a,b){var c=this.stats;switch(b){case f.PROGRESS:c.numOfProgress--;break;case f.QUEUED:c.numOfQueue--;break;case f.ERROR:c.numOfUploadFailed--;break;case f.INVALID:c.numOfInvalid--;break;case f.INTERRUPT:c.numofInterrupt--}switch(a){case f.QUEUED:c.numOfQueue++;break;case f.PROGRESS:c.numOfProgress++;break;case f.ERROR:c.numOfUploadFailed++;break;case f.COMPLETE:c.numOfSuccess++;break;case f.CANCELLED:c.numOfCancel++;break;case f.INVALID:c.numOfInvalid++;break;case f.INTERRUPT:c.numofInterrupt++}}}),b.installTo(d.prototype),d}),b("widgets/queue",["base","uploader","queue","file","lib/file","runtime/client","widgets/widget"],function(a,b,c,d,e,f){var g=a.$,h=/\.\w+$/,i=d.Status;return b.register({name:"queue",init:function(b){var d,e,h,i,j,k,l,m=this;if(g.isPlainObject(b.accept)&&(b.accept=[b.accept]),b.accept){for(j=[],h=0,e=b.accept.length;e>h;h++)i=b.accept[h].extensions,i&&j.push(i);j.length&&(k="\\."+j.join(",").replace(/,/g,"$|\\.").replace(/\*/g,".*")+"$"),m.accept=new RegExp(k,"i")}return m.queue=new c,m.stats=m.queue.stats,"html5"===this.request("predict-runtime-type")?(d=a.Deferred(),this.placeholder=l=new f("Placeholder"),l.connectRuntime({runtimeOrder:"html5"},function(){m._ruid=l.getRuid(),d.resolve()}),d.promise()):void 0},_wrapFile:function(a){if(!(a instanceof d)){if(!(a instanceof e)){if(!this._ruid)throw new Error("Can't add external files.");a=new e(this._ruid,a)}a=new d(a)}return a},acceptFile:function(a){var b=!a||!a.size||this.accept&&h.exec(a.name)&&!this.accept.test(a.name);return!b},_addFile:function(a){var b=this;return a=b._wrapFile(a),b.owner.trigger("beforeFileQueued",a)?b.acceptFile(a)?(b.queue.append(a),b.owner.trigger("fileQueued",a),a):void b.owner.trigger("error","Q_TYPE_DENIED",a):void 0},getFile:function(a){return this.queue.getFile(a)},addFile:function(a){var b=this;a.length||(a=[a]),a=g.map(a,function(a){return b._addFile(a)}),b.owner.trigger("filesQueued",a),b.options.auto&&setTimeout(function(){b.request("start-upload")},20)},getStats:function(){return this.stats},removeFile:function(a,b){var c=this;a=a.id?a:c.queue.getFile(a),this.request("cancel-file",a),b&&this.queue.removeFile(a)},getFiles:function(){return this.queue.getFiles.apply(this.queue,arguments)},fetchFile:function(){return this.queue.fetch.apply(this.queue,arguments)},retry:function(a,b){var c,d,e,f=this;if(a)return a=a.id?a:f.queue.getFile(a),a.setStatus(i.QUEUED),void(b||f.request("start-upload"));for(c=f.queue.getFiles(i.ERROR),d=0,e=c.length;e>d;d++)a=c[d],a.setStatus(i.QUEUED);f.request("start-upload")},sortFiles:function(){return this.queue.sort.apply(this.queue,arguments)},reset:function(){this.owner.trigger("reset"),this.queue=new c,this.stats=this.queue.stats},destroy:function(){this.reset(),this.placeholder&&this.placeholder.destroy()}})}),b("widgets/runtime",["uploader","runtime/runtime","widgets/widget"],function(a,b){return a.support=function(){return b.hasRuntime.apply(b,arguments)},a.register({name:"runtime",init:function(){if(!this.predictRuntimeType())throw Error("Runtime Error")},predictRuntimeType:function(){var a,c,d=this.options.runtimeOrder||b.orders,e=this.type;if(!e)for(d=d.split(/\s*,\s*/g),a=0,c=d.length;c>a;a++)if(b.hasRuntime(d[a])){this.type=e=d[a];break}return e}})}),b("lib/transport",["base","runtime/client","mediator"],function(a,b,c){function d(a){var c=this;a=c.options=e.extend(!0,{},d.options,a||{}),b.call(this,"Transport"),this._blob=null,this._formData=a.formData||{},this._headers=a.headers||{},this.on("progress",this._timeout),this.on("load error",function(){c.trigger("progress",1),clearTimeout(c._timer)})}var e=a.$;return d.options={server:"",method:"POST",withCredentials:!1,fileVal:"file",timeout:12e4,formData:{},headers:{},sendAsBinary:!1},e.extend(d.prototype,{appendBlob:function(a,b,c){var d=this,e=d.options;d.getRuid()&&d.disconnectRuntime(),d.connectRuntime(b.ruid,function(){d.exec("init")}),d._blob=b,e.fileVal=a||e.fileVal,e.filename=c||e.filename},append:function(a,b){"object"==typeof a?e.extend(this._formData,a):this._formData[a]=b},setRequestHeader:function(a,b){"object"==typeof a?e.extend(this._headers,a):this._headers[a]=b},send:function(a){this.exec("send",a),this._timeout()},abort:function(){return clearTimeout(this._timer),this.exec("abort")},destroy:function(){this.trigger("destroy"),this.off(),this.exec("destroy"),this.disconnectRuntime()},getResponse:function(){return this.exec("getResponse")},getResponseAsJson:function(){return this.exec("getResponseAsJson")},getStatus:function(){return this.exec("getStatus")},_timeout:function(){var a=this,b=a.options.timeout;b&&(clearTimeout(a._timer),a._timer=setTimeout(function(){a.abort(),a.trigger("error","timeout")},b))}}),c.installTo(d.prototype),d}),b("widgets/upload",["base","uploader","file","lib/transport","widgets/widget"],function(a,b,c,d){function e(a,b){var c,d,e=[],f=a.source,g=f.size,h=b?Math.ceil(g/b):1,i=0,j=0;for(d={file:a,has:function(){return!!e.length},shift:function(){return e.shift()},unshift:function(a){e.unshift(a)}};h>j;)c=Math.min(b,g-i),e.push({file:a,start:i,end:b?i+c:g,total:g,chunks:h,chunk:j++,cuted:d}),i+=c;return a.blocks=e.concat(),a.remaning=e.length,d}var f=a.$,g=a.isPromise,h=c.Status;f.extend(b.options,{prepareNextFile:!1,chunked:!1,chunkSize:5242880,chunkRetry:2,threads:3,formData:{}}),b.register({name:"upload",init:function(){var b=this.owner,c=this;this.runing=!1,this.progress=!1,b.on("startUpload",function(){c.progress=!0}).on("uploadFinished",function(){c.progress=!1}),this.pool=[],this.stack=[],this.pending=[],this.remaning=0,this.__tick=a.bindFn(this._tick,this),b.on("uploadComplete",function(a){a.blocks&&f.each(a.blocks,function(a,b){b.transport&&(b.transport.abort(),b.transport.destroy()),delete b.transport}),delete a.blocks,delete a.remaning})},reset:function(){this.request("stop-upload",!0),this.runing=!1,this.pool=[],this.stack=[],this.pending=[],this.remaning=0,this._trigged=!1,this._promise=null},startUpload:function(b){var c=this;if(f.each(c.request("get-files",h.INVALID),function(){c.request("remove-file",this)}),b)if(b=b.id?b:c.request("get-file",b),b.getStatus()===h.INTERRUPT)f.each(c.pool,function(a,c){c.file===b&&c.transport&&c.transport.send()}),b.setStatus(h.QUEUED);else{if(b.getStatus()===h.PROGRESS)return;b.setStatus(h.QUEUED)}else f.each(c.request("get-files",[h.INITED]),function(){this.setStatus(h.QUEUED)});if(!c.runing){c.runing=!0;var d=[];f.each(c.pool,function(a,b){var e=b.file;e.getStatus()===h.INTERRUPT&&(d.push(e),c._trigged=!1,b.transport&&b.transport.send())});for(var b;b=d.shift();)b.setStatus(h.PROGRESS);b||f.each(c.request("get-files",h.INTERRUPT),function(){this.setStatus(h.PROGRESS)}),c._trigged=!1,a.nextTick(c.__tick),c.owner.trigger("startUpload")}},stopUpload:function(b,c){var d=this;if(b===!0&&(c=b,b=null),d.runing!==!1){if(b){if(b=b.id?b:d.request("get-file",b),b.getStatus()!==h.PROGRESS&&b.getStatus()!==h.QUEUED)return;return b.setStatus(h.INTERRUPT),f.each(d.pool,function(a,c){c.file===b&&(c.transport&&c.transport.abort(),d._putback(c),d._popBlock(c))}),a.nextTick(d.__tick)}d.runing=!1,this._promise&&this._promise.file&&this._promise.file.setStatus(h.INTERRUPT),c&&f.each(d.pool,function(a,b){b.transport&&b.transport.abort(),b.file.setStatus(h.INTERRUPT)}),d.owner.trigger("stopUpload")}},cancelFile:function(a){a=a.id?a:this.request("get-file",a),a.blocks&&f.each(a.blocks,function(a,b){var c=b.transport;c&&(c.abort(),c.destroy(),delete b.transport)}),a.setStatus(h.CANCELLED),this.owner.trigger("fileDequeued",a)},isInProgress:function(){return!!this.progress},_getStats:function(){return this.request("get-stats")},skipFile:function(a,b){a=a.id?a:this.request("get-file",a),a.setStatus(b||h.COMPLETE),a.skipped=!0,a.blocks&&f.each(a.blocks,function(a,b){var c=b.transport;c&&(c.abort(),c.destroy(),delete b.transport)}),this.owner.trigger("uploadSkip",a)},_tick:function(){var b,c,d=this,e=d.options;return d._promise?d._promise.always(d.__tick):void(d.pool.length1&&~"http,abort".indexOf(a)&&b.retried1&&f.extend(m,{chunks:b.chunks,chunk:b.chunk}),i.trigger("uploadBeforeSend",b,m,n),l.appendBlob(j.fileVal,b.blob,k.name),l.append(m),l.setRequestHeader(n),l.send()},_finishFile:function(a,b,c){var d=this.owner;return d.request("after-send-file",arguments,function(){a.setStatus(h.COMPLETE),d.trigger("uploadSuccess",a,b,c)}).fail(function(b){a.getStatus()===h.PROGRESS&&a.setStatus(h.ERROR,b),d.trigger("uploadError",a,b) -}).always(function(){d.trigger("uploadComplete",a)})},updateFileProgress:function(a){var b=0,c=0;a.blocks&&(f.each(a.blocks,function(a,b){c+=(b.percentage||0)*(b.end-b.start)}),b=c/a.size,this.owner.trigger("uploadProgress",a,b||0))}})}),b("widgets/validator",["base","uploader","file","widgets/widget"],function(a,b,c){var d,e=a.$,f={};return d={addValidator:function(a,b){f[a]=b},removeValidator:function(a){delete f[a]}},b.register({name:"validator",init:function(){var b=this;a.nextTick(function(){e.each(f,function(){this.call(b.owner)})})}}),d.addValidator("fileNumLimit",function(){var a=this,b=a.options,c=0,d=parseInt(b.fileNumLimit,10),e=!0;d&&(a.on("beforeFileQueued",function(a){return c>=d&&e&&(e=!1,this.trigger("error","Q_EXCEED_NUM_LIMIT",d,a),setTimeout(function(){e=!0},1)),c>=d?!1:!0}),a.on("fileQueued",function(){c++}),a.on("fileDequeued",function(){c--}),a.on("reset",function(){c=0}))}),d.addValidator("fileSizeLimit",function(){var a=this,b=a.options,c=0,d=parseInt(b.fileSizeLimit,10),e=!0;d&&(a.on("beforeFileQueued",function(a){var b=c+a.size>d;return b&&e&&(e=!1,this.trigger("error","Q_EXCEED_SIZE_LIMIT",d,a),setTimeout(function(){e=!0},1)),b?!1:!0}),a.on("fileQueued",function(a){c+=a.size}),a.on("fileDequeued",function(a){c-=a.size}),a.on("reset",function(){c=0}))}),d.addValidator("fileSingleSizeLimit",function(){var a=this,b=a.options,d=b.fileSingleSizeLimit;d&&a.on("beforeFileQueued",function(a){return a.size>d?(a.setStatus(c.Status.INVALID,"exceed_size"),this.trigger("error","F_EXCEED_SIZE",d,a),!1):void 0})}),d.addValidator("duplicate",function(){function a(a){for(var b,c=0,d=0,e=a.length;e>d;d++)b=a.charCodeAt(d),c=b+(c<<6)+(c<<16)-c;return c}var b=this,c=b.options,d={};c.duplicate||(b.on("beforeFileQueued",function(b){var c=b.__hash||(b.__hash=a(b.name+b.size+b.lastModifiedDate));return d[c]?(this.trigger("error","F_DUPLICATE",b),!1):void 0}),b.on("fileQueued",function(a){var b=a.__hash;b&&(d[b]=!0)}),b.on("fileDequeued",function(a){var b=a.__hash;b&&delete d[b]}),b.on("reset",function(){d={}}))}),d}),b("lib/md5",["runtime/client","mediator"],function(a,b){function c(){a.call(this,"Md5")}return b.installTo(c.prototype),c.prototype.loadFromBlob=function(a){var b=this;b.getRuid()&&b.disconnectRuntime(),b.connectRuntime(a.ruid,function(){b.exec("init"),b.exec("loadFromBlob",a)})},c.prototype.getResult=function(){return this.exec("getResult")},c}),b("widgets/md5",["base","uploader","lib/md5","lib/blob","widgets/widget"],function(a,b,c,d){return b.register({name:"md5",md5File:function(b,e,f){var g=new c,h=a.Deferred(),i=b instanceof d?b:this.request("get-file",b).source;return g.on("progress load",function(a){a=a||{},h.notify(a.total?a.loaded/a.total:1)}),g.on("complete",function(){h.resolve(g.getResult())}),g.on("error",function(a){h.reject(a)}),arguments.length>1&&(e=e||0,f=f||0,0>e&&(e=i.size+e),0>f&&(f=i.size+f),f=Math.min(f,i.size),i=i.slice(e,f)),g.loadFromBlob(i),h.promise()}})}),b("runtime/compbase",[],function(){function a(a,b){this.owner=a,this.options=a.options,this.getRuntime=function(){return b},this.getRuid=function(){return b.uid},this.trigger=function(){return a.trigger.apply(a,arguments)}}return a}),b("runtime/html5/runtime",["base","runtime/runtime","runtime/compbase"],function(b,c,d){function e(){var a={},d=this,e=this.destroy;c.apply(d,arguments),d.type=f,d.exec=function(c,e){var f,h=this,i=h.uid,j=b.slice(arguments,2);return g[c]&&(f=a[i]=a[i]||new g[c](h,d),f[e])?f[e].apply(f,j):void 0},d.destroy=function(){return e&&e.apply(this,arguments)}}var f="html5",g={};return b.inherits(c,{constructor:e,init:function(){var a=this;setTimeout(function(){a.trigger("ready")},1)}}),e.register=function(a,c){var e=g[a]=b.inherits(d,c);return e},a.Blob&&a.FileReader&&a.DataView&&c.addRuntime(f,e),e}),b("runtime/html5/blob",["runtime/html5/runtime","lib/blob"],function(a,b){return a.register("Blob",{slice:function(a,c){var d=this.owner.source,e=d.slice||d.webkitSlice||d.mozSlice;return d=e.call(d,a,c),new b(this.getRuid(),d)}})}),b("runtime/html5/dnd",["base","runtime/html5/runtime","lib/file"],function(a,b,c){var d=a.$,e="webuploader-dnd-";return b.register("DragAndDrop",{init:function(){var b=this.elem=this.options.container;this.dragEnterHandler=a.bindFn(this._dragEnterHandler,this),this.dragOverHandler=a.bindFn(this._dragOverHandler,this),this.dragLeaveHandler=a.bindFn(this._dragLeaveHandler,this),this.dropHandler=a.bindFn(this._dropHandler,this),this.dndOver=!1,b.on("dragenter",this.dragEnterHandler),b.on("dragover",this.dragOverHandler),b.on("dragleave",this.dragLeaveHandler),b.on("drop",this.dropHandler),this.options.disableGlobalDnd&&(d(document).on("dragover",this.dragOverHandler),d(document).on("drop",this.dropHandler))},_dragEnterHandler:function(a){var b,c=this,d=c._denied||!1;return a=a.originalEvent||a,c.dndOver||(c.dndOver=!0,b=a.dataTransfer.items,b&&b.length&&(c._denied=d=!c.trigger("accept",b)),c.elem.addClass(e+"over"),c.elem[d?"addClass":"removeClass"](e+"denied")),a.dataTransfer.dropEffect=d?"none":"copy",!1},_dragOverHandler:function(a){var b=this.elem.parent().get(0);return b&&!d.contains(b,a.currentTarget)?!1:(clearTimeout(this._leaveTimer),this._dragEnterHandler.call(this,a),!1)},_dragLeaveHandler:function(){var a,b=this;return a=function(){b.dndOver=!1,b.elem.removeClass(e+"over "+e+"denied")},clearTimeout(b._leaveTimer),b._leaveTimer=setTimeout(a,100),!1},_dropHandler:function(a){var b,f,g=this,h=g.getRuid(),i=g.elem.parent().get(0);if(i&&!d.contains(i,a.currentTarget))return!1;a=a.originalEvent||a,b=a.dataTransfer;try{f=b.getData("text/html")}catch(j){}return f?void 0:(g._getTansferFiles(b,function(a){g.trigger("drop",d.map(a,function(a){return new c(h,a)}))}),g.dndOver=!1,g.elem.removeClass(e+"over"),!1)},_getTansferFiles:function(b,c){var d,e,f,g,h,i,j,k=[],l=[];for(d=b.items,e=b.files,j=!(!d||!d[0].webkitGetAsEntry),h=0,i=e.length;i>h;h++)f=e[h],g=d&&d[h],j&&g.webkitGetAsEntry().isDirectory?l.push(this._traverseDirectoryTree(g.webkitGetAsEntry(),k)):k.push(f);a.when.apply(a,l).done(function(){k.length&&c(k)})},_traverseDirectoryTree:function(b,c){var d=a.Deferred(),e=this;return b.isFile?b.file(function(a){c.push(a),d.resolve()}):b.isDirectory&&b.createReader().readEntries(function(b){var f,g=b.length,h=[],i=[];for(f=0;g>f;f++)h.push(e._traverseDirectoryTree(b[f],i));a.when.apply(a,h).then(function(){c.push.apply(c,i),d.resolve()},d.reject)}),d.promise()},destroy:function(){var a=this.elem;a&&(a.off("dragenter",this.dragEnterHandler),a.off("dragover",this.dragOverHandler),a.off("dragleave",this.dragLeaveHandler),a.off("drop",this.dropHandler),this.options.disableGlobalDnd&&(d(document).off("dragover",this.dragOverHandler),d(document).off("drop",this.dropHandler)))}})}),b("runtime/html5/filepaste",["base","runtime/html5/runtime","lib/file"],function(a,b,c){return b.register("FilePaste",{init:function(){var b,c,d,e,f=this.options,g=this.elem=f.container,h=".*";if(f.accept){for(b=[],c=0,d=f.accept.length;d>c;c++)e=f.accept[c].mimeTypes,e&&b.push(e);b.length&&(h=b.join(","),h=h.replace(/,/g,"|").replace(/\*/g,".*"))}this.accept=h=new RegExp(h,"i"),this.hander=a.bindFn(this._pasteHander,this),g.on("paste",this.hander)},_pasteHander:function(a){var b,d,e,f,g,h=[],i=this.getRuid();for(a=a.originalEvent||a,b=a.clipboardData.items,f=0,g=b.length;g>f;f++)d=b[f],"file"===d.kind&&(e=d.getAsFile())&&h.push(new c(i,e));h.length&&(a.preventDefault(),a.stopPropagation(),this.trigger("paste",h))},destroy:function(){this.elem.off("paste",this.hander)}})}),b("runtime/html5/filepicker",["base","runtime/html5/runtime"],function(a,b){var c=a.$;return b.register("FilePicker",{init:function(){var a,b,d,e,f=this.getRuntime().getContainer(),g=this,h=g.owner,i=g.options,j=this.label=c(document.createElement("label")),k=this.input=c(document.createElement("input"));if(k.attr("type","file"),k.attr("name",i.name),k.addClass("webuploader-element-invisible"),j.on("click",function(){k.trigger("click")}),j.css({opacity:0,width:"100%",height:"100%",display:"block",cursor:"pointer",background:"#ffffff"}),i.multiple&&k.attr("multiple","multiple"),i.accept&&i.accept.length>0){for(a=[],b=0,d=i.accept.length;d>b;b++)a.push(i.accept[b].mimeTypes);k.attr("accept",a.join(","))}f.append(k),f.append(j),e=function(a){h.trigger(a.type)},k.on("change",function(a){var b,d=arguments.callee;g.files=a.target.files,b=this.cloneNode(!0),b.value=null,this.parentNode.replaceChild(b,this),k.off(),k=c(b).on("change",d).on("mouseenter mouseleave",e),h.trigger("change")}),j.on("mouseenter mouseleave",e)},getFiles:function(){return this.files},destroy:function(){this.input.off(),this.label.off()}})}),b("runtime/html5/util",["base"],function(b){var c=a.createObjectURL&&a||a.URL&&URL.revokeObjectURL&&URL||a.webkitURL,d=b.noop,e=d;return c&&(d=function(){return c.createObjectURL.apply(c,arguments)},e=function(){return c.revokeObjectURL.apply(c,arguments)}),{createObjectURL:d,revokeObjectURL:e,dataURL2Blob:function(a){var b,c,d,e,f,g;for(g=a.split(","),b=~g[0].indexOf("base64")?atob(g[1]):decodeURIComponent(g[1]),d=new ArrayBuffer(b.length),c=new Uint8Array(d),e=0;ei&&(d=h.getUint16(i),d>=65504&&65519>=d||65534===d)&&(e=h.getUint16(i+2)+2,!(i+e>h.byteLength));){if(f=b.parsers[d],!c&&f)for(g=0;g6&&(l.imageHead=a.slice?a.slice(2,k):new Uint8Array(a).subarray(2,k))}return l}},updateImageHead:function(a,b){var c,d,e,f=this._parse(a,!0);return e=2,f.imageHead&&(e=2+f.imageHead.byteLength),d=a.slice?a.slice(e):new Uint8Array(a).subarray(e),c=new Uint8Array(b.byteLength+2+d.byteLength),c[0]=255,c[1]=216,c.set(new Uint8Array(b),2),c.set(new Uint8Array(d),b.byteLength+2),c.buffer}},a.parseMeta=function(){return b.parse.apply(b,arguments)},a.updateImageHead=function(){return b.updateImageHead.apply(b,arguments)},b}),b("runtime/html5/imagemeta/exif",["base","runtime/html5/imagemeta"],function(a,b){var c={};return c.ExifMap=function(){return this},c.ExifMap.prototype.map={Orientation:274},c.ExifMap.prototype.get=function(a){return this[a]||this[this.map[a]]},c.exifTagTypes={1:{getValue:function(a,b){return a.getUint8(b)},size:1},2:{getValue:function(a,b){return String.fromCharCode(a.getUint8(b))},size:1,ascii:!0},3:{getValue:function(a,b,c){return a.getUint16(b,c)},size:2},4:{getValue:function(a,b,c){return a.getUint32(b,c)},size:4},5:{getValue:function(a,b,c){return a.getUint32(b,c)/a.getUint32(b+4,c)},size:8},9:{getValue:function(a,b,c){return a.getInt32(b,c)},size:4},10:{getValue:function(a,b,c){return a.getInt32(b,c)/a.getInt32(b+4,c)},size:8}},c.exifTagTypes[7]=c.exifTagTypes[1],c.getExifValue=function(b,d,e,f,g,h){var i,j,k,l,m,n,o=c.exifTagTypes[f];if(!o)return void a.log("Invalid Exif data: Invalid tag type.");if(i=o.size*g,j=i>4?d+b.getUint32(e+8,h):e+8,j+i>b.byteLength)return void a.log("Invalid Exif data: Invalid data offset.");if(1===g)return o.getValue(b,j,h);for(k=[],l=0;g>l;l+=1)k[l]=o.getValue(b,j+l*o.size,h);if(o.ascii){for(m="",l=0;lb.byteLength)return void a.log("Invalid Exif data: Invalid directory offset.");if(g=b.getUint16(d,e),h=d+2+12*g,h+4>b.byteLength)return void a.log("Invalid Exif data: Invalid directory size.");for(i=0;g>i;i+=1)this.parseExifTag(b,c,d+2+12*i,e,f);return b.getUint32(h,e)},c.parseExifData=function(b,d,e,f){var g,h,i=d+10;if(1165519206===b.getUint32(d+4)){if(i+8>b.byteLength)return void a.log("Invalid Exif data: Invalid segment size.");if(0!==b.getUint16(d+8))return void a.log("Invalid Exif data: Missing byte alignment offset.");switch(b.getUint16(i)){case 18761:g=!0;break;case 19789:g=!1;break;default:return void a.log("Invalid Exif data: Invalid byte alignment marker.")}if(42!==b.getUint16(i+2,g))return void a.log("Invalid Exif data: Missing TIFF marker.");h=b.getUint32(i+4,g),f.exif=new c.ExifMap,h=c.parseExifTags(b,i,i+h,g,f)}},b.parsers[65505].push(c.parseExifData),c}),b("runtime/html5/jpegencoder",[],function(){function a(a){function b(a){for(var b=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],c=0;64>c;c++){var d=y((b[c]*a+50)/100);1>d?d=1:d>255&&(d=255),z[P[c]]=d}for(var e=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],f=0;64>f;f++){var g=y((e[f]*a+50)/100);1>g?g=1:g>255&&(g=255),A[P[f]]=g}for(var h=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],i=0,j=0;8>j;j++)for(var k=0;8>k;k++)B[i]=1/(z[P[i]]*h[j]*h[k]*8),C[i]=1/(A[P[i]]*h[j]*h[k]*8),i++}function c(a,b){for(var c=0,d=0,e=new Array,f=1;16>=f;f++){for(var g=1;g<=a[f];g++)e[b[d]]=[],e[b[d]][0]=c,e[b[d]][1]=f,d++,c++;c*=2}return e}function d(){t=c(Q,R),u=c(U,V),v=c(S,T),w=c(W,X)}function e(){for(var a=1,b=2,c=1;15>=c;c++){for(var d=a;b>d;d++)E[32767+d]=c,D[32767+d]=[],D[32767+d][1]=c,D[32767+d][0]=d;for(var e=-(b-1);-a>=e;e++)E[32767+e]=c,D[32767+e]=[],D[32767+e][1]=c,D[32767+e][0]=b-1+e;a<<=1,b<<=1}}function f(){for(var a=0;256>a;a++)O[a]=19595*a,O[a+256>>0]=38470*a,O[a+512>>0]=7471*a+32768,O[a+768>>0]=-11059*a,O[a+1024>>0]=-21709*a,O[a+1280>>0]=32768*a+8421375,O[a+1536>>0]=-27439*a,O[a+1792>>0]=-5329*a}function g(a){for(var b=a[0],c=a[1]-1;c>=0;)b&1<J&&(255==I?(h(255),h(0)):h(I),J=7,I=0)}function h(a){H.push(N[a])}function i(a){h(a>>8&255),h(255&a)}function j(a,b){var c,d,e,f,g,h,i,j,k,l=0,m=8,n=64;for(k=0;m>k;++k){c=a[l],d=a[l+1],e=a[l+2],f=a[l+3],g=a[l+4],h=a[l+5],i=a[l+6],j=a[l+7];var o=c+j,p=c-j,q=d+i,r=d-i,s=e+h,t=e-h,u=f+g,v=f-g,w=o+u,x=o-u,y=q+s,z=q-s;a[l]=w+y,a[l+4]=w-y;var A=.707106781*(z+x);a[l+2]=x+A,a[l+6]=x-A,w=v+t,y=t+r,z=r+p;var B=.382683433*(w-z),C=.5411961*w+B,D=1.306562965*z+B,E=.707106781*y,G=p+E,H=p-E;a[l+5]=H+C,a[l+3]=H-C,a[l+1]=G+D,a[l+7]=G-D,l+=8}for(l=0,k=0;m>k;++k){c=a[l],d=a[l+8],e=a[l+16],f=a[l+24],g=a[l+32],h=a[l+40],i=a[l+48],j=a[l+56];var I=c+j,J=c-j,K=d+i,L=d-i,M=e+h,N=e-h,O=f+g,P=f-g,Q=I+O,R=I-O,S=K+M,T=K-M;a[l]=Q+S,a[l+32]=Q-S;var U=.707106781*(T+R);a[l+16]=R+U,a[l+48]=R-U,Q=P+N,S=N+L,T=L+J;var V=.382683433*(Q-T),W=.5411961*Q+V,X=1.306562965*T+V,Y=.707106781*S,Z=J+Y,$=J-Y;a[l+40]=$+W,a[l+24]=$-W,a[l+8]=Z+X,a[l+56]=Z-X,l++}var _;for(k=0;n>k;++k)_=a[k]*b[k],F[k]=_>0?_+.5|0:_-.5|0;return F}function k(){i(65504),i(16),h(74),h(70),h(73),h(70),h(0),h(1),h(1),h(0),i(1),i(1),h(0),h(0)}function l(a,b){i(65472),i(17),h(8),i(b),i(a),h(3),h(1),h(17),h(0),h(2),h(17),h(1),h(3),h(17),h(1)}function m(){i(65499),i(132),h(0);for(var a=0;64>a;a++)h(z[a]);h(1);for(var b=0;64>b;b++)h(A[b])}function n(){i(65476),i(418),h(0);for(var a=0;16>a;a++)h(Q[a+1]);for(var b=0;11>=b;b++)h(R[b]);h(16);for(var c=0;16>c;c++)h(S[c+1]);for(var d=0;161>=d;d++)h(T[d]);h(1);for(var e=0;16>e;e++)h(U[e+1]);for(var f=0;11>=f;f++)h(V[f]);h(17);for(var g=0;16>g;g++)h(W[g+1]);for(var j=0;161>=j;j++)h(X[j])}function o(){i(65498),i(12),h(3),h(1),h(0),h(2),h(17),h(3),h(17),h(0),h(63),h(0)}function p(a,b,c,d,e){for(var f,h=e[0],i=e[240],k=16,l=63,m=64,n=j(a,b),o=0;m>o;++o)G[P[o]]=n[o];var p=G[0]-c;c=G[0],0==p?g(d[0]):(f=32767+p,g(d[E[f]]),g(D[f]));for(var q=63;q>0&&0==G[q];q--);if(0==q)return g(h),c;for(var r,s=1;q>=s;){for(var t=s;0==G[s]&&q>=s;++s);var u=s-t;if(u>=k){r=u>>4;for(var v=1;r>=v;++v)g(i);u=15&u}f=32767+G[s],g(e[(u<<4)+E[f]]),g(D[f]),s++}return q!=l&&g(h),c}function q(){for(var a=String.fromCharCode,b=0;256>b;b++)N[b]=a(b)}function r(a){if(0>=a&&(a=1),a>100&&(a=100),x!=a){var c=0;c=Math.floor(50>a?5e3/a:200-2*a),b(c),x=a}}function s(){a||(a=50),q(),d(),e(),f(),r(a)}var t,u,v,w,x,y=(Math.round,Math.floor),z=new Array(64),A=new Array(64),B=new Array(64),C=new Array(64),D=new Array(65535),E=new Array(65535),F=new Array(64),G=new Array(64),H=[],I=0,J=7,K=new Array(64),L=new Array(64),M=new Array(64),N=new Array(256),O=new Array(2048),P=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],Q=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],R=[0,1,2,3,4,5,6,7,8,9,10,11],S=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],T=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],U=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],V=[0,1,2,3,4,5,6,7,8,9,10,11],W=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],X=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];this.encode=function(a,b){b&&r(b),H=new Array,I=0,J=7,i(65496),k(),m(),l(a.width,a.height),n(),o();var c=0,d=0,e=0;I=0,J=7,this.encode.displayName="_encode_";for(var f,h,j,q,s,x,y,z,A,D=a.data,E=a.width,F=a.height,G=4*E,N=0;F>N;){for(f=0;G>f;){for(s=G*N+f,x=s,y=-1,z=0,A=0;64>A;A++)z=A>>3,y=4*(7&A),x=s+z*G+y,N+z>=F&&(x-=G*(N+1+z-F)),f+y>=G&&(x-=f+y-G+4),h=D[x++],j=D[x++],q=D[x++],K[A]=(O[h]+O[j+256>>0]+O[q+512>>0]>>16)-128,L[A]=(O[h+768>>0]+O[j+1024>>0]+O[q+1280>>0]>>16)-128,M[A]=(O[h+1280>>0]+O[j+1536>>0]+O[q+1792>>0]>>16)-128;c=p(K,B,c,t,v),d=p(L,C,d,u,w),e=p(M,C,e,u,w),f+=32}N+=8}if(J>=0){var P=[];P[1]=J+1,P[0]=(1<i;)e=d[4*(k-1)+3],0===e?j=k:i=k,k=j+i>>1;return f=k/c,0===f?1:f}function c(a){var b,c,d=a.naturalWidth,e=a.naturalHeight;return d*e>1048576?(b=document.createElement("canvas"),b.width=b.height=1,c=b.getContext("2d"),c.drawImage(a,-d+1,0),0===c.getImageData(0,0,1,1).data[3]):!1}return a.os.ios?a.os.ios>=7?function(a,c,d,e,f,g){var h=c.naturalWidth,i=c.naturalHeight,j=b(c,h,i);return a.getContext("2d").drawImage(c,0,0,h*j,i*j,d,e,f,g)}:function(a,d,e,f,g,h){var i,j,k,l,m,n,o,p=d.naturalWidth,q=d.naturalHeight,r=a.getContext("2d"),s=c(d),t="image/jpeg"===this.type,u=1024,v=0,w=0;for(s&&(p/=2,q/=2),r.save(),i=document.createElement("canvas"),i.width=i.height=u,j=i.getContext("2d"),k=t?b(d,p,q):1,l=Math.ceil(u*g/p),m=Math.ceil(u*h/q/k);q>v;){for(n=0,o=0;p>n;)j.clearRect(0,0,u,u),j.drawImage(d,-n,-v),r.drawImage(i,0,0,u,u,e+o,f+w,l,m),n+=u,o+=l;v+=u,w+=m}r.restore(),i=j=null}:function(b){var c=a.slice(arguments,1),d=b.getContext("2d");d.drawImage.apply(d,c)}}()})}),b("runtime/html5/transport",["base","runtime/html5/runtime"],function(a,b){var c=a.noop,d=a.$;return b.register("Transport",{init:function(){this._status=0,this._response=null},send:function(){var b,c,e,f=this.owner,g=this.options,h=this._initAjax(),i=f._blob,j=g.server;g.sendAsBinary?(j+=(/\?/.test(j)?"&":"?")+d.param(f._formData),c=i.getSource()):(b=new FormData,d.each(f._formData,function(a,c){b.append(a,c)}),b.append(g.fileVal,i.getSource(),g.filename||f._formData.name||"")),g.withCredentials&&"withCredentials"in h?(h.open(g.method,j,!0),h.withCredentials=!0):h.open(g.method,j),this._setRequestHeader(h,g.headers),c?(h.overrideMimeType&&h.overrideMimeType("application/octet-stream"),a.os.android?(e=new FileReader,e.onload=function(){h.send(this.result),e=e.onload=null},e.readAsArrayBuffer(c)):h.send(c)):h.send(b)},getResponse:function(){return this._response},getResponseAsJson:function(){return this._parseJson(this._response)},getStatus:function(){return this._status},abort:function(){var a=this._xhr;a&&(a.upload.onprogress=c,a.onreadystatechange=c,a.abort(),this._xhr=a=null)},destroy:function(){this.abort()},_initAjax:function(){var a=this,b=new XMLHttpRequest,d=this.options;return!d.withCredentials||"withCredentials"in b||"undefined"==typeof XDomainRequest||(b=new XDomainRequest),b.upload.onprogress=function(b){var c=0;return b.lengthComputable&&(c=b.loaded/b.total),a.trigger("progress",c)},b.onreadystatechange=function(){return 4===b.readyState?(b.upload.onprogress=c,b.onreadystatechange=c,a._xhr=null,a._status=b.status,b.status>=200&&b.status<300?(a._response=b.responseText,a.trigger("load")):b.status>=500&&b.status<600?(a._response=b.responseText,a.trigger("error","server")):a.trigger("error",a._status?"http":"abort")):void 0},a._xhr=b,b},_setRequestHeader:function(a,b){d.each(b,function(b,c){a.setRequestHeader(b,c)})},_parseJson:function(a){var b;try{b=JSON.parse(a)}catch(c){b={}}return b}})}),b("runtime/html5/md5",["runtime/html5/runtime"],function(a){var b=function(a,b){return a+b&4294967295},c=function(a,c,d,e,f,g){return c=b(b(c,a),b(e,g)),b(c<>>32-f,d)},d=function(a,b,d,e,f,g,h){return c(b&d|~b&e,a,b,f,g,h)},e=function(a,b,d,e,f,g,h){return c(b&e|d&~e,a,b,f,g,h)},f=function(a,b,d,e,f,g,h){return c(b^d^e,a,b,f,g,h)},g=function(a,b,d,e,f,g,h){return c(d^(b|~e),a,b,f,g,h)},h=function(a,c){var h=a[0],i=a[1],j=a[2],k=a[3];h=d(h,i,j,k,c[0],7,-680876936),k=d(k,h,i,j,c[1],12,-389564586),j=d(j,k,h,i,c[2],17,606105819),i=d(i,j,k,h,c[3],22,-1044525330),h=d(h,i,j,k,c[4],7,-176418897),k=d(k,h,i,j,c[5],12,1200080426),j=d(j,k,h,i,c[6],17,-1473231341),i=d(i,j,k,h,c[7],22,-45705983),h=d(h,i,j,k,c[8],7,1770035416),k=d(k,h,i,j,c[9],12,-1958414417),j=d(j,k,h,i,c[10],17,-42063),i=d(i,j,k,h,c[11],22,-1990404162),h=d(h,i,j,k,c[12],7,1804603682),k=d(k,h,i,j,c[13],12,-40341101),j=d(j,k,h,i,c[14],17,-1502002290),i=d(i,j,k,h,c[15],22,1236535329),h=e(h,i,j,k,c[1],5,-165796510),k=e(k,h,i,j,c[6],9,-1069501632),j=e(j,k,h,i,c[11],14,643717713),i=e(i,j,k,h,c[0],20,-373897302),h=e(h,i,j,k,c[5],5,-701558691),k=e(k,h,i,j,c[10],9,38016083),j=e(j,k,h,i,c[15],14,-660478335),i=e(i,j,k,h,c[4],20,-405537848),h=e(h,i,j,k,c[9],5,568446438),k=e(k,h,i,j,c[14],9,-1019803690),j=e(j,k,h,i,c[3],14,-187363961),i=e(i,j,k,h,c[8],20,1163531501),h=e(h,i,j,k,c[13],5,-1444681467),k=e(k,h,i,j,c[2],9,-51403784),j=e(j,k,h,i,c[7],14,1735328473),i=e(i,j,k,h,c[12],20,-1926607734),h=f(h,i,j,k,c[5],4,-378558),k=f(k,h,i,j,c[8],11,-2022574463),j=f(j,k,h,i,c[11],16,1839030562),i=f(i,j,k,h,c[14],23,-35309556),h=f(h,i,j,k,c[1],4,-1530992060),k=f(k,h,i,j,c[4],11,1272893353),j=f(j,k,h,i,c[7],16,-155497632),i=f(i,j,k,h,c[10],23,-1094730640),h=f(h,i,j,k,c[13],4,681279174),k=f(k,h,i,j,c[0],11,-358537222),j=f(j,k,h,i,c[3],16,-722521979),i=f(i,j,k,h,c[6],23,76029189),h=f(h,i,j,k,c[9],4,-640364487),k=f(k,h,i,j,c[12],11,-421815835),j=f(j,k,h,i,c[15],16,530742520),i=f(i,j,k,h,c[2],23,-995338651),h=g(h,i,j,k,c[0],6,-198630844),k=g(k,h,i,j,c[7],10,1126891415),j=g(j,k,h,i,c[14],15,-1416354905),i=g(i,j,k,h,c[5],21,-57434055),h=g(h,i,j,k,c[12],6,1700485571),k=g(k,h,i,j,c[3],10,-1894986606),j=g(j,k,h,i,c[10],15,-1051523),i=g(i,j,k,h,c[1],21,-2054922799),h=g(h,i,j,k,c[8],6,1873313359),k=g(k,h,i,j,c[15],10,-30611744),j=g(j,k,h,i,c[6],15,-1560198380),i=g(i,j,k,h,c[13],21,1309151649),h=g(h,i,j,k,c[4],6,-145523070),k=g(k,h,i,j,c[11],10,-1120210379),j=g(j,k,h,i,c[2],15,718787259),i=g(i,j,k,h,c[9],21,-343485551),a[0]=b(h,a[0]),a[1]=b(i,a[1]),a[2]=b(j,a[2]),a[3]=b(k,a[3])},i=function(a){var b,c=[];for(b=0;64>b;b+=4)c[b>>2]=a.charCodeAt(b)+(a.charCodeAt(b+1)<<8)+(a.charCodeAt(b+2)<<16)+(a.charCodeAt(b+3)<<24);return c},j=function(a){var b,c=[];for(b=0;64>b;b+=4)c[b>>2]=a[b]+(a[b+1]<<8)+(a[b+2]<<16)+(a[b+3]<<24);return c},k=function(a){var b,c,d,e,f,g,j=a.length,k=[1732584193,-271733879,-1732584194,271733878];for(b=64;j>=b;b+=64)h(k,i(a.substring(b-64,b)));for(a=a.substring(b-64),c=a.length,d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],b=0;c>b;b+=1)d[b>>2]|=a.charCodeAt(b)<<(b%4<<3);if(d[b>>2]|=128<<(b%4<<3),b>55)for(h(k,d),b=0;16>b;b+=1)d[b]=0;return e=8*j,e=e.toString(16).match(/(.*?)(.{0,8})$/),f=parseInt(e[2],16),g=parseInt(e[1],16)||0,d[14]=f,d[15]=g,h(k,d),k},l=function(a){var b,c,d,e,f,g,i=a.length,k=[1732584193,-271733879,-1732584194,271733878];for(b=64;i>=b;b+=64)h(k,j(a.subarray(b-64,b)));for(a=i>b-64?a.subarray(b-64):new Uint8Array(0),c=a.length,d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],b=0;c>b;b+=1)d[b>>2]|=a[b]<<(b%4<<3);if(d[b>>2]|=128<<(b%4<<3),b>55)for(h(k,d),b=0;16>b;b+=1)d[b]=0;return e=8*i,e=e.toString(16).match(/(.*?)(.{0,8})$/),f=parseInt(e[2],16),g=parseInt(e[1],16)||0,d[14]=f,d[15]=g,h(k,d),k},m=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n=function(a){var b,c="";for(b=0;4>b;b+=1)c+=m[a>>8*b+4&15]+m[a>>8*b&15];return c},o=function(a){var b;for(b=0;b>16)+(b>>16)+(c>>16);return d<<16|65535&c}),q.prototype.append=function(a){return/[\u0080-\uFFFF]/.test(a)&&(a=unescape(encodeURIComponent(a))),this.appendBinary(a),this},q.prototype.appendBinary=function(a){this._buff+=a,this._length+=a.length;var b,c=this._buff.length;for(b=64;c>=b;b+=64)h(this._state,i(this._buff.substring(b-64,b)));return this._buff=this._buff.substr(b-64),this},q.prototype.end=function(a){var b,c,d=this._buff,e=d.length,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(b=0;e>b;b+=1)f[b>>2]|=d.charCodeAt(b)<<(b%4<<3);return this._finish(f,e),c=a?this._state:o(this._state),this.reset(),c},q.prototype._finish=function(a,b){var c,d,e,f=b;if(a[f>>2]|=128<<(f%4<<3),f>55)for(h(this._state,a),f=0;16>f;f+=1)a[f]=0;c=8*this._length,c=c.toString(16).match(/(.*?)(.{0,8})$/),d=parseInt(c[2],16),e=parseInt(c[1],16)||0,a[14]=d,a[15]=e,h(this._state,a)},q.prototype.reset=function(){return this._buff="",this._length=0,this._state=[1732584193,-271733879,-1732584194,271733878],this},q.prototype.destroy=function(){delete this._state,delete this._buff,delete this._length},q.hash=function(a,b){/[\u0080-\uFFFF]/.test(a)&&(a=unescape(encodeURIComponent(a)));var c=k(a);return b?c:o(c)},q.hashBinary=function(a,b){var c=k(a);return b?c:o(c)},q.ArrayBuffer=function(){this.reset()},q.ArrayBuffer.prototype.append=function(a){var b,c=this._concatArrayBuffer(this._buff,a),d=c.length;for(this._length+=a.byteLength,b=64;d>=b;b+=64)h(this._state,j(c.subarray(b-64,b)));return this._buff=d>b-64?c.subarray(b-64):new Uint8Array(0),this},q.ArrayBuffer.prototype.end=function(a){var b,c,d=this._buff,e=d.length,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; -for(b=0;e>b;b+=1)f[b>>2]|=d[b]<<(b%4<<3);return this._finish(f,e),c=a?this._state:o(this._state),this.reset(),c},q.ArrayBuffer.prototype._finish=q.prototype._finish,q.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._state=[1732584193,-271733879,-1732584194,271733878],this},q.ArrayBuffer.prototype.destroy=q.prototype.destroy,q.ArrayBuffer.prototype._concatArrayBuffer=function(a,b){var c=a.length,d=new Uint8Array(c+b.byteLength);return d.set(a),d.set(new Uint8Array(b),c),d},q.ArrayBuffer.hash=function(a,b){var c=l(new Uint8Array(a));return b?c:o(c)},a.register("Md5",{init:function(){},loadFromBlob:function(a){var b,c,d=a.getSource(),e=2097152,f=Math.ceil(d.size/e),g=0,h=this.owner,i=new q.ArrayBuffer,j=this,k=d.mozSlice||d.webkitSlice||d.slice;c=new FileReader,(b=function(){var l,m;l=g*e,m=Math.min(l+e,d.size),c.onload=function(b){i.append(b.target.result),h.trigger("progress",{total:a.size,loaded:m})},c.onloadend=function(){c.onloadend=c.onload=null,++g',c.html(a)},getFlash:function(){return this._flash?this._flash:(this._flash=g("#"+this.uid).get(0),this._flash)}}),f.register=function(a,c){return c=i[a]=b.inherits(d,g.extend({flashExec:function(){var a=this.owner,b=this.getRuntime();return b.flashExec.apply(a,arguments)}},c))},e()>=11.4&&c.addRuntime(h,f),f}),b("runtime/flash/filepicker",["base","runtime/flash/runtime"],function(a,b){var c=a.$;return b.register("FilePicker",{init:function(a){var b,d,e=c.extend({},a);for(b=e.accept&&e.accept.length,d=0;b>d;d++)e.accept[d].title||(e.accept[d].title="Files");delete e.button,delete e.id,delete e.container,this.flashExec("FilePicker","init",e)},destroy:function(){this.flashExec("FilePicker","destroy")}})}),b("runtime/flash/image",["runtime/flash/runtime"],function(a){return a.register("Image",{loadFromBlob:function(a){var b=this.owner;b.info()&&this.flashExec("Image","info",b.info()),b.meta()&&this.flashExec("Image","meta",b.meta()),this.flashExec("Image","loadFromBlob",a.uid)}})}),b("runtime/flash/transport",["base","runtime/flash/runtime","runtime/client"],function(b,c,d){var e=b.$;return c.register("Transport",{init:function(){this._status=0,this._response=null,this._responseJson=null},send:function(){var a,b=this.owner,c=this.options,d=this._initAjax(),f=b._blob,g=c.server;d.connectRuntime(f.ruid),c.sendAsBinary?(g+=(/\?/.test(g)?"&":"?")+e.param(b._formData),a=f.uid):(e.each(b._formData,function(a,b){d.exec("append",a,b)}),d.exec("appendBlob",c.fileVal,f.uid,c.filename||b._formData.name||"")),this._setRequestHeader(d,c.headers),d.exec("send",{method:c.method,url:g,forceURLStream:c.forceURLStream,mimeType:"application/octet-stream"},a)},getStatus:function(){return this._status},getResponse:function(){return this._response||""},getResponseAsJson:function(){return this._responseJson},abort:function(){var a=this._xhr;a&&(a.exec("abort"),a.destroy(),this._xhr=a=null)},destroy:function(){this.abort()},_initAjax:function(){var b=this,c=new d("XMLHttpRequest");return c.on("uploadprogress progress",function(a){var c=a.loaded/a.total;return c=Math.min(1,Math.max(0,c)),b.trigger("progress",c)}),c.on("load",function(){var d,e=c.exec("getStatus"),f=!1,g="";return c.off(),b._xhr=null,e>=200&&300>e?f=!0:e>=500&&600>e?(f=!0,g="server"):g="http",f&&(b._response=c.exec("getResponse"),b._response=decodeURIComponent(b._response),d=a.JSON&&a.JSON.parse||function(a){try{return new Function("return "+a).call()}catch(b){return{}}},b._responseJson=b._response?d(b._response):{}),c.destroy(),c=null,g?b.trigger("error",g):b.trigger("load")}),c.on("error",function(){c.off(),b._xhr=null,b.trigger("error","http")}),b._xhr=c,c},_setRequestHeader:function(a,b){e.each(b,function(b,c){a.exec("setRequestHeader",b,c)})}})}),b("runtime/flash/blob",["runtime/flash/runtime","lib/blob"],function(a,b){return a.register("Blob",{slice:function(a,c){var d=this.flashExec("Blob","slice",a,c);return new b(d.uid,d)}})}),b("runtime/flash/md5",["runtime/flash/runtime"],function(a){return a.register("Md5",{init:function(){},loadFromBlob:function(a){return this.flashExec("Md5","loadFromBlob",a.uid)}})}),b("preset/all",["base","widgets/filednd","widgets/filepaste","widgets/filepicker","widgets/image","widgets/queue","widgets/runtime","widgets/upload","widgets/validator","widgets/md5","runtime/html5/blob","runtime/html5/dnd","runtime/html5/filepaste","runtime/html5/filepicker","runtime/html5/imagemeta/exif","runtime/html5/androidpatch","runtime/html5/image","runtime/html5/transport","runtime/html5/md5","runtime/flash/filepicker","runtime/flash/image","runtime/flash/transport","runtime/flash/blob","runtime/flash/md5"],function(a){return a}),b("webuploader",["preset/all"],function(a){return a}),c("webuploader")}); \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.withoutimage.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.withoutimage.js deleted file mode 100644 index 9e6e3a38..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.withoutimage.js +++ /dev/null @@ -1,4993 +0,0 @@ -/*! WebUploader 0.1.5 */ - - -/** - * @fileOverview 让内部各个部件的代码可以用[amd](https://github.com/amdjs/amdjs-api/wiki/AMD)模块定义方式组织起来。 - * - * AMD API 内部的简单不完全实现,请忽略。只有当WebUploader被合并成一个文件的时候才会引入。 - */ -(function( root, factory ) { - var modules = {}, - - // 内部require, 简单不完全实现。 - // https://github.com/amdjs/amdjs-api/wiki/require - _require = function( deps, callback ) { - var args, len, i; - - // 如果deps不是数组,则直接返回指定module - if ( typeof deps === 'string' ) { - return getModule( deps ); - } else { - args = []; - for( len = deps.length, i = 0; i < len; i++ ) { - args.push( getModule( deps[ i ] ) ); - } - - return callback.apply( null, args ); - } - }, - - // 内部define,暂时不支持不指定id. - _define = function( id, deps, factory ) { - if ( arguments.length === 2 ) { - factory = deps; - deps = null; - } - - _require( deps || [], function() { - setModule( id, factory, arguments ); - }); - }, - - // 设置module, 兼容CommonJs写法。 - setModule = function( id, factory, args ) { - var module = { - exports: factory - }, - returned; - - if ( typeof factory === 'function' ) { - args.length || (args = [ _require, module.exports, module ]); - returned = factory.apply( null, args ); - returned !== undefined && (module.exports = returned); - } - - modules[ id ] = module.exports; - }, - - // 根据id获取module - getModule = function( id ) { - var module = modules[ id ] || root[ id ]; - - if ( !module ) { - throw new Error( '`' + id + '` is undefined' ); - } - - return module; - }, - - // 将所有modules,将路径ids装换成对象。 - exportsTo = function( obj ) { - var key, host, parts, part, last, ucFirst; - - // make the first character upper case. - ucFirst = function( str ) { - return str && (str.charAt( 0 ).toUpperCase() + str.substr( 1 )); - }; - - for ( key in modules ) { - host = obj; - - if ( !modules.hasOwnProperty( key ) ) { - continue; - } - - parts = key.split('/'); - last = ucFirst( parts.pop() ); - - while( (part = ucFirst( parts.shift() )) ) { - host[ part ] = host[ part ] || {}; - host = host[ part ]; - } - - host[ last ] = modules[ key ]; - } - - return obj; - }, - - makeExport = function( dollar ) { - root.__dollar = dollar; - - // exports every module. - return exportsTo( factory( root, _define, _require ) ); - }, - - origin; - - if ( typeof module === 'object' && typeof module.exports === 'object' ) { - - // For CommonJS and CommonJS-like environments where a proper window is present, - module.exports = makeExport(); - } else if ( typeof define === 'function' && define.amd ) { - - // Allow using this built library as an AMD module - // in another project. That other project will only - // see this AMD call, not the internal modules in - // the closure below. - define([ 'jquery' ], makeExport ); - } else { - - // Browser globals case. Just assign the - // result to a property on the global. - origin = root.WebUploader; - root.WebUploader = makeExport(); - root.WebUploader.noConflict = function() { - root.WebUploader = origin; - }; - } -})( window, function( window, define, require ) { - - - /** - * @fileOverview jQuery or Zepto - */ - define('dollar-third',[],function() { - var $ = window.__dollar || window.jQuery || window.Zepto; - - if ( !$ ) { - throw new Error('jQuery or Zepto not found!'); - } - - return $; - }); - /** - * @fileOverview Dom 操作相关 - */ - define('dollar',[ - 'dollar-third' - ], function( _ ) { - return _; - }); - /** - * @fileOverview 使用jQuery的Promise - */ - define('promise-third',[ - 'dollar' - ], function( $ ) { - return { - Deferred: $.Deferred, - when: $.when, - - isPromise: function( anything ) { - return anything && typeof anything.then === 'function'; - } - }; - }); - /** - * @fileOverview Promise/A+ - */ - define('promise',[ - 'promise-third' - ], function( _ ) { - return _; - }); - /** - * @fileOverview 基础类方法。 - */ - - /** - * Web Uploader内部类的详细说明,以下提及的功能类,都可以在`WebUploader`这个变量中访问到。 - * - * As you know, Web Uploader的每个文件都是用过[AMD](https://github.com/amdjs/amdjs-api/wiki/AMD)规范中的`define`组织起来的, 每个Module都会有个module id. - * 默认module id为该文件的路径,而此路径将会转化成名字空间存放在WebUploader中。如: - * - * * module `base`:WebUploader.Base - * * module `file`: WebUploader.File - * * module `lib/dnd`: WebUploader.Lib.Dnd - * * module `runtime/html5/dnd`: WebUploader.Runtime.Html5.Dnd - * - * - * 以下文档中对类的使用可能省略掉了`WebUploader`前缀。 - * @module WebUploader - * @title WebUploader API文档 - */ - define('base',[ - 'dollar', - 'promise' - ], function( $, promise ) { - - var noop = function() {}, - call = Function.call; - - // http://jsperf.com/uncurrythis - // 反科里化 - function uncurryThis( fn ) { - return function() { - return call.apply( fn, arguments ); - }; - } - - function bindFn( fn, context ) { - return function() { - return fn.apply( context, arguments ); - }; - } - - function createObject( proto ) { - var f; - - if ( Object.create ) { - return Object.create( proto ); - } else { - f = function() {}; - f.prototype = proto; - return new f(); - } - } - - - /** - * 基础类,提供一些简单常用的方法。 - * @class Base - */ - return { - - /** - * @property {String} version 当前版本号。 - */ - version: '0.1.5', - - /** - * @property {jQuery|Zepto} $ 引用依赖的jQuery或者Zepto对象。 - */ - $: $, - - Deferred: promise.Deferred, - - isPromise: promise.isPromise, - - when: promise.when, - - /** - * @description 简单的浏览器检查结果。 - * - * * `webkit` webkit版本号,如果浏览器为非webkit内核,此属性为`undefined`。 - * * `chrome` chrome浏览器版本号,如果浏览器为chrome,此属性为`undefined`。 - * * `ie` ie浏览器版本号,如果浏览器为非ie,此属性为`undefined`。**暂不支持ie10+** - * * `firefox` firefox浏览器版本号,如果浏览器为非firefox,此属性为`undefined`。 - * * `safari` safari浏览器版本号,如果浏览器为非safari,此属性为`undefined`。 - * * `opera` opera浏览器版本号,如果浏览器为非opera,此属性为`undefined`。 - * - * @property {Object} [browser] - */ - browser: (function( ua ) { - var ret = {}, - webkit = ua.match( /WebKit\/([\d.]+)/ ), - chrome = ua.match( /Chrome\/([\d.]+)/ ) || - ua.match( /CriOS\/([\d.]+)/ ), - - ie = ua.match( /MSIE\s([\d\.]+)/ ) || - ua.match( /(?:trident)(?:.*rv:([\w.]+))?/i ), - firefox = ua.match( /Firefox\/([\d.]+)/ ), - safari = ua.match( /Safari\/([\d.]+)/ ), - opera = ua.match( /OPR\/([\d.]+)/ ); - - webkit && (ret.webkit = parseFloat( webkit[ 1 ] )); - chrome && (ret.chrome = parseFloat( chrome[ 1 ] )); - ie && (ret.ie = parseFloat( ie[ 1 ] )); - firefox && (ret.firefox = parseFloat( firefox[ 1 ] )); - safari && (ret.safari = parseFloat( safari[ 1 ] )); - opera && (ret.opera = parseFloat( opera[ 1 ] )); - - return ret; - })( navigator.userAgent ), - - /** - * @description 操作系统检查结果。 - * - * * `android` 如果在android浏览器环境下,此值为对应的android版本号,否则为`undefined`。 - * * `ios` 如果在ios浏览器环境下,此值为对应的ios版本号,否则为`undefined`。 - * @property {Object} [os] - */ - os: (function( ua ) { - var ret = {}, - - // osx = !!ua.match( /\(Macintosh\; Intel / ), - android = ua.match( /(?:Android);?[\s\/]+([\d.]+)?/ ), - ios = ua.match( /(?:iPad|iPod|iPhone).*OS\s([\d_]+)/ ); - - // osx && (ret.osx = true); - android && (ret.android = parseFloat( android[ 1 ] )); - ios && (ret.ios = parseFloat( ios[ 1 ].replace( /_/g, '.' ) )); - - return ret; - })( navigator.userAgent ), - - /** - * 实现类与类之间的继承。 - * @method inherits - * @grammar Base.inherits( super ) => child - * @grammar Base.inherits( super, protos ) => child - * @grammar Base.inherits( super, protos, statics ) => child - * @param {Class} super 父类 - * @param {Object | Function} [protos] 子类或者对象。如果对象中包含constructor,子类将是用此属性值。 - * @param {Function} [protos.constructor] 子类构造器,不指定的话将创建个临时的直接执行父类构造器的方法。 - * @param {Object} [statics] 静态属性或方法。 - * @return {Class} 返回子类。 - * @example - * function Person() { - * console.log( 'Super' ); - * } - * Person.prototype.hello = function() { - * console.log( 'hello' ); - * }; - * - * var Manager = Base.inherits( Person, { - * world: function() { - * console.log( 'World' ); - * } - * }); - * - * // 因为没有指定构造器,父类的构造器将会执行。 - * var instance = new Manager(); // => Super - * - * // 继承子父类的方法 - * instance.hello(); // => hello - * instance.world(); // => World - * - * // 子类的__super__属性指向父类 - * console.log( Manager.__super__ === Person ); // => true - */ - inherits: function( Super, protos, staticProtos ) { - var child; - - if ( typeof protos === 'function' ) { - child = protos; - protos = null; - } else if ( protos && protos.hasOwnProperty('constructor') ) { - child = protos.constructor; - } else { - child = function() { - return Super.apply( this, arguments ); - }; - } - - // 复制静态方法 - $.extend( true, child, Super, staticProtos || {} ); - - /* jshint camelcase: false */ - - // 让子类的__super__属性指向父类。 - child.__super__ = Super.prototype; - - // 构建原型,添加原型方法或属性。 - // 暂时用Object.create实现。 - child.prototype = createObject( Super.prototype ); - protos && $.extend( true, child.prototype, protos ); - - return child; - }, - - /** - * 一个不做任何事情的方法。可以用来赋值给默认的callback. - * @method noop - */ - noop: noop, - - /** - * 返回一个新的方法,此方法将已指定的`context`来执行。 - * @grammar Base.bindFn( fn, context ) => Function - * @method bindFn - * @example - * var doSomething = function() { - * console.log( this.name ); - * }, - * obj = { - * name: 'Object Name' - * }, - * aliasFn = Base.bind( doSomething, obj ); - * - * aliasFn(); // => Object Name - * - */ - bindFn: bindFn, - - /** - * 引用Console.log如果存在的话,否则引用一个[空函数noop](#WebUploader:Base.noop)。 - * @grammar Base.log( args... ) => undefined - * @method log - */ - log: (function() { - if ( window.console ) { - return bindFn( console.log, console ); - } - return noop; - })(), - - nextTick: (function() { - - return function( cb ) { - setTimeout( cb, 1 ); - }; - - // @bug 当浏览器不在当前窗口时就停了。 - // var next = window.requestAnimationFrame || - // window.webkitRequestAnimationFrame || - // window.mozRequestAnimationFrame || - // function( cb ) { - // window.setTimeout( cb, 1000 / 60 ); - // }; - - // // fix: Uncaught TypeError: Illegal invocation - // return bindFn( next, window ); - })(), - - /** - * 被[uncurrythis](http://www.2ality.com/2011/11/uncurrying-this.html)的数组slice方法。 - * 将用来将非数组对象转化成数组对象。 - * @grammar Base.slice( target, start[, end] ) => Array - * @method slice - * @example - * function doSomthing() { - * var args = Base.slice( arguments, 1 ); - * console.log( args ); - * } - * - * doSomthing( 'ignored', 'arg2', 'arg3' ); // => Array ["arg2", "arg3"] - */ - slice: uncurryThis( [].slice ), - - /** - * 生成唯一的ID - * @method guid - * @grammar Base.guid() => String - * @grammar Base.guid( prefx ) => String - */ - guid: (function() { - var counter = 0; - - return function( prefix ) { - var guid = (+new Date()).toString( 32 ), - i = 0; - - for ( ; i < 5; i++ ) { - guid += Math.floor( Math.random() * 65535 ).toString( 32 ); - } - - return (prefix || 'wu_') + guid + (counter++).toString( 32 ); - }; - })(), - - /** - * 格式化文件大小, 输出成带单位的字符串 - * @method formatSize - * @grammar Base.formatSize( size ) => String - * @grammar Base.formatSize( size, pointLength ) => String - * @grammar Base.formatSize( size, pointLength, units ) => String - * @param {Number} size 文件大小 - * @param {Number} [pointLength=2] 精确到的小数点数。 - * @param {Array} [units=[ 'B', 'K', 'M', 'G', 'TB' ]] 单位数组。从字节,到千字节,一直往上指定。如果单位数组里面只指定了到了K(千字节),同时文件大小大于M, 此方法的输出将还是显示成多少K. - * @example - * console.log( Base.formatSize( 100 ) ); // => 100B - * console.log( Base.formatSize( 1024 ) ); // => 1.00K - * console.log( Base.formatSize( 1024, 0 ) ); // => 1K - * console.log( Base.formatSize( 1024 * 1024 ) ); // => 1.00M - * console.log( Base.formatSize( 1024 * 1024 * 1024 ) ); // => 1.00G - * console.log( Base.formatSize( 1024 * 1024 * 1024, 0, ['B', 'KB', 'MB'] ) ); // => 1024MB - */ - formatSize: function( size, pointLength, units ) { - var unit; - - units = units || [ 'B', 'K', 'M', 'G', 'TB' ]; - - while ( (unit = units.shift()) && size > 1024 ) { - size = size / 1024; - } - - return (unit === 'B' ? size : size.toFixed( pointLength || 2 )) + - unit; - } - }; - }); - /** - * 事件处理类,可以独立使用,也可以扩展给对象使用。 - * @fileOverview Mediator - */ - define('mediator',[ - 'base' - ], function( Base ) { - var $ = Base.$, - slice = [].slice, - separator = /\s+/, - protos; - - // 根据条件过滤出事件handlers. - function findHandlers( arr, name, callback, context ) { - return $.grep( arr, function( handler ) { - return handler && - (!name || handler.e === name) && - (!callback || handler.cb === callback || - handler.cb._cb === callback) && - (!context || handler.ctx === context); - }); - } - - function eachEvent( events, callback, iterator ) { - // 不支持对象,只支持多个event用空格隔开 - $.each( (events || '').split( separator ), function( _, key ) { - iterator( key, callback ); - }); - } - - function triggerHanders( events, args ) { - var stoped = false, - i = -1, - len = events.length, - handler; - - while ( ++i < len ) { - handler = events[ i ]; - - if ( handler.cb.apply( handler.ctx2, args ) === false ) { - stoped = true; - break; - } - } - - return !stoped; - } - - protos = { - - /** - * 绑定事件。 - * - * `callback`方法在执行时,arguments将会来源于trigger的时候携带的参数。如 - * ```javascript - * var obj = {}; - * - * // 使得obj有事件行为 - * Mediator.installTo( obj ); - * - * obj.on( 'testa', function( arg1, arg2 ) { - * console.log( arg1, arg2 ); // => 'arg1', 'arg2' - * }); - * - * obj.trigger( 'testa', 'arg1', 'arg2' ); - * ``` - * - * 如果`callback`中,某一个方法`return false`了,则后续的其他`callback`都不会被执行到。 - * 切会影响到`trigger`方法的返回值,为`false`。 - * - * `on`还可以用来添加一个特殊事件`all`, 这样所有的事件触发都会响应到。同时此类`callback`中的arguments有一个不同处, - * 就是第一个参数为`type`,记录当前是什么事件在触发。此类`callback`的优先级比脚低,会再正常`callback`执行完后触发。 - * ```javascript - * obj.on( 'all', function( type, arg1, arg2 ) { - * console.log( type, arg1, arg2 ); // => 'testa', 'arg1', 'arg2' - * }); - * ``` - * - * @method on - * @grammar on( name, callback[, context] ) => self - * @param {String} name 事件名,支持多个事件用空格隔开 - * @param {Function} callback 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - * @class Mediator - */ - on: function( name, callback, context ) { - var me = this, - set; - - if ( !callback ) { - return this; - } - - set = this._events || (this._events = []); - - eachEvent( name, callback, function( name, callback ) { - var handler = { e: name }; - - handler.cb = callback; - handler.ctx = context; - handler.ctx2 = context || me; - handler.id = set.length; - - set.push( handler ); - }); - - return this; - }, - - /** - * 绑定事件,且当handler执行完后,自动解除绑定。 - * @method once - * @grammar once( name, callback[, context] ) => self - * @param {String} name 事件名 - * @param {Function} callback 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - */ - once: function( name, callback, context ) { - var me = this; - - if ( !callback ) { - return me; - } - - eachEvent( name, callback, function( name, callback ) { - var once = function() { - me.off( name, once ); - return callback.apply( context || me, arguments ); - }; - - once._cb = callback; - me.on( name, once, context ); - }); - - return me; - }, - - /** - * 解除事件绑定 - * @method off - * @grammar off( [name[, callback[, context] ] ] ) => self - * @param {String} [name] 事件名 - * @param {Function} [callback] 事件处理器 - * @param {Object} [context] 事件处理器的上下文。 - * @return {self} 返回自身,方便链式 - * @chainable - */ - off: function( name, cb, ctx ) { - var events = this._events; - - if ( !events ) { - return this; - } - - if ( !name && !cb && !ctx ) { - this._events = []; - return this; - } - - eachEvent( name, cb, function( name, cb ) { - $.each( findHandlers( events, name, cb, ctx ), function() { - delete events[ this.id ]; - }); - }); - - return this; - }, - - /** - * 触发事件 - * @method trigger - * @grammar trigger( name[, args...] ) => self - * @param {String} type 事件名 - * @param {*} [...] 任意参数 - * @return {Boolean} 如果handler中return false了,则返回false, 否则返回true - */ - trigger: function( type ) { - var args, events, allEvents; - - if ( !this._events || !type ) { - return this; - } - - args = slice.call( arguments, 1 ); - events = findHandlers( this._events, type ); - allEvents = findHandlers( this._events, 'all' ); - - return triggerHanders( events, args ) && - triggerHanders( allEvents, arguments ); - } - }; - - /** - * 中介者,它本身是个单例,但可以通过[installTo](#WebUploader:Mediator:installTo)方法,使任何对象具备事件行为。 - * 主要目的是负责模块与模块之间的合作,降低耦合度。 - * - * @class Mediator - */ - return $.extend({ - - /** - * 可以通过这个接口,使任何对象具备事件功能。 - * @method installTo - * @param {Object} obj 需要具备事件行为的对象。 - * @return {Object} 返回obj. - */ - installTo: function( obj ) { - return $.extend( obj, protos ); - } - - }, protos ); - }); - /** - * @fileOverview Uploader上传类 - */ - define('uploader',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$; - - /** - * 上传入口类。 - * @class Uploader - * @constructor - * @grammar new Uploader( opts ) => Uploader - * @example - * var uploader = WebUploader.Uploader({ - * swf: 'path_of_swf/Uploader.swf', - * - * // 开起分片上传。 - * chunked: true - * }); - */ - function Uploader( opts ) { - this.options = $.extend( true, {}, Uploader.options, opts ); - this._init( this.options ); - } - - // default Options - // widgets中有相应扩展 - Uploader.options = {}; - Mediator.installTo( Uploader.prototype ); - - // 批量添加纯命令式方法。 - $.each({ - upload: 'start-upload', - stop: 'stop-upload', - getFile: 'get-file', - getFiles: 'get-files', - addFile: 'add-file', - addFiles: 'add-file', - sort: 'sort-files', - removeFile: 'remove-file', - cancelFile: 'cancel-file', - skipFile: 'skip-file', - retry: 'retry', - isInProgress: 'is-in-progress', - makeThumb: 'make-thumb', - md5File: 'md5-file', - getDimension: 'get-dimension', - addButton: 'add-btn', - predictRuntimeType: 'predict-runtime-type', - refresh: 'refresh', - disable: 'disable', - enable: 'enable', - reset: 'reset' - }, function( fn, command ) { - Uploader.prototype[ fn ] = function() { - return this.request( command, arguments ); - }; - }); - - $.extend( Uploader.prototype, { - state: 'pending', - - _init: function( opts ) { - var me = this; - - me.request( 'init', opts, function() { - me.state = 'ready'; - me.trigger('ready'); - }); - }, - - /** - * 获取或者设置Uploader配置项。 - * @method option - * @grammar option( key ) => * - * @grammar option( key, val ) => self - * @example - * - * // 初始状态图片上传前不会压缩 - * var uploader = new WebUploader.Uploader({ - * compress: null; - * }); - * - * // 修改后图片上传前,尝试将图片压缩到1600 * 1600 - * uploader.option( 'compress', { - * width: 1600, - * height: 1600 - * }); - */ - option: function( key, val ) { - var opts = this.options; - - // setter - if ( arguments.length > 1 ) { - - if ( $.isPlainObject( val ) && - $.isPlainObject( opts[ key ] ) ) { - $.extend( opts[ key ], val ); - } else { - opts[ key ] = val; - } - - } else { // getter - return key ? opts[ key ] : opts; - } - }, - - /** - * 获取文件统计信息。返回一个包含一下信息的对象。 - * * `successNum` 上传成功的文件数 - * * `progressNum` 上传中的文件数 - * * `cancelNum` 被删除的文件数 - * * `invalidNum` 无效的文件数 - * * `uploadFailNum` 上传失败的文件数 - * * `queueNum` 还在队列中的文件数 - * * `interruptNum` 被暂停的文件数 - * @method getStats - * @grammar getStats() => Object - */ - getStats: function() { - // return this._mgr.getStats.apply( this._mgr, arguments ); - var stats = this.request('get-stats'); - - return stats ? { - successNum: stats.numOfSuccess, - progressNum: stats.numOfProgress, - - // who care? - // queueFailNum: 0, - cancelNum: stats.numOfCancel, - invalidNum: stats.numOfInvalid, - uploadFailNum: stats.numOfUploadFailed, - queueNum: stats.numOfQueue, - interruptNum: stats.numofInterrupt - } : {}; - }, - - // 需要重写此方法来来支持opts.onEvent和instance.onEvent的处理器 - trigger: function( type/*, args...*/ ) { - var args = [].slice.call( arguments, 1 ), - opts = this.options, - name = 'on' + type.substring( 0, 1 ).toUpperCase() + - type.substring( 1 ); - - if ( - // 调用通过on方法注册的handler. - Mediator.trigger.apply( this, arguments ) === false || - - // 调用opts.onEvent - $.isFunction( opts[ name ] ) && - opts[ name ].apply( this, args ) === false || - - // 调用this.onEvent - $.isFunction( this[ name ] ) && - this[ name ].apply( this, args ) === false || - - // 广播所有uploader的事件。 - Mediator.trigger.apply( Mediator, - [ this, type ].concat( args ) ) === false ) { - - return false; - } - - return true; - }, - - /** - * 销毁 webuploader 实例 - * @method destroy - * @grammar destroy() => undefined - */ - destroy: function() { - this.request( 'destroy', arguments ); - this.off(); - }, - - // widgets/widget.js将补充此方法的详细文档。 - request: Base.noop - }); - - /** - * 创建Uploader实例,等同于new Uploader( opts ); - * @method create - * @class Base - * @static - * @grammar Base.create( opts ) => Uploader - */ - Base.create = Uploader.create = function( opts ) { - return new Uploader( opts ); - }; - - // 暴露Uploader,可以通过它来扩展业务逻辑。 - Base.Uploader = Uploader; - - return Uploader; - }); - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/runtime',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$, - factories = {}, - - // 获取对象的第一个key - getFirstKey = function( obj ) { - for ( var key in obj ) { - if ( obj.hasOwnProperty( key ) ) { - return key; - } - } - return null; - }; - - // 接口类。 - function Runtime( options ) { - this.options = $.extend({ - container: document.body - }, options ); - this.uid = Base.guid('rt_'); - } - - $.extend( Runtime.prototype, { - - getContainer: function() { - var opts = this.options, - parent, container; - - if ( this._container ) { - return this._container; - } - - parent = $( opts.container || document.body ); - container = $( document.createElement('div') ); - - container.attr( 'id', 'rt_' + this.uid ); - container.css({ - position: 'absolute', - top: '0px', - left: '0px', - width: '1px', - height: '1px', - overflow: 'hidden' - }); - - parent.append( container ); - parent.addClass('webuploader-container'); - this._container = container; - this._parent = parent; - return container; - }, - - init: Base.noop, - exec: Base.noop, - - destroy: function() { - this._container && this._container.remove(); - this._parent && this._parent.removeClass('webuploader-container'); - this.off(); - } - }); - - Runtime.orders = 'html5,flash'; - - - /** - * 添加Runtime实现。 - * @param {String} type 类型 - * @param {Runtime} factory 具体Runtime实现。 - */ - Runtime.addRuntime = function( type, factory ) { - factories[ type ] = factory; - }; - - Runtime.hasRuntime = function( type ) { - return !!(type ? factories[ type ] : getFirstKey( factories )); - }; - - Runtime.create = function( opts, orders ) { - var type, runtime; - - orders = orders || Runtime.orders; - $.each( orders.split( /\s*,\s*/g ), function() { - if ( factories[ this ] ) { - type = this; - return false; - } - }); - - type = type || getFirstKey( factories ); - - if ( !type ) { - throw new Error('Runtime Error'); - } - - runtime = new factories[ type ]( opts ); - return runtime; - }; - - Mediator.installTo( Runtime.prototype ); - return Runtime; - }); - - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/client',[ - 'base', - 'mediator', - 'runtime/runtime' - ], function( Base, Mediator, Runtime ) { - - var cache; - - cache = (function() { - var obj = {}; - - return { - add: function( runtime ) { - obj[ runtime.uid ] = runtime; - }, - - get: function( ruid, standalone ) { - var i; - - if ( ruid ) { - return obj[ ruid ]; - } - - for ( i in obj ) { - // 有些类型不能重用,比如filepicker. - if ( standalone && obj[ i ].__standalone ) { - continue; - } - - return obj[ i ]; - } - - return null; - }, - - remove: function( runtime ) { - delete obj[ runtime.uid ]; - } - }; - })(); - - function RuntimeClient( component, standalone ) { - var deferred = Base.Deferred(), - runtime; - - this.uid = Base.guid('client_'); - - // 允许runtime没有初始化之前,注册一些方法在初始化后执行。 - this.runtimeReady = function( cb ) { - return deferred.done( cb ); - }; - - this.connectRuntime = function( opts, cb ) { - - // already connected. - if ( runtime ) { - throw new Error('already connected!'); - } - - deferred.done( cb ); - - if ( typeof opts === 'string' && cache.get( opts ) ) { - runtime = cache.get( opts ); - } - - // 像filePicker只能独立存在,不能公用。 - runtime = runtime || cache.get( null, standalone ); - - // 需要创建 - if ( !runtime ) { - runtime = Runtime.create( opts, opts.runtimeOrder ); - runtime.__promise = deferred.promise(); - runtime.once( 'ready', deferred.resolve ); - runtime.init(); - cache.add( runtime ); - runtime.__client = 1; - } else { - // 来自cache - Base.$.extend( runtime.options, opts ); - runtime.__promise.then( deferred.resolve ); - runtime.__client++; - } - - standalone && (runtime.__standalone = standalone); - return runtime; - }; - - this.getRuntime = function() { - return runtime; - }; - - this.disconnectRuntime = function() { - if ( !runtime ) { - return; - } - - runtime.__client--; - - if ( runtime.__client <= 0 ) { - cache.remove( runtime ); - delete runtime.__promise; - runtime.destroy(); - } - - runtime = null; - }; - - this.exec = function() { - if ( !runtime ) { - return; - } - - var args = Base.slice( arguments ); - component && args.unshift( component ); - - return runtime.exec.apply( this, args ); - }; - - this.getRuid = function() { - return runtime && runtime.uid; - }; - - this.destroy = (function( destroy ) { - return function() { - destroy && destroy.apply( this, arguments ); - this.trigger('destroy'); - this.off(); - this.exec('destroy'); - this.disconnectRuntime(); - }; - })( this.destroy ); - } - - Mediator.installTo( RuntimeClient.prototype ); - return RuntimeClient; - }); - /** - * @fileOverview 错误信息 - */ - define('lib/dnd',[ - 'base', - 'mediator', - 'runtime/client' - ], function( Base, Mediator, RuntimeClent ) { - - var $ = Base.$; - - function DragAndDrop( opts ) { - opts = this.options = $.extend({}, DragAndDrop.options, opts ); - - opts.container = $( opts.container ); - - if ( !opts.container.length ) { - return; - } - - RuntimeClent.call( this, 'DragAndDrop' ); - } - - DragAndDrop.options = { - accept: null, - disableGlobalDnd: false - }; - - Base.inherits( RuntimeClent, { - constructor: DragAndDrop, - - init: function() { - var me = this; - - me.connectRuntime( me.options, function() { - me.exec('init'); - me.trigger('ready'); - }); - } - }); - - Mediator.installTo( DragAndDrop.prototype ); - - return DragAndDrop; - }); - /** - * @fileOverview 组件基类。 - */ - define('widgets/widget',[ - 'base', - 'uploader' - ], function( Base, Uploader ) { - - var $ = Base.$, - _init = Uploader.prototype._init, - _destroy = Uploader.prototype.destroy, - IGNORE = {}, - widgetClass = []; - - function isArrayLike( obj ) { - if ( !obj ) { - return false; - } - - var length = obj.length, - type = $.type( obj ); - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === 'array' || type !== 'function' && type !== 'string' && - (length === 0 || typeof length === 'number' && length > 0 && - (length - 1) in obj); - } - - function Widget( uploader ) { - this.owner = uploader; - this.options = uploader.options; - } - - $.extend( Widget.prototype, { - - init: Base.noop, - - // 类Backbone的事件监听声明,监听uploader实例上的事件 - // widget直接无法监听事件,事件只能通过uploader来传递 - invoke: function( apiName, args ) { - - /* - { - 'make-thumb': 'makeThumb' - } - */ - var map = this.responseMap; - - // 如果无API响应声明则忽略 - if ( !map || !(apiName in map) || !(map[ apiName ] in this) || - !$.isFunction( this[ map[ apiName ] ] ) ) { - - return IGNORE; - } - - return this[ map[ apiName ] ].apply( this, args ); - - }, - - /** - * 发送命令。当传入`callback`或者`handler`中返回`promise`时。返回一个当所有`handler`中的promise都完成后完成的新`promise`。 - * @method request - * @grammar request( command, args ) => * | Promise - * @grammar request( command, args, callback ) => Promise - * @for Uploader - */ - request: function() { - return this.owner.request.apply( this.owner, arguments ); - } - }); - - // 扩展Uploader. - $.extend( Uploader.prototype, { - - /** - * @property {String | Array} [disableWidgets=undefined] - * @namespace options - * @for Uploader - * @description 默认所有 Uploader.register 了的 widget 都会被加载,如果禁用某一部分,请通过此 option 指定黑名单。 - */ - - // 覆写_init用来初始化widgets - _init: function() { - var me = this, - widgets = me._widgets = [], - deactives = me.options.disableWidgets || ''; - - $.each( widgetClass, function( _, klass ) { - (!deactives || !~deactives.indexOf( klass._name )) && - widgets.push( new klass( me ) ); - }); - - return _init.apply( me, arguments ); - }, - - request: function( apiName, args, callback ) { - var i = 0, - widgets = this._widgets, - len = widgets && widgets.length, - rlts = [], - dfds = [], - widget, rlt, promise, key; - - args = isArrayLike( args ) ? args : [ args ]; - - for ( ; i < len; i++ ) { - widget = widgets[ i ]; - rlt = widget.invoke( apiName, args ); - - if ( rlt !== IGNORE ) { - - // Deferred对象 - if ( Base.isPromise( rlt ) ) { - dfds.push( rlt ); - } else { - rlts.push( rlt ); - } - } - } - - // 如果有callback,则用异步方式。 - if ( callback || dfds.length ) { - promise = Base.when.apply( Base, dfds ); - key = promise.pipe ? 'pipe' : 'then'; - - // 很重要不能删除。删除了会死循环。 - // 保证执行顺序。让callback总是在下一个 tick 中执行。 - return promise[ key ](function() { - var deferred = Base.Deferred(), - args = arguments; - - if ( args.length === 1 ) { - args = args[ 0 ]; - } - - setTimeout(function() { - deferred.resolve( args ); - }, 1 ); - - return deferred.promise(); - })[ callback ? key : 'done' ]( callback || Base.noop ); - } else { - return rlts[ 0 ]; - } - }, - - destroy: function() { - _destroy.apply( this, arguments ); - this._widgets = null; - } - }); - - /** - * 添加组件 - * @grammar Uploader.register(proto); - * @grammar Uploader.register(map, proto); - * @param {object} responseMap API 名称与函数实现的映射 - * @param {object} proto 组件原型,构造函数通过 constructor 属性定义 - * @method Uploader.register - * @for Uploader - * @example - * Uploader.register({ - * 'make-thumb': 'makeThumb' - * }, { - * init: function( options ) {}, - * makeThumb: function() {} - * }); - * - * Uploader.register({ - * 'make-thumb': function() { - * - * } - * }); - */ - Uploader.register = Widget.register = function( responseMap, widgetProto ) { - var map = { init: 'init', destroy: 'destroy', name: 'anonymous' }, - klass; - - if ( arguments.length === 1 ) { - widgetProto = responseMap; - - // 自动生成 map 表。 - $.each(widgetProto, function(key) { - if ( key[0] === '_' || key === 'name' ) { - key === 'name' && (map.name = widgetProto.name); - return; - } - - map[key.replace(/[A-Z]/g, '-$&').toLowerCase()] = key; - }); - - } else { - map = $.extend( map, responseMap ); - } - - widgetProto.responseMap = map; - klass = Base.inherits( Widget, widgetProto ); - klass._name = map.name; - widgetClass.push( klass ); - - return klass; - }; - - /** - * 删除插件,只有在注册时指定了名字的才能被删除。 - * @grammar Uploader.unRegister(name); - * @param {string} name 组件名字 - * @method Uploader.unRegister - * @for Uploader - * @example - * - * Uploader.register({ - * name: 'custom', - * - * 'make-thumb': function() { - * - * } - * }); - * - * Uploader.unRegister('custom'); - */ - Uploader.unRegister = Widget.unRegister = function( name ) { - if ( !name || name === 'anonymous' ) { - return; - } - - // 删除指定的插件。 - for ( var i = widgetClass.length; i--; ) { - if ( widgetClass[i]._name === name ) { - widgetClass.splice(i, 1) - } - } - }; - - return Widget; - }); - /** - * @fileOverview DragAndDrop Widget。 - */ - define('widgets/filednd',[ - 'base', - 'uploader', - 'lib/dnd', - 'widgets/widget' - ], function( Base, Uploader, Dnd ) { - var $ = Base.$; - - Uploader.options.dnd = ''; - - /** - * @property {Selector} [dnd=undefined] 指定Drag And Drop拖拽的容器,如果不指定,则不启动。 - * @namespace options - * @for Uploader - */ - - /** - * @property {Selector} [disableGlobalDnd=false] 是否禁掉整个页面的拖拽功能,如果不禁用,图片拖进来的时候会默认被浏览器打开。 - * @namespace options - * @for Uploader - */ - - /** - * @event dndAccept - * @param {DataTransferItemList} items DataTransferItem - * @description 阻止此事件可以拒绝某些类型的文件拖入进来。目前只有 chrome 提供这样的 API,且只能通过 mime-type 验证。 - * @for Uploader - */ - return Uploader.register({ - name: 'dnd', - - init: function( opts ) { - - if ( !opts.dnd || - this.request('predict-runtime-type') !== 'html5' ) { - return; - } - - var me = this, - deferred = Base.Deferred(), - options = $.extend({}, { - disableGlobalDnd: opts.disableGlobalDnd, - container: opts.dnd, - accept: opts.accept - }), - dnd; - - this.dnd = dnd = new Dnd( options ); - - dnd.once( 'ready', deferred.resolve ); - dnd.on( 'drop', function( files ) { - me.request( 'add-file', [ files ]); - }); - - // 检测文件是否全部允许添加。 - dnd.on( 'accept', function( items ) { - return me.owner.trigger( 'dndAccept', items ); - }); - - dnd.init(); - - return deferred.promise(); - }, - - destroy: function() { - this.dnd && this.dnd.destroy(); - } - }); - }); - - /** - * @fileOverview 错误信息 - */ - define('lib/filepaste',[ - 'base', - 'mediator', - 'runtime/client' - ], function( Base, Mediator, RuntimeClent ) { - - var $ = Base.$; - - function FilePaste( opts ) { - opts = this.options = $.extend({}, opts ); - opts.container = $( opts.container || document.body ); - RuntimeClent.call( this, 'FilePaste' ); - } - - Base.inherits( RuntimeClent, { - constructor: FilePaste, - - init: function() { - var me = this; - - me.connectRuntime( me.options, function() { - me.exec('init'); - me.trigger('ready'); - }); - } - }); - - Mediator.installTo( FilePaste.prototype ); - - return FilePaste; - }); - /** - * @fileOverview 组件基类。 - */ - define('widgets/filepaste',[ - 'base', - 'uploader', - 'lib/filepaste', - 'widgets/widget' - ], function( Base, Uploader, FilePaste ) { - var $ = Base.$; - - /** - * @property {Selector} [paste=undefined] 指定监听paste事件的容器,如果不指定,不启用此功能。此功能为通过粘贴来添加截屏的图片。建议设置为`document.body`. - * @namespace options - * @for Uploader - */ - return Uploader.register({ - name: 'paste', - - init: function( opts ) { - - if ( !opts.paste || - this.request('predict-runtime-type') !== 'html5' ) { - return; - } - - var me = this, - deferred = Base.Deferred(), - options = $.extend({}, { - container: opts.paste, - accept: opts.accept - }), - paste; - - this.paste = paste = new FilePaste( options ); - - paste.once( 'ready', deferred.resolve ); - paste.on( 'paste', function( files ) { - me.owner.request( 'add-file', [ files ]); - }); - paste.init(); - - return deferred.promise(); - }, - - destroy: function() { - this.paste && this.paste.destroy(); - } - }); - }); - /** - * @fileOverview Blob - */ - define('lib/blob',[ - 'base', - 'runtime/client' - ], function( Base, RuntimeClient ) { - - function Blob( ruid, source ) { - var me = this; - - me.source = source; - me.ruid = ruid; - this.size = source.size || 0; - - // 如果没有指定 mimetype, 但是知道文件后缀。 - if ( !source.type && this.ext && - ~'jpg,jpeg,png,gif,bmp'.indexOf( this.ext ) ) { - this.type = 'image/' + (this.ext === 'jpg' ? 'jpeg' : this.ext); - } else { - this.type = source.type || 'application/octet-stream'; - } - - RuntimeClient.call( me, 'Blob' ); - this.uid = source.uid || this.uid; - - if ( ruid ) { - me.connectRuntime( ruid ); - } - } - - Base.inherits( RuntimeClient, { - constructor: Blob, - - slice: function( start, end ) { - return this.exec( 'slice', start, end ); - }, - - getSource: function() { - return this.source; - } - }); - - return Blob; - }); - /** - * 为了统一化Flash的File和HTML5的File而存在。 - * 以至于要调用Flash里面的File,也可以像调用HTML5版本的File一下。 - * @fileOverview File - */ - define('lib/file',[ - 'base', - 'lib/blob' - ], function( Base, Blob ) { - - var uid = 1, - rExt = /\.([^.]+)$/; - - function File( ruid, file ) { - var ext; - - this.name = file.name || ('untitled' + uid++); - ext = rExt.exec( file.name ) ? RegExp.$1.toLowerCase() : ''; - - // todo 支持其他类型文件的转换。 - // 如果有 mimetype, 但是文件名里面没有找出后缀规律 - if ( !ext && file.type ) { - ext = /\/(jpg|jpeg|png|gif|bmp)$/i.exec( file.type ) ? - RegExp.$1.toLowerCase() : ''; - this.name += '.' + ext; - } - - this.ext = ext; - this.lastModifiedDate = file.lastModifiedDate || - (new Date()).toLocaleString(); - - Blob.apply( this, arguments ); - } - - return Base.inherits( Blob, File ); - }); - - /** - * @fileOverview 错误信息 - */ - define('lib/filepicker',[ - 'base', - 'runtime/client', - 'lib/file' - ], function( Base, RuntimeClent, File ) { - - var $ = Base.$; - - function FilePicker( opts ) { - opts = this.options = $.extend({}, FilePicker.options, opts ); - - opts.container = $( opts.id ); - - if ( !opts.container.length ) { - throw new Error('按钮指定错误'); - } - - opts.innerHTML = opts.innerHTML || opts.label || - opts.container.html() || ''; - - opts.button = $( opts.button || document.createElement('div') ); - opts.button.html( opts.innerHTML ); - opts.container.html( opts.button ); - - RuntimeClent.call( this, 'FilePicker', true ); - } - - FilePicker.options = { - button: null, - container: null, - label: null, - innerHTML: null, - multiple: true, - accept: null, - name: 'file' - }; - - Base.inherits( RuntimeClent, { - constructor: FilePicker, - - init: function() { - var me = this, - opts = me.options, - button = opts.button; - - button.addClass('webuploader-pick'); - - me.on( 'all', function( type ) { - var files; - - switch ( type ) { - case 'mouseenter': - button.addClass('webuploader-pick-hover'); - break; - - case 'mouseleave': - button.removeClass('webuploader-pick-hover'); - break; - - case 'change': - files = me.exec('getFiles'); - me.trigger( 'select', $.map( files, function( file ) { - file = new File( me.getRuid(), file ); - - // 记录来源。 - file._refer = opts.container; - return file; - }), opts.container ); - break; - } - }); - - me.connectRuntime( opts, function() { - me.refresh(); - me.exec( 'init', opts ); - me.trigger('ready'); - }); - - this._resizeHandler = Base.bindFn( this.refresh, this ); - $( window ).on( 'resize', this._resizeHandler ); - }, - - refresh: function() { - var shimContainer = this.getRuntime().getContainer(), - button = this.options.button, - width = button.outerWidth ? - button.outerWidth() : button.width(), - - height = button.outerHeight ? - button.outerHeight() : button.height(), - - pos = button.offset(); - - width && height && shimContainer.css({ - bottom: 'auto', - right: 'auto', - width: width + 'px', - height: height + 'px' - }).offset( pos ); - }, - - enable: function() { - var btn = this.options.button; - - btn.removeClass('webuploader-pick-disable'); - this.refresh(); - }, - - disable: function() { - var btn = this.options.button; - - this.getRuntime().getContainer().css({ - top: '-99999px' - }); - - btn.addClass('webuploader-pick-disable'); - }, - - destroy: function() { - var btn = this.options.button; - $( window ).off( 'resize', this._resizeHandler ); - btn.removeClass('webuploader-pick-disable webuploader-pick-hover ' + - 'webuploader-pick'); - } - }); - - return FilePicker; - }); - - /** - * @fileOverview 文件选择相关 - */ - define('widgets/filepicker',[ - 'base', - 'uploader', - 'lib/filepicker', - 'widgets/widget' - ], function( Base, Uploader, FilePicker ) { - var $ = Base.$; - - $.extend( Uploader.options, { - - /** - * @property {Selector | Object} [pick=undefined] - * @namespace options - * @for Uploader - * @description 指定选择文件的按钮容器,不指定则不创建按钮。 - * - * * `id` {Seletor} 指定选择文件的按钮容器,不指定则不创建按钮。 - * * `label` {String} 请采用 `innerHTML` 代替 - * * `innerHTML` {String} 指定按钮文字。不指定时优先从指定的容器中看是否自带文字。 - * * `multiple` {Boolean} 是否开起同时选择多个文件能力。 - */ - pick: null, - - /** - * @property {Arroy} [accept=null] - * @namespace options - * @for Uploader - * @description 指定接受哪些类型的文件。 由于目前还有ext转mimeType表,所以这里需要分开指定。 - * - * * `title` {String} 文字描述 - * * `extensions` {String} 允许的文件后缀,不带点,多个用逗号分割。 - * * `mimeTypes` {String} 多个用逗号分割。 - * - * 如: - * - * ``` - * { - * title: 'Images', - * extensions: 'gif,jpg,jpeg,bmp,png', - * mimeTypes: 'image/*' - * } - * ``` - */ - accept: null/*{ - title: 'Images', - extensions: 'gif,jpg,jpeg,bmp,png', - mimeTypes: 'image/*' - }*/ - }); - - return Uploader.register({ - name: 'picker', - - init: function( opts ) { - this.pickers = []; - return opts.pick && this.addBtn( opts.pick ); - }, - - refresh: function() { - $.each( this.pickers, function() { - this.refresh(); - }); - }, - - /** - * @method addButton - * @for Uploader - * @grammar addButton( pick ) => Promise - * @description - * 添加文件选择按钮,如果一个按钮不够,需要调用此方法来添加。参数跟[options.pick](#WebUploader:Uploader:options)一致。 - * @example - * uploader.addButton({ - * id: '#btnContainer', - * innerHTML: '选择文件' - * }); - */ - addBtn: function( pick ) { - var me = this, - opts = me.options, - accept = opts.accept, - promises = []; - - if ( !pick ) { - return; - } - - $.isPlainObject( pick ) || (pick = { - id: pick - }); - - $( pick.id ).each(function() { - var options, picker, deferred; - - deferred = Base.Deferred(); - - options = $.extend({}, pick, { - accept: $.isPlainObject( accept ) ? [ accept ] : accept, - swf: opts.swf, - runtimeOrder: opts.runtimeOrder, - id: this - }); - - picker = new FilePicker( options ); - - picker.once( 'ready', deferred.resolve ); - picker.on( 'select', function( files ) { - me.owner.request( 'add-file', [ files ]); - }); - picker.init(); - - me.pickers.push( picker ); - - promises.push( deferred.promise() ); - }); - - return Base.when.apply( Base, promises ); - }, - - disable: function() { - $.each( this.pickers, function() { - this.disable(); - }); - }, - - enable: function() { - $.each( this.pickers, function() { - this.enable(); - }); - }, - - destroy: function() { - $.each( this.pickers, function() { - this.destroy(); - }); - this.pickers = null; - } - }); - }); - /** - * @fileOverview 文件属性封装 - */ - define('file',[ - 'base', - 'mediator' - ], function( Base, Mediator ) { - - var $ = Base.$, - idPrefix = 'WU_FILE_', - idSuffix = 0, - rExt = /\.([^.]+)$/, - statusMap = {}; - - function gid() { - return idPrefix + idSuffix++; - } - - /** - * 文件类 - * @class File - * @constructor 构造函数 - * @grammar new File( source ) => File - * @param {Lib.File} source [lib.File](#Lib.File)实例, 此source对象是带有Runtime信息的。 - */ - function WUFile( source ) { - - /** - * 文件名,包括扩展名(后缀) - * @property name - * @type {string} - */ - this.name = source.name || 'Untitled'; - - /** - * 文件体积(字节) - * @property size - * @type {uint} - * @default 0 - */ - this.size = source.size || 0; - - /** - * 文件MIMETYPE类型,与文件类型的对应关系请参考[http://t.cn/z8ZnFny](http://t.cn/z8ZnFny) - * @property type - * @type {string} - * @default 'application/octet-stream' - */ - this.type = source.type || 'application/octet-stream'; - - /** - * 文件最后修改日期 - * @property lastModifiedDate - * @type {int} - * @default 当前时间戳 - */ - this.lastModifiedDate = source.lastModifiedDate || (new Date() * 1); - - /** - * 文件ID,每个对象具有唯一ID,与文件名无关 - * @property id - * @type {string} - */ - this.id = gid(); - - /** - * 文件扩展名,通过文件名获取,例如test.png的扩展名为png - * @property ext - * @type {string} - */ - this.ext = rExt.exec( this.name ) ? RegExp.$1 : ''; - - - /** - * 状态文字说明。在不同的status语境下有不同的用途。 - * @property statusText - * @type {string} - */ - this.statusText = ''; - - // 存储文件状态,防止通过属性直接修改 - statusMap[ this.id ] = WUFile.Status.INITED; - - this.source = source; - this.loaded = 0; - - this.on( 'error', function( msg ) { - this.setStatus( WUFile.Status.ERROR, msg ); - }); - } - - $.extend( WUFile.prototype, { - - /** - * 设置状态,状态变化时会触发`change`事件。 - * @method setStatus - * @grammar setStatus( status[, statusText] ); - * @param {File.Status|String} status [文件状态值](#WebUploader:File:File.Status) - * @param {String} [statusText=''] 状态说明,常在error时使用,用http, abort,server等来标记是由于什么原因导致文件错误。 - */ - setStatus: function( status, text ) { - - var prevStatus = statusMap[ this.id ]; - - typeof text !== 'undefined' && (this.statusText = text); - - if ( status !== prevStatus ) { - statusMap[ this.id ] = status; - /** - * 文件状态变化 - * @event statuschange - */ - this.trigger( 'statuschange', status, prevStatus ); - } - - }, - - /** - * 获取文件状态 - * @return {File.Status} - * @example - 文件状态具体包括以下几种类型: - { - // 初始化 - INITED: 0, - // 已入队列 - QUEUED: 1, - // 正在上传 - PROGRESS: 2, - // 上传出错 - ERROR: 3, - // 上传成功 - COMPLETE: 4, - // 上传取消 - CANCELLED: 5 - } - */ - getStatus: function() { - return statusMap[ this.id ]; - }, - - /** - * 获取文件原始信息。 - * @return {*} - */ - getSource: function() { - return this.source; - }, - - destroy: function() { - this.off(); - delete statusMap[ this.id ]; - } - }); - - Mediator.installTo( WUFile.prototype ); - - /** - * 文件状态值,具体包括以下几种类型: - * * `inited` 初始状态 - * * `queued` 已经进入队列, 等待上传 - * * `progress` 上传中 - * * `complete` 上传完成。 - * * `error` 上传出错,可重试 - * * `interrupt` 上传中断,可续传。 - * * `invalid` 文件不合格,不能重试上传。会自动从队列中移除。 - * * `cancelled` 文件被移除。 - * @property {Object} Status - * @namespace File - * @class File - * @static - */ - WUFile.Status = { - INITED: 'inited', // 初始状态 - QUEUED: 'queued', // 已经进入队列, 等待上传 - PROGRESS: 'progress', // 上传中 - ERROR: 'error', // 上传出错,可重试 - COMPLETE: 'complete', // 上传完成。 - CANCELLED: 'cancelled', // 上传取消。 - INTERRUPT: 'interrupt', // 上传中断,可续传。 - INVALID: 'invalid' // 文件不合格,不能重试上传。 - }; - - return WUFile; - }); - - /** - * @fileOverview 文件队列 - */ - define('queue',[ - 'base', - 'mediator', - 'file' - ], function( Base, Mediator, WUFile ) { - - var $ = Base.$, - STATUS = WUFile.Status; - - /** - * 文件队列, 用来存储各个状态中的文件。 - * @class Queue - * @extends Mediator - */ - function Queue() { - - /** - * 统计文件数。 - * * `numOfQueue` 队列中的文件数。 - * * `numOfSuccess` 上传成功的文件数 - * * `numOfCancel` 被取消的文件数 - * * `numOfProgress` 正在上传中的文件数 - * * `numOfUploadFailed` 上传错误的文件数。 - * * `numOfInvalid` 无效的文件数。 - * * `numofDeleted` 被移除的文件数。 - * @property {Object} stats - */ - this.stats = { - numOfQueue: 0, - numOfSuccess: 0, - numOfCancel: 0, - numOfProgress: 0, - numOfUploadFailed: 0, - numOfInvalid: 0, - numofDeleted: 0, - numofInterrupt: 0, - }; - - // 上传队列,仅包括等待上传的文件 - this._queue = []; - - // 存储所有文件 - this._map = {}; - } - - $.extend( Queue.prototype, { - - /** - * 将新文件加入对队列尾部 - * - * @method append - * @param {File} file 文件对象 - */ - append: function( file ) { - this._queue.push( file ); - this._fileAdded( file ); - return this; - }, - - /** - * 将新文件加入对队列头部 - * - * @method prepend - * @param {File} file 文件对象 - */ - prepend: function( file ) { - this._queue.unshift( file ); - this._fileAdded( file ); - return this; - }, - - /** - * 获取文件对象 - * - * @method getFile - * @param {String} fileId 文件ID - * @return {File} - */ - getFile: function( fileId ) { - if ( typeof fileId !== 'string' ) { - return fileId; - } - return this._map[ fileId ]; - }, - - /** - * 从队列中取出一个指定状态的文件。 - * @grammar fetch( status ) => File - * @method fetch - * @param {String} status [文件状态值](#WebUploader:File:File.Status) - * @return {File} [File](#WebUploader:File) - */ - fetch: function( status ) { - var len = this._queue.length, - i, file; - - status = status || STATUS.QUEUED; - - for ( i = 0; i < len; i++ ) { - file = this._queue[ i ]; - - if ( status === file.getStatus() ) { - return file; - } - } - - return null; - }, - - /** - * 对队列进行排序,能够控制文件上传顺序。 - * @grammar sort( fn ) => undefined - * @method sort - * @param {Function} fn 排序方法 - */ - sort: function( fn ) { - if ( typeof fn === 'function' ) { - this._queue.sort( fn ); - } - }, - - /** - * 获取指定类型的文件列表, 列表中每一个成员为[File](#WebUploader:File)对象。 - * @grammar getFiles( [status1[, status2 ...]] ) => Array - * @method getFiles - * @param {String} [status] [文件状态值](#WebUploader:File:File.Status) - */ - getFiles: function() { - var sts = [].slice.call( arguments, 0 ), - ret = [], - i = 0, - len = this._queue.length, - file; - - for ( ; i < len; i++ ) { - file = this._queue[ i ]; - - if ( sts.length && !~$.inArray( file.getStatus(), sts ) ) { - continue; - } - - ret.push( file ); - } - - return ret; - }, - - /** - * 在队列中删除文件。 - * @grammar removeFile( file ) => Array - * @method removeFile - * @param {File} 文件对象。 - */ - removeFile: function( file ) { - var me = this, - existing = this._map[ file.id ]; - - if ( existing ) { - delete this._map[ file.id ]; - file.destroy(); - this.stats.numofDeleted++; - } - }, - - _fileAdded: function( file ) { - var me = this, - existing = this._map[ file.id ]; - - if ( !existing ) { - this._map[ file.id ] = file; - - file.on( 'statuschange', function( cur, pre ) { - me._onFileStatusChange( cur, pre ); - }); - } - }, - - _onFileStatusChange: function( curStatus, preStatus ) { - var stats = this.stats; - - switch ( preStatus ) { - case STATUS.PROGRESS: - stats.numOfProgress--; - break; - - case STATUS.QUEUED: - stats.numOfQueue --; - break; - - case STATUS.ERROR: - stats.numOfUploadFailed--; - break; - - case STATUS.INVALID: - stats.numOfInvalid--; - break; - - case STATUS.INTERRUPT: - stats.numofInterrupt--; - break; - } - - switch ( curStatus ) { - case STATUS.QUEUED: - stats.numOfQueue++; - break; - - case STATUS.PROGRESS: - stats.numOfProgress++; - break; - - case STATUS.ERROR: - stats.numOfUploadFailed++; - break; - - case STATUS.COMPLETE: - stats.numOfSuccess++; - break; - - case STATUS.CANCELLED: - stats.numOfCancel++; - break; - - - case STATUS.INVALID: - stats.numOfInvalid++; - break; - - case STATUS.INTERRUPT: - stats.numofInterrupt++; - break; - } - } - - }); - - Mediator.installTo( Queue.prototype ); - - return Queue; - }); - /** - * @fileOverview 队列 - */ - define('widgets/queue',[ - 'base', - 'uploader', - 'queue', - 'file', - 'lib/file', - 'runtime/client', - 'widgets/widget' - ], function( Base, Uploader, Queue, WUFile, File, RuntimeClient ) { - - var $ = Base.$, - rExt = /\.\w+$/, - Status = WUFile.Status; - - return Uploader.register({ - name: 'queue', - - init: function( opts ) { - var me = this, - deferred, len, i, item, arr, accept, runtime; - - if ( $.isPlainObject( opts.accept ) ) { - opts.accept = [ opts.accept ]; - } - - // accept中的中生成匹配正则。 - if ( opts.accept ) { - arr = []; - - for ( i = 0, len = opts.accept.length; i < len; i++ ) { - item = opts.accept[ i ].extensions; - item && arr.push( item ); - } - - if ( arr.length ) { - accept = '\\.' + arr.join(',') - .replace( /,/g, '$|\\.' ) - .replace( /\*/g, '.*' ) + '$'; - } - - me.accept = new RegExp( accept, 'i' ); - } - - me.queue = new Queue(); - me.stats = me.queue.stats; - - // 如果当前不是html5运行时,那就算了。 - // 不执行后续操作 - if ( this.request('predict-runtime-type') !== 'html5' ) { - return; - } - - // 创建一个 html5 运行时的 placeholder - // 以至于外部添加原生 File 对象的时候能正确包裹一下供 webuploader 使用。 - deferred = Base.Deferred(); - this.placeholder = runtime = new RuntimeClient('Placeholder'); - runtime.connectRuntime({ - runtimeOrder: 'html5' - }, function() { - me._ruid = runtime.getRuid(); - deferred.resolve(); - }); - return deferred.promise(); - }, - - - // 为了支持外部直接添加一个原生File对象。 - _wrapFile: function( file ) { - if ( !(file instanceof WUFile) ) { - - if ( !(file instanceof File) ) { - if ( !this._ruid ) { - throw new Error('Can\'t add external files.'); - } - file = new File( this._ruid, file ); - } - - file = new WUFile( file ); - } - - return file; - }, - - // 判断文件是否可以被加入队列 - acceptFile: function( file ) { - var invalid = !file || !file.size || this.accept && - - // 如果名字中有后缀,才做后缀白名单处理。 - rExt.exec( file.name ) && !this.accept.test( file.name ); - - return !invalid; - }, - - - /** - * @event beforeFileQueued - * @param {File} file File对象 - * @description 当文件被加入队列之前触发,此事件的handler返回值为`false`,则此文件不会被添加进入队列。 - * @for Uploader - */ - - /** - * @event fileQueued - * @param {File} file File对象 - * @description 当文件被加入队列以后触发。 - * @for Uploader - */ - - _addFile: function( file ) { - var me = this; - - file = me._wrapFile( file ); - - // 不过类型判断允许不允许,先派送 `beforeFileQueued` - if ( !me.owner.trigger( 'beforeFileQueued', file ) ) { - return; - } - - // 类型不匹配,则派送错误事件,并返回。 - if ( !me.acceptFile( file ) ) { - me.owner.trigger( 'error', 'Q_TYPE_DENIED', file ); - return; - } - - me.queue.append( file ); - me.owner.trigger( 'fileQueued', file ); - return file; - }, - - getFile: function( fileId ) { - return this.queue.getFile( fileId ); - }, - - /** - * @event filesQueued - * @param {File} files 数组,内容为原始File(lib/File)对象。 - * @description 当一批文件添加进队列以后触发。 - * @for Uploader - */ - - /** - * @property {Boolean} [auto=false] - * @namespace options - * @for Uploader - * @description 设置为 true 后,不需要手动调用上传,有文件选择即开始上传。 - * - */ - - /** - * @method addFiles - * @grammar addFiles( file ) => undefined - * @grammar addFiles( [file1, file2 ...] ) => undefined - * @param {Array of File or File} [files] Files 对象 数组 - * @description 添加文件到队列 - * @for Uploader - */ - addFile: function( files ) { - var me = this; - - if ( !files.length ) { - files = [ files ]; - } - - files = $.map( files, function( file ) { - return me._addFile( file ); - }); - - me.owner.trigger( 'filesQueued', files ); - - if ( me.options.auto ) { - setTimeout(function() { - me.request('start-upload'); - }, 20 ); - } - }, - - getStats: function() { - return this.stats; - }, - - /** - * @event fileDequeued - * @param {File} file File对象 - * @description 当文件被移除队列后触发。 - * @for Uploader - */ - - /** - * @method removeFile - * @grammar removeFile( file ) => undefined - * @grammar removeFile( id ) => undefined - * @grammar removeFile( file, true ) => undefined - * @grammar removeFile( id, true ) => undefined - * @param {File|id} file File对象或这File对象的id - * @description 移除某一文件, 默认只会标记文件状态为已取消,如果第二个参数为 `true` 则会从 queue 中移除。 - * @for Uploader - * @example - * - * $li.on('click', '.remove-this', function() { - * uploader.removeFile( file ); - * }) - */ - removeFile: function( file, remove ) { - var me = this; - - file = file.id ? file : me.queue.getFile( file ); - - this.request( 'cancel-file', file ); - - if ( remove ) { - this.queue.removeFile( file ); - } - }, - - /** - * @method getFiles - * @grammar getFiles() => Array - * @grammar getFiles( status1, status2, status... ) => Array - * @description 返回指定状态的文件集合,不传参数将返回所有状态的文件。 - * @for Uploader - * @example - * console.log( uploader.getFiles() ); // => all files - * console.log( uploader.getFiles('error') ) // => all error files. - */ - getFiles: function() { - return this.queue.getFiles.apply( this.queue, arguments ); - }, - - fetchFile: function() { - return this.queue.fetch.apply( this.queue, arguments ); - }, - - /** - * @method retry - * @grammar retry() => undefined - * @grammar retry( file ) => undefined - * @description 重试上传,重试指定文件,或者从出错的文件开始重新上传。 - * @for Uploader - * @example - * function retry() { - * uploader.retry(); - * } - */ - retry: function( file, noForceStart ) { - var me = this, - files, i, len; - - if ( file ) { - file = file.id ? file : me.queue.getFile( file ); - file.setStatus( Status.QUEUED ); - noForceStart || me.request('start-upload'); - return; - } - - files = me.queue.getFiles( Status.ERROR ); - i = 0; - len = files.length; - - for ( ; i < len; i++ ) { - file = files[ i ]; - file.setStatus( Status.QUEUED ); - } - - me.request('start-upload'); - }, - - /** - * @method sort - * @grammar sort( fn ) => undefined - * @description 排序队列中的文件,在上传之前调整可以控制上传顺序。 - * @for Uploader - */ - sortFiles: function() { - return this.queue.sort.apply( this.queue, arguments ); - }, - - /** - * @event reset - * @description 当 uploader 被重置的时候触发。 - * @for Uploader - */ - - /** - * @method reset - * @grammar reset() => undefined - * @description 重置uploader。目前只重置了队列。 - * @for Uploader - * @example - * uploader.reset(); - */ - reset: function() { - this.owner.trigger('reset'); - this.queue = new Queue(); - this.stats = this.queue.stats; - }, - - destroy: function() { - this.reset(); - this.placeholder && this.placeholder.destroy(); - } - }); - - }); - /** - * @fileOverview 添加获取Runtime相关信息的方法。 - */ - define('widgets/runtime',[ - 'uploader', - 'runtime/runtime', - 'widgets/widget' - ], function( Uploader, Runtime ) { - - Uploader.support = function() { - return Runtime.hasRuntime.apply( Runtime, arguments ); - }; - - return Uploader.register({ - name: 'runtime', - - init: function() { - if ( !this.predictRuntimeType() ) { - throw Error('Runtime Error'); - } - }, - - /** - * 预测Uploader将采用哪个`Runtime` - * @grammar predictRuntimeType() => String - * @method predictRuntimeType - * @for Uploader - */ - predictRuntimeType: function() { - var orders = this.options.runtimeOrder || Runtime.orders, - type = this.type, - i, len; - - if ( !type ) { - orders = orders.split( /\s*,\s*/g ); - - for ( i = 0, len = orders.length; i < len; i++ ) { - if ( Runtime.hasRuntime( orders[ i ] ) ) { - this.type = type = orders[ i ]; - break; - } - } - } - - return type; - } - }); - }); - /** - * @fileOverview Transport - */ - define('lib/transport',[ - 'base', - 'runtime/client', - 'mediator' - ], function( Base, RuntimeClient, Mediator ) { - - var $ = Base.$; - - function Transport( opts ) { - var me = this; - - opts = me.options = $.extend( true, {}, Transport.options, opts || {} ); - RuntimeClient.call( this, 'Transport' ); - - this._blob = null; - this._formData = opts.formData || {}; - this._headers = opts.headers || {}; - - this.on( 'progress', this._timeout ); - this.on( 'load error', function() { - me.trigger( 'progress', 1 ); - clearTimeout( me._timer ); - }); - } - - Transport.options = { - server: '', - method: 'POST', - - // 跨域时,是否允许携带cookie, 只有html5 runtime才有效 - withCredentials: false, - fileVal: 'file', - timeout: 2 * 60 * 1000, // 2分钟 - formData: {}, - headers: {}, - sendAsBinary: false - }; - - $.extend( Transport.prototype, { - - // 添加Blob, 只能添加一次,最后一次有效。 - appendBlob: function( key, blob, filename ) { - var me = this, - opts = me.options; - - if ( me.getRuid() ) { - me.disconnectRuntime(); - } - - // 连接到blob归属的同一个runtime. - me.connectRuntime( blob.ruid, function() { - me.exec('init'); - }); - - me._blob = blob; - opts.fileVal = key || opts.fileVal; - opts.filename = filename || opts.filename; - }, - - // 添加其他字段 - append: function( key, value ) { - if ( typeof key === 'object' ) { - $.extend( this._formData, key ); - } else { - this._formData[ key ] = value; - } - }, - - setRequestHeader: function( key, value ) { - if ( typeof key === 'object' ) { - $.extend( this._headers, key ); - } else { - this._headers[ key ] = value; - } - }, - - send: function( method ) { - this.exec( 'send', method ); - this._timeout(); - }, - - abort: function() { - clearTimeout( this._timer ); - return this.exec('abort'); - }, - - destroy: function() { - this.trigger('destroy'); - this.off(); - this.exec('destroy'); - this.disconnectRuntime(); - }, - - getResponse: function() { - return this.exec('getResponse'); - }, - - getResponseAsJson: function() { - return this.exec('getResponseAsJson'); - }, - - getStatus: function() { - return this.exec('getStatus'); - }, - - _timeout: function() { - var me = this, - duration = me.options.timeout; - - if ( !duration ) { - return; - } - - clearTimeout( me._timer ); - me._timer = setTimeout(function() { - me.abort(); - me.trigger( 'error', 'timeout' ); - }, duration ); - } - - }); - - // 让Transport具备事件功能。 - Mediator.installTo( Transport.prototype ); - - return Transport; - }); - /** - * @fileOverview 负责文件上传相关。 - */ - define('widgets/upload',[ - 'base', - 'uploader', - 'file', - 'lib/transport', - 'widgets/widget' - ], function( Base, Uploader, WUFile, Transport ) { - - var $ = Base.$, - isPromise = Base.isPromise, - Status = WUFile.Status; - - // 添加默认配置项 - $.extend( Uploader.options, { - - - /** - * @property {Boolean} [prepareNextFile=false] - * @namespace options - * @for Uploader - * @description 是否允许在文件传输时提前把下一个文件准备好。 - * 对于一个文件的准备工作比较耗时,比如图片压缩,md5序列化。 - * 如果能提前在当前文件传输期处理,可以节省总体耗时。 - */ - prepareNextFile: false, - - /** - * @property {Boolean} [chunked=false] - * @namespace options - * @for Uploader - * @description 是否要分片处理大文件上传。 - */ - chunked: false, - - /** - * @property {Boolean} [chunkSize=5242880] - * @namespace options - * @for Uploader - * @description 如果要分片,分多大一片? 默认大小为5M. - */ - chunkSize: 5 * 1024 * 1024, - - /** - * @property {Boolean} [chunkRetry=2] - * @namespace options - * @for Uploader - * @description 如果某个分片由于网络问题出错,允许自动重传多少次? - */ - chunkRetry: 2, - - /** - * @property {Boolean} [threads=3] - * @namespace options - * @for Uploader - * @description 上传并发数。允许同时最大上传进程数。 - */ - threads: 3, - - - /** - * @property {Object} [formData={}] - * @namespace options - * @for Uploader - * @description 文件上传请求的参数表,每次发送都会发送此对象中的参数。 - */ - formData: {} - - /** - * @property {Object} [fileVal='file'] - * @namespace options - * @for Uploader - * @description 设置文件上传域的name。 - */ - - /** - * @property {Object} [method='POST'] - * @namespace options - * @for Uploader - * @description 文件上传方式,`POST`或者`GET`。 - */ - - /** - * @property {Object} [sendAsBinary=false] - * @namespace options - * @for Uploader - * @description 是否已二进制的流的方式发送文件,这样整个上传内容`php://input`都为文件内容, - * 其他参数在$_GET数组中。 - */ - }); - - // 负责将文件切片。 - function CuteFile( file, chunkSize ) { - var pending = [], - blob = file.source, - total = blob.size, - chunks = chunkSize ? Math.ceil( total / chunkSize ) : 1, - start = 0, - index = 0, - len, api; - - api = { - file: file, - - has: function() { - return !!pending.length; - }, - - shift: function() { - return pending.shift(); - }, - - unshift: function( block ) { - pending.unshift( block ); - } - }; - - while ( index < chunks ) { - len = Math.min( chunkSize, total - start ); - - pending.push({ - file: file, - start: start, - end: chunkSize ? (start + len) : total, - total: total, - chunks: chunks, - chunk: index++, - cuted: api - }); - start += len; - } - - file.blocks = pending.concat(); - file.remaning = pending.length; - - return api; - } - - Uploader.register({ - name: 'upload', - - init: function() { - var owner = this.owner, - me = this; - - this.runing = false; - this.progress = false; - - owner - .on( 'startUpload', function() { - me.progress = true; - }) - .on( 'uploadFinished', function() { - me.progress = false; - }); - - // 记录当前正在传的数据,跟threads相关 - this.pool = []; - - // 缓存分好片的文件。 - this.stack = []; - - // 缓存即将上传的文件。 - this.pending = []; - - // 跟踪还有多少分片在上传中但是没有完成上传。 - this.remaning = 0; - this.__tick = Base.bindFn( this._tick, this ); - - owner.on( 'uploadComplete', function( file ) { - - // 把其他块取消了。 - file.blocks && $.each( file.blocks, function( _, v ) { - v.transport && (v.transport.abort(), v.transport.destroy()); - delete v.transport; - }); - - delete file.blocks; - delete file.remaning; - }); - }, - - reset: function() { - this.request( 'stop-upload', true ); - this.runing = false; - this.pool = []; - this.stack = []; - this.pending = []; - this.remaning = 0; - this._trigged = false; - this._promise = null; - }, - - /** - * @event startUpload - * @description 当开始上传流程时触发。 - * @for Uploader - */ - - /** - * 开始上传。此方法可以从初始状态调用开始上传流程,也可以从暂停状态调用,继续上传流程。 - * - * 可以指定开始某一个文件。 - * @grammar upload() => undefined - * @grammar upload( file | fileId) => undefined - * @method upload - * @for Uploader - */ - startUpload: function(file) { - var me = this; - - // 移出invalid的文件 - $.each( me.request( 'get-files', Status.INVALID ), function() { - me.request( 'remove-file', this ); - }); - - // 如果指定了开始某个文件,则只开始指定文件。 - if ( file ) { - file = file.id ? file : me.request( 'get-file', file ); - - if (file.getStatus() === Status.INTERRUPT) { - $.each( me.pool, function( _, v ) { - - // 之前暂停过。 - if (v.file !== file) { - return; - } - - v.transport && v.transport.send(); - }); - - file.setStatus( Status.QUEUED ); - } else if (file.getStatus() === Status.PROGRESS) { - return; - } else { - file.setStatus( Status.QUEUED ); - } - } else { - $.each( me.request( 'get-files', [ Status.INITED ] ), function() { - this.setStatus( Status.QUEUED ); - }); - } - - if ( me.runing ) { - return; - } - - me.runing = true; - - // 如果有暂停的,则续传 - $.each( me.pool, function( _, v ) { - var file = v.file; - - if ( file.getStatus() === Status.INTERRUPT ) { - file.setStatus( Status.PROGRESS ); - me._trigged = false; - v.transport && v.transport.send(); - } - }); - - file || $.each( me.request( 'get-files', - Status.INTERRUPT ), function() { - this.setStatus( Status.PROGRESS ); - }); - - me._trigged = false; - Base.nextTick( me.__tick ); - me.owner.trigger('startUpload'); - }, - - /** - * @event stopUpload - * @description 当开始上传流程暂停时触发。 - * @for Uploader - */ - - /** - * 暂停上传。第一个参数为是否中断上传当前正在上传的文件。 - * - * 如果第一个参数是文件,则只暂停指定文件。 - * @grammar stop() => undefined - * @grammar stop( true ) => undefined - * @grammar stop( file ) => undefined - * @method stop - * @for Uploader - */ - stopUpload: function( file, interrupt ) { - var me = this; - - if (file === true) { - interrupt = file; - file = null; - } - - if ( me.runing === false ) { - return; - } - - // 如果只是暂停某个文件。 - if ( file ) { - file = file.id ? file : me.request( 'get-file', file ); - - if ( file.getStatus() !== Status.PROGRESS && - file.getStatus() !== Status.QUEUED ) { - return; - } - - file.setStatus( Status.INTERRUPT ); - $.each( me.pool, function( _, v ) { - - // 只 abort 指定的文件。 - if (v.file !== file) { - return; - } - - v.transport && v.transport.abort(); - me._putback(v); - me._popBlock(v); - }); - - return Base.nextTick( me.__tick ); - } - - me.runing = false; - - if (this._promise && this._promise.file) { - this._promise.file.setStatus( Status.INTERRUPT ); - } - - interrupt && $.each( me.pool, function( _, v ) { - v.transport && v.transport.abort(); - v.file.setStatus( Status.INTERRUPT ); - }); - - me.owner.trigger('stopUpload'); - }, - - /** - * @method cancelFile - * @grammar cancelFile( file ) => undefined - * @grammar cancelFile( id ) => undefined - * @param {File|id} file File对象或这File对象的id - * @description 标记文件状态为已取消, 同时将中断文件传输。 - * @for Uploader - * @example - * - * $li.on('click', '.remove-this', function() { - * uploader.cancelFile( file ); - * }) - */ - cancelFile: function( file ) { - file = file.id ? file : this.request( 'get-file', file ); - - // 如果正在上传。 - file.blocks && $.each( file.blocks, function( _, v ) { - var _tr = v.transport; - - if ( _tr ) { - _tr.abort(); - _tr.destroy(); - delete v.transport; - } - }); - - file.setStatus( Status.CANCELLED ); - this.owner.trigger( 'fileDequeued', file ); - }, - - /** - * 判断`Uplaode`r是否正在上传中。 - * @grammar isInProgress() => Boolean - * @method isInProgress - * @for Uploader - */ - isInProgress: function() { - return !!this.progress; - }, - - _getStats: function() { - return this.request('get-stats'); - }, - - /** - * 掉过一个文件上传,直接标记指定文件为已上传状态。 - * @grammar skipFile( file ) => undefined - * @method skipFile - * @for Uploader - */ - skipFile: function( file, status ) { - file = file.id ? file : this.request( 'get-file', file ); - - file.setStatus( status || Status.COMPLETE ); - file.skipped = true; - - // 如果正在上传。 - file.blocks && $.each( file.blocks, function( _, v ) { - var _tr = v.transport; - - if ( _tr ) { - _tr.abort(); - _tr.destroy(); - delete v.transport; - } - }); - - this.owner.trigger( 'uploadSkip', file ); - }, - - /** - * @event uploadFinished - * @description 当所有文件上传结束时触发。 - * @for Uploader - */ - _tick: function() { - var me = this, - opts = me.options, - fn, val; - - // 上一个promise还没有结束,则等待完成后再执行。 - if ( me._promise ) { - return me._promise.always( me.__tick ); - } - - // 还有位置,且还有文件要处理的话。 - if ( me.pool.length < opts.threads && (val = me._nextBlock()) ) { - me._trigged = false; - - fn = function( val ) { - me._promise = null; - - // 有可能是reject过来的,所以要检测val的类型。 - val && val.file && me._startSend( val ); - Base.nextTick( me.__tick ); - }; - - me._promise = isPromise( val ) ? val.always( fn ) : fn( val ); - - // 没有要上传的了,且没有正在传输的了。 - } else if ( !me.remaning && !me._getStats().numOfQueue && - !me._getStats().numofInterrupt ) { - me.runing = false; - - me._trigged || Base.nextTick(function() { - me.owner.trigger('uploadFinished'); - }); - me._trigged = true; - } - }, - - _putback: function(block) { - var idx; - - block.cuted.unshift(block); - idx = this.stack.indexOf(block.cuted); - - if (!~idx) { - this.stack.unshift(block.cuted); - } - }, - - _getStack: function() { - var i = 0, - act; - - while ( (act = this.stack[ i++ ]) ) { - if ( act.has() && act.file.getStatus() === Status.PROGRESS ) { - return act; - } else if (!act.has() || - act.file.getStatus() !== Status.PROGRESS && - act.file.getStatus() !== Status.INTERRUPT ) { - - // 把已经处理完了的,或者,状态为非 progress(上传中)、 - // interupt(暂停中) 的移除。 - this.stack.splice( --i, 1 ); - } - } - - return null; - }, - - _nextBlock: function() { - var me = this, - opts = me.options, - act, next, done, preparing; - - // 如果当前文件还有没有需要传输的,则直接返回剩下的。 - if ( (act = this._getStack()) ) { - - // 是否提前准备下一个文件 - if ( opts.prepareNextFile && !me.pending.length ) { - me._prepareNextFile(); - } - - return act.shift(); - - // 否则,如果正在运行,则准备下一个文件,并等待完成后返回下个分片。 - } else if ( me.runing ) { - - // 如果缓存中有,则直接在缓存中取,没有则去queue中取。 - if ( !me.pending.length && me._getStats().numOfQueue ) { - me._prepareNextFile(); - } - - next = me.pending.shift(); - done = function( file ) { - if ( !file ) { - return null; - } - - act = CuteFile( file, opts.chunked ? opts.chunkSize : 0 ); - me.stack.push(act); - return act.shift(); - }; - - // 文件可能还在prepare中,也有可能已经完全准备好了。 - if ( isPromise( next) ) { - preparing = next.file; - next = next[ next.pipe ? 'pipe' : 'then' ]( done ); - next.file = preparing; - return next; - } - - return done( next ); - } - }, - - - /** - * @event uploadStart - * @param {File} file File对象 - * @description 某个文件开始上传前触发,一个文件只会触发一次。 - * @for Uploader - */ - _prepareNextFile: function() { - var me = this, - file = me.request('fetch-file'), - pending = me.pending, - promise; - - if ( file ) { - promise = me.request( 'before-send-file', file, function() { - - // 有可能文件被skip掉了。文件被skip掉后,状态坑定不是Queued. - if ( file.getStatus() === Status.PROGRESS || - file.getStatus() === Status.INTERRUPT ) { - return file; - } - - return me._finishFile( file ); - }); - - me.owner.trigger( 'uploadStart', file ); - file.setStatus( Status.PROGRESS ); - - promise.file = file; - - // 如果还在pending中,则替换成文件本身。 - promise.done(function() { - var idx = $.inArray( promise, pending ); - - ~idx && pending.splice( idx, 1, file ); - }); - - // befeore-send-file的钩子就有错误发生。 - promise.fail(function( reason ) { - file.setStatus( Status.ERROR, reason ); - me.owner.trigger( 'uploadError', file, reason ); - me.owner.trigger( 'uploadComplete', file ); - }); - - pending.push( promise ); - } - }, - - // 让出位置了,可以让其他分片开始上传 - _popBlock: function( block ) { - var idx = $.inArray( block, this.pool ); - - this.pool.splice( idx, 1 ); - block.file.remaning--; - this.remaning--; - }, - - // 开始上传,可以被掉过。如果promise被reject了,则表示跳过此分片。 - _startSend: function( block ) { - var me = this, - file = block.file, - promise; - - // 有可能在 before-send-file 的 promise 期间改变了文件状态。 - // 如:暂停,取消 - // 我们不能中断 promise, 但是可以在 promise 完后,不做上传操作。 - if ( file.getStatus() !== Status.PROGRESS ) { - - // 如果是中断,则还需要放回去。 - if (file.getStatus() === Status.INTERRUPT) { - me._putback(block); - } - - return; - } - - me.pool.push( block ); - me.remaning++; - - // 如果没有分片,则直接使用原始的。 - // 不会丢失content-type信息。 - block.blob = block.chunks === 1 ? file.source : - file.source.slice( block.start, block.end ); - - // hook, 每个分片发送之前可能要做些异步的事情。 - promise = me.request( 'before-send', block, function() { - - // 有可能文件已经上传出错了,所以不需要再传输了。 - if ( file.getStatus() === Status.PROGRESS ) { - me._doSend( block ); - } else { - me._popBlock( block ); - Base.nextTick( me.__tick ); - } - }); - - // 如果为fail了,则跳过此分片。 - promise.fail(function() { - if ( file.remaning === 1 ) { - me._finishFile( file ).always(function() { - block.percentage = 1; - me._popBlock( block ); - me.owner.trigger( 'uploadComplete', file ); - Base.nextTick( me.__tick ); - }); - } else { - block.percentage = 1; - me._popBlock( block ); - Base.nextTick( me.__tick ); - } - }); - }, - - - /** - * @event uploadBeforeSend - * @param {Object} object - * @param {Object} data 默认的上传参数,可以扩展此对象来控制上传参数。 - * @param {Object} headers 可以扩展此对象来控制上传头部。 - * @description 当某个文件的分块在发送前触发,主要用来询问是否要添加附带参数,大文件在开起分片上传的前提下此事件可能会触发多次。 - * @for Uploader - */ - - /** - * @event uploadAccept - * @param {Object} object - * @param {Object} ret 服务端的返回数据,json格式,如果服务端不是json格式,从ret._raw中取数据,自行解析。 - * @description 当某个文件上传到服务端响应后,会派送此事件来询问服务端响应是否有效。如果此事件handler返回值为`false`, 则此文件将派送`server`类型的`uploadError`事件。 - * @for Uploader - */ - - /** - * @event uploadProgress - * @param {File} file File对象 - * @param {Number} percentage 上传进度 - * @description 上传过程中触发,携带上传进度。 - * @for Uploader - */ - - - /** - * @event uploadError - * @param {File} file File对象 - * @param {String} reason 出错的code - * @description 当文件上传出错时触发。 - * @for Uploader - */ - - /** - * @event uploadSuccess - * @param {File} file File对象 - * @param {Object} response 服务端返回的数据 - * @description 当文件上传成功时触发。 - * @for Uploader - */ - - /** - * @event uploadComplete - * @param {File} [file] File对象 - * @description 不管成功或者失败,文件上传完成时触发。 - * @for Uploader - */ - - // 做上传操作。 - _doSend: function( block ) { - var me = this, - owner = me.owner, - opts = me.options, - file = block.file, - tr = new Transport( opts ), - data = $.extend({}, opts.formData ), - headers = $.extend({}, opts.headers ), - requestAccept, ret; - - block.transport = tr; - - tr.on( 'destroy', function() { - delete block.transport; - me._popBlock( block ); - Base.nextTick( me.__tick ); - }); - - // 广播上传进度。以文件为单位。 - tr.on( 'progress', function( percentage ) { - var totalPercent = 0, - uploaded = 0; - - // 可能没有abort掉,progress还是执行进来了。 - // if ( !file.blocks ) { - // return; - // } - - totalPercent = block.percentage = percentage; - - if ( block.chunks > 1 ) { // 计算文件的整体速度。 - $.each( file.blocks, function( _, v ) { - uploaded += (v.percentage || 0) * (v.end - v.start); - }); - - totalPercent = uploaded / file.size; - } - - owner.trigger( 'uploadProgress', file, totalPercent || 0 ); - }); - - // 用来询问,是否返回的结果是有错误的。 - requestAccept = function( reject ) { - var fn; - - ret = tr.getResponseAsJson() || {}; - ret._raw = tr.getResponse(); - fn = function( value ) { - reject = value; - }; - - // 服务端响应了,不代表成功了,询问是否响应正确。 - if ( !owner.trigger( 'uploadAccept', block, ret, fn ) ) { - reject = reject || 'server'; - } - - return reject; - }; - - // 尝试重试,然后广播文件上传出错。 - tr.on( 'error', function( type, flag ) { - block.retried = block.retried || 0; - - // 自动重试 - if ( block.chunks > 1 && ~'http,abort'.indexOf( type ) && - block.retried < opts.chunkRetry ) { - - block.retried++; - tr.send(); - - } else { - - // http status 500 ~ 600 - if ( !flag && type === 'server' ) { - type = requestAccept( type ); - } - - file.setStatus( Status.ERROR, type ); - owner.trigger( 'uploadError', file, type ); - owner.trigger( 'uploadComplete', file ); - } - }); - - // 上传成功 - tr.on( 'load', function() { - var reason; - - // 如果非预期,转向上传出错。 - if ( (reason = requestAccept()) ) { - tr.trigger( 'error', reason, true ); - return; - } - - // 全部上传完成。 - if ( file.remaning === 1 ) { - me._finishFile( file, ret ); - } else { - tr.destroy(); - } - }); - - // 配置默认的上传字段。 - data = $.extend( data, { - id: file.id, - name: file.name, - type: file.type, - lastModifiedDate: file.lastModifiedDate, - size: file.size - }); - - block.chunks > 1 && $.extend( data, { - chunks: block.chunks, - chunk: block.chunk - }); - - // 在发送之间可以添加字段什么的。。。 - // 如果默认的字段不够使用,可以通过监听此事件来扩展 - owner.trigger( 'uploadBeforeSend', block, data, headers ); - - // 开始发送。 - tr.appendBlob( opts.fileVal, block.blob, file.name ); - tr.append( data ); - tr.setRequestHeader( headers ); - tr.send(); - }, - - // 完成上传。 - _finishFile: function( file, ret, hds ) { - var owner = this.owner; - - return owner - .request( 'after-send-file', arguments, function() { - file.setStatus( Status.COMPLETE ); - owner.trigger( 'uploadSuccess', file, ret, hds ); - }) - .fail(function( reason ) { - - // 如果外部已经标记为invalid什么的,不再改状态。 - if ( file.getStatus() === Status.PROGRESS ) { - file.setStatus( Status.ERROR, reason ); - } - - owner.trigger( 'uploadError', file, reason ); - }) - .always(function() { - owner.trigger( 'uploadComplete', file ); - }); - } - - }); - }); - /** - * @fileOverview 各种验证,包括文件总大小是否超出、单文件是否超出和文件是否重复。 - */ - - define('widgets/validator',[ - 'base', - 'uploader', - 'file', - 'widgets/widget' - ], function( Base, Uploader, WUFile ) { - - var $ = Base.$, - validators = {}, - api; - - /** - * @event error - * @param {String} type 错误类型。 - * @description 当validate不通过时,会以派送错误事件的形式通知调用者。通过`upload.on('error', handler)`可以捕获到此类错误,目前有以下错误会在特定的情况下派送错来。 - * - * * `Q_EXCEED_NUM_LIMIT` 在设置了`fileNumLimit`且尝试给`uploader`添加的文件数量超出这个值时派送。 - * * `Q_EXCEED_SIZE_LIMIT` 在设置了`Q_EXCEED_SIZE_LIMIT`且尝试给`uploader`添加的文件总大小超出这个值时派送。 - * * `Q_TYPE_DENIED` 当文件类型不满足时触发。。 - * @for Uploader - */ - - // 暴露给外面的api - api = { - - // 添加验证器 - addValidator: function( type, cb ) { - validators[ type ] = cb; - }, - - // 移除验证器 - removeValidator: function( type ) { - delete validators[ type ]; - } - }; - - // 在Uploader初始化的时候启动Validators的初始化 - Uploader.register({ - name: 'validator', - - init: function() { - var me = this; - Base.nextTick(function() { - $.each( validators, function() { - this.call( me.owner ); - }); - }); - } - }); - - /** - * @property {int} [fileNumLimit=undefined] - * @namespace options - * @for Uploader - * @description 验证文件总数量, 超出则不允许加入队列。 - */ - api.addValidator( 'fileNumLimit', function() { - var uploader = this, - opts = uploader.options, - count = 0, - max = parseInt( opts.fileNumLimit, 10 ), - flag = true; - - if ( !max ) { - return; - } - - uploader.on( 'beforeFileQueued', function( file ) { - - if ( count >= max && flag ) { - flag = false; - this.trigger( 'error', 'Q_EXCEED_NUM_LIMIT', max, file ); - setTimeout(function() { - flag = true; - }, 1 ); - } - - return count >= max ? false : true; - }); - - uploader.on( 'fileQueued', function() { - count++; - }); - - uploader.on( 'fileDequeued', function() { - count--; - }); - - uploader.on( 'reset', function() { - count = 0; - }); - }); - - - /** - * @property {int} [fileSizeLimit=undefined] - * @namespace options - * @for Uploader - * @description 验证文件总大小是否超出限制, 超出则不允许加入队列。 - */ - api.addValidator( 'fileSizeLimit', function() { - var uploader = this, - opts = uploader.options, - count = 0, - max = parseInt( opts.fileSizeLimit, 10 ), - flag = true; - - if ( !max ) { - return; - } - - uploader.on( 'beforeFileQueued', function( file ) { - var invalid = count + file.size > max; - - if ( invalid && flag ) { - flag = false; - this.trigger( 'error', 'Q_EXCEED_SIZE_LIMIT', max, file ); - setTimeout(function() { - flag = true; - }, 1 ); - } - - return invalid ? false : true; - }); - - uploader.on( 'fileQueued', function( file ) { - count += file.size; - }); - - uploader.on( 'fileDequeued', function( file ) { - count -= file.size; - }); - - uploader.on( 'reset', function() { - count = 0; - }); - }); - - /** - * @property {int} [fileSingleSizeLimit=undefined] - * @namespace options - * @for Uploader - * @description 验证单个文件大小是否超出限制, 超出则不允许加入队列。 - */ - api.addValidator( 'fileSingleSizeLimit', function() { - var uploader = this, - opts = uploader.options, - max = opts.fileSingleSizeLimit; - - if ( !max ) { - return; - } - - uploader.on( 'beforeFileQueued', function( file ) { - - if ( file.size > max ) { - file.setStatus( WUFile.Status.INVALID, 'exceed_size' ); - this.trigger( 'error', 'F_EXCEED_SIZE', max, file ); - return false; - } - - }); - - }); - - /** - * @property {Boolean} [duplicate=undefined] - * @namespace options - * @for Uploader - * @description 去重, 根据文件名字、文件大小和最后修改时间来生成hash Key. - */ - api.addValidator( 'duplicate', function() { - var uploader = this, - opts = uploader.options, - mapping = {}; - - if ( opts.duplicate ) { - return; - } - - function hashString( str ) { - var hash = 0, - i = 0, - len = str.length, - _char; - - for ( ; i < len; i++ ) { - _char = str.charCodeAt( i ); - hash = _char + (hash << 6) + (hash << 16) - hash; - } - - return hash; - } - - uploader.on( 'beforeFileQueued', function( file ) { - var hash = file.__hash || (file.__hash = hashString( file.name + - file.size + file.lastModifiedDate )); - - // 已经重复了 - if ( mapping[ hash ] ) { - this.trigger( 'error', 'F_DUPLICATE', file ); - return false; - } - }); - - uploader.on( 'fileQueued', function( file ) { - var hash = file.__hash; - - hash && (mapping[ hash ] = true); - }); - - uploader.on( 'fileDequeued', function( file ) { - var hash = file.__hash; - - hash && (delete mapping[ hash ]); - }); - - uploader.on( 'reset', function() { - mapping = {}; - }); - }); - - return api; - }); - - /** - * @fileOverview Runtime管理器,负责Runtime的选择, 连接 - */ - define('runtime/compbase',[],function() { - - function CompBase( owner, runtime ) { - - this.owner = owner; - this.options = owner.options; - - this.getRuntime = function() { - return runtime; - }; - - this.getRuid = function() { - return runtime.uid; - }; - - this.trigger = function() { - return owner.trigger.apply( owner, arguments ); - }; - } - - return CompBase; - }); - /** - * @fileOverview Html5Runtime - */ - define('runtime/html5/runtime',[ - 'base', - 'runtime/runtime', - 'runtime/compbase' - ], function( Base, Runtime, CompBase ) { - - var type = 'html5', - components = {}; - - function Html5Runtime() { - var pool = {}, - me = this, - destroy = this.destroy; - - Runtime.apply( me, arguments ); - me.type = type; - - - // 这个方法的调用者,实际上是RuntimeClient - me.exec = function( comp, fn/*, args...*/) { - var client = this, - uid = client.uid, - args = Base.slice( arguments, 2 ), - instance; - - if ( components[ comp ] ) { - instance = pool[ uid ] = pool[ uid ] || - new components[ comp ]( client, me ); - - if ( instance[ fn ] ) { - return instance[ fn ].apply( instance, args ); - } - } - }; - - me.destroy = function() { - // @todo 删除池子中的所有实例 - return destroy && destroy.apply( this, arguments ); - }; - } - - Base.inherits( Runtime, { - constructor: Html5Runtime, - - // 不需要连接其他程序,直接执行callback - init: function() { - var me = this; - setTimeout(function() { - me.trigger('ready'); - }, 1 ); - } - - }); - - // 注册Components - Html5Runtime.register = function( name, component ) { - var klass = components[ name ] = Base.inherits( CompBase, component ); - return klass; - }; - - // 注册html5运行时。 - // 只有在支持的前提下注册。 - if ( window.Blob && window.FileReader && window.DataView ) { - Runtime.addRuntime( type, Html5Runtime ); - } - - return Html5Runtime; - }); - /** - * @fileOverview Blob Html实现 - */ - define('runtime/html5/blob',[ - 'runtime/html5/runtime', - 'lib/blob' - ], function( Html5Runtime, Blob ) { - - return Html5Runtime.register( 'Blob', { - slice: function( start, end ) { - var blob = this.owner.source, - slice = blob.slice || blob.webkitSlice || blob.mozSlice; - - blob = slice.call( blob, start, end ); - - return new Blob( this.getRuid(), blob ); - } - }); - }); - /** - * @fileOverview FilePaste - */ - define('runtime/html5/dnd',[ - 'base', - 'runtime/html5/runtime', - 'lib/file' - ], function( Base, Html5Runtime, File ) { - - var $ = Base.$, - prefix = 'webuploader-dnd-'; - - return Html5Runtime.register( 'DragAndDrop', { - init: function() { - var elem = this.elem = this.options.container; - - this.dragEnterHandler = Base.bindFn( this._dragEnterHandler, this ); - this.dragOverHandler = Base.bindFn( this._dragOverHandler, this ); - this.dragLeaveHandler = Base.bindFn( this._dragLeaveHandler, this ); - this.dropHandler = Base.bindFn( this._dropHandler, this ); - this.dndOver = false; - - elem.on( 'dragenter', this.dragEnterHandler ); - elem.on( 'dragover', this.dragOverHandler ); - elem.on( 'dragleave', this.dragLeaveHandler ); - elem.on( 'drop', this.dropHandler ); - - if ( this.options.disableGlobalDnd ) { - $( document ).on( 'dragover', this.dragOverHandler ); - $( document ).on( 'drop', this.dropHandler ); - } - }, - - _dragEnterHandler: function( e ) { - var me = this, - denied = me._denied || false, - items; - - e = e.originalEvent || e; - - if ( !me.dndOver ) { - me.dndOver = true; - - // 注意只有 chrome 支持。 - items = e.dataTransfer.items; - - if ( items && items.length ) { - me._denied = denied = !me.trigger( 'accept', items ); - } - - me.elem.addClass( prefix + 'over' ); - me.elem[ denied ? 'addClass' : - 'removeClass' ]( prefix + 'denied' ); - } - - e.dataTransfer.dropEffect = denied ? 'none' : 'copy'; - - return false; - }, - - _dragOverHandler: function( e ) { - // 只处理框内的。 - var parentElem = this.elem.parent().get( 0 ); - if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) { - return false; - } - - clearTimeout( this._leaveTimer ); - this._dragEnterHandler.call( this, e ); - - return false; - }, - - _dragLeaveHandler: function() { - var me = this, - handler; - - handler = function() { - me.dndOver = false; - me.elem.removeClass( prefix + 'over ' + prefix + 'denied' ); - }; - - clearTimeout( me._leaveTimer ); - me._leaveTimer = setTimeout( handler, 100 ); - return false; - }, - - _dropHandler: function( e ) { - var me = this, - ruid = me.getRuid(), - parentElem = me.elem.parent().get( 0 ), - dataTransfer, data; - - // 只处理框内的。 - if ( parentElem && !$.contains( parentElem, e.currentTarget ) ) { - return false; - } - - e = e.originalEvent || e; - dataTransfer = e.dataTransfer; - - // 如果是页面内拖拽,还不能处理,不阻止事件。 - // 此处 ie11 下会报参数错误, - try { - data = dataTransfer.getData('text/html'); - } catch( err ) { - } - - if ( data ) { - return; - } - - me._getTansferFiles( dataTransfer, function( results ) { - me.trigger( 'drop', $.map( results, function( file ) { - return new File( ruid, file ); - }) ); - }); - - me.dndOver = false; - me.elem.removeClass( prefix + 'over' ); - return false; - }, - - // 如果传入 callback 则去查看文件夹,否则只管当前文件夹。 - _getTansferFiles: function( dataTransfer, callback ) { - var results = [], - promises = [], - items, files, file, item, i, len, canAccessFolder; - - items = dataTransfer.items; - files = dataTransfer.files; - - canAccessFolder = !!(items && items[ 0 ].webkitGetAsEntry); - - for ( i = 0, len = files.length; i < len; i++ ) { - file = files[ i ]; - item = items && items[ i ]; - - if ( canAccessFolder && item.webkitGetAsEntry().isDirectory ) { - - promises.push( this._traverseDirectoryTree( - item.webkitGetAsEntry(), results ) ); - } else { - results.push( file ); - } - } - - Base.when.apply( Base, promises ).done(function() { - - if ( !results.length ) { - return; - } - - callback( results ); - }); - }, - - _traverseDirectoryTree: function( entry, results ) { - var deferred = Base.Deferred(), - me = this; - - if ( entry.isFile ) { - entry.file(function( file ) { - results.push( file ); - deferred.resolve(); - }); - } else if ( entry.isDirectory ) { - entry.createReader().readEntries(function( entries ) { - var len = entries.length, - promises = [], - arr = [], // 为了保证顺序。 - i; - - for ( i = 0; i < len; i++ ) { - promises.push( me._traverseDirectoryTree( - entries[ i ], arr ) ); - } - - Base.when.apply( Base, promises ).then(function() { - results.push.apply( results, arr ); - deferred.resolve(); - }, deferred.reject ); - }); - } - - return deferred.promise(); - }, - - destroy: function() { - var elem = this.elem; - - // 还没 init 就调用 destroy - if (!elem) { - return; - } - - elem.off( 'dragenter', this.dragEnterHandler ); - elem.off( 'dragover', this.dragOverHandler ); - elem.off( 'dragleave', this.dragLeaveHandler ); - elem.off( 'drop', this.dropHandler ); - - if ( this.options.disableGlobalDnd ) { - $( document ).off( 'dragover', this.dragOverHandler ); - $( document ).off( 'drop', this.dropHandler ); - } - } - }); - }); - - /** - * @fileOverview FilePaste - */ - define('runtime/html5/filepaste',[ - 'base', - 'runtime/html5/runtime', - 'lib/file' - ], function( Base, Html5Runtime, File ) { - - return Html5Runtime.register( 'FilePaste', { - init: function() { - var opts = this.options, - elem = this.elem = opts.container, - accept = '.*', - arr, i, len, item; - - // accetp的mimeTypes中生成匹配正则。 - if ( opts.accept ) { - arr = []; - - for ( i = 0, len = opts.accept.length; i < len; i++ ) { - item = opts.accept[ i ].mimeTypes; - item && arr.push( item ); - } - - if ( arr.length ) { - accept = arr.join(','); - accept = accept.replace( /,/g, '|' ).replace( /\*/g, '.*' ); - } - } - this.accept = accept = new RegExp( accept, 'i' ); - this.hander = Base.bindFn( this._pasteHander, this ); - elem.on( 'paste', this.hander ); - }, - - _pasteHander: function( e ) { - var allowed = [], - ruid = this.getRuid(), - items, item, blob, i, len; - - e = e.originalEvent || e; - items = e.clipboardData.items; - - for ( i = 0, len = items.length; i < len; i++ ) { - item = items[ i ]; - - if ( item.kind !== 'file' || !(blob = item.getAsFile()) ) { - continue; - } - - allowed.push( new File( ruid, blob ) ); - } - - if ( allowed.length ) { - // 不阻止非文件粘贴(文字粘贴)的事件冒泡 - e.preventDefault(); - e.stopPropagation(); - this.trigger( 'paste', allowed ); - } - }, - - destroy: function() { - this.elem.off( 'paste', this.hander ); - } - }); - }); - - /** - * @fileOverview FilePicker - */ - define('runtime/html5/filepicker',[ - 'base', - 'runtime/html5/runtime' - ], function( Base, Html5Runtime ) { - - var $ = Base.$; - - return Html5Runtime.register( 'FilePicker', { - init: function() { - var container = this.getRuntime().getContainer(), - me = this, - owner = me.owner, - opts = me.options, - label = this.label = $( document.createElement('label') ), - input = this.input = $( document.createElement('input') ), - arr, i, len, mouseHandler; - - input.attr( 'type', 'file' ); - input.attr( 'name', opts.name ); - input.addClass('webuploader-element-invisible'); - - label.on( 'click', function() { - input.trigger('click'); - }); - - label.css({ - opacity: 0, - width: '100%', - height: '100%', - display: 'block', - cursor: 'pointer', - background: '#ffffff' - }); - - if ( opts.multiple ) { - input.attr( 'multiple', 'multiple' ); - } - - // @todo Firefox不支持单独指定后缀 - if ( opts.accept && opts.accept.length > 0 ) { - arr = []; - - for ( i = 0, len = opts.accept.length; i < len; i++ ) { - arr.push( opts.accept[ i ].mimeTypes ); - } - - input.attr( 'accept', arr.join(',') ); - } - - container.append( input ); - container.append( label ); - - mouseHandler = function( e ) { - owner.trigger( e.type ); - }; - - input.on( 'change', function( e ) { - var fn = arguments.callee, - clone; - - me.files = e.target.files; - - // reset input - clone = this.cloneNode( true ); - clone.value = null; - this.parentNode.replaceChild( clone, this ); - - input.off(); - input = $( clone ).on( 'change', fn ) - .on( 'mouseenter mouseleave', mouseHandler ); - - owner.trigger('change'); - }); - - label.on( 'mouseenter mouseleave', mouseHandler ); - - }, - - - getFiles: function() { - return this.files; - }, - - destroy: function() { - this.input.off(); - this.label.off(); - } - }); - }); - /** - * @fileOverview Transport - * @todo 支持chunked传输,优势: - * 可以将大文件分成小块,挨个传输,可以提高大文件成功率,当失败的时候,也只需要重传那小部分, - * 而不需要重头再传一次。另外断点续传也需要用chunked方式。 - */ - define('runtime/html5/transport',[ - 'base', - 'runtime/html5/runtime' - ], function( Base, Html5Runtime ) { - - var noop = Base.noop, - $ = Base.$; - - return Html5Runtime.register( 'Transport', { - init: function() { - this._status = 0; - this._response = null; - }, - - send: function() { - var owner = this.owner, - opts = this.options, - xhr = this._initAjax(), - blob = owner._blob, - server = opts.server, - formData, binary, fr; - - if ( opts.sendAsBinary ) { - server += (/\?/.test( server ) ? '&' : '?') + - $.param( owner._formData ); - - binary = blob.getSource(); - } else { - formData = new FormData(); - $.each( owner._formData, function( k, v ) { - formData.append( k, v ); - }); - - formData.append( opts.fileVal, blob.getSource(), - opts.filename || owner._formData.name || '' ); - } - - if ( opts.withCredentials && 'withCredentials' in xhr ) { - xhr.open( opts.method, server, true ); - xhr.withCredentials = true; - } else { - xhr.open( opts.method, server ); - } - - this._setRequestHeader( xhr, opts.headers ); - - if ( binary ) { - // 强制设置成 content-type 为文件流。 - xhr.overrideMimeType && - xhr.overrideMimeType('application/octet-stream'); - - // android直接发送blob会导致服务端接收到的是空文件。 - // bug详情。 - // https://code.google.com/p/android/issues/detail?id=39882 - // 所以先用fileReader读取出来再通过arraybuffer的方式发送。 - if ( Base.os.android ) { - fr = new FileReader(); - - fr.onload = function() { - xhr.send( this.result ); - fr = fr.onload = null; - }; - - fr.readAsArrayBuffer( binary ); - } else { - xhr.send( binary ); - } - } else { - xhr.send( formData ); - } - }, - - getResponse: function() { - return this._response; - }, - - getResponseAsJson: function() { - return this._parseJson( this._response ); - }, - - getStatus: function() { - return this._status; - }, - - abort: function() { - var xhr = this._xhr; - - if ( xhr ) { - xhr.upload.onprogress = noop; - xhr.onreadystatechange = noop; - xhr.abort(); - - this._xhr = xhr = null; - } - }, - - destroy: function() { - this.abort(); - }, - - _initAjax: function() { - var me = this, - xhr = new XMLHttpRequest(), - opts = this.options; - - if ( opts.withCredentials && !('withCredentials' in xhr) && - typeof XDomainRequest !== 'undefined' ) { - xhr = new XDomainRequest(); - } - - xhr.upload.onprogress = function( e ) { - var percentage = 0; - - if ( e.lengthComputable ) { - percentage = e.loaded / e.total; - } - - return me.trigger( 'progress', percentage ); - }; - - xhr.onreadystatechange = function() { - - if ( xhr.readyState !== 4 ) { - return; - } - - xhr.upload.onprogress = noop; - xhr.onreadystatechange = noop; - me._xhr = null; - me._status = xhr.status; - - if ( xhr.status >= 200 && xhr.status < 300 ) { - me._response = xhr.responseText; - return me.trigger('load'); - } else if ( xhr.status >= 500 && xhr.status < 600 ) { - me._response = xhr.responseText; - return me.trigger( 'error', 'server' ); - } - - - return me.trigger( 'error', me._status ? 'http' : 'abort' ); - }; - - me._xhr = xhr; - return xhr; - }, - - _setRequestHeader: function( xhr, headers ) { - $.each( headers, function( key, val ) { - xhr.setRequestHeader( key, val ); - }); - }, - - _parseJson: function( str ) { - var json; - - try { - json = JSON.parse( str ); - } catch ( ex ) { - json = {}; - } - - return json; - } - }); - }); - /** - * @fileOverview FlashRuntime - */ - define('runtime/flash/runtime',[ - 'base', - 'runtime/runtime', - 'runtime/compbase' - ], function( Base, Runtime, CompBase ) { - - var $ = Base.$, - type = 'flash', - components = {}; - - - function getFlashVersion() { - var version; - - try { - version = navigator.plugins[ 'Shockwave Flash' ]; - version = version.description; - } catch ( ex ) { - try { - version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash') - .GetVariable('$version'); - } catch ( ex2 ) { - version = '0.0'; - } - } - version = version.match( /\d+/g ); - return parseFloat( version[ 0 ] + '.' + version[ 1 ], 10 ); - } - - function FlashRuntime() { - var pool = {}, - clients = {}, - destroy = this.destroy, - me = this, - jsreciver = Base.guid('webuploader_'); - - Runtime.apply( me, arguments ); - me.type = type; - - - // 这个方法的调用者,实际上是RuntimeClient - me.exec = function( comp, fn/*, args...*/ ) { - var client = this, - uid = client.uid, - args = Base.slice( arguments, 2 ), - instance; - - clients[ uid ] = client; - - if ( components[ comp ] ) { - if ( !pool[ uid ] ) { - pool[ uid ] = new components[ comp ]( client, me ); - } - - instance = pool[ uid ]; - - if ( instance[ fn ] ) { - return instance[ fn ].apply( instance, args ); - } - } - - return me.flashExec.apply( client, arguments ); - }; - - function handler( evt, obj ) { - var type = evt.type || evt, - parts, uid; - - parts = type.split('::'); - uid = parts[ 0 ]; - type = parts[ 1 ]; - - // console.log.apply( console, arguments ); - - if ( type === 'Ready' && uid === me.uid ) { - me.trigger('ready'); - } else if ( clients[ uid ] ) { - clients[ uid ].trigger( type.toLowerCase(), evt, obj ); - } - - // Base.log( evt, obj ); - } - - // flash的接受器。 - window[ jsreciver ] = function() { - var args = arguments; - - // 为了能捕获得到。 - setTimeout(function() { - handler.apply( null, args ); - }, 1 ); - }; - - this.jsreciver = jsreciver; - - this.destroy = function() { - // @todo 删除池子中的所有实例 - return destroy && destroy.apply( this, arguments ); - }; - - this.flashExec = function( comp, fn ) { - var flash = me.getFlash(), - args = Base.slice( arguments, 2 ); - - return flash.exec( this.uid, comp, fn, args ); - }; - - // @todo - } - - Base.inherits( Runtime, { - constructor: FlashRuntime, - - init: function() { - var container = this.getContainer(), - opts = this.options, - html; - - // if not the minimal height, shims are not initialized - // in older browsers (e.g FF3.6, IE6,7,8, Safari 4.0,5.0, etc) - container.css({ - position: 'absolute', - top: '-8px', - left: '-8px', - width: '9px', - height: '9px', - overflow: 'hidden' - }); - - // insert flash object - html = '' + - '' + - '' + - '' + - ''; - - container.html( html ); - }, - - getFlash: function() { - if ( this._flash ) { - return this._flash; - } - - this._flash = $( '#' + this.uid ).get( 0 ); - return this._flash; - } - - }); - - FlashRuntime.register = function( name, component ) { - component = components[ name ] = Base.inherits( CompBase, $.extend({ - - // @todo fix this later - flashExec: function() { - var owner = this.owner, - runtime = this.getRuntime(); - - return runtime.flashExec.apply( owner, arguments ); - } - }, component ) ); - - return component; - }; - - if ( getFlashVersion() >= 11.4 ) { - Runtime.addRuntime( type, FlashRuntime ); - } - - return FlashRuntime; - }); - /** - * @fileOverview FilePicker - */ - define('runtime/flash/filepicker',[ - 'base', - 'runtime/flash/runtime' - ], function( Base, FlashRuntime ) { - var $ = Base.$; - - return FlashRuntime.register( 'FilePicker', { - init: function( opts ) { - var copy = $.extend({}, opts ), - len, i; - - // 修复Flash再没有设置title的情况下无法弹出flash文件选择框的bug. - len = copy.accept && copy.accept.length; - for ( i = 0; i < len; i++ ) { - if ( !copy.accept[ i ].title ) { - copy.accept[ i ].title = 'Files'; - } - } - - delete copy.button; - delete copy.id; - delete copy.container; - - this.flashExec( 'FilePicker', 'init', copy ); - }, - - destroy: function() { - this.flashExec( 'FilePicker', 'destroy' ); - } - }); - }); - /** - * @fileOverview Transport flash实现 - */ - define('runtime/flash/transport',[ - 'base', - 'runtime/flash/runtime', - 'runtime/client' - ], function( Base, FlashRuntime, RuntimeClient ) { - var $ = Base.$; - - return FlashRuntime.register( 'Transport', { - init: function() { - this._status = 0; - this._response = null; - this._responseJson = null; - }, - - send: function() { - var owner = this.owner, - opts = this.options, - xhr = this._initAjax(), - blob = owner._blob, - server = opts.server, - binary; - - xhr.connectRuntime( blob.ruid ); - - if ( opts.sendAsBinary ) { - server += (/\?/.test( server ) ? '&' : '?') + - $.param( owner._formData ); - - binary = blob.uid; - } else { - $.each( owner._formData, function( k, v ) { - xhr.exec( 'append', k, v ); - }); - - xhr.exec( 'appendBlob', opts.fileVal, blob.uid, - opts.filename || owner._formData.name || '' ); - } - - this._setRequestHeader( xhr, opts.headers ); - xhr.exec( 'send', { - method: opts.method, - url: server, - forceURLStream: opts.forceURLStream, - mimeType: 'application/octet-stream' - }, binary ); - }, - - getStatus: function() { - return this._status; - }, - - getResponse: function() { - return this._response || ''; - }, - - getResponseAsJson: function() { - return this._responseJson; - }, - - abort: function() { - var xhr = this._xhr; - - if ( xhr ) { - xhr.exec('abort'); - xhr.destroy(); - this._xhr = xhr = null; - } - }, - - destroy: function() { - this.abort(); - }, - - _initAjax: function() { - var me = this, - xhr = new RuntimeClient('XMLHttpRequest'); - - xhr.on( 'uploadprogress progress', function( e ) { - var percent = e.loaded / e.total; - percent = Math.min( 1, Math.max( 0, percent ) ); - return me.trigger( 'progress', percent ); - }); - - xhr.on( 'load', function() { - var status = xhr.exec('getStatus'), - readBody = false, - err = '', - p; - - xhr.off(); - me._xhr = null; - - if ( status >= 200 && status < 300 ) { - readBody = true; - } else if ( status >= 500 && status < 600 ) { - readBody = true; - err = 'server'; - } else { - err = 'http'; - } - - if ( readBody ) { - me._response = xhr.exec('getResponse'); - me._response = decodeURIComponent( me._response ); - - // flash 处理可能存在 bug, 没辙只能靠 js 了 - // try { - // me._responseJson = xhr.exec('getResponseAsJson'); - // } catch ( error ) { - - p = window.JSON && window.JSON.parse || function( s ) { - try { - return new Function('return ' + s).call(); - } catch ( err ) { - return {}; - } - }; - me._responseJson = me._response ? p(me._response) : {}; - - // } - } - - xhr.destroy(); - xhr = null; - - return err ? me.trigger( 'error', err ) : me.trigger('load'); - }); - - xhr.on( 'error', function() { - xhr.off(); - me._xhr = null; - me.trigger( 'error', 'http' ); - }); - - me._xhr = xhr; - return xhr; - }, - - _setRequestHeader: function( xhr, headers ) { - $.each( headers, function( key, val ) { - xhr.exec( 'setRequestHeader', key, val ); - }); - } - }); - }); - /** - * @fileOverview 没有图像处理的版本。 - */ - define('preset/withoutimage',[ - 'base', - - // widgets - 'widgets/filednd', - 'widgets/filepaste', - 'widgets/filepicker', - 'widgets/queue', - 'widgets/runtime', - 'widgets/upload', - 'widgets/validator', - - // runtimes - // html5 - 'runtime/html5/blob', - 'runtime/html5/dnd', - 'runtime/html5/filepaste', - 'runtime/html5/filepicker', - 'runtime/html5/transport', - - // flash - 'runtime/flash/filepicker', - 'runtime/flash/transport' - ], function( Base ) { - return Base; - }); - define('webuploader',[ - 'preset/withoutimage' - ], function( preset ) { - return preset; - }); - return require('webuploader'); -}); diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.withoutimage.min.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.withoutimage.min.js deleted file mode 100644 index 84ba1987..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.withoutimage.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* WebUploader 0.1.5 */!function(a,b){var c,d={},e=function(a,b){var c,d,e;if("string"==typeof a)return h(a);for(c=[],d=a.length,e=0;d>e;e++)c.push(h(a[e]));return b.apply(null,c)},f=function(a,b,c){2===arguments.length&&(c=b,b=null),e(b||[],function(){g(a,c,arguments)})},g=function(a,b,c){var f,g={exports:b};"function"==typeof b&&(c.length||(c=[e,g.exports,g]),f=b.apply(null,c),void 0!==f&&(g.exports=f)),d[a]=g.exports},h=function(b){var c=d[b]||a[b];if(!c)throw new Error("`"+b+"` is undefined");return c},i=function(a){var b,c,e,f,g,h;h=function(a){return a&&a.charAt(0).toUpperCase()+a.substr(1)};for(b in d)if(c=a,d.hasOwnProperty(b)){for(e=b.split("/"),g=h(e.pop());f=h(e.shift());)c[f]=c[f]||{},c=c[f];c[g]=d[b]}return a},j=function(c){return a.__dollar=c,i(b(a,f,e))};"object"==typeof module&&"object"==typeof module.exports?module.exports=j():"function"==typeof define&&define.amd?define(["jquery"],j):(c=a.WebUploader,a.WebUploader=j(),a.WebUploader.noConflict=function(){a.WebUploader=c})}(window,function(a,b,c){return b("dollar-third",[],function(){var b=a.__dollar||a.jQuery||a.Zepto;if(!b)throw new Error("jQuery or Zepto not found!");return b}),b("dollar",["dollar-third"],function(a){return a}),b("promise-third",["dollar"],function(a){return{Deferred:a.Deferred,when:a.when,isPromise:function(a){return a&&"function"==typeof a.then}}}),b("promise",["promise-third"],function(a){return a}),b("base",["dollar","promise"],function(b,c){function d(a){return function(){return h.apply(a,arguments)}}function e(a,b){return function(){return a.apply(b,arguments)}}function f(a){var b;return Object.create?Object.create(a):(b=function(){},b.prototype=a,new b)}var g=function(){},h=Function.call;return{version:"0.1.5",$:b,Deferred:c.Deferred,isPromise:c.isPromise,when:c.when,browser:function(a){var b={},c=a.match(/WebKit\/([\d.]+)/),d=a.match(/Chrome\/([\d.]+)/)||a.match(/CriOS\/([\d.]+)/),e=a.match(/MSIE\s([\d\.]+)/)||a.match(/(?:trident)(?:.*rv:([\w.]+))?/i),f=a.match(/Firefox\/([\d.]+)/),g=a.match(/Safari\/([\d.]+)/),h=a.match(/OPR\/([\d.]+)/);return c&&(b.webkit=parseFloat(c[1])),d&&(b.chrome=parseFloat(d[1])),e&&(b.ie=parseFloat(e[1])),f&&(b.firefox=parseFloat(f[1])),g&&(b.safari=parseFloat(g[1])),h&&(b.opera=parseFloat(h[1])),b}(navigator.userAgent),os:function(a){var b={},c=a.match(/(?:Android);?[\s\/]+([\d.]+)?/),d=a.match(/(?:iPad|iPod|iPhone).*OS\s([\d_]+)/);return c&&(b.android=parseFloat(c[1])),d&&(b.ios=parseFloat(d[1].replace(/_/g,"."))),b}(navigator.userAgent),inherits:function(a,c,d){var e;return"function"==typeof c?(e=c,c=null):e=c&&c.hasOwnProperty("constructor")?c.constructor:function(){return a.apply(this,arguments)},b.extend(!0,e,a,d||{}),e.__super__=a.prototype,e.prototype=f(a.prototype),c&&b.extend(!0,e.prototype,c),e},noop:g,bindFn:e,log:function(){return a.console?e(console.log,console):g}(),nextTick:function(){return function(a){setTimeout(a,1)}}(),slice:d([].slice),guid:function(){var a=0;return function(b){for(var c=(+new Date).toString(32),d=0;5>d;d++)c+=Math.floor(65535*Math.random()).toString(32);return(b||"wu_")+c+(a++).toString(32)}}(),formatSize:function(a,b,c){var d;for(c=c||["B","K","M","G","TB"];(d=c.shift())&&a>1024;)a/=1024;return("B"===d?a:a.toFixed(b||2))+d}}}),b("mediator",["base"],function(a){function b(a,b,c,d){return f.grep(a,function(a){return!(!a||b&&a.e!==b||c&&a.cb!==c&&a.cb._cb!==c||d&&a.ctx!==d)})}function c(a,b,c){f.each((a||"").split(h),function(a,d){c(d,b)})}function d(a,b){for(var c,d=!1,e=-1,f=a.length;++e1?void(d.isPlainObject(b)&&d.isPlainObject(c[a])?d.extend(c[a],b):c[a]=b):a?c[a]:c},getStats:function(){var a=this.request("get-stats");return a?{successNum:a.numOfSuccess,progressNum:a.numOfProgress,cancelNum:a.numOfCancel,invalidNum:a.numOfInvalid,uploadFailNum:a.numOfUploadFailed,queueNum:a.numOfQueue,interruptNum:a.numofInterrupt}:{}},trigger:function(a){var c=[].slice.call(arguments,1),e=this.options,f="on"+a.substring(0,1).toUpperCase()+a.substring(1);return b.trigger.apply(this,arguments)===!1||d.isFunction(e[f])&&e[f].apply(this,c)===!1||d.isFunction(this[f])&&this[f].apply(this,c)===!1||b.trigger.apply(b,[this,a].concat(c))===!1?!1:!0},destroy:function(){this.request("destroy",arguments),this.off()},request:a.noop}),a.create=c.create=function(a){return new c(a)},a.Uploader=c,c}),b("runtime/runtime",["base","mediator"],function(a,b){function c(b){this.options=d.extend({container:document.body},b),this.uid=a.guid("rt_")}var d=a.$,e={},f=function(a){for(var b in a)if(a.hasOwnProperty(b))return b;return null};return d.extend(c.prototype,{getContainer:function(){var a,b,c=this.options;return this._container?this._container:(a=d(c.container||document.body),b=d(document.createElement("div")),b.attr("id","rt_"+this.uid),b.css({position:"absolute",top:"0px",left:"0px",width:"1px",height:"1px",overflow:"hidden"}),a.append(b),a.addClass("webuploader-container"),this._container=b,this._parent=a,b)},init:a.noop,exec:a.noop,destroy:function(){this._container&&this._container.remove(),this._parent&&this._parent.removeClass("webuploader-container"),this.off()}}),c.orders="html5,flash",c.addRuntime=function(a,b){e[a]=b},c.hasRuntime=function(a){return!!(a?e[a]:f(e))},c.create=function(a,b){var g,h;if(b=b||c.orders,d.each(b.split(/\s*,\s*/g),function(){return e[this]?(g=this,!1):void 0}),g=g||f(e),!g)throw new Error("Runtime Error");return h=new e[g](a)},b.installTo(c.prototype),c}),b("runtime/client",["base","mediator","runtime/runtime"],function(a,b,c){function d(b,d){var f,g=a.Deferred();this.uid=a.guid("client_"),this.runtimeReady=function(a){return g.done(a)},this.connectRuntime=function(b,h){if(f)throw new Error("already connected!");return g.done(h),"string"==typeof b&&e.get(b)&&(f=e.get(b)),f=f||e.get(null,d),f?(a.$.extend(f.options,b),f.__promise.then(g.resolve),f.__client++):(f=c.create(b,b.runtimeOrder),f.__promise=g.promise(),f.once("ready",g.resolve),f.init(),e.add(f),f.__client=1),d&&(f.__standalone=d),f},this.getRuntime=function(){return f},this.disconnectRuntime=function(){f&&(f.__client--,f.__client<=0&&(e.remove(f),delete f.__promise,f.destroy()),f=null)},this.exec=function(){if(f){var c=a.slice(arguments);return b&&c.unshift(b),f.exec.apply(this,c)}},this.getRuid=function(){return f&&f.uid},this.destroy=function(a){return function(){a&&a.apply(this,arguments),this.trigger("destroy"),this.off(),this.exec("destroy"),this.disconnectRuntime()}}(this.destroy)}var e;return e=function(){var a={};return{add:function(b){a[b.uid]=b},get:function(b,c){var d;if(b)return a[b];for(d in a)if(!c||!a[d].__standalone)return a[d];return null},remove:function(b){delete a[b.uid]}}}(),b.installTo(d.prototype),d}),b("lib/dnd",["base","mediator","runtime/client"],function(a,b,c){function d(a){a=this.options=e.extend({},d.options,a),a.container=e(a.container),a.container.length&&c.call(this,"DragAndDrop")}var e=a.$;return d.options={accept:null,disableGlobalDnd:!1},a.inherits(c,{constructor:d,init:function(){var a=this;a.connectRuntime(a.options,function(){a.exec("init"),a.trigger("ready")})}}),b.installTo(d.prototype),d}),b("widgets/widget",["base","uploader"],function(a,b){function c(a){if(!a)return!1;var b=a.length,c=e.type(a);return 1===a.nodeType&&b?!0:"array"===c||"function"!==c&&"string"!==c&&(0===b||"number"==typeof b&&b>0&&b-1 in a)}function d(a){this.owner=a,this.options=a.options}var e=a.$,f=b.prototype._init,g=b.prototype.destroy,h={},i=[];return e.extend(d.prototype,{init:a.noop,invoke:function(a,b){var c=this.responseMap;return c&&a in c&&c[a]in this&&e.isFunction(this[c[a]])?this[c[a]].apply(this,b):h},request:function(){return this.owner.request.apply(this.owner,arguments)}}),e.extend(b.prototype,{_init:function(){var a=this,b=a._widgets=[],c=a.options.disableWidgets||"";return e.each(i,function(d,e){(!c||!~c.indexOf(e._name))&&b.push(new e(a))}),f.apply(a,arguments)},request:function(b,d,e){var f,g,i,j,k=0,l=this._widgets,m=l&&l.length,n=[],o=[];for(d=c(d)?d:[d];m>k;k++)f=l[k],g=f.invoke(b,d),g!==h&&(a.isPromise(g)?o.push(g):n.push(g));return e||o.length?(i=a.when.apply(a,o),j=i.pipe?"pipe":"then",i[j](function(){var b=a.Deferred(),c=arguments;return 1===c.length&&(c=c[0]),setTimeout(function(){b.resolve(c)},1),b.promise()})[e?j:"done"](e||a.noop)):n[0]},destroy:function(){g.apply(this,arguments),this._widgets=null}}),b.register=d.register=function(b,c){var f,g={init:"init",destroy:"destroy",name:"anonymous"};return 1===arguments.length?(c=b,e.each(c,function(a){return"_"===a[0]||"name"===a?void("name"===a&&(g.name=c.name)):void(g[a.replace(/[A-Z]/g,"-$&").toLowerCase()]=a)})):g=e.extend(g,b),c.responseMap=g,f=a.inherits(d,c),f._name=g.name,i.push(f),f},b.unRegister=d.unRegister=function(a){if(a&&"anonymous"!==a)for(var b=i.length;b--;)i[b]._name===a&&i.splice(b,1)},d}),b("widgets/filednd",["base","uploader","lib/dnd","widgets/widget"],function(a,b,c){var d=a.$;return b.options.dnd="",b.register({name:"dnd",init:function(b){if(b.dnd&&"html5"===this.request("predict-runtime-type")){var e,f=this,g=a.Deferred(),h=d.extend({},{disableGlobalDnd:b.disableGlobalDnd,container:b.dnd,accept:b.accept});return this.dnd=e=new c(h),e.once("ready",g.resolve),e.on("drop",function(a){f.request("add-file",[a])}),e.on("accept",function(a){return f.owner.trigger("dndAccept",a)}),e.init(),g.promise()}},destroy:function(){this.dnd&&this.dnd.destroy()}})}),b("lib/filepaste",["base","mediator","runtime/client"],function(a,b,c){function d(a){a=this.options=e.extend({},a),a.container=e(a.container||document.body),c.call(this,"FilePaste")}var e=a.$;return a.inherits(c,{constructor:d,init:function(){var a=this;a.connectRuntime(a.options,function(){a.exec("init"),a.trigger("ready")})}}),b.installTo(d.prototype),d}),b("widgets/filepaste",["base","uploader","lib/filepaste","widgets/widget"],function(a,b,c){var d=a.$;return b.register({name:"paste",init:function(b){if(b.paste&&"html5"===this.request("predict-runtime-type")){var e,f=this,g=a.Deferred(),h=d.extend({},{container:b.paste,accept:b.accept});return this.paste=e=new c(h),e.once("ready",g.resolve),e.on("paste",function(a){f.owner.request("add-file",[a])}),e.init(),g.promise()}},destroy:function(){this.paste&&this.paste.destroy()}})}),b("lib/blob",["base","runtime/client"],function(a,b){function c(a,c){var d=this;d.source=c,d.ruid=a,this.size=c.size||0,this.type=!c.type&&this.ext&&~"jpg,jpeg,png,gif,bmp".indexOf(this.ext)?"image/"+("jpg"===this.ext?"jpeg":this.ext):c.type||"application/octet-stream",b.call(d,"Blob"),this.uid=c.uid||this.uid,a&&d.connectRuntime(a)}return a.inherits(b,{constructor:c,slice:function(a,b){return this.exec("slice",a,b)},getSource:function(){return this.source}}),c}),b("lib/file",["base","lib/blob"],function(a,b){function c(a,c){var f;this.name=c.name||"untitled"+d++,f=e.exec(c.name)?RegExp.$1.toLowerCase():"",!f&&c.type&&(f=/\/(jpg|jpeg|png|gif|bmp)$/i.exec(c.type)?RegExp.$1.toLowerCase():"",this.name+="."+f),this.ext=f,this.lastModifiedDate=c.lastModifiedDate||(new Date).toLocaleString(),b.apply(this,arguments)}var d=1,e=/\.([^.]+)$/;return a.inherits(b,c)}),b("lib/filepicker",["base","runtime/client","lib/file"],function(b,c,d){function e(a){if(a=this.options=f.extend({},e.options,a),a.container=f(a.id),!a.container.length)throw new Error("按钮指定错误");a.innerHTML=a.innerHTML||a.label||a.container.html()||"",a.button=f(a.button||document.createElement("div")),a.button.html(a.innerHTML),a.container.html(a.button),c.call(this,"FilePicker",!0)}var f=b.$;return e.options={button:null,container:null,label:null,innerHTML:null,multiple:!0,accept:null,name:"file"},b.inherits(c,{constructor:e,init:function(){var c=this,e=c.options,g=e.button;g.addClass("webuploader-pick"),c.on("all",function(a){var b;switch(a){case"mouseenter":g.addClass("webuploader-pick-hover");break;case"mouseleave":g.removeClass("webuploader-pick-hover");break;case"change":b=c.exec("getFiles"),c.trigger("select",f.map(b,function(a){return a=new d(c.getRuid(),a),a._refer=e.container,a}),e.container)}}),c.connectRuntime(e,function(){c.refresh(),c.exec("init",e),c.trigger("ready")}),this._resizeHandler=b.bindFn(this.refresh,this),f(a).on("resize",this._resizeHandler)},refresh:function(){var a=this.getRuntime().getContainer(),b=this.options.button,c=b.outerWidth?b.outerWidth():b.width(),d=b.outerHeight?b.outerHeight():b.height(),e=b.offset();c&&d&&a.css({bottom:"auto",right:"auto",width:c+"px",height:d+"px"}).offset(e)},enable:function(){var a=this.options.button;a.removeClass("webuploader-pick-disable"),this.refresh()},disable:function(){var a=this.options.button;this.getRuntime().getContainer().css({top:"-99999px"}),a.addClass("webuploader-pick-disable")},destroy:function(){var b=this.options.button;f(a).off("resize",this._resizeHandler),b.removeClass("webuploader-pick-disable webuploader-pick-hover webuploader-pick")}}),e}),b("widgets/filepicker",["base","uploader","lib/filepicker","widgets/widget"],function(a,b,c){var d=a.$;return d.extend(b.options,{pick:null,accept:null}),b.register({name:"picker",init:function(a){return this.pickers=[],a.pick&&this.addBtn(a.pick)},refresh:function(){d.each(this.pickers,function(){this.refresh()})},addBtn:function(b){var e=this,f=e.options,g=f.accept,h=[];if(b)return d.isPlainObject(b)||(b={id:b}),d(b.id).each(function(){var i,j,k;k=a.Deferred(),i=d.extend({},b,{accept:d.isPlainObject(g)?[g]:g,swf:f.swf,runtimeOrder:f.runtimeOrder,id:this}),j=new c(i),j.once("ready",k.resolve),j.on("select",function(a){e.owner.request("add-file",[a])}),j.init(),e.pickers.push(j),h.push(k.promise())}),a.when.apply(a,h)},disable:function(){d.each(this.pickers,function(){this.disable()})},enable:function(){d.each(this.pickers,function(){this.enable()})},destroy:function(){d.each(this.pickers,function(){this.destroy()}),this.pickers=null}})}),b("file",["base","mediator"],function(a,b){function c(){return f+g++}function d(a){this.name=a.name||"Untitled",this.size=a.size||0,this.type=a.type||"application/octet-stream",this.lastModifiedDate=a.lastModifiedDate||1*new Date,this.id=c(),this.ext=h.exec(this.name)?RegExp.$1:"",this.statusText="",i[this.id]=d.Status.INITED,this.source=a,this.loaded=0,this.on("error",function(a){this.setStatus(d.Status.ERROR,a)})}var e=a.$,f="WU_FILE_",g=0,h=/\.([^.]+)$/,i={};return e.extend(d.prototype,{setStatus:function(a,b){var c=i[this.id];"undefined"!=typeof b&&(this.statusText=b),a!==c&&(i[this.id]=a,this.trigger("statuschange",a,c))},getStatus:function(){return i[this.id]},getSource:function(){return this.source},destroy:function(){this.off(),delete i[this.id]}}),b.installTo(d.prototype),d.Status={INITED:"inited",QUEUED:"queued",PROGRESS:"progress",ERROR:"error",COMPLETE:"complete",CANCELLED:"cancelled",INTERRUPT:"interrupt",INVALID:"invalid"},d}),b("queue",["base","mediator","file"],function(a,b,c){function d(){this.stats={numOfQueue:0,numOfSuccess:0,numOfCancel:0,numOfProgress:0,numOfUploadFailed:0,numOfInvalid:0,numofDeleted:0,numofInterrupt:0},this._queue=[],this._map={}}var e=a.$,f=c.Status;return e.extend(d.prototype,{append:function(a){return this._queue.push(a),this._fileAdded(a),this},prepend:function(a){return this._queue.unshift(a),this._fileAdded(a),this},getFile:function(a){return"string"!=typeof a?a:this._map[a]},fetch:function(a){var b,c,d=this._queue.length;for(a=a||f.QUEUED,b=0;d>b;b++)if(c=this._queue[b],a===c.getStatus())return c;return null},sort:function(a){"function"==typeof a&&this._queue.sort(a)},getFiles:function(){for(var a,b=[].slice.call(arguments,0),c=[],d=0,f=this._queue.length;f>d;d++)a=this._queue[d],(!b.length||~e.inArray(a.getStatus(),b))&&c.push(a);return c},removeFile:function(a){var b=this._map[a.id];b&&(delete this._map[a.id],a.destroy(),this.stats.numofDeleted++)},_fileAdded:function(a){var b=this,c=this._map[a.id];c||(this._map[a.id]=a,a.on("statuschange",function(a,c){b._onFileStatusChange(a,c)}))},_onFileStatusChange:function(a,b){var c=this.stats;switch(b){case f.PROGRESS:c.numOfProgress--;break;case f.QUEUED:c.numOfQueue--;break;case f.ERROR:c.numOfUploadFailed--;break;case f.INVALID:c.numOfInvalid--;break;case f.INTERRUPT:c.numofInterrupt--}switch(a){case f.QUEUED:c.numOfQueue++;break;case f.PROGRESS:c.numOfProgress++;break;case f.ERROR:c.numOfUploadFailed++;break;case f.COMPLETE:c.numOfSuccess++;break;case f.CANCELLED:c.numOfCancel++;break;case f.INVALID:c.numOfInvalid++;break;case f.INTERRUPT:c.numofInterrupt++}}}),b.installTo(d.prototype),d}),b("widgets/queue",["base","uploader","queue","file","lib/file","runtime/client","widgets/widget"],function(a,b,c,d,e,f){var g=a.$,h=/\.\w+$/,i=d.Status;return b.register({name:"queue",init:function(b){var d,e,h,i,j,k,l,m=this;if(g.isPlainObject(b.accept)&&(b.accept=[b.accept]),b.accept){for(j=[],h=0,e=b.accept.length;e>h;h++)i=b.accept[h].extensions,i&&j.push(i);j.length&&(k="\\."+j.join(",").replace(/,/g,"$|\\.").replace(/\*/g,".*")+"$"),m.accept=new RegExp(k,"i")}return m.queue=new c,m.stats=m.queue.stats,"html5"===this.request("predict-runtime-type")?(d=a.Deferred(),this.placeholder=l=new f("Placeholder"),l.connectRuntime({runtimeOrder:"html5"},function(){m._ruid=l.getRuid(),d.resolve()}),d.promise()):void 0},_wrapFile:function(a){if(!(a instanceof d)){if(!(a instanceof e)){if(!this._ruid)throw new Error("Can't add external files.");a=new e(this._ruid,a)}a=new d(a)}return a},acceptFile:function(a){var b=!a||!a.size||this.accept&&h.exec(a.name)&&!this.accept.test(a.name);return!b},_addFile:function(a){var b=this;return a=b._wrapFile(a),b.owner.trigger("beforeFileQueued",a)?b.acceptFile(a)?(b.queue.append(a),b.owner.trigger("fileQueued",a),a):void b.owner.trigger("error","Q_TYPE_DENIED",a):void 0},getFile:function(a){return this.queue.getFile(a)},addFile:function(a){var b=this;a.length||(a=[a]),a=g.map(a,function(a){return b._addFile(a)}),b.owner.trigger("filesQueued",a),b.options.auto&&setTimeout(function(){b.request("start-upload")},20)},getStats:function(){return this.stats},removeFile:function(a,b){var c=this;a=a.id?a:c.queue.getFile(a),this.request("cancel-file",a),b&&this.queue.removeFile(a)},getFiles:function(){return this.queue.getFiles.apply(this.queue,arguments)},fetchFile:function(){return this.queue.fetch.apply(this.queue,arguments)},retry:function(a,b){var c,d,e,f=this;if(a)return a=a.id?a:f.queue.getFile(a),a.setStatus(i.QUEUED),void(b||f.request("start-upload"));for(c=f.queue.getFiles(i.ERROR),d=0,e=c.length;e>d;d++)a=c[d],a.setStatus(i.QUEUED);f.request("start-upload")},sortFiles:function(){return this.queue.sort.apply(this.queue,arguments)},reset:function(){this.owner.trigger("reset"),this.queue=new c,this.stats=this.queue.stats},destroy:function(){this.reset(),this.placeholder&&this.placeholder.destroy()}})}),b("widgets/runtime",["uploader","runtime/runtime","widgets/widget"],function(a,b){return a.support=function(){return b.hasRuntime.apply(b,arguments)},a.register({name:"runtime",init:function(){if(!this.predictRuntimeType())throw Error("Runtime Error")},predictRuntimeType:function(){var a,c,d=this.options.runtimeOrder||b.orders,e=this.type;if(!e)for(d=d.split(/\s*,\s*/g),a=0,c=d.length;c>a;a++)if(b.hasRuntime(d[a])){this.type=e=d[a];break}return e}})}),b("lib/transport",["base","runtime/client","mediator"],function(a,b,c){function d(a){var c=this;a=c.options=e.extend(!0,{},d.options,a||{}),b.call(this,"Transport"),this._blob=null,this._formData=a.formData||{},this._headers=a.headers||{},this.on("progress",this._timeout),this.on("load error",function(){c.trigger("progress",1),clearTimeout(c._timer)})}var e=a.$;return d.options={server:"",method:"POST",withCredentials:!1,fileVal:"file",timeout:12e4,formData:{},headers:{},sendAsBinary:!1},e.extend(d.prototype,{appendBlob:function(a,b,c){var d=this,e=d.options;d.getRuid()&&d.disconnectRuntime(),d.connectRuntime(b.ruid,function(){d.exec("init")}),d._blob=b,e.fileVal=a||e.fileVal,e.filename=c||e.filename},append:function(a,b){"object"==typeof a?e.extend(this._formData,a):this._formData[a]=b},setRequestHeader:function(a,b){"object"==typeof a?e.extend(this._headers,a):this._headers[a]=b},send:function(a){this.exec("send",a),this._timeout()},abort:function(){return clearTimeout(this._timer),this.exec("abort")},destroy:function(){this.trigger("destroy"),this.off(),this.exec("destroy"),this.disconnectRuntime()},getResponse:function(){return this.exec("getResponse")},getResponseAsJson:function(){return this.exec("getResponseAsJson")},getStatus:function(){return this.exec("getStatus")},_timeout:function(){var a=this,b=a.options.timeout;b&&(clearTimeout(a._timer),a._timer=setTimeout(function(){a.abort(),a.trigger("error","timeout")},b))}}),c.installTo(d.prototype),d}),b("widgets/upload",["base","uploader","file","lib/transport","widgets/widget"],function(a,b,c,d){function e(a,b){var c,d,e=[],f=a.source,g=f.size,h=b?Math.ceil(g/b):1,i=0,j=0;for(d={file:a,has:function(){return!!e.length},shift:function(){return e.shift()},unshift:function(a){e.unshift(a)}};h>j;)c=Math.min(b,g-i),e.push({file:a,start:i,end:b?i+c:g,total:g,chunks:h,chunk:j++,cuted:d}),i+=c;return a.blocks=e.concat(),a.remaning=e.length,d}var f=a.$,g=a.isPromise,h=c.Status;f.extend(b.options,{prepareNextFile:!1,chunked:!1,chunkSize:5242880,chunkRetry:2,threads:3,formData:{}}),b.register({name:"upload",init:function(){var b=this.owner,c=this;this.runing=!1,this.progress=!1,b.on("startUpload",function(){c.progress=!0}).on("uploadFinished",function(){c.progress=!1}),this.pool=[],this.stack=[],this.pending=[],this.remaning=0,this.__tick=a.bindFn(this._tick,this),b.on("uploadComplete",function(a){a.blocks&&f.each(a.blocks,function(a,b){b.transport&&(b.transport.abort(),b.transport.destroy()),delete b.transport}),delete a.blocks,delete a.remaning})},reset:function(){this.request("stop-upload",!0),this.runing=!1,this.pool=[],this.stack=[],this.pending=[],this.remaning=0,this._trigged=!1,this._promise=null},startUpload:function(b){var c=this;if(f.each(c.request("get-files",h.INVALID),function(){c.request("remove-file",this)}),b)if(b=b.id?b:c.request("get-file",b),b.getStatus()===h.INTERRUPT)f.each(c.pool,function(a,c){c.file===b&&c.transport&&c.transport.send()}),b.setStatus(h.QUEUED);else{if(b.getStatus()===h.PROGRESS)return;b.setStatus(h.QUEUED)}else f.each(c.request("get-files",[h.INITED]),function(){this.setStatus(h.QUEUED)});c.runing||(c.runing=!0,f.each(c.pool,function(a,b){var d=b.file;d.getStatus()===h.INTERRUPT&&(d.setStatus(h.PROGRESS),c._trigged=!1,b.transport&&b.transport.send())}),b||f.each(c.request("get-files",h.INTERRUPT),function(){this.setStatus(h.PROGRESS)}),c._trigged=!1,a.nextTick(c.__tick),c.owner.trigger("startUpload"))},stopUpload:function(b,c){var d=this;if(b===!0&&(c=b,b=null),d.runing!==!1){if(b){if(b=b.id?b:d.request("get-file",b),b.getStatus()!==h.PROGRESS&&b.getStatus()!==h.QUEUED)return;return b.setStatus(h.INTERRUPT),f.each(d.pool,function(a,c){c.file===b&&(c.transport&&c.transport.abort(),d._putback(c),d._popBlock(c))}),a.nextTick(d.__tick)}d.runing=!1,this._promise&&this._promise.file&&this._promise.file.setStatus(h.INTERRUPT),c&&f.each(d.pool,function(a,b){b.transport&&b.transport.abort(),b.file.setStatus(h.INTERRUPT)}),d.owner.trigger("stopUpload")}},cancelFile:function(a){a=a.id?a:this.request("get-file",a),a.blocks&&f.each(a.blocks,function(a,b){var c=b.transport;c&&(c.abort(),c.destroy(),delete b.transport)}),a.setStatus(h.CANCELLED),this.owner.trigger("fileDequeued",a)},isInProgress:function(){return!!this.progress},_getStats:function(){return this.request("get-stats")},skipFile:function(a,b){a=a.id?a:this.request("get-file",a),a.setStatus(b||h.COMPLETE),a.skipped=!0,a.blocks&&f.each(a.blocks,function(a,b){var c=b.transport;c&&(c.abort(),c.destroy(),delete b.transport)}),this.owner.trigger("uploadSkip",a)},_tick:function(){var b,c,d=this,e=d.options;return d._promise?d._promise.always(d.__tick):void(d.pool.length1&&(f.each(k.blocks,function(a,b){d+=(b.percentage||0)*(b.end-b.start)}),c=d/k.size),i.trigger("uploadProgress",k,c||0)}),c=function(a){var c;return e=l.getResponseAsJson()||{},e._raw=l.getResponse(),c=function(b){a=b},i.trigger("uploadAccept",b,e,c)||(a=a||"server"),a},l.on("error",function(a,d){b.retried=b.retried||0,b.chunks>1&&~"http,abort".indexOf(a)&&b.retried1&&f.extend(m,{chunks:b.chunks,chunk:b.chunk}),i.trigger("uploadBeforeSend",b,m,n),l.appendBlob(j.fileVal,b.blob,k.name),l.append(m),l.setRequestHeader(n),l.send()},_finishFile:function(a,b,c){var d=this.owner;return d.request("after-send-file",arguments,function(){a.setStatus(h.COMPLETE),d.trigger("uploadSuccess",a,b,c)}).fail(function(b){a.getStatus()===h.PROGRESS&&a.setStatus(h.ERROR,b),d.trigger("uploadError",a,b)}).always(function(){d.trigger("uploadComplete",a)})}})}),b("widgets/validator",["base","uploader","file","widgets/widget"],function(a,b,c){var d,e=a.$,f={};return d={addValidator:function(a,b){f[a]=b},removeValidator:function(a){delete f[a]}},b.register({name:"validator",init:function(){var b=this;a.nextTick(function(){e.each(f,function(){this.call(b.owner)})})}}),d.addValidator("fileNumLimit",function(){var a=this,b=a.options,c=0,d=parseInt(b.fileNumLimit,10),e=!0;d&&(a.on("beforeFileQueued",function(a){return c>=d&&e&&(e=!1,this.trigger("error","Q_EXCEED_NUM_LIMIT",d,a),setTimeout(function(){e=!0},1)),c>=d?!1:!0}),a.on("fileQueued",function(){c++}),a.on("fileDequeued",function(){c--}),a.on("reset",function(){c=0}))}),d.addValidator("fileSizeLimit",function(){var a=this,b=a.options,c=0,d=parseInt(b.fileSizeLimit,10),e=!0;d&&(a.on("beforeFileQueued",function(a){var b=c+a.size>d;return b&&e&&(e=!1,this.trigger("error","Q_EXCEED_SIZE_LIMIT",d,a),setTimeout(function(){e=!0},1)),b?!1:!0}),a.on("fileQueued",function(a){c+=a.size}),a.on("fileDequeued",function(a){c-=a.size}),a.on("reset",function(){c=0}))}),d.addValidator("fileSingleSizeLimit",function(){var a=this,b=a.options,d=b.fileSingleSizeLimit;d&&a.on("beforeFileQueued",function(a){return a.size>d?(a.setStatus(c.Status.INVALID,"exceed_size"),this.trigger("error","F_EXCEED_SIZE",d,a),!1):void 0})}),d.addValidator("duplicate",function(){function a(a){for(var b,c=0,d=0,e=a.length;e>d;d++)b=a.charCodeAt(d),c=b+(c<<6)+(c<<16)-c;return c}var b=this,c=b.options,d={};c.duplicate||(b.on("beforeFileQueued",function(b){var c=b.__hash||(b.__hash=a(b.name+b.size+b.lastModifiedDate));return d[c]?(this.trigger("error","F_DUPLICATE",b),!1):void 0}),b.on("fileQueued",function(a){var b=a.__hash;b&&(d[b]=!0)}),b.on("fileDequeued",function(a){var b=a.__hash;b&&delete d[b]}),b.on("reset",function(){d={}}))}),d}),b("runtime/compbase",[],function(){function a(a,b){this.owner=a,this.options=a.options,this.getRuntime=function(){return b},this.getRuid=function(){return b.uid},this.trigger=function(){return a.trigger.apply(a,arguments)}}return a}),b("runtime/html5/runtime",["base","runtime/runtime","runtime/compbase"],function(b,c,d){function e(){var a={},d=this,e=this.destroy;c.apply(d,arguments),d.type=f,d.exec=function(c,e){var f,h=this,i=h.uid,j=b.slice(arguments,2);return g[c]&&(f=a[i]=a[i]||new g[c](h,d),f[e])?f[e].apply(f,j):void 0},d.destroy=function(){return e&&e.apply(this,arguments)}}var f="html5",g={};return b.inherits(c,{constructor:e,init:function(){var a=this;setTimeout(function(){a.trigger("ready")},1)}}),e.register=function(a,c){var e=g[a]=b.inherits(d,c);return e},a.Blob&&a.FileReader&&a.DataView&&c.addRuntime(f,e),e}),b("runtime/html5/blob",["runtime/html5/runtime","lib/blob"],function(a,b){return a.register("Blob",{slice:function(a,c){var d=this.owner.source,e=d.slice||d.webkitSlice||d.mozSlice; -return d=e.call(d,a,c),new b(this.getRuid(),d)}})}),b("runtime/html5/dnd",["base","runtime/html5/runtime","lib/file"],function(a,b,c){var d=a.$,e="webuploader-dnd-";return b.register("DragAndDrop",{init:function(){var b=this.elem=this.options.container;this.dragEnterHandler=a.bindFn(this._dragEnterHandler,this),this.dragOverHandler=a.bindFn(this._dragOverHandler,this),this.dragLeaveHandler=a.bindFn(this._dragLeaveHandler,this),this.dropHandler=a.bindFn(this._dropHandler,this),this.dndOver=!1,b.on("dragenter",this.dragEnterHandler),b.on("dragover",this.dragOverHandler),b.on("dragleave",this.dragLeaveHandler),b.on("drop",this.dropHandler),this.options.disableGlobalDnd&&(d(document).on("dragover",this.dragOverHandler),d(document).on("drop",this.dropHandler))},_dragEnterHandler:function(a){var b,c=this,d=c._denied||!1;return a=a.originalEvent||a,c.dndOver||(c.dndOver=!0,b=a.dataTransfer.items,b&&b.length&&(c._denied=d=!c.trigger("accept",b)),c.elem.addClass(e+"over"),c.elem[d?"addClass":"removeClass"](e+"denied")),a.dataTransfer.dropEffect=d?"none":"copy",!1},_dragOverHandler:function(a){var b=this.elem.parent().get(0);return b&&!d.contains(b,a.currentTarget)?!1:(clearTimeout(this._leaveTimer),this._dragEnterHandler.call(this,a),!1)},_dragLeaveHandler:function(){var a,b=this;return a=function(){b.dndOver=!1,b.elem.removeClass(e+"over "+e+"denied")},clearTimeout(b._leaveTimer),b._leaveTimer=setTimeout(a,100),!1},_dropHandler:function(a){var b,f,g=this,h=g.getRuid(),i=g.elem.parent().get(0);if(i&&!d.contains(i,a.currentTarget))return!1;a=a.originalEvent||a,b=a.dataTransfer;try{f=b.getData("text/html")}catch(j){}return f?void 0:(g._getTansferFiles(b,function(a){g.trigger("drop",d.map(a,function(a){return new c(h,a)}))}),g.dndOver=!1,g.elem.removeClass(e+"over"),!1)},_getTansferFiles:function(b,c){var d,e,f,g,h,i,j,k=[],l=[];for(d=b.items,e=b.files,j=!(!d||!d[0].webkitGetAsEntry),h=0,i=e.length;i>h;h++)f=e[h],g=d&&d[h],j&&g.webkitGetAsEntry().isDirectory?l.push(this._traverseDirectoryTree(g.webkitGetAsEntry(),k)):k.push(f);a.when.apply(a,l).done(function(){k.length&&c(k)})},_traverseDirectoryTree:function(b,c){var d=a.Deferred(),e=this;return b.isFile?b.file(function(a){c.push(a),d.resolve()}):b.isDirectory&&b.createReader().readEntries(function(b){var f,g=b.length,h=[],i=[];for(f=0;g>f;f++)h.push(e._traverseDirectoryTree(b[f],i));a.when.apply(a,h).then(function(){c.push.apply(c,i),d.resolve()},d.reject)}),d.promise()},destroy:function(){var a=this.elem;a&&(a.off("dragenter",this.dragEnterHandler),a.off("dragover",this.dragOverHandler),a.off("dragleave",this.dragLeaveHandler),a.off("drop",this.dropHandler),this.options.disableGlobalDnd&&(d(document).off("dragover",this.dragOverHandler),d(document).off("drop",this.dropHandler)))}})}),b("runtime/html5/filepaste",["base","runtime/html5/runtime","lib/file"],function(a,b,c){return b.register("FilePaste",{init:function(){var b,c,d,e,f=this.options,g=this.elem=f.container,h=".*";if(f.accept){for(b=[],c=0,d=f.accept.length;d>c;c++)e=f.accept[c].mimeTypes,e&&b.push(e);b.length&&(h=b.join(","),h=h.replace(/,/g,"|").replace(/\*/g,".*"))}this.accept=h=new RegExp(h,"i"),this.hander=a.bindFn(this._pasteHander,this),g.on("paste",this.hander)},_pasteHander:function(a){var b,d,e,f,g,h=[],i=this.getRuid();for(a=a.originalEvent||a,b=a.clipboardData.items,f=0,g=b.length;g>f;f++)d=b[f],"file"===d.kind&&(e=d.getAsFile())&&h.push(new c(i,e));h.length&&(a.preventDefault(),a.stopPropagation(),this.trigger("paste",h))},destroy:function(){this.elem.off("paste",this.hander)}})}),b("runtime/html5/filepicker",["base","runtime/html5/runtime"],function(a,b){var c=a.$;return b.register("FilePicker",{init:function(){var a,b,d,e,f=this.getRuntime().getContainer(),g=this,h=g.owner,i=g.options,j=this.label=c(document.createElement("label")),k=this.input=c(document.createElement("input"));if(k.attr("type","file"),k.attr("name",i.name),k.addClass("webuploader-element-invisible"),j.on("click",function(){k.trigger("click")}),j.css({opacity:0,width:"100%",height:"100%",display:"block",cursor:"pointer",background:"#ffffff"}),i.multiple&&k.attr("multiple","multiple"),i.accept&&i.accept.length>0){for(a=[],b=0,d=i.accept.length;d>b;b++)a.push(i.accept[b].mimeTypes);k.attr("accept",a.join(","))}f.append(k),f.append(j),e=function(a){h.trigger(a.type)},k.on("change",function(a){var b,d=arguments.callee;g.files=a.target.files,b=this.cloneNode(!0),b.value=null,this.parentNode.replaceChild(b,this),k.off(),k=c(b).on("change",d).on("mouseenter mouseleave",e),h.trigger("change")}),j.on("mouseenter mouseleave",e)},getFiles:function(){return this.files},destroy:function(){this.input.off(),this.label.off()}})}),b("runtime/html5/transport",["base","runtime/html5/runtime"],function(a,b){var c=a.noop,d=a.$;return b.register("Transport",{init:function(){this._status=0,this._response=null},send:function(){var b,c,e,f=this.owner,g=this.options,h=this._initAjax(),i=f._blob,j=g.server;g.sendAsBinary?(j+=(/\?/.test(j)?"&":"?")+d.param(f._formData),c=i.getSource()):(b=new FormData,d.each(f._formData,function(a,c){b.append(a,c)}),b.append(g.fileVal,i.getSource(),g.filename||f._formData.name||"")),g.withCredentials&&"withCredentials"in h?(h.open(g.method,j,!0),h.withCredentials=!0):h.open(g.method,j),this._setRequestHeader(h,g.headers),c?(h.overrideMimeType&&h.overrideMimeType("application/octet-stream"),a.os.android?(e=new FileReader,e.onload=function(){h.send(this.result),e=e.onload=null},e.readAsArrayBuffer(c)):h.send(c)):h.send(b)},getResponse:function(){return this._response},getResponseAsJson:function(){return this._parseJson(this._response)},getStatus:function(){return this._status},abort:function(){var a=this._xhr;a&&(a.upload.onprogress=c,a.onreadystatechange=c,a.abort(),this._xhr=a=null)},destroy:function(){this.abort()},_initAjax:function(){var a=this,b=new XMLHttpRequest,d=this.options;return!d.withCredentials||"withCredentials"in b||"undefined"==typeof XDomainRequest||(b=new XDomainRequest),b.upload.onprogress=function(b){var c=0;return b.lengthComputable&&(c=b.loaded/b.total),a.trigger("progress",c)},b.onreadystatechange=function(){return 4===b.readyState?(b.upload.onprogress=c,b.onreadystatechange=c,a._xhr=null,a._status=b.status,b.status>=200&&b.status<300?(a._response=b.responseText,a.trigger("load")):b.status>=500&&b.status<600?(a._response=b.responseText,a.trigger("error","server")):a.trigger("error",a._status?"http":"abort")):void 0},a._xhr=b,b},_setRequestHeader:function(a,b){d.each(b,function(b,c){a.setRequestHeader(b,c)})},_parseJson:function(a){var b;try{b=JSON.parse(a)}catch(c){b={}}return b}})}),b("runtime/flash/runtime",["base","runtime/runtime","runtime/compbase"],function(b,c,d){function e(){var a;try{a=navigator.plugins["Shockwave Flash"],a=a.description}catch(b){try{a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")}catch(c){a="0.0"}}return a=a.match(/\d+/g),parseFloat(a[0]+"."+a[1],10)}function f(){function d(a,b){var c,d,e=a.type||a;c=e.split("::"),d=c[0],e=c[1],"Ready"===e&&d===j.uid?j.trigger("ready"):f[d]&&f[d].trigger(e.toLowerCase(),a,b)}var e={},f={},g=this.destroy,j=this,k=b.guid("webuploader_");c.apply(j,arguments),j.type=h,j.exec=function(a,c){var d,g=this,h=g.uid,k=b.slice(arguments,2);return f[h]=g,i[a]&&(e[h]||(e[h]=new i[a](g,j)),d=e[h],d[c])?d[c].apply(d,k):j.flashExec.apply(g,arguments)},a[k]=function(){var a=arguments;setTimeout(function(){d.apply(null,a)},1)},this.jsreciver=k,this.destroy=function(){return g&&g.apply(this,arguments)},this.flashExec=function(a,c){var d=j.getFlash(),e=b.slice(arguments,2);return d.exec(this.uid,a,c,e)}}var g=b.$,h="flash",i={};return b.inherits(c,{constructor:f,init:function(){var a,c=this.getContainer(),d=this.options;c.css({position:"absolute",top:"-8px",left:"-8px",width:"9px",height:"9px",overflow:"hidden"}),a='',c.html(a)},getFlash:function(){return this._flash?this._flash:(this._flash=g("#"+this.uid).get(0),this._flash)}}),f.register=function(a,c){return c=i[a]=b.inherits(d,g.extend({flashExec:function(){var a=this.owner,b=this.getRuntime();return b.flashExec.apply(a,arguments)}},c))},e()>=11.4&&c.addRuntime(h,f),f}),b("runtime/flash/filepicker",["base","runtime/flash/runtime"],function(a,b){var c=a.$;return b.register("FilePicker",{init:function(a){var b,d,e=c.extend({},a);for(b=e.accept&&e.accept.length,d=0;b>d;d++)e.accept[d].title||(e.accept[d].title="Files");delete e.button,delete e.id,delete e.container,this.flashExec("FilePicker","init",e)},destroy:function(){this.flashExec("FilePicker","destroy")}})}),b("runtime/flash/transport",["base","runtime/flash/runtime","runtime/client"],function(b,c,d){var e=b.$;return c.register("Transport",{init:function(){this._status=0,this._response=null,this._responseJson=null},send:function(){var a,b=this.owner,c=this.options,d=this._initAjax(),f=b._blob,g=c.server;d.connectRuntime(f.ruid),c.sendAsBinary?(g+=(/\?/.test(g)?"&":"?")+e.param(b._formData),a=f.uid):(e.each(b._formData,function(a,b){d.exec("append",a,b)}),d.exec("appendBlob",c.fileVal,f.uid,c.filename||b._formData.name||"")),this._setRequestHeader(d,c.headers),d.exec("send",{method:c.method,url:g,forceURLStream:c.forceURLStream,mimeType:"application/octet-stream"},a)},getStatus:function(){return this._status},getResponse:function(){return this._response||""},getResponseAsJson:function(){return this._responseJson},abort:function(){var a=this._xhr;a&&(a.exec("abort"),a.destroy(),this._xhr=a=null)},destroy:function(){this.abort()},_initAjax:function(){var b=this,c=new d("XMLHttpRequest");return c.on("uploadprogress progress",function(a){var c=a.loaded/a.total;return c=Math.min(1,Math.max(0,c)),b.trigger("progress",c)}),c.on("load",function(){var d,e=c.exec("getStatus"),f=!1,g="";return c.off(),b._xhr=null,e>=200&&300>e?f=!0:e>=500&&600>e?(f=!0,g="server"):g="http",f&&(b._response=c.exec("getResponse"),b._response=decodeURIComponent(b._response),d=a.JSON&&a.JSON.parse||function(a){try{return new Function("return "+a).call()}catch(b){return{}}},b._responseJson=b._response?d(b._response):{}),c.destroy(),c=null,g?b.trigger("error",g):b.trigger("load")}),c.on("error",function(){c.off(),b._xhr=null,b.trigger("error","http")}),b._xhr=c,c},_setRequestHeader:function(a,b){e.each(b,function(b,c){a.exec("setRequestHeader",b,c)})}})}),b("preset/withoutimage",["base","widgets/filednd","widgets/filepaste","widgets/filepicker","widgets/queue","widgets/runtime","widgets/upload","widgets/validator","runtime/html5/blob","runtime/html5/dnd","runtime/html5/filepaste","runtime/html5/filepicker","runtime/html5/transport","runtime/flash/filepicker","runtime/flash/transport"],function(a){return a}),b("webuploader",["preset/withoutimage"],function(a){return a}),c("webuploader")}); \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/API_cn.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/API_cn.html deleted file mode 100644 index 53f4efed..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/API_cn.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - API 文档 [zTree -- jQuery 树插件] - - - - - -
        - -
        -
        -
        - - -
        -
        -
        -
        • setting 配置详解
        -
          -
          -
          -
          • zTree 方法详解
          -
            -
            • treeNode 节点数据详解
            -
              -
              -
              -
              -
              -
              -
              - - -
              -
              -
              - - - -
              - -
              -
              -
              -
              - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/API_en.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/API_en.html deleted file mode 100644 index e8b8596b..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/API_en.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - API Document [zTree -- jQuery tree plug-ins.] - - - - - -
              - -
              -
              -
              - - -
              -
              -
              -
              • setting details
              -
                -
                -
                -
                • zTree method details
                -
                  -
                  • treeNode data details
                  -
                    -
                    -
                    -
                    -
                    -
                    -
                    - - -
                    -
                    -
                    - - - -
                    - -
                    -
                    -
                    -
                    - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/api.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/api.js deleted file mode 100644 index 37dd4ba3..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/api.js +++ /dev/null @@ -1,592 +0,0 @@ -var apiContent = { - zTree_Setting: null, - zTree_Node: null, - zTree_Function: null, - overlayDiv : null, - overlayContent : null, - overlayDetailDiv : null, - overlayCloseBtn: null, - overlayArrow: null, - contentBoxDiv : null, - settingDiv : null, - functionDiv : null, - overlaySearch: null, - searchKey: null, - searchResultInput: null, - searchPrevBtn: null, - searchNextBtn: null, - apiCache: {}, - lastValue: "", - searchNodes: [], - searchNodesCur: 0, - - _init: function() { - this.overlayDiv = $("#overlayDiv"); - this.overlayContent = $("#overlayContent"); - this.overlayDetailDiv = $("#overlayDetailDiv"); - this.overlayCloseBtn = $("#overlayDivCloseBtn"); - this.overlayArrow = $("#overlayDivArrow"); - this.contentBoxDiv = $("#contentBox"); - this.settingDiv = $("#api_setting"); - this.functionDiv = $("#api_function"); - this.searchKey = $(".searchKey"); - this.overlaySearch = $(".overlaySearch"); - this.searchResultInput = $(".searchResult"); - this.searchPrevBtn = $(".searchPrev"); - this.searchNextBtn = $(".searchNext"); - var setting = { - view: { - fontCss: this.getFontCss, - showLine: false, - showIcon: this.showIcon, - showTitle: this.getTitle, - selectedMulti: false, - dblClickExpand: false - }, - data: { - key: { - title: "tt" - }, - simpleData: { - enable:true, - idKey: "id", - pIdKey: "pId", - rootPId: "" - } - }, - callback: { - onNodeCreated: this.onNodeCreated, - beforeClick: this.beforeClick - } - }; - var setting_nodes =[ - {id:1, pId:0, t:"setting", name:"var setting = {", open:true}, - {id:11, pId:1, t:"treeId", name:"treeId : \"\",", iconSkin:"core", showAPI:true}, - {id:12, pId:1, t:"treeObj", name:"treeObj : null,", iconSkin:"core", showAPI:true}, - {id:121, pId:1, name:""}, - - {id:20, pId:1, t:"async", name:"async : {", open:true}, - {id:201, pId:20, t:"autoParam", name:"autoParam : [],", iconSkin:"core", showAPI:true}, - {id:208, pId:20, t:"contentType", name:"contentType : \"application...\",", iconSkin:"core", showAPI:true}, - {id:202, pId:20, t:"dataFilter", name:"dataFilter : null,", iconSkin:"core", showAPI:true}, - {id:203, pId:20, t:"dataType", name:"dataType : \"text\",", iconSkin:"core", showAPI:true}, - {id:204, pId:20, t:"enable", name:"enable : false,", iconSkin:"core", showAPI:true}, - {id:205, pId:20, t:"otherParam", name:"otherParam : [],", iconSkin:"core", showAPI:true}, - {id:206, pId:20, t:"type", name:"type : \"post\",", iconSkin:"core", showAPI:true}, - {id:207, pId:20, t:"url", name:"url : \"\"", iconSkin:"core", showAPI:true}, - {id:21, pId:1, name:"},"}, - {id:22, pId:1, name:""}, - - {id:30, pId:1, t:"callback", name:"callback : {", open:true}, - {id:3001, pId:30, t:"beforeAsync", name:"beforeAsync : null,", iconSkin:"core", showAPI:true}, - {id:3002, pId:30, t:"beforeCheck", name:"beforeCheck : null,", iconSkin:"check", showAPI:true}, - {id:3003, pId:30, t:"beforeClick", name:"beforeClick : null,", iconSkin:"core", showAPI:true}, - {id:3004, pId:30, t:"beforeCollapse", name:"beforeCollapse : null,", iconSkin:"core", showAPI:true}, - {id:3004, pId:30, t:"beforeDblClick", name:"beforeDblClick : null,", iconSkin:"core", showAPI:true}, - {id:3005, pId:30, t:"beforeDrag", name:"beforeDrag : null,", iconSkin:"edit", showAPI:true}, - {id:3006, pId:30, t:"beforeDragOpen", name:"beforeDragOpen : null,", iconSkin:"edit", showAPI:true}, - {id:3007, pId:30, t:"beforeDrop", name:"beforeDrop : null,", iconSkin:"edit", showAPI:true}, - {id:3029, pId:30, t:"beforeEditName", name:"beforeEditName : null,", iconSkin:"edit", showAPI:true}, - {id:3008, pId:30, t:"beforeExpand", name:"beforeExpand : null,", iconSkin:"core", showAPI:true}, - {id:3009, pId:30, t:"beforeMouseDown", name:"beforeMouseDown : null,", iconSkin:"core", showAPI:true}, - {id:3010, pId:30, t:"beforeMouseUp", name:"beforeMouseUp : null,", iconSkin:"core", showAPI:true}, - {id:3011, pId:30, t:"beforeRemove", name:"beforeRemove : null,", iconSkin:"edit", showAPI:true}, - {id:3012, pId:30, t:"beforeRename", name:"beforeRename : null,", iconSkin:"edit", showAPI:true}, - {id:3013, pId:30, t:"beforeRightClick", name:"beforeRightClick : null,", iconSkin:"core", showAPI:true}, - {id:3014, pId:30, name:""}, - {id:3015, pId:30, t:"onAsyncError", name:"onAsyncError : null,", iconSkin:"core", showAPI:true}, - {id:3016, pId:30, t:"onAsyncSuccess", name:"onAsyncSuccess : null,", iconSkin:"core", showAPI:true}, - {id:3017, pId:30, t:"onCheck", name:"onCheck : null,", iconSkin:"check", showAPI:true}, - {id:3018, pId:30, t:"onClick", name:"onClick : null,", iconSkin:"core", showAPI:true}, - {id:3019, pId:30, t:"onCollapse", name:"onCollapse : null,", iconSkin:"core", showAPI:true}, - {id:3029, pId:30, t:"onDblClick", name:"onDblClick : null,", iconSkin:"core", showAPI:true}, - {id:3020, pId:30, t:"onDrag", name:"onDrag : null,", iconSkin:"edit", showAPI:true}, - {id:3030, pId:30, t:"onDragMove", name:"onDragMove : null,", iconSkin:"edit", showAPI:true}, - {id:3021, pId:30, t:"onDrop", name:"onDrop : null,", iconSkin:"edit", showAPI:true}, - {id:3022, pId:30, t:"onExpand", name:"onExpand : null,", iconSkin:"core", showAPI:true}, - {id:3023, pId:30, t:"onMouseDown", name:"onMouseDown : null,", iconSkin:"core", showAPI:true}, - {id:3024, pId:30, t:"onMouseUp", name:"onMouseUp : null,", iconSkin:"core", showAPI:true}, - {id:3025, pId:30, t:"onNodeCreated", name:"onNodeCreated : null,", iconSkin:"core", showAPI:true}, - {id:3026, pId:30, t:"onRemove", name:"onRemove : null,", iconSkin:"edit", showAPI:true}, - {id:3027, pId:30, t:"onRename", name:"onRename : null,", iconSkin:"edit", showAPI:true}, - {id:3028, pId:30, t:"onRightClick", name:"onRightClick : null", iconSkin:"core", showAPI:true}, - {id:31, pId:1, name:"},"}, - {id:32, pId:1, name:""}, - - {id:40, pId:1, t:"check", name:"check : {", open:true}, - {id:405, pId:40, t:"autoCheckTrigger", name:"autoCheckTrigger : false,", iconSkin:"check", showAPI:true}, - {id:401, pId:40, t:"chkboxType", name:"chkboxType : {\"Y\": \"ps\", \"N\": \"ps\"},", iconSkin:"check", showAPI:true}, - {id:402, pId:40, t:"chkStyle", name:"chkStyle : \"checkbox\",", iconSkin:"check", showAPI:true}, - {id:403, pId:40, t:"enable", name:"enable : false,", iconSkin:"check", showAPI:true}, - {id:406, pId:40, t:"nocheckInherit", name:"nocheckInherit : false", iconSkin:"check", showAPI:true}, - {id:407, pId:40, t:"chkDisabledInherit", name:"chkDisabledInherit : false", iconSkin:"check", showAPI:true}, - {id:404, pId:40, t:"radioType", name:"radioType : \"level\"", iconSkin:"check", showAPI:true}, - {id:41, pId:1, name:"},"}, - {id:42, pId:1, name:""}, - - {id:50, pId:1, t:"data", name:"data : {", open:true}, - {id:500, pId:50, t:"keep", name:"keep : {", open:true}, - {id:5001, pId:500, t:"leaf", name:"leaf : false,", iconSkin:"core", showAPI:true}, - {id:5002, pId:500, t:"parent", name:"parent : false", iconSkin:"core", showAPI:true}, - {id:501, pId:50, name:"},"}, - - {id:510, pId:50, t:"key", name:"key : {", open:true}, - {id:5101, pId:510, t:"checked", name:"checked : \"checked\",", iconSkin:"check", showAPI:true}, - {id:5102, pId:510, t:"children", name:"children : \"children\",", iconSkin:"core", showAPI:true}, - {id:5103, pId:510, t:"name", name:"name : \"name\",", iconSkin:"core", showAPI:true}, - {id:5104, pId:510, t:"title", name:"title : \"\"", iconSkin:"core", showAPI:true}, - {id:5105, pId:510, t:"url", name:"url : \"url\"", iconSkin:"core", showAPI:true}, - {id:511, pId:50, name:"},"}, - - {id:520, pId:50, t:"simpleData", name:"simpleData : {", open:true}, - {id:5201, pId:520, t:"enable", name:"enable : false,", iconSkin:"core", showAPI:true}, - {id:5202, pId:520, t:"idKey", name:"idKey : \"id\",", iconSkin:"core", showAPI:true}, - {id:5203, pId:520, t:"pIdKey", name:"pIdKey : \"pId\",", iconSkin:"core", showAPI:true}, - {id:5204, pId:520, t:"rootPId", name:"rootPId : null", iconSkin:"core", showAPI:true}, - {id:521, pId:50, name:"}"}, - {id:51, pId:1, name:"},"}, - {id:52, pId:1, name:""}, - - {id:60, pId:1, t:"edit", name:"edit : {", open:true}, - {id:601, pId:60, t:"drag", name:"drag : {", open:true}, - {id:60111, pId:601, t:"autoExpandTrigger", name:"autoExpandTrigger : true,", iconSkin:"edit", showAPI:true}, - {id:60101, pId:601, t:"isCopy", name:"isCopy : true,", iconSkin:"edit", showAPI:true}, - {id:60102, pId:601, t:"isMove", name:"isMove : true,", iconSkin:"edit", showAPI:true}, - {id:60103, pId:601, t:"prev", name:"prev : true,", iconSkin:"edit", showAPI:true}, - {id:60104, pId:601, t:"next", name:"next : true,", iconSkin:"edit", showAPI:true}, - {id:60105, pId:601, t:"inner", name:"inner : true,", iconSkin:"edit", showAPI:true}, - {id:60107, pId:601, t:"borderMax", name:"borderMax : 10,", iconSkin:"edit", showAPI:true}, - {id:60108, pId:601, t:"borderMin", name:"borderMin : -5,", iconSkin:"edit", showAPI:true}, - {id:60106, pId:601, t:"minMoveSize", name:"minMoveSize : 5,", iconSkin:"edit", showAPI:true}, - {id:60109, pId:601, t:"maxShowNodeNum", name:"maxShowNodeNum : 5,", iconSkin:"edit", showAPI:true}, - {id:60110, pId:601, t:"autoOpenTime", name:"autoOpenTime : 500", iconSkin:"edit", showAPI:true}, - {id:602, pId:60, name:"},"}, - {id:608, pId:60, t:"editNameSelectAll", name:"editNameSelectAll : false,", iconSkin:"edit", showAPI:true}, - {id:603, pId:60, t:"enable", name:"enable : false,", iconSkin:"edit", showAPI:true}, - {id:604, pId:60, t:"removeTitle", name:"removeTitle : \"remove\",", iconSkin:"edit", showAPI:true}, - {id:605, pId:60, t:"renameTitle", name:"renameTitle : \"rename\",", iconSkin:"edit", showAPI:true}, - {id:606, pId:60, t:"showRemoveBtn", name:"showRemoveBtn : true,", iconSkin:"edit", showAPI:true}, - {id:607, pId:60, t:"showRenameBtn", name:"showRenameBtn : true", iconSkin:"edit", showAPI:true}, - {id:61, pId:1, name:"},"}, - {id:62, pId:1, name:""}, - - {id:70, pId:1, t:"view", name:"view : {", open:true}, - {id:7001, pId:70, t:"addDiyDom", name:"addDiyDom : null,", iconSkin:"core", showAPI:true}, - {id:7002, pId:70, t:"addHoverDom", name:"addHoverDom : null,", iconSkin:"edit", showAPI:true}, - {id:7003, pId:70, t:"autoCancelSelected", name:"autoCancelSelected : true,", iconSkin:"core", showAPI:true}, - {id:7004, pId:70, t:"dblClickExpand", name:"dblClickExpand : true,", iconSkin:"core", showAPI:true}, - {id:7005, pId:70, t:"expandSpeed", name:"expandSpeed : \"fast\",", iconSkin:"core", showAPI:true}, - {id:7006, pId:70, t:"fontCss", name:"fontCss : {},", iconSkin:"core", showAPI:true}, - {id:7012, pId:70, t:"nameIsHTML", name:"nameIsHTML : false,", iconSkin:"core", showAPI:true}, - {id:7007, pId:70, t:"removeHoverDom", name:"removeHoverDom : null,", iconSkin:"edit", showAPI:true}, - {id:7008, pId:70, t:"selectedMulti", name:"selectedMulti : true,", iconSkin:"core", showAPI:true}, - {id:7009, pId:70, t:"showIcon", name:"showIcon : true,", iconSkin:"core", showAPI:true}, - {id:7010, pId:70, t:"showLine", name:"showLine : true,", iconSkin:"core", showAPI:true}, - {id:7011, pId:70, t:"showTitle", name:"showTitle : true,", iconSkin:"core", showAPI:true}, - {id:7012, pId:70, t:"txtSelectedEnable", name:"txtSelectedEnable : false", iconSkin:"core", showAPI:true}, - {id:71, pId:1, name:"}"}, - - {id:2, pId:0, name:"}"} - ]; - - var treenode_nodes =[ - {id:1, pId:0, t:"treeNode", name:"treeNode : {", open:true}, - {id:101, pId:1, t:"checked", name:"checked", iconSkin:"check", showAPI:true}, - {id:102, pId:1, t:"children", name:"children", iconSkin:"core", showAPI:true}, - {id:128, pId:1, t:"chkDisabled", name:"chkDisabled", iconSkin:"check", showAPI:true}, - {id:127, pId:1, t:"click", name:"click", iconSkin:"core", showAPI:true}, - {id:103, pId:1, t:"getCheckStatus", name:"getCheckStatus ()", iconSkin:"check", showAPI:true}, - {id:104, pId:1, t:"getNextNode", name:"getNextNode ()", iconSkin:"core", showAPI:true}, - {id:105, pId:1, t:"getParentNode", name:"getParentNode ()", iconSkin:"core", showAPI:true}, - {id:106, pId:1, t:"getPreNode", name:"getPreNode ()", iconSkin:"core", showAPI:true}, - {id:129, pId:1, t:"halfCheck", name:"halfCheck", iconSkin:"check", showAPI:true}, - {id:107, pId:1, t:"icon", name:"icon", iconSkin:"core", showAPI:true}, - {id:108, pId:1, t:"iconClose", name:"iconClose", iconSkin:"core", showAPI:true}, - {id:109, pId:1, t:"iconOpen", name:"iconOpen", iconSkin:"core", showAPI:true}, - {id:110, pId:1, t:"iconSkin", name:"iconSkin", iconSkin:"core", showAPI:true}, - {id:131, pId:1, t:"isHidden", name:"isHidden", iconSkin:"hide", showAPI:true}, - {id:111, pId:1, t:"isParent", name:"isParent", iconSkin:"core", showAPI:true}, - {id:132, pId:1, t:"name", name:"name", iconSkin:"core", showAPI:true}, - {id:112, pId:1, t:"nocheck", name:"nocheck", iconSkin:"check", showAPI:true}, - {id:113, pId:1, t:"open", name:"open", iconSkin:"core", showAPI:true}, - {id:133, pId:1, t:"target", name:"target", iconSkin:"core", showAPI:true}, - {id:134, pId:1, t:"url", name:"url", iconSkin:"core", showAPI:true}, - {id:114, pId:1, t:"diy", name:"*DIY*", iconSkin:"core", showAPI:true}, - {id:115, pId:1, name:""}, - {id:116, pId:1, t:"check_Child_State", name:"[check_Child_State]", iconSkin:"check", showAPI:true}, - {id:117, pId:1, t:"check_Focus", name:"[check_Focus]", iconSkin:"check", showAPI:true}, - {id:118, pId:1, t:"checkedOld", name:"[checkedOld]", iconSkin:"check", showAPI:true}, - {id:119, pId:1, t:"editNameFlag", name:"[editNameFlag]", iconSkin:"edit", showAPI:true}, - {id:120, pId:1, t:"isAjaxing", name:"[isAjaxing]", iconSkin:"core", showAPI:true}, - {id:121, pId:1, t:"isFirstNode", name:"[isFirstNode]", iconSkin:"core", showAPI:true}, - {id:122, pId:1, t:"isHover", name:"[isHover]", iconSkin:"edit", showAPI:true}, - {id:123, pId:1, t:"isLastNode", name:"[isLastNode]", iconSkin:"core", showAPI:true}, - {id:124, pId:1, t:"level", name:"[level]", iconSkin:"core", showAPI:true}, - {id:125, pId:1, t:"parentTId", name:"[parentTId]", iconSkin:"core", showAPI:true}, - {id:126, pId:1, t:"tId", name:"[tId]", iconSkin:"core", showAPI:true}, - {id:130, pId:1, t:"zAsync", name:"[zAsync]", iconSkin:"core", showAPI:true}, - {id:2, pId:0, name:"}"} - ]; - - var function_nodes =[ - {id:1, pId:0, t:"$.fn.zTree", name:"$.fn.zTree : {", open:true}, - {id:11, pId:1, t:"init", name:"init (obj, zSetting, zNodes)", iconSkin:"core", showAPI:true}, - {id:12, pId:1, t:"getZTreeObj", name:"getZTreeObj (treeId)", iconSkin:"core", showAPI:true}, - {id:14, pId:1, t:"destroy", name:"destroy (treeId)", iconSkin:"core", showAPI:true}, - {id:13, pId:1, t:"_z", name:"_z : {tools, view, event, data}", iconSkin:"core", showAPI:true}, - {id:2, pId:0, name:"}"}, - {id:3, pId:0, name:""}, - {id:4, pId:0, t:"zTreeObj", name:"zTreeObj : {", open:true}, - {id:401, pId:4, t:"setting", name:"setting", iconSkin:"core", showAPI:true}, - {id:402, pId:4, t:"addNodes", name:"addNodes (parentNode, newNodes, isSilent)", iconSkin:"core", showAPI:true}, - {id:403, pId:4, t:"cancelEditName", name:"cancelEditName (newName)", iconSkin:"edit", showAPI:true}, - {id:404, pId:4, t:"cancelSelectedNode", name:"cancelSelectedNode (node)", iconSkin:"core", showAPI:true}, - {id:405, pId:4, t:"checkAllNodes", name:"checkAllNodes (checked)", iconSkin:"check", showAPI:true}, - {id:406, pId:4, t:"checkNode", name:"checkNode (node, checked, checkTypeFlag, callbackFlag)", iconSkin:"check", showAPI:true}, - {id:407, pId:4, t:"copyNode", name:"copyNode (targetNode, node, moveType, isSilent)", iconSkin:"edit", showAPI:true}, - {id:436, pId:4, t:"destroy", name:"destroy ()", iconSkin:"core", showAPI:true}, - {id:408, pId:4, t:"editName", name:"editName (node)", iconSkin:"edit", showAPI:true}, - {id:409, pId:4, t:"expandAll", name:"expandAll (expandFlag)", iconSkin:"core", showAPI:true}, - {id:410, pId:4, t:"expandNode", name:"expandNode (node, expandFlag, sonSign, focus, callbackFlag)", iconSkin:"core", showAPI:true}, - {id:411, pId:4, t:"getChangeCheckedNodes", name:"getChangeCheckedNodes ()", iconSkin:"check", showAPI:true}, - {id:412, pId:4, t:"getCheckedNodes", name:"getCheckedNodes (checked)", iconSkin:"check", showAPI:true}, - {id:413, pId:4, t:"getNodeByParam", name:"getNodeByParam (key, value, parentNode)", iconSkin:"core", showAPI:true}, - {id:414, pId:4, t:"getNodeByTId", name:"getNodeByTId (tId)", iconSkin:"core", showAPI:true}, - {id:415, pId:4, t:"getNodeIndex", name:"getNodeIndex (node)", iconSkin:"core", showAPI:true}, - {id:416, pId:4, t:"getNodes", name:"getNodes ()", iconSkin:"core", showAPI:true}, - {id:431, pId:4, t:"getNodesByFilter", name:"getNodesByFilter (filter, isSingle, parentNode, invokeParam)", iconSkin:"core", showAPI:true}, - {id:417, pId:4, t:"getNodesByParam", name:"getNodesByParam (key, value, parentNode)", iconSkin:"core", showAPI:true}, - {id:418, pId:4, t:"getNodesByParamFuzzy", name:"getNodesByParamFuzzy (key, value, parentNode)", iconSkin:"core", showAPI:true}, - {id:419, pId:4, t:"getSelectedNodes", name:"getSelectedNodes ()", iconSkin:"core", showAPI:true}, - {id:432, pId:4, t:"hideNode", name:"hideNode (node)", iconSkin:"hide", showAPI:true}, - {id:433, pId:4, t:"hideNodes", name:"hideNodes (nodes)", iconSkin:"hide", showAPI:true}, - {id:420, pId:4, t:"moveNode", name:"moveNode (targetNode, node, moveType, isSilent)", iconSkin:"edit", showAPI:true}, - {id:421, pId:4, t:"reAsyncChildNodes", name:"reAsyncChildNodes (parentNode, reloadType, isSilent)", iconSkin:"core", showAPI:true}, - {id:422, pId:4, t:"refresh", name:"refresh ()", iconSkin:"core", showAPI:true}, - {id:423, pId:4, t:"removeChildNodes", name:"removeChildNodes (parentNode)", iconSkin:"core", showAPI:true}, - {id:424, pId:4, t:"removeNode", name:"removeNode (node, callbackFlag)", iconSkin:"core", showAPI:true}, - {id:425, pId:4, t:"selectNode", name:"selectNode (node, addFlag)", iconSkin:"core", showAPI:true}, - {id:430, pId:4, t:"setChkDisabled", name:"setChkDisabled (node, disabled, inheritParent, inheritChildren)", iconSkin:"check", showAPI:true}, - {id:426, pId:4, t:"setEditable", name:"setEditable (editable)", iconSkin:"edit", showAPI:true}, - {id:434, pId:4, t:"showNode", name:"showNode (node)", iconSkin:"hide", showAPI:true}, - {id:435, pId:4, t:"showNodes", name:"showNodes (nodes)", iconSkin:"hide", showAPI:true}, - {id:427, pId:4, t:"transformToArray", name:"transformToArray (nodes)", iconSkin:"core", showAPI:true}, - {id:428, pId:4, t:"transformTozTreeNodes", name:"transformTozTreeNodes (simpleNodes)", iconSkin:"core", showAPI:true}, - {id:429, pId:4, t:"updateNode", name:"updateNode (node, checkTypeFlag)", iconSkin:"core", showAPI:true}, - {id:5, pId:0, name:"}"} - ]; - - apiContent.zTree_Setting = $.fn.zTree.init($("#settingTree"), $.fn.zTree._z.tools.clone(setting), setting_nodes); - apiContent.zTree_Node = $.fn.zTree.init($("#treenodeTree"), $.fn.zTree._z.tools.clone(setting), treenode_nodes); - apiContent.zTree_Function = $.fn.zTree.init($("#functionTree"), $.fn.zTree._z.tools.clone(setting), function_nodes); - this.bindEvent(); - - }, - bindEvent: function() { - $(document).bind("keydown", this.listenKeyDown) - this.overlayCloseBtn.bind("click", apiContent.overlayClose); - this.searchResultInput.bind("click", function(e) { - $(this).prev().get(0).focus(); - this.blur(); - }).bind("focus", function(e) { - this.blur(); - }); - this.searchKey.bind("focus", this.focusKey) - .bind("blur", this.blurKey) - .bind("propertychange", this.searchNode) - .bind("input", this.searchNode); - this.searchPrevBtn.bind("click", this.searchPrev); - this.searchNextBtn.bind("click", this.searchNext); - }, - setSameKey: function(value) { - apiContent.searchKey.attr("value", value); - }, - focusKey: function(e) { - if (apiContent.searchKey.hasClass("empty")) { - apiContent.searchKey.removeClass("empty"); - } - }, - blurKey: function(e) { - apiContent.setSameKey(e.target.value); - if (e.target.value === "") { - apiContent.searchKey.addClass("empty"); - } - }, - listenKeyDown: function(e) { - if (e.keyCode=="13" && apiContent.overlayDiv.is(":hidden")) { - apiContent.openAPI(); - } else if (e.keyCode=="37") { - apiContent.searchPrev(); - } else if (e.keyCode=="13" || e.keyCode=="39") { - apiContent.searchNext(); - } - }, - openAPI: function() { - if (apiContent.searchNodes.length > 0) { - var setting_zTree = $.fn.zTree.getZTreeObj("settingTree"), - treenode_zTree = $.fn.zTree.getZTreeObj("treenodeTree"), - function_zTree = $.fn.zTree.getZTreeObj("functionTree"); - if (apiContent.searchNodesCur < 0 || apiContent.searchNodesCur > apiContent.searchNodes.length -1) { - apiContent.searchNodesCur = 0; - } - var node = apiContent.searchNodes[apiContent.searchNodesCur]; - - if (node.tId.indexOf("setting") > -1) { - setting_zTree.selectNode(node); - } else if (node.tId.indexOf("treenode") > -1) { - treenode_zTree.selectNode(node); - } else { - function_zTree.selectNode(node); - } - apiContent.beforeClick(node.tId.substring(0, node.tId.indexOf("_")), node, true); - apiContent.searchCur(); - } - }, - searchNode: function(e) { - var setting_zTree = $.fn.zTree.getZTreeObj("settingTree"), - treenode_zTree = $.fn.zTree.getZTreeObj("treenodeTree"), - function_zTree = $.fn.zTree.getZTreeObj("functionTree"); - if (apiContent.curKey == e.target.value) return; - apiContent.curKey = e.target.value; - var value = $.trim(apiContent.curKey); - apiContent.setSameKey(apiContent.curKey); - if (apiContent.searchKey.hasClass("empty")) { - value = ""; - apiContent.searchResultInput.removeClass("noResult").attr("value",""); - } - if (apiContent.lastValue === value) return; - - apiContent.updateNodes(false); - apiContent.lastValue = value; - if (value === "" || value.length < 2) { - apiContent.searchNodes = []; - apiContent.searchNodesCur = -1; - apiContent.searchCur(true); - return; - } - - var settingNodeList = setting_zTree.getNodesByFilter(apiContent.searchFilter); - var functionNodeList = function_zTree.getNodesByFilter(apiContent.searchFilter); - var treenodeNodeList = treenode_zTree.getNodesByFilter(apiContent.searchFilter); - apiContent.searchNodes = settingNodeList.concat(functionNodeList).concat(treenodeNodeList); - apiContent.searchNodesCur = -1; - apiContent.searchCur(); - apiContent.updateNodes(true); - }, - searchFilter: function(node) { - var value = $.trim(apiContent.searchKey.get(0).value).toLowerCase(); - return (node.showAPI && node.name.toLowerCase().indexOf(value) > -1); - }, - searchPrev: function(e) { - if (apiContent.searchPrevBtn.hasClass("disabled")) return; - apiContent.searchNodesCur--; - if (apiContent.searchNodesCur < 0 || apiContent.searchNodesCur > apiContent.searchNodes.length -1) { - apiContent.searchNodesCur = apiContent.searchNodes.length -1; - } - apiContent.openAPI(); - }, - searchNext: function(e) { - if (apiContent.searchNextBtn.hasClass("disabled")) return; - apiContent.searchNodesCur++; - apiContent.openAPI(); - }, - searchCur: function(init) { - var result = apiContent.searchNodes; - if (init) { - apiContent.searchResultInput.removeClass("noResult").attr("value",""); - } else if (result.length == 0) { - apiContent.searchResultInput.addClass("noResult").attr("value"," [ 0 / 0 ] "); - } else { - apiContent.searchResultInput.removeClass("noResult").attr("value"," [ " + (apiContent.searchNodesCur > -1 ? apiContent.searchNodesCur+1 : "?")+ " / " + result.length + " ] "); - } - if (result.length > 0) { - apiContent.searchPrevBtn.removeClass("disabled"); - apiContent.searchNextBtn.removeClass("disabled"); - } else { - apiContent.searchPrevBtn.addClass("disabled"); - apiContent.searchNextBtn.addClass("disabled"); - } - }, - updateNodes: function(highlight) { - var setting_zTree = $.fn.zTree.getZTreeObj("settingTree"), - treenode_zTree = $.fn.zTree.getZTreeObj("treenodeTree"), - function_zTree = $.fn.zTree.getZTreeObj("functionTree"), - node = null; - for( var i=0, l=apiContent.searchNodes.length; i 0) { - node.highlight = highlight; - if (node.tId.indexOf("setting") > -1) { - setting_zTree.updateNode(node); - } else if (node.tId.indexOf("treenode") > -1) { - treenode_zTree.updateNode(node); - } else { - function_zTree.updateNode(node); - } - } - } - }, - getFontCss: function(treeId, treeNode) { - return (!!treeNode.highlight) ? {color:"#A60000", "font-weight":"bold"} : {color:"#333", "font-weight":"normal"}; - }, - getTitle: function(treeId, node) { - var t = [], n = node; - while (n && !!n.t) { - t.push(n.t); - n = n.getParentNode(); - } - t = t.reverse(); - node.tt = t.join('.'); - return true; - }, - showIcon: function(treeId, node) { - return (!!node.iconSkin); - }, - onNodeCreated: function (e, treeId, node) { - var a = $("#" + node.tId + "_a"); - if (node.showAPI) { - a.attr("rel", "#overlayDiv"); - } else { - a.css({cursor: "default"}); - } - }, - beforeClick: function (treeId, node, noClear) { - if (!node.showAPI) return false; - var o = $("#" + node.tId + "_a"); - if (!!apiContent.apiCache[node.tId]) { - apiContent.tmpDiv.html(apiContent.apiCache[node.tId]); - apiContent.overlayShow(o, (apiContent.lastNode === node)); - } else { - apiContent.overlayAjax(treeId, node); - } - apiContent.lastNode = node; - if (node.tId.indexOf("settingTree")>-1) { - apiContent.settingDiv.removeClass("right").addClass("left"); - apiContent.functionDiv.removeClass("left").addClass("right"); - } else { - apiContent.settingDiv.removeClass("left").addClass("right"); - apiContent.functionDiv.removeClass("right").addClass("left"); - } - - if (!noClear) { - apiContent.clearSelectedNode(); - } - return true; - }, - clearSelectedNode: function() { - apiContent.zTree_Setting.cancelSelectedNode(); - apiContent.zTree_Node.cancelSelectedNode(); - apiContent.zTree_Function.cancelSelectedNode(); - }, - overlayAutoClose: function(e) { - var eId = e.target.id, eRel = e.target.getAttribute("rel"), eClass = e.target.className; - if (eId === "overlayDiv" || eId === "overlayDivArrow" || eClass.indexOf("searchPrev") > -1 || eClass.indexOf("searchNext") > -1 || !!eRel) return; - if (!$(e.target).parents("[rel]").length && !$(e.target).parents("#overlayDiv").length) { - apiContent.overlayClose(); - } - }, - overlayClose: function() { - var o = apiContent.overlayDiv; - o.stop(); - apiContent.clearSelectedNode(); - if (ie) { - o.hide(); - } else { - setTimeout(function() {o.fadeTo("fast", 0, function(){o.hide();})}, 200); - } - $(document).unbind("click", apiContent.overlayAutoClose); - }, - overlayShow: function(target, isSameNode) { - var w = $(window), o = apiContent.overlayDiv, a = apiContent.overlayArrow, - oc = apiContent.overlayContent, c = apiContent.contentBoxDiv, - t = target.offset().top - 30, - cMaxLeft = c.offset().left + c.outerWidth({margin:true}) - o.outerWidth({margin:true}) - 10, - l = Math.min(cMaxLeft, target.offset().left + target.width() + 40), - arrowT = target.offset().top + 16, - wMinTop = 100, footerHeight = 50, onlyFade = false, - wHeight = w.height(), wScrollTop=w.scrollTop(), wMaxTop = wHeight + wScrollTop - footerHeight; - if (!apiContent.overlayMaxTop) { - apiContent.overlayMaxTop = apiContent.contentBoxDiv.offset().top + apiContent.contentBoxDiv.height(); - } - o.stop(); - if (o.css("display") !== "block") { - o.css({top: t, left: l}); - a.css({top:arrowT - t}); - $(document).bind("click", apiContent.overlayAutoClose); - } - if (ie) { - onlyFade = true; - o.show(); - } else { - o.fadeTo("fast", 1); - } - - var h = apiContent.tmpDiv.outerHeight({margin:true}) + apiContent.overlaySearch.outerHeight(); - if ((t + h) > wMaxTop) { - t = wMaxTop - h; - } - if ((t + h) > apiContent.overlayMaxTop) { - t = apiContent.overlayMaxTop - h; - } - t = Math.max(t, wScrollTop, wMinTop); - if ((t + h) > ($("body").height()-footerHeight-20)) { - o.css("padding-bottom", footerHeight + "px"); - } else { - o.css("padding-bottom", "0"); - } - apiContent.overlayDetailDiv.empty(); - apiContent.overlayDetailDiv.append(apiContent.tmpDiv.children()); - if (!onlyFade) { - onlyFade = (isSameNode && t === parseInt(o.css("top").replace("px", ""))); - } - - a.removeClass("reverse"); - if ( (arrowT - t) > (h-55) ) { - a.addClass("reverse"); - arrowT -= 55; - } - - if (onlyFade) { - o.css({top: t, left: l}); - oc.css({height: h}); - a.css({top:arrowT - t}); - } else { - o.animate({top: t, left: l}, {duration: "normal",easing: "swing", complete:null}); - oc.animate({height: h}, {duration: "fast",easing: "swing", complete:null}); - a.animate({top:arrowT - t}, {duration: "normal",easing: "linear", complete:null}); - } - }, - overlayAjax: function(treeId, node) { - var o = $("#" + node.tId + "_a"); - if (node.isAjax) return; - node.isAjax = true; - $.ajax({ - type: "get", - url: "" + lang + "/" + node.tt.replace("$.", "") + ".html", - data: null, - dataType: "text", - success: function(msg) { - if (!apiContent.tmpDiv) { - var tmpDiv = $(document.createElement("div")); - tmpDiv.addClass("baby_overlay_tmp"); - $("body").append(tmpDiv) - apiContent.tmpDiv = $(document.createElement("div")); - apiContent.tmpDiv.addClass("details"); - tmpDiv.append(apiContent.tmpDiv); - - } else { - apiContent.tmpDiv.empty(); - } - apiContent.tmpDiv.html(msg); - apiContent.overlayShow(o, false); - apiContent.apiCache[node.tId] = msg; - node.isAjax = false; - }, - error: function(XMLHttpRequest, textStatus, errorThrown) { - alert(ajaxMsg) - if (apiContent.tmpDiv) apiContent.tmpDiv.empty(); - node.isAjax = false; - } - }); - } -} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/common.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/common.css deleted file mode 100644 index 78f910c7..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/common.css +++ /dev/null @@ -1,219 +0,0 @@ -/* Resets */ -html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { - margin: 0;padding: 0;border: 0;outline: 0;font-weight: inherit;font-style: inherit;font-size: 100%;font-family: inherit;vertical-align: baseline;} -:focus {outline: 0;} -body {color: #2f332a;font: 15px/21px Arial, Helvetica, simsun, sans-serif;background: #528036 url(img/background.jpg) no-repeat fixed 0 0;} -p {padding-bottom: 20px;} -ol, ul {list-style: none;} -table {border-collapse: separate;border-spacing: 0;} -caption, th, td {text-align: left;font-weight: normal;} -strong {font-weight: bold;} -em {font-style: italic;} -hr {display: none;} -.font1 {color: white;background-color: #528036;} -.right {float: right;} -.left {float: left;} -.hide {display: none;} -.round {-moz-border-radius: 15px;-webkit-border-radius: 15px;-khtml-border-radius: 15px;border-radius: 15px;} -.clear {clear: both;} -.clearfix {display: block;} -.clearfix:after {content: ".";display: block;clear: both;visibility: hidden;line-height: 0;height: 0;} -html[xmlns] .clearfix {display: block;} -* html .clearfix {height: 1%;} - -/* Link Styles */ -a {color: #528036;} -a:link, a:visited {text-decoration: none;} -a:hover {color: #000;text-decoration: none;} -a:active {text-decoration: none;} - -/* Headings */ -h1, h2, h3, h4, h5, h6 {color: #2f332a;font-weight: bold;font-family: Helvetica, Arial, simsun, sans-serif;padding-bottom: 5px;} -h1 {font-size: 36px;line-height: 44px;} -h2 {font-size: 20px;line-height: 20px;} -h3 {font-size: 14px;line-height: 14px;} -h4 {font-size: 14px;font-weight: normal;line-height: 25px;} - -/* Wraps */ -.header_wrap {position: relative;min-width: 940px;padding: 100px 30px 0 30px;} -.content_wrap {position: relative;min-width: 940px;padding: 0 30px 50px 30px;} -.footer_wrap {bottom: 0;height: 47px;width: 100%;background-color: #1b1b1b;border-top: 1px solid #749e58;} - -/* Header */ -.header {position: relative;width: 940px;margin: 0 auto;height: 160px;border: 1px solid white;background: transparent url(img/header-bg.png) repeat-x 0 -50px;} -.header-text {padding: 40px 25px 15px 120px;font-size: 18px;line-height: 24px;color: #747d67;font-family: Helvetica, sans-serif;} -.header-text img {padding-bottom: 5px;} -.shortcuts {white-space: nowrap;text-align: right;position: absolute;top: -45px;right: 5px;} -.shortcuts.language {top: -85px;right:0px;} -.shortcuts li {display: inline;font-size: 18px;line-height: 28px;font-family: Helvetica, Arial, simsun, sans-serif;padding-bottom: 5px;margin-left: 30px;cursor: pointer;} -.shortcuts li button {cursor: pointer;} -.shortcuts li span {border-bottom: 1px dotted white;} -.shortcuts li span.selected {padding: 2px;background-color: #528036;} -.shortcuts li a {color: #fff;} -.ieSuggest {display:none;font-size: 12px;color: silver;position: absolute;left: 10px;top: 2px;} -.google_plus {position: absolute;right: 10px; top:10px;} -.light-bulb {position: absolute;left: -20px;bottom: -35px;width:116px;height:180px;background-image:url(img/lightbulb.png);background-repeat: no-repeat;} - -/* Content */ -.content {position: relative;width: 940px;margin: 0 auto;} -.nav_section {position: relative;height: 20px;font-family: "Myriad Pro", "Trebuchet MS", sans-serif;font-size: 15px;color: #253;padding: 20px 0;} -.nav_section ul {position: absolute;right: 10px;} -.nav_section ul li {display: inline;line-height: 20px;margin: 0 5px 0 20px;border-bottom: 1px dotted white;} -.nav_section ul li.noline {border-bottom: 0;} -.nav_section ul li a {color: #fff;} -.nav_section ul li a.selected {padding: 2px;background-color: #528036;} -.nav_section ul li.first {border: none;} -.content .title {margin: 50px 30px 20px 70px;} -.content li {margin-bottom: 5px;} -.contentBox {position: relative;overflow: hidden;border: 1px solid white;min-height: 200px;line-height: 25px;background: transparent url(img/contact-bg.png) repeat-x 0 0;} - -.zTreeInfo {display:none;width: 940px;position: absolute;} -.zTreeInfo p {padding-bottom: 50px;} -.zTreeInfo-left {float: left;width: 280px;height:300px;padding: 0 50px 60px 75px;background:url(img/zTreeIntroduction.jpg) no-repeat 30px 30px;} -.zTreeInfo-right {position: relative;float: right;width: 475px;padding: 0 50px 60px 0;} -.zTreeInfo-right li {font-size: 12px;list-style-type: disc;} - -.license {display:none;width: 940px;position: absolute;} - -.donateInfo {display:block;width: 940px;position: absolute;} - -.links {display:none;width: 940px;position: absolute;} -.links .content {float: left;width: 160px;height:200px;padding: 0 10px 10px 2px;text-align: center;} -.links .content.first {margin-left: 30px;} - -.contact {display:none;width: 940px;position: absolute;} -.contact .myhome { position: absolute; top:10px; left:620px; width:300px; height:266px; background: transparent url(img/myhome.gif) scroll no-repeat 0 0;} - -.siteTag {position: absolute;left: -16px;top: 109px;z-index: 10;width: 65px;height: 46px;padding:0;margin:0 10px 0 0; - vertical-align:middle;border:0 none;background: transparent url(img/siteTag.png) scroll no-repeat 0 0;} -.siteTag.tag_zTreeInfo {background-position: 0 0} -.siteTag.tag_license {background-position: 0 -46px} -.siteTag.tag_donate {background-position: 0 -92px} -.siteTag.tag_contact {background-position: 0 -138px} - -.apiContent {width: 940px;} -.apiContent .right {float: right;padding-right: 100px;} -.apiContent .left {float: left;padding-right: 20px;border-right: 1px dotted silver;} -.api_setting {position: relative;margin:20px 0 20px 20px;} -.api_function {position: relative;margin:20px 0 20px 30px;padding-right: 10px;} -.api_content_title {text-align: center;font-weight: bold;} - -.demoContent {width: 940px;} -.demoContent .right {float: right;padding: 20px;width: 600px;} -.demoContent .left {float: left;padding: 20px;} -.demoContent iframe {width:600px;min-height: 530px;} - -.faqContent {width: 940px;} -.faqContent .right {float: right;padding: 20px;width: 600px;} -.faqContent .left {float: left;padding: 20px;} -.faqContent iframe {width:600px;min-height: 300px;} - -.baby_overlay_tmp {position: absolute;top:0; left:-5000px;display:block;visibility: hidden;width:640px;font-size:11px;} -.baby_overlay_tmp .details {padding: 20px;} -.baby_overlay {display:none;position:absolute;z-index:99;left:0; top:0;width:640px;color:#fff;font-size:11px;} -.baby_overlay .content {width:100%; height:100px;overflow: hidden;background: transparent url(img/overlay_bg.png) scroll repeat 0 0;} -.baby_overlay .details {padding:0 20px 20px 20px;} -.baby_overlay .close {background-image:url(img/close.png);position:absolute; right:5px; top:5px;cursor:pointer;height:36px;width:36px;} -.baby_overlay_arrow {background-image:url(img/overlay_arrow.png);background-position:0 0;position:absolute;height:40px;width:40px;left: -40px;} -.baby_overlay_arrow.reverse {background-position:0 -40px;} - -/* Footer */ -.footer {position: relative;min-width: 1000px;font: 14px/24px arial, helvetica, sans-serif;} -.footer ul {position:absolute;left: 0px;border:1px solid #393939;background:#262626;padding:12px 0px;line-height: 18px;display: none;list-style: none;} -.footer ul li a {display:block;padding: 2px 15px;color: #9c9c9c;text-indent: 0;} -.footer ul li a:hover {text-decoration:none;color: #fff;} -.footer-logo {position:absolute;margin: 10px 0 0 30px;width:122px; height:24px;top:0; left:0;background: transparent url(img/footer-logo.png) no-repeat 0 0;} -.footer_mii {position: absolute;right: 558px;top: 8px;z-index: 10;padding: 4px 0;} -.footer_mii a {font-size:10px;color:#649140} -.footer_mii a:hover {color:#B6D76F} -.footer_siteMap {position: absolute;right: 358px;top: 8px;width: 155px;z-index: 10;padding: 4px 0;} -.footer_siteMap .footer_siteMap_header {width:155px;text-indent: -9999px;background: transparent url(img/footer_siteMap.gif) no-repeat 0 0;} -.footer_siteMap ul {top:-202px;width:180px;} -.footer_siteMap:hover ul {left: 0} -.footer_contact {position: absolute;right: 193px;top: 8px;width: 155px;z-index: 10;padding: 4px 0;} -.footer_contact .footer_contact_header {width:155px;text-indent: -9999px;background: transparent url(img/footer_contact.gif) no-repeat 0px 0px;} -.footer_contact ul {top:-113px;width:153px;} -.footer_contact:hover ul {left: 0} -.footer_download {position: absolute;right: 60px;top: 8px;width: 123px;z-index: 10;padding: 4px 0;} -.footer_download .footer_download_header {width:123px;text-indent: -9999px;background: transparent url(img/footer_download.png) no-repeat 0px 0px;} -.footer_download ul {top:-113px;width:140px;} -.footer_download:hover ul {left: 0} - -/* button icon */ -button {vertical-align:middle;border:0 none;background: transparent no-repeat 0 0 scroll;} - -.shortcuts button.ico {width:24px; height:24px;padding:0; margin:0 10px 0 0;background-image:url(img/menuIcon.png)} -.shortcuts button.home {background-position: 0 0} -.shortcuts button.demo {background-position: 0 -24px} -.shortcuts button.api {background-position: 0 -48px} -.shortcuts button.faq {background-position: 0 -72px} -.shortcuts button.donate {background-position: 0 -144px} -.shortcuts button.download {background-position: 0 -96px} -.shortcuts button.face {background-position: 0 -120px} -.shortcuts button.cn {width:48px; height:24px;padding:0; margin:0 10px 0 0;background-image:url(img/chinese.png)} -.shortcuts button.en {width:48px; height:24px;padding:0; margin:0 10px 0 0;background-image:url(img/english.png)} - -.content button.ico {width:24px; height:24px;padding:0; margin:0 10px 0 0;} - -.content button.ico16 {width:16px; height:16px;padding:0; margin:0 5px 0 0;background-image:url("img/apiMenu.png");} -button.z_core {margin-top: -4px;background-position:0 0;} -button.z_check {margin-top: -4px;background-position:0 -16px;} -button.z_edit {margin-top: -4px;background-position:0 -32px;} -button.z_hide {margin-top: -4px;background-position:0 -64px;} -button.z_search {margin-top: -4px;background-position:0 -48px;} -button.searchPrev {margin-top: -4px;background-position:-16px 0;cursor:pointer} -button.searchNext {margin-top: -4px;background-position:-16px -16px;cursor:pointer} -button.searchPrev.disabled {margin-top: -4px;background-position:-16px -32px;cursor:auto} -button.searchNext.disabled {margin-top: -4px;background-position:-16px -48px;cursor:auto} -input.search {margin:0;padding:2px 0; border:0;} -input.searchKey {width:150px;} -input.searchResult {margin-left:-3px;width:65px;text-align:right;background-color:white;color:#707070} -input.searchResult.noResult {background-color:#ff6666;color:black} -.baby_overlay div.overlaySearch {text-align:right;padding-right:50px;padding-top:12px;} - -/* api overlay*/ -.apiDetail .topLine {border-top: 1px dashed #376B29;margin-top: 5px;padding-top: 5px;} -.apiDetail .highlight_red {color:#A60000;} -.apiDetail .highlight_green {color:#A7F43D;} -.apiDetail h1, .apiDetail h2, .apiDetail h3, .apiDetail h4, .apiDetail h5, .apiDetail h6 {color: white;padding: 0;} -.apiDetail h2 {color: #A7F43D;margin: 5px auto;padding: 5px;font-size: 20px;} -.apiDetail h2 span {font-size: 14px;float: right;font-weight: normal;margin: 2px 20px 0 0;vertical-align: bottom;} -.apiDetail h2 span.path {float: left;margin: 2px 0 0 0;vertical-align: bottom;} -.apiDetail h3 {margin: 5px auto;padding: 5px;font-size: 14px;font-weight: normal;} -.apiDetail h3 span.h3_info {margin-left: 20px;font-size: 12px;} -.apiDetail h4 {margin: 0 auto;padding: 0 5px;font-size: 12px;font-weight: normal;line-height: 16px;} -.apiDetail .desc h4 {color: black;} -.apiDetail h4 b{width: 150px;display:inline-block;} -.apiDetail h4 span{width: 230px;display:inline-block;} - -.apiDetail pre, .apiDetail .desc {background: #E8FCD6;color: black;margin: 10px;padding: 10px;display: block;} -.apiDetail pre {word-wrap: break-word;} -.apiDetail p{margin-left: 5px;padding: 0;} -.apiDetail .longdesc {margin-top: 5px;} -.apiDetail .longdesc p{font-size: 12px;line-height:1.5;margin:3px 0;} -.apiDetail .longdesc b{font-size: 14px;} -.apiDetail table {border-collapse:collapse;} -.apiDetail table td {border:1px solid silver;text-align: center;vertical-align: middle;} -.apiDetail table thead td {font-weight: bold} - -.apiDetail button {width:16px; height:16px; vertical-align:middle; border:0 none; cursor: pointer; - background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; - background-image:url("zTreeStyle/img/zTreeStandard.png");} - -.apiDetail button.chk {width:13px; height:13px; margin:0 3px 2px 0; cursor: auto} -.apiDetail button.chk.checkbox_false_full {background-position:0 0} -.apiDetail button.chk.checkbox_false_full_focus {background-position:0 -14px} -.apiDetail button.chk.checkbox_false_part {background-position:0 -28px} -.apiDetail button.chk.checkbox_false_part_focus {background-position:0 -42px} -.apiDetail button.chk.checkbox_true_full {background-position:-14px 0} -.apiDetail button.chk.checkbox_true_full_focus {background-position:-14px -14px} -.apiDetail button.chk.checkbox_true_part {background-position:-14px -28px} -.apiDetail button.chk.checkbox_true_part_focus {background-position:-14px -42px} -.apiDetail button.chk.radio_false_full {background-position:-28px 0} -.apiDetail button.chk.radio_false_full_focus {background-position:-28px -14px} -.apiDetail button.chk.radio_false_part {background-position:-28px -28px} -.apiDetail button.chk.radio_false_part_focus {background-position:-28px -42px} -.apiDetail button.chk.radio_true_full {background-position:-42px 0} -.apiDetail button.chk.radio_true_full_focus {background-position:-42px -14px} -.apiDetail button.chk.radio_true_part {background-position:-42px -28px} -.apiDetail button.chk.radio_true_part_focus {background-position:-42px -42px} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/common_ie6.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/common_ie6.css deleted file mode 100644 index aacaf59c..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/common_ie6.css +++ /dev/null @@ -1,23 +0,0 @@ -* html{ -/* background-image:url(about:blank);*/ - background-attachment:fixed; -} -html pre {word-wrap: break-word} -.header {background-image: none;background-color: #F0F6E4;} - -.ieSuggest {display:block;} -.shortcuts button.cn {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='apiCss/img/chinese.png');background-image: none;} -.shortcuts button.en {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='apiCss/img/english.png');background-image: none;} - -.light-bulb {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='apiCss/img/lightbulb.png');background-image: none;} -.contentBox {background-image: none;background-color: #F0F6E4;} -.zTreeInfo {background-image: none;background-color: #F0F6E4;} - -.content button.ico16 {*background-image:url("img/apiMenu.gif")} -.siteTag {background-image: none;} -.apiContent .right {float: right;padding-right: 50px;} - -div.baby_overlay {background-color: #3C6E31;background-image:none;color:#fff;} -div.baby_overlay .close {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='apiCss/img/overlay_close_IE6.gif');background-image: none;} -.baby_overlay_arrow {background-image:url(img/overlay_arrow.gif);} -.apiDetail button {background-image:url("img/zTreeStandard.gif")} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/apiMenu.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/apiMenu.gif deleted file mode 100644 index 066fc8e4..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/apiMenu.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/apiMenu.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/apiMenu.png deleted file mode 100644 index 9acec505..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/apiMenu.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/background.jpg b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/background.jpg deleted file mode 100644 index 003375ff..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/background.jpg and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/chinese.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/chinese.png deleted file mode 100644 index d3b57fc1..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/chinese.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/close.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/close.png deleted file mode 100644 index 69e41e38..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/close.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/contact-bg.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/contact-bg.png deleted file mode 100644 index a3d7a5f1..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/contact-bg.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/english.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/english.png deleted file mode 100644 index 2ad2d7d5..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/english.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/header-bg.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/header-bg.png deleted file mode 100644 index a2baacf2..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/header-bg.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/lightbulb.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/lightbulb.png deleted file mode 100644 index c99357a3..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/lightbulb.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/overlay_arrow.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/overlay_arrow.gif deleted file mode 100644 index e7c3e6d4..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/overlay_arrow.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/overlay_arrow.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/overlay_arrow.png deleted file mode 100644 index d790a115..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/overlay_arrow.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/overlay_bg.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/overlay_bg.png deleted file mode 100644 index 5f81ee69..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/overlay_bg.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/overlay_close_IE6.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/overlay_close_IE6.gif deleted file mode 100644 index 42cb8d83..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/overlay_close_IE6.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/zTreeStandard.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/zTreeStandard.gif deleted file mode 100644 index 3f69a5b1..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/zTreeStandard.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/zTreeStandard.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/zTreeStandard.png deleted file mode 100644 index 33c9e844..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/img/zTreeStandard.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/jquery-1.6.2.min.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/jquery-1.6.2.min.js deleted file mode 100644 index 8cdc80eb..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/jquery-1.6.2.min.js +++ /dev/null @@ -1,18 +0,0 @@ -/*! - * jQuery JavaScript Library v1.6.2 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Thu Jun 30 14:16:56 2011 -0400 - */ -(function(a,b){function cv(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cs(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"":"")+""),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cr(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cq(){cn=b}function cp(){setTimeout(cq,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bx(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bm(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(be,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bl(a){f.nodeName(a,"input")?bk(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bk)}function bk(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bj(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bi(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bh(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(a,b){return(a&&a!=="*"?a+".":"")+b.replace(z,"`").replace(A,"&")}function M(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;ic)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function K(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function E(){return!0}function D(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z])/ig,x=function(a,b){return b.toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!A){A=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||D.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c
                    a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0},m&&f.extend(p,{position:"absolute",left:-1e3,top:-1e3});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
                    ",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
                    t
                    ",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]||i[c]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=w:v&&c!=="className"&&(f.nodeName(a,"form")||u.test(c))&&(i=v)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}},value:{get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return f.prop(a,c)?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.attrHooks.title=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var x=/\.(.*)$/,y=/^(?:textarea|input|select)$/i,z=/\./g,A=/ /g,B=/[^\w\s.|`]/g,C=function(a){return a.replace(B,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=D;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=D);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),C).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i. -shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},J=function(c){var d=c.target,e,g;if(!!y.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=I(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:J,beforedeactivate:J,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&J.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&J.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",I(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in H)f.event.add(this,c+".specialChange",H[c]);return y.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return y.test(this.nodeName)}},H=f.event.special.change.filters,H.focus=H.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

                    ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
                    ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(h=g;h0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var X=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,Z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,$=/<([\w:]+)/,_=/",""],legend:[1,"
                    ","
                    "],thead:[1,"","
                    "],tr:[2,"","
                    "],td:[3,"","
                    "],col:[2,"","
                    "],area:[1,"",""],_default:[0,"",""]};bf.optgroup=bf.option,bf.tbody=bf.tfoot=bf.colgroup=bf.caption=bf.thead,bf.th=bf.td,f.support.htmlSerialize||(bf._default=[1,"div
                    ","
                    "]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(X,""):null;if(typeof a=="string"&&!bb.test(a)&&(f.support.leadingWhitespace||!Y.test(a))&&!bf[($.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Z,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j -)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bi(a,d),e=bj(a),g=bj(d);for(h=0;e[h];++h)bi(e[h],g[h])}if(b){bh(a,d);if(c){e=bj(a),g=bj(d);for(h=0;e[h];++h)bh(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!ba.test(k))k=b.createTextNode(k);else{k=k.replace(Z,"<$1>");var l=($.exec(k)||["",""])[1].toLowerCase(),m=bf[l]||bf._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=_.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&Y.test(k)&&o.insertBefore(b.createTextNode(Y.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bo.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bn.test(g)?g.replace(bn,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bx(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(by=function(a,c){var d,e,g;c=c.replace(bp,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bz=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bq.test(d)&&br.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bx=by||bz,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bB=/%20/g,bC=/\[\]$/,bD=/\r?\n/g,bE=/#.*$/,bF=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bG=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bH=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bI=/^(?:GET|HEAD)$/,bJ=/^\/\//,bK=/\?/,bL=/)<[^<]*)*<\/script>/gi,bM=/^(?:select|textarea)/i,bN=/\s+/,bO=/([?&])_=[^&]*/,bP=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bQ=f.fn.load,bR={},bS={},bT,bU;try{bT=e.href}catch(bV){bT=c.createElement("a"),bT.href="",bT=bT.href}bU=bP.exec(bT.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bQ)return bQ.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
                    ").append(c.replace(bL,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bM.test(this.nodeName)||bG.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bD,"\r\n")}}):{name:b.name,value:c.replace(bD,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bT,isLocal:bH.test(bU[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML}},ajaxPrefilter:bW(bR),ajaxTransport:bW(bS),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a?4:0;var o,r,u,w=l?bZ(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=b$(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bF.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bE,"").replace(bJ,bU[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bN),d.crossDomain==null&&(r=bP.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bU[1]&&r[2]==bU[2]&&(r[3]||(r[1]==="http:"?80:443))==(bU[3]||(bU[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bX(bR,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bI.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bK.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bO,"$1_="+x);d.url=y+(y===d.url?(bK.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", */*; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bX(bS,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){status<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bB,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn,co=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cr("show",3),a,b,c);for(var g=0,h=this.length;g=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b
                    ";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cu.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cu.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cv(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cv(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/jquery.ztree.core-3.5.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/jquery.ztree.core-3.5.js deleted file mode 100644 index 4fc4082d..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/jquery.ztree.core-3.5.js +++ /dev/null @@ -1,70 +0,0 @@ -/* - * JQuery zTree core v3.5.18 - * http://zTree.me/ - * - * Copyright (c) 2010 Hunter.z - * - * Licensed same as jquery - MIT License - * http://www.opensource.org/licenses/mit-license.php - * - * email: hunter.z@263.net - * Date: 2015-05-25 - */ -(function(p){var G,H,I,J,K,L,r={},u={},v={},M={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{children:"children",name:"name",title:"",url:"url"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",url:"",autoParam:[], -otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},w=[function(b){var a=b.treeObj,c=e.event;a.bind(c.NODECREATED,function(a,c,g){j.apply(b.callback.onNodeCreated, -[a,c,g])});a.bind(c.CLICK,function(a,c,g,l,h){j.apply(b.callback.onClick,[c,g,l,h])});a.bind(c.EXPAND,function(a,c,g){j.apply(b.callback.onExpand,[a,c,g])});a.bind(c.COLLAPSE,function(a,c,g){j.apply(b.callback.onCollapse,[a,c,g])});a.bind(c.ASYNC_SUCCESS,function(a,c,g,l){j.apply(b.callback.onAsyncSuccess,[a,c,g,l])});a.bind(c.ASYNC_ERROR,function(a,c,g,l,h,e){j.apply(b.callback.onAsyncError,[a,c,g,l,h,e])});a.bind(c.REMOVE,function(a,c,g){j.apply(b.callback.onRemove,[a,c,g])});a.bind(c.SELECTED, -function(a,c,g,l){j.apply(b.callback.onSelected,[c,g,l])});a.bind(c.UNSELECTED,function(a,c,g,l){j.apply(b.callback.onUnSelected,[c,g,l])})}],x=[function(b){var a=e.event;b.treeObj.unbind(a.NODECREATED).unbind(a.CLICK).unbind(a.EXPAND).unbind(a.COLLAPSE).unbind(a.ASYNC_SUCCESS).unbind(a.ASYNC_ERROR).unbind(a.REMOVE).unbind(a.SELECTED).unbind(a.UNSELECTED)}],y=[function(b){var a=h.getCache(b);a||(a={},h.setCache(b,a));a.nodes=[];a.doms=[]}],z=[function(b,a,c,d,f,g){if(c){var l=h.getRoot(b),e=b.data.key.children; -c.level=a;c.tId=b.treeId+"_"+ ++l.zId;c.parentTId=d?d.tId:null;c.open=typeof c.open=="string"?j.eqs(c.open,"true"):!!c.open;c[e]&&c[e].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent=typeof c.isParent=="string"?j.eqs(c.isParent,"true"):!!c.isParent,c.open=c.isParent&&!b.async.enable?c.open:!1,c.zAsync=!c.isParent);c.isFirstNode=f;c.isLastNode=g;c.getParentNode=function(){return h.getNodeCache(b,c.parentTId)};c.getPreNode=function(){return h.getPreNode(b,c)};c.getNextNode=function(){return h.getNextNode(b, -c)};c.isAjaxing=!1;h.fixPIdKeyValue(b,c)}}],s=[function(b){var a=b.target,c=h.getSetting(b.data.treeId),d="",f=null,g="",l="",i=null,o=null,k=null;if(j.eqs(b.type,"mousedown"))l="mousedown";else if(j.eqs(b.type,"mouseup"))l="mouseup";else if(j.eqs(b.type,"contextmenu"))l="contextmenu";else if(j.eqs(b.type,"click"))if(j.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+e.id.SWITCH)!==null)d=j.getNodeMainDom(a).id,g="switchNode";else{if(k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}]))d=j.getNodeMainDom(k).id, -g="clickNode"}else if(j.eqs(b.type,"dblclick")&&(l="dblclick",k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}])))d=j.getNodeMainDom(k).id,g="switchNode";if(l.length>0&&d.length==0&&(k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}])))d=j.getNodeMainDom(k).id;if(d.length>0)switch(f=h.getNodeCache(c,d),g){case "switchNode":f.isParent?j.eqs(b.type,"click")||j.eqs(b.type,"dblclick")&&j.apply(c.view.dblClickExpand,[c.treeId,f],c.view.dblClickExpand)?i=G:g="":g="";break;case "clickNode":i= -H}switch(l){case "mousedown":o=I;break;case "mouseup":o=J;break;case "dblclick":o=K;break;case "contextmenu":o=L}return{stop:!1,node:f,nodeEventType:g,nodeEventCallback:i,treeEventType:l,treeEventCallback:o}}],A=[function(b){var a=h.getRoot(b);a||(a={},h.setRoot(b,a));a[b.data.key.children]=[];a.expandTriggerFlag=!1;a.curSelectedList=[];a.noSelection=!0;a.createdNodes=[];a.zId=0;a._ver=(new Date).getTime()}],B=[],C=[],D=[],E=[],F=[],h={addNodeCache:function(b,a){h.getCache(b).nodes[h.getNodeCacheId(a.tId)]= -a},getNodeCacheId:function(b){return b.substring(b.lastIndexOf("_")+1)},addAfterA:function(b){C.push(b)},addBeforeA:function(b){B.push(b)},addInnerAfterA:function(b){E.push(b)},addInnerBeforeA:function(b){D.push(b)},addInitBind:function(b){w.push(b)},addInitUnBind:function(b){x.push(b)},addInitCache:function(b){y.push(b)},addInitNode:function(b){z.push(b)},addInitProxy:function(b,a){a?s.splice(0,0,b):s.push(b)},addInitRoot:function(b){A.push(b)},addNodesData:function(b,a,c){var d=b.data.key.children; -a[d]||(a[d]=[]);if(a[d].length>0)a[d][a[d].length-1].isLastNode=!1,i.setNodeLineIcos(b,a[d][a[d].length-1]);a.isParent=!0;a[d]=a[d].concat(c)},addSelectedNode:function(b,a){var c=h.getRoot(b);h.isSelectedNode(b,a)||c.curSelectedList.push(a)},addCreatedNode:function(b,a){(b.callback.onNodeCreated||b.view.addDiyDom)&&h.getRoot(b).createdNodes.push(a)},addZTreeTools:function(b){F.push(b)},exSetting:function(b){p.extend(!0,M,b)},fixPIdKeyValue:function(b,a){b.data.simpleData.enable&&(a[b.data.simpleData.pIdKey]= -a.parentTId?a.getParentNode()[b.data.simpleData.idKey]:b.data.simpleData.rootPId)},getAfterA:function(b,a,c){for(var d=0,f=C.length;d-1&&g.push(a[l]),g=g.concat(h.getNodesByParamFuzzy(b,a[l][f],c,d));return g},getNodesByFilter:function(b,a,c,d,f){if(!a)return d?null:[];for(var g=b.data.key.children,e=d?null:[],i=0,o=a.length;i0)},clone:function(b){if(b===null)return null;var a=j.isArray(b)?[]:{},c;for(c in b)a[c]=b[c]instanceof Date?new Date(b[c].getTime()):typeof b[c]==="object"?arguments.callee(b[c]):b[c];return a},eqs:function(b,a){return b.toLowerCase()===a.toLowerCase()},isArray:function(b){return Object.prototype.toString.apply(b)==="[object Array]"},$:function(b,a,c){a&&typeof a!="string"&&(c=a,a="");return typeof b=="string"?p(b,c?c.treeObj.get(0).ownerDocument: -null):p("#"+b.tId+a,c?c.treeObj:null)},getMDom:function(b,a,c){if(!a)return null;for(;a&&a.id!==b.treeId;){for(var d=0,f=c.length;a.tagName&&d0},uCanDo:function(){return!0}},i={addNodes:function(b,a,c,d){if(!b.data.keep.leaf|| -!a||a.isParent)if(j.isArray(c)||(c=[c]),b.data.simpleData.enable&&(c=h.transformTozTreeFormat(b,c)),a){var f=k(a,e.id.SWITCH,b),g=k(a,e.id.ICON,b),l=k(a,e.id.UL,b);if(!a.open)i.replaceSwitchClass(a,f,e.folder.CLOSE),i.replaceIcoClass(a,g,e.folder.CLOSE),a.open=!1,l.css({display:"none"});h.addNodesData(b,a,c);i.createNodes(b,a.level+1,c,a);d||i.expandCollapseParentNode(b,a,!0)}else h.addNodesData(b,h.getRoot(b),c),i.createNodes(b,0,c,null)},appendNodes:function(b,a,c,d,f,g){if(!c)return[];for(var e= -[],j=b.data.key.children,k=0,m=c.length;k0&&(t=i.appendNodes(b,a+1,n[j],n,f,g&&n.open));g&&(i.makeDOMNodeMainBefore(e,b,n),i.makeDOMNodeLine(e,b,n),h.getBeforeA(b,n,e),i.makeDOMNodeNameBefore(e,b,n),h.getInnerBeforeA(b,n,e),i.makeDOMNodeIcon(e,b,n),h.getInnerAfterA(b,n,e),i.makeDOMNodeNameAfter(e,b,n),h.getAfterA(b,n,e),n.isParent&&n.open&&i.makeUlHtml(b, -n,e,t.join("")),i.makeDOMNodeMainAfter(e,b,n),h.addCreatedNode(b,n))}return e},appendParentULDom:function(b,a){var c=[],d=k(a,b);!d.get(0)&&a.parentTId&&(i.appendParentULDom(b,a.getParentNode()),d=k(a,b));var f=k(a,e.id.UL,b);f.get(0)&&f.remove();f=i.appendNodes(b,a.level+1,a[b.data.key.children],a,!1,!0);i.makeUlHtml(b,a,c,f.join(""));d.append(c.join(""))},asyncNode:function(b,a,c,d){var f,g;if(a&&!a.isParent)return j.apply(d),!1;else if(a&&a.isAjaxing)return!1;else if(j.apply(b.callback.beforeAsync, -[b.treeId,a],!0)==!1)return j.apply(d),!1;if(a)a.isAjaxing=!0,k(a,e.id.ICON,b).attr({style:"","class":e.className.BUTTON+" "+e.className.ICO_LOADING});var l={};for(f=0,g=b.async.autoParam.length;a&&f1&&(o=q[1],q=q[0]);l[o]=a[q]}if(j.isArray(b.async.otherParam))for(f=0,g=b.async.otherParam.length;f=0;f--)if(g=d[f],a===g||!a&&(!c||c!==g))if(k(g,e.id.A,b).removeClass(e.node.CURSELECTED),a){h.removeSelectedNode(b,a);b.treeObj.trigger(e.event.UNSELECTED,[m,b.treeId,g]);break}else d.splice(f,1),b.treeObj.trigger(e.event.UNSELECTED, -[m,b.treeId,g])},createNodeCallback:function(b){if(b.callback.onNodeCreated||b.view.addDiyDom)for(var a=h.getRoot(b);a.createdNodes.length>0;){var c=a.createdNodes.shift();j.apply(b.view.addDiyDom,[b.treeId,c]);b.callback.onNodeCreated&&b.treeObj.trigger(e.event.NODECREATED,[b.treeId,c])}},createNodes:function(b,a,c,d){if(c&&c.length!=0){var f=h.getRoot(b),g=b.data.key.children,g=!d||d.open||!!k(d[g][0],b).get(0);f.createdNodes=[];a=i.appendNodes(b,a,c,d,!0,g);d?(d=k(d,e.id.UL,b),d.get(0)&&d.append(a.join(""))): -b.treeObj.append(a.join(""));i.createNodeCallback(b)}},destroy:function(b){b&&(h.initCache(b),h.initRoot(b),m.unbindTree(b),m.unbindEvent(b),b.treeObj.empty(),delete r[b.treeId])},expandCollapseNode:function(b,a,c,d,f){var g=h.getRoot(b),l=b.data.key.children;if(a){if(g.expandTriggerFlag){var q=f,f=function(){q&&q();a.open?b.treeObj.trigger(e.event.EXPAND,[b.treeId,a]):b.treeObj.trigger(e.event.COLLAPSE,[b.treeId,a])};g.expandTriggerFlag=!1}if(!a.open&&a.isParent&&(!k(a,e.id.UL,b).get(0)||a[l]&&a[l].length> -0&&!k(a[l][0],b).get(0)))i.appendParentULDom(b,a),i.createNodeCallback(b);if(a.open==c)j.apply(f,[]);else{var c=k(a,e.id.UL,b),g=k(a,e.id.SWITCH,b),o=k(a,e.id.ICON,b);a.isParent?(a.open=!a.open,a.iconOpen&&a.iconClose&&o.attr("style",i.makeNodeIcoStyle(b,a)),a.open?(i.replaceSwitchClass(a,g,e.folder.OPEN),i.replaceIcoClass(a,o,e.folder.OPEN),d==!1||b.view.expandSpeed==""?(c.show(),j.apply(f,[])):a[l]&&a[l].length>0?c.slideDown(b.view.expandSpeed,f):(c.show(),j.apply(f,[]))):(i.replaceSwitchClass(a, -g,e.folder.CLOSE),i.replaceIcoClass(a,o,e.folder.CLOSE),d==!1||b.view.expandSpeed==""||!(a[l]&&a[l].length>0)?(c.hide(),j.apply(f,[])):c.slideUp(b.view.expandSpeed,f))):j.apply(f,[])}}else j.apply(f,[])},expandCollapseParentNode:function(b,a,c,d,f){a&&(a.parentTId?(i.expandCollapseNode(b,a,c,d),a.parentTId&&i.expandCollapseParentNode(b,a.getParentNode(),c,d,f)):i.expandCollapseNode(b,a,c,d,f))},expandCollapseSonNode:function(b,a,c,d,f){var g=h.getRoot(b),e=b.data.key.children,g=a?a[e]:g[e],e=a?!1: -d,j=h.getRoot(b).expandTriggerFlag;h.getRoot(b).expandTriggerFlag=!1;if(g)for(var k=0,m=g.length;k=0;d--)if(a===c[d])return!0;return!1},makeDOMNodeIcon:function(b,a,c){var d=h.getNodeName(a,c),d=a.view.nameIsHTML?d:d.replace(/&/g,"&").replace(//g,">");b.push("",d,"")},makeDOMNodeLine:function(b,a,c){b.push("")},makeDOMNodeMainAfter:function(b){b.push("")},makeDOMNodeMainBefore:function(b,a,c){b.push("
                  • ")}, -makeDOMNodeNameAfter:function(b){b.push("")},makeDOMNodeNameBefore:function(b,a,c){var d=h.getNodeTitle(a,c),f=i.makeNodeUrl(a,c),g=i.makeNodeFontCss(a,c),l=[],k;for(k in g)l.push(k,":",g[k],";");b.push("0?"href='"+f+"'":""," target='",i.makeNodeTarget(c),"' style='",l.join(""),"'");j.apply(a.view.showTitle,[a.treeId,c],a.view.showTitle)&&d&&b.push("title='",d.replace(/'/g, -"'").replace(//g,">"),"'");b.push(">")},makeNodeFontCss:function(b,a){var c=j.apply(b.view.fontCss,[b.treeId,a],b.view.fontCss);return c&&typeof c!="function"?c:{}},makeNodeIcoClass:function(b,a){var c=["ico"];a.isAjaxing||(c[0]=(a.iconSkin?a.iconSkin+"_":"")+c[0],a.isParent?c.push(a.open?e.folder.OPEN:e.folder.CLOSE):c.push(e.folder.DOCU));return e.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(b,a){var c=[];if(!a.isAjaxing){var d=a.isParent&&a.iconOpen&& -a.iconClose?a.open?a.iconOpen:a.iconClose:a.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;");(b.view.showIcon==!1||!j.apply(b.view.showIcon,[b.treeId,a],!0))&&c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(b,a){var c=[];b.view.showLine?a.level==0&&a.isFirstNode&&a.isLastNode?c.push(e.line.ROOT):a.level==0&&a.isFirstNode?c.push(e.line.ROOTS):a.isLastNode?c.push(e.line.BOTTOM):c.push(e.line.CENTER):c.push(e.line.NOLINE);a.isParent?c.push(a.open?e.folder.OPEN:e.folder.CLOSE): -c.push(e.folder.DOCU);return i.makeNodeLineClassEx(a)+c.join("_")},makeNodeLineClassEx:function(b){return e.className.BUTTON+" "+e.className.LEVEL+b.level+" "+e.className.SWITCH+" "},makeNodeTarget:function(b){return b.target||"_blank"},makeNodeUrl:function(b,a){var c=b.data.key.url;return a[c]?a[c]:null},makeUlHtml:function(b,a,c,d){c.push("
                      ");c.push(d);c.push("
                    ")}, -makeUlLineClass:function(b,a){return b.view.showLine&&!a.isLastNode?e.line.LINE:""},removeChildNodes:function(b,a){if(a){var c=b.data.key.children,d=a[c];if(d){for(var f=0,g=d.length;f0)a[c][0].isFirstNode=!0},setLastNode:function(b,a){var c=b.data.key.children,d=a[c].length;if(d>0)a[c][d-1].isLastNode=!0},removeNode:function(b,a){var c=h.getRoot(b),d=b.data.key.children,f=a.parentTId?a.getParentNode():c;a.isFirstNode=!1;a.isLastNode=!1;a.getPreNode=function(){return null};a.getNextNode=function(){return null};if(h.getNodeCache(b,a.tId)){k(a,b).remove();h.removeNodeCache(b,a);h.removeSelectedNode(b,a);for(var g=0,l=f[d].length;g0){var o=f[d][g-1],g=k(o,e.id.UL,b),l=k(o,e.id.SWITCH,b);j=k(o,e.id.ICON,b);f==c?f[d].length==1?i.replaceSwitchClass(o,l,e.line.ROOT):(c=k(f[d][0],e.id.SWITCH,b),i.replaceSwitchClass(f[d][0],c,e.line.ROOTS), -i.replaceSwitchClass(o,l,e.line.BOTTOM)):i.replaceSwitchClass(o,l,e.line.BOTTOM);g.removeClass(e.line.LINE)}}},replaceIcoClass:function(b,a,c){if(a&&!b.isAjaxing&&(b=a.attr("class"),b!=void 0)){b=b.split("_");switch(c){case e.folder.OPEN:case e.folder.CLOSE:case e.folder.DOCU:b[b.length-1]=c}a.attr("class",b.join("_"))}},replaceSwitchClass:function(b,a,c){if(a){var d=a.attr("class");if(d!=void 0){d=d.split("_");switch(c){case e.line.ROOT:case e.line.ROOTS:case e.line.CENTER:case e.line.BOTTOM:case e.line.NOLINE:d[0]= -i.makeNodeLineClassEx(b)+c;break;case e.folder.OPEN:case e.folder.CLOSE:case e.folder.DOCU:d[1]=c}a.attr("class",d.join("_"));c!==e.folder.DOCU?a.removeAttr("disabled"):a.attr("disabled","disabled")}}},selectNode:function(b,a,c){c||i.cancelPreSelectedNode(b,null,a);k(a,e.id.A,b).addClass(e.node.CURSELECTED);h.addSelectedNode(b,a);b.treeObj.trigger(e.event.SELECTED,[m,b.treeId,a])},setNodeFontCss:function(b,a){var c=k(a,e.id.A,b),d=i.makeNodeFontCss(b,a);d&&c.css(d)},setNodeLineIcos:function(b,a){if(a){var c= -k(a,e.id.SWITCH,b),d=k(a,e.id.UL,b),f=k(a,e.id.ICON,b),g=i.makeUlLineClass(b,a);g.length==0?d.removeClass(e.line.LINE):d.addClass(g);c.attr("class",i.makeNodeLineClass(b,a));a.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled");f.removeAttr("style");f.attr("style",i.makeNodeIcoStyle(b,a));f.attr("class",i.makeNodeIcoClass(b,a))}},setNodeName:function(b,a){var c=h.getNodeTitle(b,a),d=k(a,e.id.SPAN,b);d.empty();b.view.nameIsHTML?d.html(h.getNodeName(b,a)):d.text(h.getNodeName(b,a));j.apply(b.view.showTitle, -[b.treeId,a],b.view.showTitle)&&k(a,e.id.A,b).attr("title",!c?"":c)},setNodeTarget:function(b,a){k(a,e.id.A,b).attr("target",i.makeNodeTarget(a))},setNodeUrl:function(b,a){var c=k(a,e.id.A,b),d=i.makeNodeUrl(b,a);d==null||d.length==0?c.removeAttr("href"):c.attr("href",d)},switchNode:function(b,a){a.open||!j.canAsync(b,a)?i.expandCollapseNode(b,a,!a.open):b.async.enable?i.asyncNode(b,a)||i.expandCollapseNode(b,a,!a.open):a&&i.expandCollapseNode(b,a,!a.open)}};p.fn.zTree={consts:{className:{BUTTON:"button", -LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch"},event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove",SELECTED:"ztree_selected",UNSELECTED:"ztree_unselected"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close", -DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_z:{tools:j,view:i,event:m,data:h},getZTreeObj:function(b){return(b=h.getZTreeTools(b))?b:null},destroy:function(b){if(b&&b.length>0)i.destroy(h.getSetting(b));else for(var a in r)i.destroy(r[a])},init:function(b,a,c){var d=j.clone(M);p.extend(!0,d,a);d.treeId=b.attr("id");d.treeObj=b;d.treeObj.empty();r[d.treeId]=d;if(typeof document.body.style.maxHeight==="undefined")d.view.expandSpeed="";h.initRoot(d);b=h.getRoot(d);a=d.data.key.children;c=c?j.clone(j.isArray(c)? -c:[c]):[];b[a]=d.data.simpleData.enable?h.transformTozTreeFormat(d,c):c;h.initCache(d);m.unbindTree(d);m.bindTree(d);m.unbindEvent(d);m.bindEvent(d);c={setting:d,addNodes:function(a,b,c){function e(){i.addNodes(d,a,h,c==!0)}if(!b)return null;a||(a=null);if(a&&!a.isParent&&d.data.keep.leaf)return null;var h=j.clone(j.isArray(b)?b:[b]);j.canAsync(d,a)?i.asyncNode(d,a,c,e):e();return h},cancelSelectedNode:function(a){i.cancelPreSelectedNode(d,a)},destroy:function(){i.destroy(d)},expandAll:function(a){a= -!!a;i.expandCollapseSonNode(d,null,a,!0);return a},expandNode:function(a,b,c,e,m){if(!a||!a.isParent)return null;b!==!0&&b!==!1&&(b=!a.open);if((m=!!m)&&b&&j.apply(d.callback.beforeExpand,[d.treeId,a],!0)==!1)return null;else if(m&&!b&&j.apply(d.callback.beforeCollapse,[d.treeId,a],!0)==!1)return null;b&&a.parentTId&&i.expandCollapseParentNode(d,a.getParentNode(),b,!1);if(b===a.open&&!c)return null;h.getRoot(d).expandTriggerFlag=m;if(!j.canAsync(d,a)&&c)i.expandCollapseSonNode(d,a,b,!0,function(){if(e!== -!1)try{k(a,d).focus().blur()}catch(b){}});else if(a.open=!b,i.switchNode(this.setting,a),e!==!1)try{k(a,d).focus().blur()}catch(p){}return b},getNodes:function(){return h.getNodes(d)},getNodeByParam:function(a,b,c){return!a?null:h.getNodeByParam(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodeByTId:function(a){return h.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return!a?null:h.getNodesByParam(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodesByParamFuzzy:function(a,b,c){return!a? -null:h.getNodesByParamFuzzy(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodesByFilter:function(a,b,c,e){b=!!b;return!a||typeof a!="function"?b?null:[]:h.getNodesByFilter(d,c?c[d.data.key.children]:h.getNodes(d),a,b,e)},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():h.getRoot(d),e=0,i=c[b].length;e0?i.createNodes(d,0,b[a]):d.async.enable&& -d.async.url&&d.async.url!==""&&i.asyncNode(d);return c}};var N=p.fn.zTree,k=j.$,e=N.consts})(jQuery); diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/zTreeStyleForApi.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/zTreeStyleForApi.css deleted file mode 100644 index bb4717bc..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/apiCss/zTreeStyleForApi.css +++ /dev/null @@ -1,49 +0,0 @@ -/*------------------------------------- -zTree Style - -version: 3.0 -author: Hunter.z -email: hunter.z@263.net -website: http://code.google.com/p/jquerytree/ - --------------------------------------*/ - -.ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif} -.ztree {margin:0; padding:5px; color:#333} -.ztree li{padding:0; margin:0; list-style:none; line-height:14px; text-align:left; white-space:nowrap} -.ztree li ul{ margin:0; padding:0 0 0 18px} -.ztree li ul.line{ background:url(./img/line_conn.gif) 0 0 repeat-y;} - -.ztree li a {padding:1px 3px 0 0; margin:0; cursor:pointer; color:#333; height:17px; text-decoration:none; vertical-align:top; display: inline-block} -.ztree li a:hover {text-decoration:none} -.ztree li a.curSelectedNode {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid;} -.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8; filter:alpha(opacity=80)} -.ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#316AC5; color:white; height:16px; border:1px #316AC5 solid; opacity:0.8; filter:alpha(opacity=80)} -.ztree li a.tmpTargetNode_prev {} -.ztree li a.tmpTargetNode_next {} -.ztree li a input.rename {height:14px; width:80px; padding:0; margin:0; - font-size:12px; border:1px #7EC4CC solid; *border:0px} -.ztree li span {line-height:16px; margin-right: 2px} -.ztree li span.button {line-height:0; margin:0;width:16px; height:16px; display: inline-block; vertical-align:middle; - border:0 none; cursor: pointer; - background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; - background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")} - -.ztree li span.button.switch {width:1px; height:18px; visibility: hidden} - -.zTreeDragUL {margin:0; padding:0; position:absolute; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)} -.zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute} - -/* level 等级样式*/ -/*.ztree li button.level0 { - display:none; -} -.ztree li ul.level0 { - padding:0; - background:none; -}*/ - -.ztree li span.button.core_ico_docu{margin-right:2px; background-position:-126px 0; vertical-align:top; *vertical-align:middle} -.ztree li span.button.check_ico_docu{margin-right:2px; background-position:-126px -16px; vertical-align:top; *vertical-align:middle} -.ztree li span.button.edit_ico_docu{margin-right:2px; background-position:-126px -32px; vertical-align:top; *vertical-align:middle} -.ztree li span.button.hide_ico_docu{margin-right:2px; background-position:-160px 0; vertical-align:top; *vertical-align:middle} diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/fn.zTree._z.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/fn.zTree._z.html deleted file mode 100644 index 7af3e40d..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/fn.zTree._z.html +++ /dev/null @@ -1,13 +0,0 @@ -
                    -
                    -

                    JSON$.fn.zTree._z

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/fn.zTree.destroy.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/fn.zTree.destroy.html deleted file mode 100644 index 71058076..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/fn.zTree.destroy.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    Function(treeId)$.fn.zTree.destroy

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

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

                    -

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

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

                    zTree 的 DOM 容器的 id

                    -

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

                    -

                    返回值无

                    -

                    目前无任何返回值

                    -
                    -

                    function 举例

                    -

                    1. 销毁 id 为 "treeDemo" 的 zTree

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

                    2. 销毁全部 的 zTree

                    -
                    $.fn.zTree.destroy();
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/fn.zTree.getZTreeObj.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/fn.zTree.getZTreeObj.html deleted file mode 100644 index b1d1db40..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/fn.zTree.getZTreeObj.html +++ /dev/null @@ -1,24 +0,0 @@ -
                    -
                    -

                    Function(treeId)$.fn.zTree.getZTreeObj

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

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

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

                    zTree 的 DOM 容器的 id

                    -

                    返回值JSON

                    -

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

                    -
                    -

                    function 举例

                    -

                    1. 获取 id 为 tree 的 zTree 对象

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/fn.zTree.init.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/fn.zTree.init.html deleted file mode 100644 index 8db6d2c7..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/fn.zTree.init.html +++ /dev/null @@ -1,74 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

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

                    -

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

                    -

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

                    -

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

                    -

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

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    objjQuery Object

                    -

                    用于展现 zTree 的 DOM 容器

                    -

                    zSettingJSON

                    -

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

                    -

                    zNodesArray(JSON) / JSON

                    -

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

                    -

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

                    -

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

                    -

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

                    -

                    返回值JSON

                    -

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

                    -

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

                    -
                    -

                    setting & function 举例

                    -

                    1. 简单创建 zTree 演示

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

                    Array(String)setting.async.autoParam

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:[ ]

                    -
                    -
                    -

                    Array(String) 格式说明

                    -
                    -

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

                    -

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

                    -
                    -

                    setting 举例

                    -

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

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

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

                    -
                    var setting = {
                    -	async: {
                    -		enable: true,
                    -		url: "http://host/getNode.php",
                    -		autoParam: ["id=zId"]
                    -	}
                    -};
                    -假设 对父节点 node = {id:1, name:"test"},进行异步加载时,将提交参数 zId=1
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.async.contentType.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.async.contentType.html deleted file mode 100644 index db0c92fe..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.async.contentType.html +++ /dev/null @@ -1,29 +0,0 @@ -
                    -
                    -

                    Stringsetting.async.contentType

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -
                    -
                    -

                    String 格式说明

                    -
                    -

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

                    -

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

                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	async: {
                    -		enable: true,
                    -		contentType: "application/json",
                    -		url: "http://host/getNode.php",
                    -		autoParam: ["id", "name"]
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.async.dataFilter.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.async.dataFilter.html deleted file mode 100644 index f174bf0f..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.async.dataFilter.html +++ /dev/null @@ -1,45 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    parentNodeJSON

                    -

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

                    -

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

                    -

                    responseDataArray(JSON) / JSON / String

                    -

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

                    -

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

                    -

                    返回值Array(JSON) / JSON

                    -

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

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function ajaxDataFilter(treeId, parentNode, responseData) {
                    -    if (responseData) {
                    -      for(var i =0; i < responseData.length; i++) {
                    -        responseData[i].name += "_filter";
                    -      }
                    -    }
                    -    return responseData;
                    -};
                    -var setting = {
                    -	async: {
                    -		enable: true,
                    -		url: "http://host/getNode.php",
                    -		dataFilter: ajaxDataFilter
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.async.dataType.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.async.dataType.html deleted file mode 100644 index 6d639b70..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.async.dataType.html +++ /dev/null @@ -1,29 +0,0 @@ -
                    -
                    -

                    Stringsetting.async.dataType

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:"text"

                    -
                    -
                    -

                    String 格式说明

                    -
                    -

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

                    -

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

                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	async: {
                    -		enable: true,
                    -		dataType: "text",
                    -		url: "http://host/getNode.php",
                    -		autoParam: ["id", "name"]
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.async.enable.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.async.enable.html deleted file mode 100644 index 9079ae10..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.async.enable.html +++ /dev/null @@ -1,30 +0,0 @@ -
                    -
                    -

                    Booleansetting.async.enable

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:false

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

                    true 表示 开启 异步加载模式

                    -

                    false 表示 关闭 异步加载模式

                    -

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

                    -

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

                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	async: {
                    -		enable: true,
                    -		url: "http://host/getNode.php",
                    -		autoParam: ["id", "name"]
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.async.otherParam.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.async.otherParam.html deleted file mode 100644 index 981715f1..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.async.otherParam.html +++ /dev/null @@ -1,40 +0,0 @@ -
                    -
                    -

                    Array(String) / JSONsetting.async.otherParam

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:[ ]

                    -
                    -
                    -

                    Array(String) 格式说明

                    -
                    -

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

                    -
                    -

                    JSON 格式说明

                    -
                    -

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

                    -
                    -

                    setting 举例

                    -

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

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

                    2. 设置 JSON 格式的参数

                    -
                    var setting = {
                    -	async: {
                    -		enable: true,
                    -		url: "http://host/getNode.php",
                    -		otherParam: { "id":"1", "name":"test"}
                    -	}
                    -};
                    -进行异步加载时,将提交参数 id=1&name=test
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.async.type.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.async.type.html deleted file mode 100644 index 20d9a6b8..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.async.type.html +++ /dev/null @@ -1,30 +0,0 @@ -
                    -
                    -

                    Stringsetting.async.type

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:"post"

                    -
                    -
                    -

                    String 格式说明

                    -
                    -

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

                    -

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

                    -

                    对应于 jQuery ajax 中的 type 参数

                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	async: {
                    -		enable: true,
                    -		type: "get",
                    -		url: "http://host/getNode.php",
                    -		autoParam: ["id", "name"]
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.async.url.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.async.url.html deleted file mode 100644 index a5209afa..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.async.url.html +++ /dev/null @@ -1,50 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:""

                    -
                    -
                    -

                    String 格式说明

                    -
                    -

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

                    -

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

                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

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

                    -

                    返回值String

                    -

                    返回值同 String 格式的数据

                    -
                    -

                    setting & function 举例

                    -

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

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

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

                    -
                    function getAsyncUrl(treeId, treeNode) {
                    -    return treeNode.isParent ? "nodes1.php" : "nodes2.php";
                    -};
                    -var setting = {
                    -	async: {
                    -		enable: true,
                    -		url: getAsyncUrl,
                    -		autoParam: ["id", "name"]
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeAsync.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeAsync.html deleted file mode 100644 index 70ba0fc4..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeAsync.html +++ /dev/null @@ -1,35 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.callback.beforeAsync

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

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

                    -

                    返回值Boolean

                    -

                    返回值是 true / false

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeBeforeAsync(treeId, treeNode) {
                    -    return (treeNode.id !== 1);
                    -};
                    -var setting = {
                    -	callback: {
                    -		beforeAsync: zTreeBeforeAsync
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeCheck.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeCheck.html deleted file mode 100644 index a0e1f42f..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeCheck.html +++ /dev/null @@ -1,34 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.callback.beforeCheck

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

                    返回值Boolean

                    -

                    返回值是 true / false

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeBeforeCheck(treeId, treeNode) {
                    -    return false;
                    -};
                    -var setting = {
                    -	callback: {
                    -		beforeCheck: zTreeBeforeCheck
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeClick.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeClick.html deleted file mode 100644 index 6efe9286..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeClick.html +++ /dev/null @@ -1,49 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

                    被单击的节点 JSON 数据对象

                    -

                    clickFlagNumber

                    -

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

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

                    返回值Boolean

                    -

                    返回值是 true / false

                    -

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

                    -
                    -

                    setting & function 举例

                    -

                    1. 禁止节点被选中

                    -
                    function zTreeBeforeClick(treeId, treeNode, clickFlag) {
                    -    return (treeNode.id !== 1);
                    -};
                    -var setting = {
                    -	callback: {
                    -		beforeClick: zTreeBeforeClick
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeCollapse.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeCollapse.html deleted file mode 100644 index d778e9c8..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeCollapse.html +++ /dev/null @@ -1,34 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.callback.beforeCollapse

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

                    返回值Boolean

                    -

                    返回值是 true / false

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeBeforeCollapse(treeId, treeNode) {
                    -    return false;
                    -};
                    -var setting = {
                    -	callback: {
                    -		beforeCollapse: zTreeBeforeCollapse
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeDblClick.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeDblClick.html deleted file mode 100644 index ed7e4dc2..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeDblClick.html +++ /dev/null @@ -1,36 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.callback.beforeDblClick

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

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

                    -

                    返回值Boolean

                    -

                    返回值是 true / false

                    -

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

                    -

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

                    -
                    -

                    setting & function 举例

                    -

                    1. 禁止 onDblClick 事件

                    -
                    function zTreeBeforeDblClick(treeId, treeNode) {
                    -    return false;
                    -};
                    -var setting = {
                    -	callback: {
                    -		beforeDblClick: zTreeBeforeDblClick
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeDrag.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeDrag.html deleted file mode 100644 index 1e783a3c..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeDrag.html +++ /dev/null @@ -1,39 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNodes)setting.callback.beforeDrag

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodesArray(JSON)

                    -

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

                    -

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

                    -

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

                    -

                    返回值Boolean

                    -

                    返回值是 true / false

                    -

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

                    -
                    -

                    setting & function 举例

                    -

                    1. 禁止全部拖拽操作

                    -
                    function zTreeBeforeDrag(treeId, treeNodes) {
                    -    return false;
                    -};
                    -var setting = {
                    -	edit: {
                    -		enable: true
                    -	},
                    -	callback: {
                    -		beforeDrag: zTreeBeforeDrag
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeDragOpen.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeDragOpen.html deleted file mode 100644 index ceab2d34..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeDragOpen.html +++ /dev/null @@ -1,37 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.callback.beforeDragOpen

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

                    返回值Boolean

                    -

                    返回值是 true / false

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeBeforeDragOpen(treeId, treeNode) {
                    -    return false;
                    -};
                    -var setting = {
                    -	edit: {
                    -		enable: true
                    -	},
                    -	callback: {
                    -		beforeDragOpen: zTreeBeforeDragOpen
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeDrop.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeDrop.html deleted file mode 100644 index 41237434..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeDrop.html +++ /dev/null @@ -1,48 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:null

                    -

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

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodesArray(JSON)

                    -

                    被拖拽的节点 JSON 数据集合

                    -

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

                    -

                    targetNodeJSON

                    -

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

                    -

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

                    -

                    moveTypeString

                    -

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

                    -

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

                    -

                    isCopyBoolean

                    -

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

                    -

                    true:复制;false:移动

                    -

                    返回值Boolean

                    -

                    返回值是 true / false

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeBeforeDrop(treeId, treeNodes, targetNode, moveType) {
                    -    return !(targetNode == null || (moveType != "inner" && !targetNode.parentTId));
                    -};
                    -var setting = {
                    -	edit: {
                    -		enable: true
                    -	},
                    -	callback: {
                    -		beforeDrop: zTreeBeforeDrop
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeEditName.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeEditName.html deleted file mode 100644 index 9df3ca2c..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeEditName.html +++ /dev/null @@ -1,38 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.callback.beforeEditName

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

                    返回值Boolean

                    -

                    返回值是 true / false

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeBeforeEditName(treeId, treeNode) {
                    -	return !treeNode.isParent;
                    -}
                    -var setting = {
                    -	edit: {
                    -		enable: true
                    -	},
                    -	callback: {
                    -		beforeEditName: zTreeBeforeEditName
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeExpand.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeExpand.html deleted file mode 100644 index 350972b7..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeExpand.html +++ /dev/null @@ -1,34 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.callback.beforeExpand

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

                    返回值Boolean

                    -

                    返回值是 true / false

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeBeforeExpand(treeId, treeNode) {
                    -    return false;
                    -};
                    -var setting = {
                    -	callback: {
                    -		beforeExpand: zTreeBeforeExpand
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeMouseDown.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeMouseDown.html deleted file mode 100644 index 2c3f28d8..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeMouseDown.html +++ /dev/null @@ -1,35 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.callback.beforeMouseDown

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

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

                    -

                    返回值Boolean

                    -

                    返回值是 true / false

                    -

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

                    -
                    -

                    setting & function 举例

                    -

                    1. 禁止 onMouseDown 事件

                    -
                    function zTreeBeforeMouseDown(treeId, treeNode) {
                    -    return false;
                    -};
                    -var setting = {
                    -	callback: {
                    -		beforeMouseDown: zTreeBeforeMouseDown
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeMouseUp.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeMouseUp.html deleted file mode 100644 index f0b01b97..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeMouseUp.html +++ /dev/null @@ -1,35 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.callback.beforeMouseUp

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

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

                    -

                    返回值Boolean

                    -

                    返回值是 true / false

                    -

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

                    -
                    -

                    setting & function 举例

                    -

                    1. 禁止 onMouseUp 事件

                    -
                    function zTreeBeforeMouseUp(treeId, treeNode) {
                    -    return false;
                    -};
                    -var setting = {
                    -	callback: {
                    -		beforeMouseUp: zTreeBeforeMouseUp
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeRemove.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeRemove.html deleted file mode 100644 index 0edb3fd0..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeRemove.html +++ /dev/null @@ -1,37 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.callback.beforeRemove

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

                    返回值Boolean

                    -

                    返回值是 true / false

                    -

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

                    -
                    -

                    setting & function 举例

                    -

                    1. 禁止全部删除操作

                    -
                    function zTreeBeforeRemove(treeId, treeNode) {
                    -	return false;
                    -}
                    -var setting = {
                    -	edit: {
                    -		enable: true
                    -	},
                    -	callback: {
                    -		beforeRemove: zTreeBeforeRemove
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeRename.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeRename.html deleted file mode 100644 index 07099619..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeRename.html +++ /dev/null @@ -1,46 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

                    newNameString

                    -

                    修改后的新名称

                    -

                    isCancelBoolean

                    -

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

                    -

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

                    -

                    isCancel = false 表示确认修改操作

                    -

                    返回值Boolean

                    -

                    返回值是 true / false

                    -

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

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeBeforeRename(treeId, treeNode, newName, isCancel) {
                    -	return newName.length > 5;
                    -}
                    -var setting = {
                    -	edit: {
                    -		enable: true
                    -	},
                    -	callback: {
                    -		beforeRename: zTreeBeforeRename
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeRightClick.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeRightClick.html deleted file mode 100644 index 1a5bdaa3..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.beforeRightClick.html +++ /dev/null @@ -1,35 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.callback.beforeRightClick

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

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

                    -

                    返回值Boolean

                    -

                    返回值是 true / false

                    -

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

                    -
                    -

                    setting & function 举例

                    -

                    1. 禁止 onRightClick 事件

                    -
                    function zTreeBeforeRightClick(treeId, treeNode) {
                    -    return false;
                    -};
                    -var setting = {
                    -	callback: {
                    -		beforeRightClick: zTreeBeforeRightClick
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onAsyncError.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onAsyncError.html deleted file mode 100644 index c469e113..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onAsyncError.html +++ /dev/null @@ -1,42 +0,0 @@ -
                    -
                    -

                    setting.callback.onAsyncError

                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    eventjs event 对象

                    -

                    标准的 js event 对象

                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

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

                    -

                    XMLHttpRequestString

                    -

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

                    -

                    textStatusString

                    -

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

                    -

                    errorThrownString

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeOnAsyncError(event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown) {
                    -    alert(XMLHttpRequest);
                    -};
                    -var setting = {
                    -	callback: {
                    -		onAsyncError: zTreeOnAsyncError
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onAsyncSuccess.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onAsyncSuccess.html deleted file mode 100644 index 081e9d73..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onAsyncSuccess.html +++ /dev/null @@ -1,38 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    eventjs event 对象

                    -

                    标准的 js event 对象

                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

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

                    -

                    msgString / Object

                    -

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

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeOnAsyncSuccess(event, treeId, treeNode, msg) {
                    -    alert(msg);
                    -};
                    -var setting = {
                    -	callback: {
                    -		onAsyncSuccess: zTreeOnAsyncSuccess
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onCheck.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onCheck.html deleted file mode 100644 index 113eee97..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onCheck.html +++ /dev/null @@ -1,34 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    eventjs event 对象

                    -

                    标准的 js event 对象

                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeOnCheck(event, treeId, treeNode) {
                    -    alert(treeNode.tId + ", " + treeNode.name + "," + treeNode.checked);
                    -};
                    -var setting = {
                    -	callback: {
                    -		onCheck: zTreeOnCheck
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onClick.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onClick.html deleted file mode 100644 index 1f7a2664..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onClick.html +++ /dev/null @@ -1,49 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    eventjs event 对象

                    -

                    标准的 js event 对象

                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

                    被点击的节点 JSON 数据对象

                    -

                    clickFlagNumber

                    -

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

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

                    setting & function 举例

                    -

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

                    -
                    function zTreeOnClick(event, treeId, treeNode) {
                    -    alert(treeNode.tId + ", " + treeNode.name);
                    -};
                    -var setting = {
                    -	callback: {
                    -		onClick: zTreeOnClick
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onCollapse.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onCollapse.html deleted file mode 100644 index 1c816c20..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onCollapse.html +++ /dev/null @@ -1,34 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    eventjs event 对象

                    -

                    标准的 js event 对象

                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

                    被折叠的节点 JSON 数据对象

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeOnCollapse(event, treeId, treeNode) {
                    -    alert(treeNode.tId + ", " + treeNode.name);
                    -};
                    -var setting = {
                    -	callback: {
                    -		onCollapse: zTreeOnCollapse
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onDblClick.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onDblClick.html deleted file mode 100644 index deb8e626..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onDblClick.html +++ /dev/null @@ -1,35 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    eventjs event 对象

                    -

                    标准的 js event 对象

                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeOnDblClick(event, treeId, treeNode) {
                    -    alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
                    -};
                    -var setting = {
                    -	callback: {
                    -		onDblClick: zTreeOnDblClick
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onDrag.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onDrag.html deleted file mode 100644 index efd115bd..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onDrag.html +++ /dev/null @@ -1,34 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    eventjs event 对象

                    -

                    标准的 js event 对象

                    -

                    treeIdString

                    -

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

                    -

                    treeNodesArray(JSON)

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeOnDrag(event, treeId, treeNodes) {
                    -    alert(treeNodes.length);
                    -};
                    -var setting = {
                    -	callback: {
                    -		onDrag: zTreeOnDrag
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onDragMove.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onDragMove.html deleted file mode 100644 index e6a8dd9e..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onDragMove.html +++ /dev/null @@ -1,34 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    eventjs event 对象

                    -

                    标准的 js event 对象

                    -

                    treeIdString

                    -

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

                    -

                    treeNodesArray(JSON)

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeOnDragMove(event, treeId, treeNodes) {
                    -    console.log(event.target);
                    -};
                    -var setting = {
                    -	callback: {
                    -		onDragMove: zTreeOnDragMove
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onDrop.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onDrop.html deleted file mode 100644 index c6773a88..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onDrop.html +++ /dev/null @@ -1,46 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    eventjs event 对象

                    -

                    标准的 js event 对象

                    -

                    treeIdString

                    -

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

                    -

                    treeNodesArray(JSON)

                    -

                    被拖拽的节点 JSON 数据集合

                    -

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

                    -

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

                    -

                    targetNodeJSON

                    -

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

                    -

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

                    -

                    moveTypeString

                    -

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

                    -

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

                    -

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

                    -

                    isCopyBoolean

                    -

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

                    -

                    true:复制;false:移动

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeOnDrop(event, treeId, treeNodes, targetNode, moveType) {
                    -    alert(treeNodes.length + "," + (targetNode ? (targetNode.tId + ", " + targetNode.name) : "isRoot" ));
                    -};
                    -var setting = {
                    -	callback: {
                    -		onDrop: zTreeOnDrop
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onExpand.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onExpand.html deleted file mode 100644 index 791c5f6f..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onExpand.html +++ /dev/null @@ -1,34 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    eventjs event 对象

                    -

                    标准的 js event 对象

                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

                    被展开的节点 JSON 数据对象

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeOnExpand(event, treeId, treeNode) {
                    -    alert(treeNode.tId + ", " + treeNode.name);
                    -};
                    -var setting = {
                    -	callback: {
                    -		onExpand: zTreeOnExpand
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onMouseDown.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onMouseDown.html deleted file mode 100644 index bc9d0ea7..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onMouseDown.html +++ /dev/null @@ -1,35 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    eventjs event 对象

                    -

                    标准的 js event 对象

                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeOnMouseDown(event, treeId, treeNode) {
                    -    alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
                    -};
                    -var setting = {
                    -	callback: {
                    -		onMouseDown: zTreeOnMouseDown
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onMouseUp.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onMouseUp.html deleted file mode 100644 index a969fef9..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onMouseUp.html +++ /dev/null @@ -1,35 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    eventjs event 对象

                    -

                    标准的 js event 对象

                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeOnMouseUp(event, treeId, treeNode) {
                    -    alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
                    -};
                    -var setting = {
                    -	callback: {
                    -		onMouseUp: zTreeOnMouseUp
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onNodeCreated.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onNodeCreated.html deleted file mode 100644 index 2ebaee63..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onNodeCreated.html +++ /dev/null @@ -1,35 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    eventjs event 对象

                    -

                    标准的 js event 对象

                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeOnNodeCreated(event, treeId, treeNode) {
                    -    alert(treeNode.tId + ", " + treeNode.name);
                    -};
                    -var setting = {
                    -	callback: {
                    -		onNodeCreated: zTreeOnNodeCreated
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onRemove.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onRemove.html deleted file mode 100644 index e7e625d9..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onRemove.html +++ /dev/null @@ -1,34 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    eventjs event 对象

                    -

                    标准的 js event 对象

                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeOnRemove(event, treeId, treeNode) {
                    -	alert(treeNode.tId + ", " + treeNode.name);
                    -}
                    -var setting = {
                    -	callback: {
                    -		onRemove: zTreeOnRemove
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onRename.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onRename.html deleted file mode 100644 index f225463f..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onRename.html +++ /dev/null @@ -1,40 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

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

                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    eventjs event 对象

                    -

                    标准的 js event 对象

                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

                    isCancelBoolean

                    -

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

                    -

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

                    -

                    isCancel = false 表示确认修改操作

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeOnRename(event, treeId, treeNode, isCancel) {
                    -	alert(treeNode.tId + ", " + treeNode.name);
                    -}
                    -var setting = {
                    -	callback: {
                    -		onRename: zTreeOnRename
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onRightClick.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onRightClick.html deleted file mode 100644 index d51c68d1..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.callback.onRightClick.html +++ /dev/null @@ -1,36 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    eventjs event 对象

                    -

                    标准的 js event 对象

                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    function zTreeOnRightClick(event, treeId, treeNode) {
                    -    alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
                    -};
                    -var setting = {
                    -	callback: {
                    -		onRightClick: zTreeOnRightClick
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.check.autoCheckTrigger.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.check.autoCheckTrigger.html deleted file mode 100644 index d1efd770..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.check.autoCheckTrigger.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    Booleansetting.check.autoCheckTrigger

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

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

                    -

                    默认值: false

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	check: {
                    -		enable: true,
                    -		autoCheckTrigger: true
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.check.chkDisabledInherit.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.check.chkDisabledInherit.html deleted file mode 100644 index 8af1c2c6..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.check.chkDisabledInherit.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    Booleansetting.check.chkDisabledInherit

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值: false

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -

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

                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	check: {
                    -		enable: true,
                    -		chkDisabledInherit: true
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.check.chkStyle.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.check.chkStyle.html deleted file mode 100644 index 9706c134..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.check.chkStyle.html +++ /dev/null @@ -1,48 +0,0 @@ -
                    -
                    -

                    Stringsetting.check.chkStyle

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:"checkbox"

                    -
                    -
                    -

                    String 格式说明

                    -
                    -

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

                    -

                    请注意大小写,不要改变

                    -
                    -

                    checkbox 状态说明

                    -
                    -

                    -
                    -

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

                    -

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

                    -

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

                    -

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

                    -
                    -
                    -

                    radio 状态说明

                    -
                    -

                    -
                    -

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

                    -

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

                    -

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

                    -

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

                    -
                    -
                    -

                    setting 举例

                    -

                    1. 设置选择框为 radio

                    -
                    var setting = {
                    -	check: {
                    -		enable: true,
                    -		chkStyle: "radio"
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.check.chkboxType.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.check.chkboxType.html deleted file mode 100644 index da06b6ca..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.check.chkboxType.html +++ /dev/null @@ -1,31 +0,0 @@ -
                    -
                    -

                    JSONsetting.check.chkboxType

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -
                    -
                    -

                    JSON 格式说明

                    -
                    -

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

                    -

                    请注意大小写,不要改变

                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	check: {
                    -		enable: true,
                    -		chkStyle: "checkbox",
                    -		chkboxType: { "Y": "p", "N": "s" }
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.check.enable.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.check.enable.html deleted file mode 100644 index 8b1387e3..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.check.enable.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    Booleansetting.check.enable

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值: false

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -
                    -

                    setting 举例

                    -

                    1. 需要显示 checkbox

                    -
                    var setting = {
                    -	check: {
                    -		enable: true
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.check.nocheckInherit.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.check.nocheckInherit.html deleted file mode 100644 index caf99028..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.check.nocheckInherit.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    Booleansetting.check.nocheckInherit

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值: false

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -

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

                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	check: {
                    -		enable: true,
                    -		nocheckInherit: true
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.check.radioType.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.check.radioType.html deleted file mode 100644 index 19f84cad..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.check.radioType.html +++ /dev/null @@ -1,29 +0,0 @@ -
                    -
                    -

                    Stringsetting.check.radioType

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:"level"

                    -
                    -
                    -

                    String 格式说明

                    -
                    -

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

                    -

                    请注意大小写,不要改变

                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	check: {
                    -		enable: true,
                    -		chkStyle: "radio",
                    -		radioType: "all"
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.keep.leaf.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.keep.leaf.html deleted file mode 100644 index af3a7211..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.keep.leaf.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    Booleansetting.data.keep.leaf

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:false

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -

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

                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	data: {
                    -		keep: {
                    -			leaf: true
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.keep.parent.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.keep.parent.html deleted file mode 100644 index c4975df2..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.keep.parent.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    Booleansetting.data.keep.parent

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:false

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -

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

                    -
                    -

                    setting 举例

                    -

                    1. 需要锁定父节点状态

                    -
                    var setting = {
                    -	data: {
                    -		keep: {
                    -			parent: true
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.key.checked.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.key.checked.html deleted file mode 100644 index ac9fdc1d..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.key.checked.html +++ /dev/null @@ -1,24 +0,0 @@ -
                    -
                    -

                    Stringsetting.data.key.checked

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:"checked"

                    -

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

                    -
                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	data: {
                    -		key: {
                    -			checked: "isChecked"
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.key.children.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.key.children.html deleted file mode 100644 index 66a49a7e..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.key.children.html +++ /dev/null @@ -1,23 +0,0 @@ -
                    -
                    -

                    Stringsetting.data.key.children

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:"children"

                    -
                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	data: {
                    -		key: {
                    -			children: "nodes"
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.key.name.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.key.name.html deleted file mode 100644 index c25d250a..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.key.name.html +++ /dev/null @@ -1,23 +0,0 @@ -
                    -
                    -

                    Stringsetting.data.key.name

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:"name"

                    -
                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	data: {
                    -		key: {
                    -			name: "ename"
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.key.title.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.key.title.html deleted file mode 100644 index 43e68554..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.key.title.html +++ /dev/null @@ -1,24 +0,0 @@ -
                    -
                    -

                    Stringsetting.data.key.title

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:""

                    -
                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	data: {
                    -		key: {
                    -			title: "fullName"
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.key.url.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.key.url.html deleted file mode 100644 index e534d985..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.key.url.html +++ /dev/null @@ -1,24 +0,0 @@ -
                    -
                    -

                    Stringsetting.data.key.url

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:"url"

                    -
                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	data: {
                    -		key: {
                    -			url: "xUrl"
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.simpleData.enable.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.simpleData.enable.html deleted file mode 100644 index 5d7bd42f..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.simpleData.enable.html +++ /dev/null @@ -1,38 +0,0 @@ -
                    -
                    -

                    Booleansetting.data.simpleData.enable

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:false

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -

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

                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	data: {
                    -		simpleData: {
                    -			enable: true,
                    -			idKey: "id",
                    -			pIdKey: "pId",
                    -			rootPId: 0
                    -		}
                    -	}
                    -};
                    -var treeNodes = [
                    -    {"id":1, "pId":0, "name":"test1"},
                    -    {"id":11, "pId":1, "name":"test11"},
                    -    {"id":12, "pId":1, "name":"test12"},
                    -    {"id":111, "pId":11, "name":"test111"}
                    -];
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.simpleData.idKey.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.simpleData.idKey.html deleted file mode 100644 index 5b3ffd46..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.simpleData.idKey.html +++ /dev/null @@ -1,32 +0,0 @@ -
                    -
                    -

                    Stringsetting.data.simpleData.idKey

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:"id"

                    -
                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	data: {
                    -		simpleData: {
                    -			enable: true,
                    -			idKey: "id",
                    -			pIdKey: "pId",
                    -			rootPId: 0
                    -		}
                    -	}
                    -};
                    -var treeNodes = [
                    -    {"id":1, "pId":0, "name":"test1"},
                    -    {"id":11, "pId":1, "name":"test11"},
                    -    {"id":12, "pId":1, "name":"test12"},
                    -    {"id":111, "pId":11, "name":"test111"}
                    -];
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.simpleData.pIdKey.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.simpleData.pIdKey.html deleted file mode 100644 index d434bc31..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.simpleData.pIdKey.html +++ /dev/null @@ -1,32 +0,0 @@ -
                    -
                    -

                    Stringsetting.data.simpleData.pIdKey

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:"pId"

                    -
                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	data: {
                    -		simpleData: {
                    -			enable: true,
                    -			idKey: "id",
                    -			pIdKey: "pId",
                    -			rootPId: 0
                    -		}
                    -	}
                    -};
                    -var treeNodes = [
                    -    {"id":1, "pId":0, "name":"test1"},
                    -    {"id":11, "pId":1, "name":"test11"},
                    -    {"id":12, "pId":1, "name":"test12"},
                    -    {"id":111, "pId":11, "name":"test111"}
                    -];
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.simpleData.rootPId.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.simpleData.rootPId.html deleted file mode 100644 index 8cff82d4..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.data.simpleData.rootPId.html +++ /dev/null @@ -1,32 +0,0 @@ -
                    -
                    -

                    String / Numbersetting.data.simpleData.rootPId

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	data: {
                    -		simpleData: {
                    -			enable: true,
                    -			idKey: "id",
                    -			pIdKey: "pId",
                    -			rootPId: 0
                    -		}
                    -	}
                    -};
                    -var treeNodes = [
                    -    {"id":1, "pId":0, "name":"test1"},
                    -    {"id":11, "pId":1, "name":"test11"},
                    -    {"id":12, "pId":1, "name":"test12"},
                    -    {"id":111, "pId":11, "name":"test111"}
                    -];
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.autoExpandTrigger.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.autoExpandTrigger.html deleted file mode 100644 index 126b8a85..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.autoExpandTrigger.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    Booleansetting.edit.drag.autoExpandTrigger

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:false

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	edit: {
                    -		enable: true,
                    -		drag: {
                    -			autoExpandTrigger: true
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.autoOpenTime.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.autoOpenTime.html deleted file mode 100644 index df783392..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.autoOpenTime.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    Numbersetting.edit.drag.autoOpenTime

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:500

                    -

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

                    -
                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	edit: {
                    -		enable: true,
                    -		drag: {
                    -			autoOpenTime: 0
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.borderMax.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.borderMax.html deleted file mode 100644 index 1d4dd681..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.borderMax.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    Numbersetting.edit.drag.borderMax

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:10

                    -

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

                    -
                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	edit: {
                    -		enable: true,
                    -		drag: {
                    -			borderMax: 20
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.borderMin.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.borderMin.html deleted file mode 100644 index 463eb2b7..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.borderMin.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    Numbersetting.edit.drag.borderMin

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:-5

                    -

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

                    -
                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	edit: {
                    -		enable: true,
                    -		drag: {
                    -			borderMin: -10
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.inner.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.inner.html deleted file mode 100644 index 06679e1a..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.inner.html +++ /dev/null @@ -1,59 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

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

                    -

                    默认值:true

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodesArray(JSON)

                    -

                    被拖拽的节点 JSON 数据集合

                    -

                    targetNodeJSON

                    -

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

                    -

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

                    -

                    返回值Boolean

                    -

                    返回值同 Boolean 格式的数据

                    -
                    -

                    setting & function 举例

                    -

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

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

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

                    -
                    function canInner(treeId, nodes, targetNode) {
                    -	return !(targetNode && targetNode.level === 0);
                    -}
                    -var setting = {
                    -	edit: {
                    -		enable: true,
                    -		drag: {
                    -			prev: true,
                    -			next: true,
                    -			inner: canInner
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.isCopy.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.isCopy.html deleted file mode 100644 index cff17afd..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.isCopy.html +++ /dev/null @@ -1,32 +0,0 @@ -
                    -
                    -

                    Booleansetting.edit.drag.isCopy

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:true

                    -
                    -
                    -

                    规则说明

                    -
                    -

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

                    -

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

                    -

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

                    -

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

                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	edit: {
                    -		enable: true,
                    -		drag: {
                    -			isCopy: true,
                    -			isMove: false
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.isMove.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.isMove.html deleted file mode 100644 index 7fdadd18..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.isMove.html +++ /dev/null @@ -1,32 +0,0 @@ -
                    -
                    -

                    Booleansetting.edit.drag.isMove

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:true

                    -
                    -
                    -

                    规则说明

                    -
                    -

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

                    -

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

                    -

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

                    -

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

                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	edit: {
                    -		enable: true,
                    -		drag: {
                    -			isCopy: false,
                    -			isMove: true
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.maxShowNodeNum.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.maxShowNodeNum.html deleted file mode 100644 index 3e7a3d26..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.maxShowNodeNum.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    Numbersetting.edit.drag.maxShowNodeNum

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:5

                    -

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

                    -
                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	edit: {
                    -		enable: true,
                    -		drag: {
                    -			maxShowNodeNum: 10
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.minMoveSize.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.minMoveSize.html deleted file mode 100644 index 904be414..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.minMoveSize.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    Numbersetting.edit.drag.minMoveSize

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:5

                    -
                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	edit: {
                    -		enable: true,
                    -		drag: {
                    -			minMoveSize: 10
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.next.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.next.html deleted file mode 100644 index ffc874aa..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.next.html +++ /dev/null @@ -1,58 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

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

                    -

                    默认值:true

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodesArray(JSON)

                    -

                    被拖拽的节点 JSON 数据集合

                    -

                    targetNodeJSON

                    -

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

                    -

                    返回值Boolean

                    -

                    返回值同 Boolean 格式的数据

                    -
                    -

                    setting & function 举例

                    -

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

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

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

                    -
                    function canNext(treeId, nodes, targetNode) {
                    -	return !targetNode.isParent;
                    -}
                    -var setting = {
                    -	edit: {
                    -		enable: true,
                    -		drag: {
                    -			prev: true,
                    -			next: canNext,
                    -			inner: true
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.prev.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.prev.html deleted file mode 100644 index bd053618..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.drag.prev.html +++ /dev/null @@ -1,58 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

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

                    -

                    默认值:true

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodesArray(JSON)

                    -

                    被拖拽的节点 JSON 数据集合

                    -

                    targetNodeJSON

                    -

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

                    -

                    返回值Boolean

                    -

                    返回值同 Boolean 格式的数据

                    -
                    -

                    setting & function 举例

                    -

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

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

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

                    -
                    function canPrev(treeId, nodes, targetNode) {
                    -	return !targetNode.isParent;
                    -}
                    -var setting = {
                    -	edit: {
                    -		enable: true,
                    -		drag: {
                    -			prev: canPrev,
                    -			next: true,
                    -			inner: true
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.editNameSelectAll.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.editNameSelectAll.html deleted file mode 100644 index 30784f3c..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.editNameSelectAll.html +++ /dev/null @@ -1,27 +0,0 @@ -
                    -
                    -

                    Booleansetting.edit.editNameSelectAll

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值: false

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

                    true 表示 全选状态

                    -

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

                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	edit: {
                    -		enable: true,
                    -		editNameSelectAll: true
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.enable.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.enable.html deleted file mode 100644 index de1afeaf..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.enable.html +++ /dev/null @@ -1,38 +0,0 @@ -
                    -
                    -

                    Booleansetting.edit.enable

                    -

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

                    -
                    -

                    -
                    -

                    设置 zTree 是否处于编辑状态

                    -

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

                    -

                    默认值: false

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -
                    -

                    编辑状态规则说明

                    -
                    -

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

                    -

                    请注意大小写,不要改变

                    -
                    -

                    setting 举例

                    -

                    1. 设置 zTree 进入编辑状态

                    -
                    var setting = {
                    -	edit: {
                    -		enable: true
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.removeTitle.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.removeTitle.html deleted file mode 100644 index 55257da7..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.removeTitle.html +++ /dev/null @@ -1,48 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:"remove"

                    -
                    -
                    -

                    String 格式说明

                    -
                    -

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

                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

                    返回值String

                    -

                    返回值同 String 格式的数据

                    -
                    -

                    setting & function 举例

                    -

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

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

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

                    -
                    function setRemoveTitle(treeId, treeNode) {
                    -	return treeNode.isParent ? "删除父节点":"删除叶子节点";
                    -}
                    -var setting = {
                    -	edit: {
                    -		enable: true,
                    -		showRemoveBtn: true,
                    -		removeTitle: setRemoveTitle
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.renameTitle.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.renameTitle.html deleted file mode 100644 index 2dfbcca1..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.renameTitle.html +++ /dev/null @@ -1,48 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:"rename"

                    -
                    -
                    -

                    String 格式说明

                    -
                    -

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

                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

                    返回值String

                    -

                    返回值同 String 格式的数据

                    -
                    -

                    setting & function 举例

                    -

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

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

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

                    -
                    function setRenameTitle(treeId, treeNode) {
                    -	return treeNode.isParent ? "编辑父节点名称":"编辑叶子节点名称";
                    -}
                    -var setting = {
                    -	edit: {
                    -		enable: true,
                    -		showRenameBtn: true,
                    -		renameTitle: setRenameTitle
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.showRemoveBtn.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.showRemoveBtn.html deleted file mode 100644 index db62053c..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.showRemoveBtn.html +++ /dev/null @@ -1,49 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

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

                    -

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

                    -

                    默认值:true

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

                    返回值Boolean

                    -

                    返回值同 Boolean 格式的数据

                    -
                    -

                    setting & function 举例

                    -

                    1. 不显示删除按钮

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

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

                    -
                    function setRemoveBtn(treeId, treeNode) {
                    -	return !treeNode.isParent;
                    -}
                    -var setting = {
                    -	edit: {
                    -		enable: true,
                    -		showRemoveBtn: setRemoveBtn
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.showRenameBtn.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.showRenameBtn.html deleted file mode 100644 index 33dd37aa..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.edit.showRenameBtn.html +++ /dev/null @@ -1,51 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

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

                    -

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

                    -

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

                    -

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

                    -

                    默认值:true

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

                    返回值Boolean

                    -

                    返回值同 Boolean 格式的数据

                    -
                    -

                    setting & function 举例

                    -

                    1. 不显示编辑名称按钮

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

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

                    -
                    function setRenameBtn(treeId, treeNode) {
                    -	return !treeNode.isParent;
                    -}
                    -var setting = {
                    -	edit: {
                    -		enable: true,
                    -		showRenameBtn: setRenameBtn
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.treeId.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.treeId.html deleted file mode 100644 index 819743eb..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.treeId.html +++ /dev/null @@ -1,14 +0,0 @@ -
                    -
                    -

                    Stringsetting.treeId

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -
                    -
                    - -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.treeObj.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.treeObj.html deleted file mode 100644 index 37684a19..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.treeObj.html +++ /dev/null @@ -1,14 +0,0 @@ -
                    -
                    -

                    Objectsetting.treeObj

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -
                    -
                    - -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.addDiyDom.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.addDiyDom.html deleted file mode 100644 index 0a508acc..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.addDiyDom.html +++ /dev/null @@ -1,40 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.view.addDiyDom

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

                    -
                    var setting = {
                    -	view: {
                    -		addDiyDom: addDiyDom
                    -	}
                    -};
                    -function addDiyDom(treeId, treeNode) {
                    -	var aObj = $("#" + treeNode.tId + "_a");
                    -	if ($("#diyBtn_"+treeNode.id).length>0) return;
                    -	var editStr = "<span id='diyBtn_space_" +treeNode.id+ "' > </span>"
                    -		+ "<button type='button' class='diyBtn1' id='diyBtn_" + treeNode.id
                    -		+ "' title='"+treeNode.name+"' onfocus='this.blur();'></button>";
                    -	aObj.append(editStr);
                    -	var btn = $("#diyBtn_"+treeNode.id);
                    -	if (btn) btn.bind("click", function(){alert("diy Button for " + treeNode.name);});
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.addHoverDom.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.addHoverDom.html deleted file mode 100644 index f073e79c..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.addHoverDom.html +++ /dev/null @@ -1,45 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.view.addHoverDom

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

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

                    Booleansetting.view.autoCancelSelected

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值: true

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	view: {
                    -		autoCancelSelected: false
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.dblClickExpand.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.dblClickExpand.html deleted file mode 100644 index 5f3db964..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.dblClickExpand.html +++ /dev/null @@ -1,44 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值: true

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

                    返回值Boolean

                    -

                    返回值同 Boolean 格式的数据

                    -
                    -

                    setting 举例

                    -

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

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

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

                    -
                    function dblClickExpand(treeId, treeNode) {
                    -	return treeNode.level > 0;
                    -};
                    -var setting = {
                    -	view: {
                    -		dblClickExpand: dblClickExpand
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.expandSpeed.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.expandSpeed.html deleted file mode 100644 index 3b799c32..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.expandSpeed.html +++ /dev/null @@ -1,31 +0,0 @@ -
                    -
                    -

                    String / Numbersetting.view.expandSpeed

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:"fast"

                    -
                    -
                    -

                    String 格式说明

                    -
                    -

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

                    -

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

                    -
                    -

                    Number 格式说明

                    -
                    -

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

                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	view: {
                    -		expandSpeed: "slow"
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.fontCss.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.fontCss.html deleted file mode 100644 index 54efb1bb..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.fontCss.html +++ /dev/null @@ -1,42 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:{}

                    -
                    -
                    -

                    JSON 格式说明

                    -
                    -

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

                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

                    返回值JSON

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

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

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

                    -
                    function setFontCss(treeId, treeNode) {
                    -	return treeNode.level == 0 ? {color:"red"} : {};
                    -};
                    -var setting = {
                    -	view: {
                    -		fontCss: setFontCss
                    -	}
                    -};
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.nameIsHTML.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.nameIsHTML.html deleted file mode 100644 index a1d916c5..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.nameIsHTML.html +++ /dev/null @@ -1,27 +0,0 @@ -
                    -
                    -

                    Booleansetting.view.nameIsHTML

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值: false

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	view: {
                    -		nameIsHTML: true
                    -	}
                    -};
                    -var node = {"name":"<font color='red'>test</font>"};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.removeHoverDom.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.removeHoverDom.html deleted file mode 100644 index bb1a9aa2..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.removeHoverDom.html +++ /dev/null @@ -1,45 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.view.removeHoverDom

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:null

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -
                    -

                    setting & function 举例

                    -

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

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

                    Booleansetting.view.selectedMulti

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值: true

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -

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

                    -

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

                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	view: {
                    -		selectedMulti: false
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.showIcon.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.showIcon.html deleted file mode 100644 index ebe423ca..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.showIcon.html +++ /dev/null @@ -1,44 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:true

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

                    返回值Boolean

                    -

                    返回值同 Boolean 格式的数据

                    -
                    -

                    setting & function 举例

                    -

                    1. 设置 zTree 不显示图标

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

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

                    -
                    function showIconForTree(treeId, treeNode) {
                    -	return treeNode.level != 2;
                    -};
                    -var setting = {
                    -	view: {
                    -		showIcon: showIconForTree
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.showLine.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.showLine.html deleted file mode 100644 index 02ab5ebb..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.showLine.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    Booleansetting.view.showLine

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:true

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -
                    -

                    setting 举例

                    -

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

                    -
                    var setting = {
                    -	view: {
                    -		showLine: false
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.showTitle.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.showTitle.html deleted file mode 100644 index 5bcb8600..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.showTitle.html +++ /dev/null @@ -1,46 +0,0 @@ -
                    -
                    -

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

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:true

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -

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

                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeIdString

                    -

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

                    -

                    treeNodeJSON

                    -

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

                    -

                    返回值Boolean

                    -

                    返回值同 Boolean 格式的数据

                    -
                    -

                    setting & function 举例

                    -

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

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

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

                    -
                    function showTitleForTree(treeId, treeNode) {
                    -	return treeNode.level != 2;
                    -};
                    -var setting = {
                    -	view: {
                    -		showTitle: showTitleForTree
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.txtSelectedEnable.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.txtSelectedEnable.html deleted file mode 100644 index c22a8c00..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/setting.view.txtSelectedEnable.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    Booleansetting.view.txtSelectedEnable

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    默认值:false

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -
                    -

                    setting & function 举例

                    -

                    1. 设置 zTree 允许选择文本

                    -
                    var setting = {
                    -	view: {
                    -		txtSelectedEnable: true
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.check_Child_State.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.check_Child_State.html deleted file mode 100644 index fa378994..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.check_Child_State.html +++ /dev/null @@ -1,43 +0,0 @@ -
                    -
                    -

                    NumbertreeNode.check_Child_State

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

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

                    -

                    默认值:true

                    -
                    -
                    -

                    Number 格式说明

                    -
                    -

                    规则如下:

                    - - - - - - - - - - - -
                    setting.check.checkType = "checkbox"
                    treeNode.check_Child_State勾选状态说明
                    -1不存在子节点 或 子节点全部设置为 nocheck = true
                    0无 子节点被勾选
                    1部分 子节点被勾选
                    2全部 子节点被勾选
                    -
                    - - - - - - - - - - -
                    setting.check.checkType = "radio"
                    treeNode.check_Child_State勾选状态说明
                    -1不存在子节点 或 子节点全部设置为 nocheck = true
                    0无 子节点被勾选
                    2有 子节点被勾选
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.check_Focus.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.check_Focus.html deleted file mode 100644 index 785aec9f..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.check_Focus.html +++ /dev/null @@ -1,19 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.check_Focus

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:false

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -

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

                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.checked.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.checked.html deleted file mode 100644 index 049d6ba4..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.checked.html +++ /dev/null @@ -1,32 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.checked

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

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

                    -

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

                    -

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

                    -

                    默认值:false

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -

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

                    -
                    -

                    treeNode 举例

                    -

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

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

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

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var checked = treeObj.getNodes()[0].checked;
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.checkedOld.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.checkedOld.html deleted file mode 100644 index cab717e7..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.checkedOld.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.checkedOld

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

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

                    -

                    默认值:checked的初始化值

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -

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

                    -
                    -

                    treeNode 举例

                    -

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

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var checkedOld = treeObj.getNodes()[0].checkedOld;
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.children.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.children.html deleted file mode 100644 index 4bab8351..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.children.html +++ /dev/null @@ -1,35 +0,0 @@ -
                    -
                    -

                    Array(JSON)treeNode.children

                    -

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

                    -
                    -

                    -
                    -

                    节点的子节点数据集合。

                    -

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

                    -

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

                    -

                    默认值:无

                    -
                    -
                    -

                    Array(JSON) 格式说明

                    -
                    -

                    标准的 JSON 数据对象

                    -
                    -

                    treeNode 举例

                    -

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

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

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

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodes()[0].children;
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.chkDisabled.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.chkDisabled.html deleted file mode 100644 index e6bb0322..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.chkDisabled.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.chkDisabled

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

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

                    -

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

                    -

                    默认值:false

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

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

                    -

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

                    -
                    -

                    treeNode 举例

                    -

                    1. 禁用节点 checkbox / radio

                    -
                    var nodes = [
                    -	{ "id":1, "name":"test1", "checked":true, "chkDisabled":true},
                    -	{ "id":2, "name":"test2", "chkDisabled":true},
                    -	{ "id":3, "name":"test3"}
                    -]
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.click.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.click.html deleted file mode 100644 index 833c6784..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.click.html +++ /dev/null @@ -1,24 +0,0 @@ -
                    -
                    -

                    StringtreeNode.click

                    -

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

                    -
                    -

                    -
                    -

                    最简单的 click 事件操作。相当于 onclick="..." 的内容。 如果操作较复杂,请使用 onClick 事件回调函数。

                    -

                    由于 IE 对于 onclick 和 click事件共存时的处理与其他浏览器不同,所以请不要利用此参数控制是否允许跳转的操作(例如:treeNode.click = "return false;")。如有类似需求,请不要使用 url 属性设置网址,同时利用 onClick 回调函数控制跳转。

                    -

                    默认值:无

                    -
                    -
                    -

                    String 格式说明

                    -
                    -

                    标准 javascript 语法, 例如:alert("test"); 等

                    -
                    -

                    treeNode 举例

                    -

                    1. 设置某节点点击时,弹出信息框

                    -
                    var nodes = [
                    -	{ "id":1, "name":"Google CN", "url":"http://g.cn", "click":"alert('test');"},
                    -	......
                    -]
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.diy.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.diy.html deleted file mode 100644 index b2fb0d9e..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.diy.html +++ /dev/null @@ -1,15 +0,0 @@ -
                    -
                    -

                    ?treeNode.* DIY *

                    -

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

                    -
                    -

                    -
                    -

                    用于保存节点的其他自定义数据信息,不要与 zTree 使用的属性相同即可,用户可随意设定。

                    -
                    -
                    -

                    treeNode 举例

                    -

                    1. 设置节点的备用英文名称

                    -
                    var node = { "id":1, "name":"test1", "ename":"test eName"};
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.editNameFlag.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.editNameFlag.html deleted file mode 100644 index 51162b8b..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.editNameFlag.html +++ /dev/null @@ -1,19 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.editNameFlag

                    -

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

                    -
                    -

                    -
                    -

                    用于记录节点是否处于编辑名称状态。[setting.edit.enable = true 时有效]

                    -

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

                    -

                    默认值:false

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

                    true 表示节点处于编辑名称状态

                    -

                    false 表示节点未处于编辑名称状态

                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.getCheckStatus.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.getCheckStatus.html deleted file mode 100644 index fc20eac4..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.getCheckStatus.html +++ /dev/null @@ -1,63 +0,0 @@ -
                    -
                    -

                    Function()treeNode.getCheckStatus

                    -

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

                    -
                    -

                    -
                    -

                    获取节点 checkbox / radio 半勾选状态。[setting.check.enable = true 时有效]

                    -

                    初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    返回值JSON

                    -
                    {
                    -	checked: true, //等同于 treeNode.checked
                    -	half: true  //规则见下表
                    -}
                    - - - - - - - - - - - - - - - - - - -
                    setting.check.checkType = "checkbox"
                    treeNode.checkedtreeNode.check_Child_StatetreeNode.halfCheck half
                    --truetrue
                     
                    true-1falsefalse
                    true0falsetrue
                    true1falsetrue
                    true2falsefalse
                     
                    false-1falsefalse
                    false0falsefalse
                    false1falsetrue
                    false2falsetrue
                    -
                    - - - - - - - - - - - - - - - - -
                    setting.check.checkType = "radio"
                    treeNode.checkedtreeNode.check_Child_StatetreeNode.halfCheck half
                    --truetrue
                     
                    true-1falsefalse
                    true0falsefalse
                    true2falsetrue
                     
                    false-1falsefalse
                    false0falsefalse
                    false2falsetrue
                    -
                    -

                    treeNode 举例

                    -

                    1. 获取第一个根节点的半选状态

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var halfCheck = treeObj.getNodes()[0].getCheckStatus();
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.getNextNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.getNextNode.html deleted file mode 100644 index 7a0fa5c0..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.getNextNode.html +++ /dev/null @@ -1,27 +0,0 @@ -
                    -
                    -

                    Function()treeNode.getNextNode

                    -

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

                    -
                    -

                    -
                    -

                    获取与 treeNode 节点相邻的后一个节点。

                    -

                    初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    返回值JSON

                    -

                    与 treeNode 节点相邻的后一个节点。

                    -

                    如果 treeNode 是最后一个节点,返回 null 。

                    -
                    -

                    treeNode 举例

                    -

                    1. 获取当前被选中的节点的下一个节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var node = sNodes[0].getNextNode();
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.getParentNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.getParentNode.html deleted file mode 100644 index 31309a62..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.getParentNode.html +++ /dev/null @@ -1,27 +0,0 @@ -
                    -
                    -

                    Function()treeNode.getParentNode

                    -

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

                    -
                    -

                    -
                    -

                    获取 treeNode 节点的父节点。

                    -

                    初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    返回值JSON

                    -

                    treeNode 节点的父节点 JSON 数据对象。

                    -

                    如果 treeNode 是根节点,返回 null 。

                    -
                    -

                    treeNode 举例

                    -

                    1. 获取当前被选中的节点的父节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var node = sNodes[0].getParentNode();
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.getPreNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.getPreNode.html deleted file mode 100644 index 9d841841..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.getPreNode.html +++ /dev/null @@ -1,27 +0,0 @@ -
                    -
                    -

                    Function()treeNode.getPreNode

                    -

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

                    -
                    -

                    -
                    -

                    获取与 treeNode 节点相邻的前一个节点。

                    -

                    初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    返回值JSON

                    -

                    与 treeNode 节点相邻的前一个节点。

                    -

                    如果 treeNode 是第一个节点,返回 null 。

                    -
                    -

                    treeNode 举例

                    -

                    1. 获取当前被选中的节点的前一个节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var node = sNodes[0].getPreNode();
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.halfCheck.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.halfCheck.html deleted file mode 100644 index 23ac744c..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.halfCheck.html +++ /dev/null @@ -1,29 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.halfCheck

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    1、强制为半勾选状态后,不再进行自动计算半勾选状态

                    -

                    2、设置 treeNode.halfCheck = false 或 null 才能恢复自动计算半勾选状态

                    -

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

                    -

                    默认值:false

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

                    true 表示节点的输入框 强行设置为半勾选

                    -

                    false 表示节点的输入框 根据 zTree 的规则自动计算半勾选状态

                    -
                    -

                    treeNode 举例

                    -

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

                    -
                    var nodes = [
                    -{ "id":1, "name":"test1", isParent:true, checked:true, halfCheck:true },
                    -{ "id":2, "name":"test2", isParent:true, checked:false, halfCheck:true },
                    -{ "id":3, "name":"test3", isParent:true, checked:true },
                    -{ "id":4, "name":"test4", isParent:true, checked:false }
                    -]
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.icon.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.icon.html deleted file mode 100644 index 69c5db16..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.icon.html +++ /dev/null @@ -1,33 +0,0 @@ -
                    -
                    -

                    StringtreeNode.icon

                    -

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

                    -
                    -

                    -
                    -

                    节点自定义图标的 URL 路径。

                    -

                    1、父节点如果只设置 icon ,会导致展开、折叠时都使用同一个图标

                    -

                    2、父节点展开、折叠使用不同的个性化图标需要同时设置 treeNode.iconOpen / treeNode.iconClose 两个属性

                    -

                    3、如果想利用 className 设置个性化图标,需要设置 treeNode.iconSkin 属性

                    -

                    默认值:无

                    -
                    -
                    -

                    String 格式说明

                    -
                    -

                    图标图片的 url 可以是相对路径也可以是绝对路径

                    -

                    设置相对路径请注意页面与图片之间的关系,确保图片能够正常加载

                    -
                    -

                    treeNode 举例

                    -

                    1. 设置节点的个性化图标

                    -
                    var nodes = [
                    -	//父节点展开 折叠时使用相同的图标
                    -	{ name:"父节点1", icon:"/img/parent.gif"},
                    -
                    -	//父节点展开 折叠时分别使用不同的图标
                    -	{ name:"父节点2", iconOpen:"/img/open.gif", iconClose:"/img/close.gif"}, 
                    -
                    -	//叶子节点个性化图标
                    -	{ name:"叶子节点", icon:"/img/leaf.gif"}
                    -]
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.iconClose.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.iconClose.html deleted file mode 100644 index f51da9c9..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.iconClose.html +++ /dev/null @@ -1,33 +0,0 @@ -
                    -
                    -

                    StringtreeNode.iconClose

                    -

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

                    -
                    -

                    -
                    -

                    父节点自定义折叠时图标的 URL 路径。

                    -

                    1、此属性只针对父节点有效

                    -

                    2、此属性必须与 iconOpen 同时使用

                    -

                    3、如果想利用 className 设置个性化图标,需要设置 treeNode.iconSkin 属性

                    -

                    默认值:无

                    -
                    -
                    -

                    String 格式说明

                    -
                    -

                    图标图片的 url 可以是相对路径也可以是绝对路径

                    -

                    设置相对路径请注意页面与图片之间的关系,确保图片能够正常加载

                    -
                    -

                    treeNode 举例

                    -

                    1. 设置节点的个性化图标

                    -
                    var nodes = [
                    -	//父节点展开 折叠时使用相同的图标
                    -	{ name:"父节点1", icon:"/img/parent.gif"},
                    -
                    -	//父节点展开 折叠时分别使用不同的图标
                    -	{ name:"父节点2", iconOpen:"/img/open.gif", iconClose:"/img/close.gif"}, 
                    -
                    -	//叶子节点个性化图标
                    -	{ name:"叶子节点", icon:"/img/leaf.gif"}
                    -]
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.iconOpen.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.iconOpen.html deleted file mode 100644 index 29c9baae..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.iconOpen.html +++ /dev/null @@ -1,33 +0,0 @@ -
                    -
                    -

                    StringtreeNode.iconOpen

                    -

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

                    -
                    -

                    -
                    -

                    父节点自定义展开时图标的 URL 路径。

                    -

                    1、此属性只针对父节点有效

                    -

                    2、此属性必须与 iconClose 同时使用

                    -

                    3、如果想利用 className 设置个性化图标,需要设置 treeNode.iconSkin 属性

                    -

                    默认值:无

                    -
                    -
                    -

                    String 格式说明

                    -
                    -

                    图标图片的 url 可以是相对路径也可以是绝对路径

                    -

                    设置相对路径请注意页面与图片之间的关系,确保图片能够正常加载

                    -
                    -

                    treeNode 举例

                    -

                    1. 设置节点的个性化图标

                    -
                    var nodes = [
                    -	//父节点展开 折叠时使用相同的图标
                    -	{ name:"父节点1", icon:"/img/parent.gif"},
                    -
                    -	//父节点展开 折叠时分别使用不同的图标
                    -	{ name:"父节点2", iconOpen:"/img/open.gif", iconClose:"/img/close.gif"}, 
                    -
                    -	//叶子节点个性化图标
                    -	{ name:"叶子节点", icon:"/img/leaf.gif"}
                    -]
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.iconSkin.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.iconSkin.html deleted file mode 100644 index d5d97269..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.iconSkin.html +++ /dev/null @@ -1,43 +0,0 @@ -
                    -
                    -

                    StringtreeNode.iconSkin

                    -

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

                    -
                    -

                    -
                    -

                    节点自定义图标的 className

                    -

                    1、需要修改 css,增加相应 className 的设置

                    -

                    2、css 方式简单、方便,并且同时支持父节点展开、折叠状态切换图片

                    -

                    3、css 建议采用图片分割渲染的方式以减少反复加载图片,并且避免图片闪动

                    -

                    4、zTree v3.x 的 iconSkin 同样支持 IE6

                    -

                    5、如果想直接使用 图片的Url路径 设置节点的个性化图标,需要设置 treeNode.icon / treeNode.iconOpen / treeNode.iconClose 属性

                    -

                    默认值:无

                    -
                    -
                    -

                    String 格式说明

                    -
                    -

                    设置个性图标的 className

                    -
                    -

                    css & treeNode 举例

                    -

                    1. 设置节点的个性化图标

                    -
                    css 内容:
                    -.ztree li span.button.diy01_ico_open, .ztree li span.button.diy01_ico_close{...}
                    -
                    -.ztree li span.button.diy02_ico_open{...}
                    -.ztree li span.button.diy02_ico_close{...}
                    -
                    -.ztree li span.button.diy03_ico_docu{...}
                    -
                    -js中节点数据:
                    -var nodes = [
                    -	//父节点展开 折叠时使用相同的图标
                    -	{ name:"父节点1", iconSkin:"diy01"},
                    -
                    -	//父节点展开 折叠时分别使用不同的图标
                    -	{ name:"父节点2", iconSkin:"diy02"},
                    -
                    -	//叶子节点个性化图标
                    -	{ name:"叶子节点", iconSkin:"diy03"}
                    -]
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.isAjaxing.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.isAjaxing.html deleted file mode 100644 index 330c1202..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.isAjaxing.html +++ /dev/null @@ -1,26 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.isAjaxing

                    -

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

                    -
                    -

                    -
                    -

                    记录 treeNode 节点是否正在进行异步加载。

                    -

                    初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

                    true 表示节点正在进行异步加载

                    -

                    false 表示节点没有进行异步加载

                    -
                    -

                    treeNode 举例

                    -

                    1. 查看当前被选中的节点是否节点正在进行异步加载

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var isAjaxing = sNodes[0].isAjaxing;
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.isFirstNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.isFirstNode.html deleted file mode 100644 index 83b80bd9..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.isFirstNode.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.isFirstNode

                    -

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

                    -
                    -

                    -
                    -

                    记录 treeNode 节点是否为同级节点中的第一个节点。

                    -

                    使用 exhide 扩展后,只针对显示的节点设置此属性

                    -

                    初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

                    true 表示是同级节点中的第一个节点

                    -

                    false 表示不是同级节点中的第一个节点

                    -

                    节点被隐藏后,isFirstNode = false

                    -
                    -

                    treeNode 举例

                    -

                    1. 查看当前被选中的节点是否是同级节点中的第一个节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var isFirstNode = sNodes[0].isFirstNode;
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.isHidden.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.isHidden.html deleted file mode 100644 index 5fb388e2..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.isHidden.html +++ /dev/null @@ -1,27 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.isHidden

                    -

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

                    -
                    -

                    -
                    -

                    判断 treeNode 节点是否被隐藏。

                    -

                    1、初始化 zTree 时,如果节点设置 isHidden = true,会被自动隐藏

                    -

                    2、请勿对已加载的节点修改此属性,隐藏 / 显示 请使用 hideNode() / hideNodes() / showNode() / showNodes() 方法

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

                    true 表示被隐藏

                    -

                    false 表示被显示

                    -
                    -

                    treeNode 举例

                    -

                    1. 查看第一个根节点是否被隐藏

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getNodes();
                    -if (sNodes.length > 0) {
                    -	var isHidden = sNodes[0].isHidden;
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.isHover.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.isHover.html deleted file mode 100644 index dcef6eba..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.isHover.html +++ /dev/null @@ -1,19 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.isHover

                    -

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

                    -
                    -

                    -
                    -

                    记录节点 的 hover 状态,主要用于 setting.view.addHoverDom / removeHoverDom 。

                    -

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

                    -

                    默认值:false

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

                    true 表示节点处于 hover 状态

                    -

                    false 表示节点未处于 hover 状态

                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.isLastNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.isLastNode.html deleted file mode 100644 index 5d5ac822..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.isLastNode.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.isLastNode

                    -

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

                    -
                    -

                    -
                    -

                    记录 treeNode 节点是否为同级节点中的最后一个节点。

                    -

                    使用 exhide 扩展后,只针对显示的节点设置此属性

                    -

                    初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

                    true 表示是同级节点中的最后一个节点

                    -

                    false 表示不是同级节点中的最后一个节点

                    -

                    节点被隐藏后,isLastNode = false

                    -
                    -

                    treeNode 举例

                    -

                    1. 查看当前被选中的节点是否是同级节点中的最后一个节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var isLastNode = sNodes[0].isLastNode;
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.isParent.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.isParent.html deleted file mode 100644 index bab887e0..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.isParent.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.isParent

                    -

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

                    -
                    -

                    -
                    -

                    记录 treeNode 节点是否为父节点。

                    -

                    1、初始化节点数据时,根据 treeNode.children 属性判断,有子节点则设置为 true,否则为 false

                    -

                    2、初始化节点数据时,如果设定 treeNode.isParent = true,即使无子节点数据,也会设置为父节点

                    -

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

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

                    true 表示是父节点

                    -

                    false 表示不是父节点

                    -
                    -

                    treeNode 举例

                    -

                    1. 查看当前被选中的节点是否是父节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var isParent = sNodes[0].isParent;
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.level.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.level.html deleted file mode 100644 index aff3254c..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.level.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    NumbertreeNode.level

                    -

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

                    -
                    -

                    -
                    -

                    记录节点的层级

                    -

                    初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    -
                    -
                    -

                    Number 格式说明

                    -
                    -

                    根节点 level = 0,依次递增

                    -
                    -

                    treeNode 举例

                    -

                    1. 查看当前被选中的节点的级数

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var level = sNodes[0].level;
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.name.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.name.html deleted file mode 100644 index 918f2b49..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.name.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    StringtreeNode.name

                    -

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

                    -
                    -

                    -
                    -

                    节点名称。

                    -

                    1、如果不使用 name 属性保存节点名称,请修改 setting.data.key.name

                    -

                    默认值:无

                    -
                    -
                    -

                    String 格式说明

                    -
                    -

                    节点显示的名称字符串,标准 String 即可,所有特殊字符都会被自动转义

                    -
                    -

                    treeNode 举例

                    -

                    1. 设置节点的名称为 test1、test2、test3

                    -
                    var nodes = [
                    -	{ "id":1, "name":"test1"},
                    -	{ "id":2, "name":"test2"},
                    -	{ "id":3, "name":"test3"}
                    -]
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.nocheck.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.nocheck.html deleted file mode 100644 index afaa62fb..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.nocheck.html +++ /dev/null @@ -1,26 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.nocheck

                    -

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

                    -
                    -

                    -
                    -

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

                    -

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

                    -

                    默认值:false

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

                    true 表示此节点不显示 checkbox / radio,不影响勾选的关联关系,不影响父节点的半选状态。

                    -

                    false 表示节点具有正常的勾选功能

                    -
                    -

                    treeNode 举例

                    -

                    1. 不显示某个节点的 checkbox / radio

                    -
                    var nodes = [
                    -	{ "id":1, "name":"test1", "nocheck":true},
                    -	{ "id":2, "name":"test2"},
                    -	{ "id":3, "name":"test3"}
                    -]
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.open.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.open.html deleted file mode 100644 index 1eb9aec4..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.open.html +++ /dev/null @@ -1,30 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.open

                    -

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

                    -
                    -

                    -
                    -

                    记录 treeNode 节点的 展开 / 折叠 状态。

                    -

                    1、初始化节点数据时,如果设定 treeNode.open = true,则会直接展开此节点

                    -

                    2、叶子节点 treeNode.open = false

                    -

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

                    -

                    4、非异步加载模式下,无子节点的父节点设置 open=true 后,可显示为展开状态,但异步加载模式下不会生效。(v3.5.15+)

                    -

                    默认值:false

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

                    true 表示节点为 展开 状态

                    -

                    false 表示节点为 折叠 状态

                    -
                    -

                    treeNode 举例

                    -

                    1. 查看当前被选中的节点的 展开 / 折叠 状态

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var isOpen = sNodes[0].open;
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.parentTId.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.parentTId.html deleted file mode 100644 index d228a23a..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.parentTId.html +++ /dev/null @@ -1,27 +0,0 @@ -
                    -
                    -

                    StringtreeNode.parentTId

                    -

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

                    -
                    -

                    -
                    -

                    treeNode 节点的父节点唯一标识 tId。

                    -

                    1、v3.x 用 parentTId 替换了原先的 parentNode 属性,同时增加了 getParentNode 方法,以避免原先 parentNode 造成的 clone 死循环

                    -

                    2、初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    -
                    -
                    -

                    String 格式说明

                    -
                    -

                    zTree 内部生成的节点唯一标识,请参考 treeNode.tId 的说明

                    -

                    如果 treeNode 是根节点,则 parentTId = null

                    -
                    -

                    treeNode 举例

                    -

                    1. 查看当前被选中的节点的父节点 tId

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var parentTId = sNodes[0].parentTId;
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.tId.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.tId.html deleted file mode 100644 index c32285c5..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.tId.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    StringtreeNode.tId

                    -

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

                    -
                    -

                    -
                    -

                    treeNode 节点的唯一标识 tId。

                    -

                    初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    -
                    -
                    -

                    String 格式说明

                    -
                    -

                    生成规则:setting.treeId + "_" + 内部计数

                    -
                    -

                    treeNode 举例

                    -

                    1. 查看当前被选中的节点的 tId

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var tId = sNodes[0].tId;
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.target.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.target.html deleted file mode 100644 index f7c1b6ba..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.target.html +++ /dev/null @@ -1,24 +0,0 @@ -
                    -
                    -

                    StringtreeNode.target

                    -

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

                    -
                    -

                    -
                    -

                    设置点击节点后在何处打开 url。[treeNode.url 存在时有效]

                    -

                    默认值:无

                    -
                    -
                    -

                    String 格式说明

                    -
                    -

                    同超链接 target 属性: "_blank", "_self" 或 其他指定窗口名称

                    -

                    省略此属性,则默认为 "_blank"

                    -
                    -

                    treeNode 举例

                    -

                    1. 设置点击某节点时,弹出新页面

                    -
                    var nodes = [
                    -	{ "id":1, "name":"test1", "url":"http://myTest.com", "target":"_blank"},
                    -	......
                    -]
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.url.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.url.html deleted file mode 100644 index 0b2e0076..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.url.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    StringtreeNode.url

                    -

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

                    -
                    -

                    -
                    -

                    节点链接的目标 URL

                    -

                    1、编辑模式 (setting.edit.enable = true) 下此属性功能失效,如果必须使用类似功能,请利用 onClick 事件回调函数自行控制。

                    -

                    2、如果需要在 onClick 事件回调函数中进行跳转控制,那么请将 URL 地址保存在其他自定义的属性内,请勿使用 url

                    -

                    默认值:无

                    -
                    -
                    -

                    String 格式说明

                    -
                    -

                    同超链接 href 属性

                    -
                    -

                    treeNode 举例

                    -

                    1. 设置某节点点击时,跳转到 g.cn

                    -
                    var nodes = [
                    -	{ "id":1, "name":"Google CN", "url":"http://g.cn"},
                    -	......
                    -]
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.zAsync.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.zAsync.html deleted file mode 100644 index 00e48f39..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/treeNode.zAsync.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.zAsync

                    -

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

                    -
                    -

                    -
                    -

                    记录 treeNode 节点是否已经进行过异步加载,避免父节点反复异步加载数据。

                    -

                    初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    -

                    默认值:false (无子节点的父节点); true (有子节点的父节点 & 叶子节点)

                    -
                    -
                    -

                    Boolean 格式说明

                    -
                    -

                    true 表示父节点展开时不需要自动异步加载

                    -

                    false 表示父节点展开时需要自动异步加载

                    -

                    此参数不会对 reAsyncChildNodes 方法造成任何影响

                    -
                    -

                    treeNode 举例

                    -

                    1. 查看当前被选中的节点是否节点是否需要自动异步加载

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var zAsync = sNodes[0].zAsync;
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.addNodes.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.addNodes.html deleted file mode 100644 index eac2152d..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.addNodes.html +++ /dev/null @@ -1,42 +0,0 @@ -
                    -
                    -

                    Function(parentNode, newNodes, isSilent)zTreeObj.addNodes

                    -

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

                    -
                    -

                    -
                    -

                    添加节点。

                    -

                    v3.x 为了避免原先反复初始化造成的数据重复问题,在 初始化 和 添加节点 时内部进行 clone 操作。如果需要获取数据在 zTree 内的对象,请获取此方法的返回值。

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    parentNodeJSON

                    -

                    指定的父节点,如果增加根节点,请设置 parentNode 为 null 即可。

                    -

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    -

                    newNodesJSON / Array(JSON)

                    -

                    需要增加的节点数据 JSON 对象集合,数据只需要满足 zTree 的节点数据必需的属性即可,详细请参考“treeNode 节点数据详解”

                    -

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

                    -

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

                    -

                    isSilentBoolean

                    -

                    设定增加节点后是否自动展开父节点。

                    -

                    isSilent = true 时,不展开父节点,其他值或缺省状态都自动展开。

                    -

                    返回值Array(JSON)

                    -

                    返回值是 zTree 最终添加的节点数据集合

                    -

                    如果 newNodes 是单个节点数据 JSON,返回值也是将其包在 Array 内

                    -

                    请务必记住:返回值中的数据对象 是 newNodes 被 clone 后的,所以绝对不相等!

                    -
                    -

                    function 举例

                    -

                    1. 对于 id = "tree" 的 zTree 增加 1 个根节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var newNode = {name:"newNode1"};
                    -newNode = treeObj.addNodes(null, newNode);
                    -
                    -

                    2. 对于 id = "tree" 的 zTree 增加 3 个根节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var newNodes = [{name:"newNode1"}, {name:"newNode2"}, {name:"newNode3"}];
                    -newNodes = treeObj.addNodes(null, newNodes);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.cancelEditName.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.cancelEditName.html deleted file mode 100644 index 9df098f0..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.cancelEditName.html +++ /dev/null @@ -1,30 +0,0 @@ -
                    -
                    -

                    Function(newName)zTreeObj.cancelEditName

                    -

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

                    -
                    -

                    -
                    -

                    取消节点的编辑名称状态,可以恢复原名称,也可以强行赋给新的名称。

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    newNameString

                    -

                    重新给定的新名称。

                    -

                    如果省略此参数,则恢复原名称。

                    -

                    返回值无

                    -

                    目前无任何返回值

                    -
                    -

                    function 举例

                    -

                    1. 取消 zTree 的编辑名称状态,恢复该节点原有名称

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -treeObj.cancelEditName();
                    -
                    -

                    2. 取消 zTree 的编辑名称状态,并且重新设定该节点名称

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -treeObj.cancelEditName("test_new_name");
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.cancelSelectedNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.cancelSelectedNode.html deleted file mode 100644 index d8417685..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.cancelSelectedNode.html +++ /dev/null @@ -1,35 +0,0 @@ -
                    -
                    -

                    Function(treeNode)zTreeObj.cancelSelectedNode

                    -

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

                    -
                    -

                    -
                    -

                    取消节点的选中状态。

                    -

                    v3.x 支持多点同时选中,因此取消选中状态可以全部取消,也可以单独取消某个节点的选中状态。

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeNodeJSON

                    -

                    需要取消选中状态的节点。

                    -

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    -

                    如果省略此参数,则将取消全部被选中节点的选中状态。

                    -

                    返回值无

                    -

                    目前无任何返回值

                    -
                    -

                    function 举例

                    -

                    1. 取消当前所有被选中节点的选中状态

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -treeObj.cancelSelectedNode();
                    -
                    -

                    2. 取消当前第一个被选中节点的选中状态

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getSelectedNodes();
                    -if (nodes.length>0) { 
                    -	treeObj.cancelSelectedNode(nodes[0]);
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.checkAllNodes.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.checkAllNodes.html deleted file mode 100644 index d6eaadf1..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.checkAllNodes.html +++ /dev/null @@ -1,29 +0,0 @@ -
                    -
                    -

                    Function(checked)zTreeObj.checkAllNodes

                    -

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

                    -
                    -

                    -
                    -

                    勾选 或 取消勾选 全部节点。[setting.check.enable = true 且 setting.check.chkStyle = "checkbox" 时有效]

                    -

                    此方法不会触发 beforeCheck / onCheck 事件回调函数。

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    checkedBoolean

                    -

                    checked = true 表示勾选全部节点

                    -

                    checked = false 表示全部节点取消勾选

                    -

                    不会影响 treeNode.nochecked = true 的节点。

                    -

                    不会影响未加载的节点。

                    -

                    返回值无

                    -

                    目前无任何返回值

                    -
                    -

                    function 举例

                    -

                    1. 勾选全部节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -treeObj.checkAllNodes(true);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.checkNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.checkNode.html deleted file mode 100644 index cb8bb7de..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.checkNode.html +++ /dev/null @@ -1,44 +0,0 @@ -
                    -
                    -

                    Function(treeNode, checked, checkTypeFlag, callbackFlag)zTreeObj.checkNode

                    -

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

                    -
                    -

                    -
                    -

                    勾选 或 取消勾选 单个节点。[setting.check.enable = true 时有效]

                    -

                    v3.x 中 checkNode() 方法可以触发 beforeCheck / onCheck 事件回调函数。便于减少冗余代码

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeNodeJSON

                    -

                    需要勾选 或 取消勾选 的节点数据

                    -

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    -

                    checkedBoolean

                    -

                    checked = true 表示勾选节点

                    -

                    checked = false 表示节点取消勾选

                    -

                    省略此参数,则根据对此节点的勾选状态进行 toggle 切换

                    -

                    不影响 treeNode.nochecked = true 的节点。

                    -

                    checkTypeFlagBoolean

                    -

                    checkTypeFlag = true 表示按照 setting.check.chkboxType 属性进行父子节点的勾选联动操作

                    -

                    checkTypeFlag = false 表示只修改此节点勾选状态,无任何勾选联动操作

                    -

                    checkTypeFlag = false 且 treeNode.checked = checked 时,不会触发回调函数,直接返回

                    -

                    不影响父子节点中 treeNode.nochecked = true 的节点。

                    -

                    callbackFlagBoolean

                    -

                    callbackFlag = true 表示执行此方法时触发 beforeCheck & onCheck 事件回调函数

                    -

                    callbackFlag = false 表示执行此方法时不触发事件回调函数

                    -

                    省略此参数,等同于 false

                    -

                    返回值无

                    -

                    目前无任何返回值

                    -
                    -

                    function 举例

                    -

                    1. 勾选当前选中的节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getSelectedNodes();
                    -for (var i=0, l=nodes.length; i < l; i++) {
                    -	treeObj.checkNode(nodes[i], true, true);
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.copyNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.copyNode.html deleted file mode 100644 index f1b624bf..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.copyNode.html +++ /dev/null @@ -1,44 +0,0 @@ -
                    -
                    -

                    Function(targetNode, treeNode, moveType, isSilent)zTreeObj.copyNode

                    -

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

                    -
                    -

                    -
                    -

                    复制节点。

                    -

                    v3.x 复制节点时进行 clone 操作。如果需要获取数据在 zTree 内的对象,请获取此方法的返回值。

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    targetNodeJSON

                    -

                    要复制到的目标节点 JSON 数据

                    -

                    如果复制成为根节点,请设置 targetNode 为 null 即可

                    -

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    -

                    treeNodeJSON

                    -

                    需要被复制的节点数据

                    -

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    -

                    moveTypeString

                    -

                    复制到目标节点的相对位置

                    -

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

                    -

                    isSilentBoolean

                    -

                    设定复制节点后是否自动展开父节点。

                    -

                    isSilent = true 时,不展开父节点,其他值或缺省状态都自动展开。

                    -

                    返回值JSON

                    -

                    返回值是最终加入到 zTree 内的节点数据

                    -

                    请务必记住:返回值中的数据对象 是 treeNode 被 clone 后的,所以绝对不相等!

                    -
                    -

                    function 举例

                    -

                    1. 将根节点中第二个节点 复制成为 第一个节点的子节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodes();
                    -treeObj.copyNode(nodes[0], nodes[1], "inner");
                    -
                    -

                    2. 将根节点中第二个节点 复制成为 第一个节点的前一个节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodes();
                    -treeObj.copyNode(nodes[0], nodes[1], "before");
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.destroy.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.destroy.html deleted file mode 100644 index d9f6da0d..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.destroy.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    Function(treeId)zTreeObj.destroy

                    -

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

                    -
                    -

                    -
                    -

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

                    -

                    1、用此方法可以销毁 zTreeObj 代表的 zTree。

                    -

                    2、销毁当前页面全部的 zTree,也可以使用 $.fn.zTree.destroy() 方法。

                    -

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

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    返回值无

                    -

                    目前无任何返回值

                    -
                    -

                    function 举例

                    -

                    1. 销毁 id 为 "treeDemo" 的 zTree

                    -
                    var zTreeObj = $.fn.zTree.getZTreeObj("treeDemo");
                    -zTreeObj.destroy();
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.editName.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.editName.html deleted file mode 100644 index 2d4eaf7b..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.editName.html +++ /dev/null @@ -1,29 +0,0 @@ -
                    -
                    -

                    Function(treeNode)zTreeObj.editName

                    -

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

                    -
                    -

                    -
                    -

                    设置某节点进入编辑名称状态。

                    -

                    1、如果需要用 js 取消编辑名称状态,请使用 cancelEditName(newName) 方法。

                    -

                    2、可利用此方法让当前正编辑的节点 input 输入框获取焦点。

                    -

                    3、请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeNodeJSON

                    -

                    指定进入编辑名称状态的节点 JSON 数据

                    -

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    -

                    返回值无

                    -

                    目前无任何返回值

                    -
                    -

                    function 举例

                    -

                    1. 设置根节点第一个节点进入编辑名称状态

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodes();
                    -treeObj.editName(nodes[0]);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.expandAll.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.expandAll.html deleted file mode 100644 index aaa3e464..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.expandAll.html +++ /dev/null @@ -1,30 +0,0 @@ -
                    -
                    -

                    Function(expandFlag)zTreeObj.expandAll

                    -

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

                    -
                    -

                    -
                    -

                    展开 / 折叠 全部节点

                    -

                    此方法不会触发 beforeExpand / onExpand 和 beforeCollapse / onCollapse 事件回调函数。

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    expandFlagBoolean

                    -

                    expandFlag = true 表示 展开 全部节点

                    -

                    expandFlag = false 表示 折叠 全部节点

                    -

                    返回值Boolean

                    -

                    返回值表示最终实际操作情况

                    -

                    true 表示 展开 全部节点

                    -

                    false 表示 折叠 全部节点

                    -

                    null 表示 不存在任何父节点

                    -
                    -

                    function 举例

                    -

                    1. 展开全部节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -treeObj.expandAll(true);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.expandNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.expandNode.html deleted file mode 100644 index 5d96d3f5..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.expandNode.html +++ /dev/null @@ -1,50 +0,0 @@ -
                    -
                    -

                    Function(treeNode, expandFlag, sonSign, focus, callbackFlag)zTreeObj.expandNode

                    -

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

                    -
                    -

                    -
                    -

                    展开 / 折叠 指定的节点

                    -

                    v3.x 中执行此方法可以触发 beforeExpand / onExpand 或 beforeCollapse / onCollapse 事件回调函数。便于减少冗余代码

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeNodeJSON

                    -

                    需要 展开 / 折叠 的节点数据

                    -

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    -

                    expandFlagBoolean

                    -

                    expandFlag = true 表示 展开 节点

                    -

                    expandFlag = false 表示 折叠 节点

                    -

                    省略此参数,则根据对此节点的展开状态进行 toggle 切换

                    -

                    sonSignBoolean

                    -

                    sonSign = true 表示 全部子孙节点 进行与 expandFlag 相同的操作

                    -

                    sonSign = false 表示 只影响此节点,对于其 子孙节点无任何影响

                    -

                    sonSign = false 且 treeNode.open = expandFlag 时,不会触发回调函数,直接返回

                    -

                    省略此参数,等同于 false

                    -

                    focusBoolean

                    -

                    focus = true 表示 展开 / 折叠 操作后,通过设置焦点保证此焦点进入可视区域内

                    -

                    focus = false 表示 展开 / 折叠 操作后,不设置任何焦点

                    -

                    省略此参数,等同于 true

                    -

                    callbackFlagBoolean

                    -

                    callbackFlag = true 表示执行此方法时触发 beforeExpand / onExpand 或 beforeCollapse / onCollapse 事件回调函数

                    -

                    callbackFlag = false 表示执行此方法时不触发事件回调函数

                    -

                    省略此参数,等同于 false

                    -

                    返回值Boolean

                    -

                    返回值表示最终实际操作情况

                    -

                    true 表示 展开 节点

                    -

                    false 表示 折叠 节点

                    -

                    null 表示 不是父节点

                    -
                    -

                    function 举例

                    -

                    1. 展开当前选择的第一个节点(包括其全部子节点)

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getSelectedNodes();
                    -if (nodes.length>0) {
                    -	treeObj.expandNode(nodes[0], true, true, true);
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getChangeCheckedNodes.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getChangeCheckedNodes.html deleted file mode 100644 index ba865347..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getChangeCheckedNodes.html +++ /dev/null @@ -1,24 +0,0 @@ -
                    -
                    -

                    Function()zTreeObj.getChangeCheckedNodes

                    -

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

                    -
                    -

                    -
                    -

                    获取输入框勾选状态被改变的节点集合(与原始数据 checkedOld 对比)。[setting.check.enable = true 时有效]

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    返回值Array(JSON)

                    -

                    返回全部勾选状态被改变的节点集合 Array

                    -

                    如果需要获取每次操作后全部被改变勾选状态的节点数据,请在每次勾选操作后,遍历所有被改变勾选状态的节点数据,让其 checkedOld = checked 就可以了。

                    -
                    -

                    function 举例

                    -

                    1. 获取当前勾选状态被改变的节点集合

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getChangeCheckedNodes();
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getCheckedNodes.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getCheckedNodes.html deleted file mode 100644 index 85f4ba04..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getCheckedNodes.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    Function(checked)zTreeObj.getCheckedNodes

                    -

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

                    -
                    -

                    -
                    -

                    获取输入框被勾选 或 未勾选的节点集合。[setting.check.enable = true 时有效]

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    checkedBoolean

                    -

                    checked = true 表示获取 被勾选 的节点集合

                    -

                    checked = false 表示获取 未勾选 的节点集合

                    -

                    省略此参数,等同于 true。

                    -

                    对于 treeNode.nochecked = true 的节点不进行获取。

                    -

                    返回值Array(JSON)

                    -

                    返回全部符合要求的节点集合 Array

                    -
                    -

                    function 举例

                    -

                    1. 获取当前被勾选的节点集合

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getCheckedNodes(true);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getNodeByParam.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getNodeByParam.html deleted file mode 100644 index 89e72c78..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getNodeByParam.html +++ /dev/null @@ -1,32 +0,0 @@ -
                    -
                    -

                    Function(key, value, parentNode)zTreeObj.getNodeByParam

                    -

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

                    -
                    -

                    -
                    -

                    根据节点数据的属性搜索,获取条件完全匹配的节点数据 JSON 对象

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    keyString

                    -

                    需要精确匹配的属性名称

                    -

                    value?

                    -

                    需要精确匹配的属性值,可以是任何类型,只要保证与 key 指定的属性值保持一致即可

                    -

                    parentNodeJSON

                    -

                    搜索范围,指定在某个父节点下的子节点中进行搜索

                    -

                    忽略此参数,表示在全部节点中搜索

                    -

                    返回值JSON

                    -

                    匹配精确搜索的节点数据

                    -

                    1、如无结果,返回 null

                    -

                    2、如有多个节点满足查询条件,只返回第一个匹配到的节点

                    -
                    -

                    function 举例

                    -

                    1. 查找 id = 1 的节点数据

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var node = treeObj.getNodeByParam("id", 1, null);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getNodeByTId.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getNodeByTId.html deleted file mode 100644 index 76fcc486..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getNodeByTId.html +++ /dev/null @@ -1,27 +0,0 @@ -
                    -
                    -

                    Function(tId)zTreeObj.getNodeByTId

                    -

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

                    -
                    -

                    -
                    -

                    根据 zTree 的唯一标识 tId 快速获取节点 JSON 数据对象

                    -

                    通过内部的 cache 获取,不需要遍历节点。

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    tIdString

                    -

                    节点在 zTree 内的唯一标识 tId

                    -

                    返回值JSON

                    -

                    tId 对应的节点 JSON 数据对象

                    -

                    如无结果,返回 null

                    -
                    -

                    function 举例

                    -

                    1. 获取 tId = "tree_10" 的节点数据

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var node = treeObj.getNodeByTId("tree_10");
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getNodeIndex.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getNodeIndex.html deleted file mode 100644 index b2c757d2..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getNodeIndex.html +++ /dev/null @@ -1,30 +0,0 @@ -
                    -
                    -

                    Function(treeNode)zTreeObj.getNodeIndex

                    -

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

                    -
                    -

                    -
                    -

                    获取某节点在同级节点中的序号(从0开始)

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeNodeJSON

                    -

                    需要查询顺序的节点 JSON 数据对象

                    -

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    -

                    返回值Number

                    -

                    返回值从 0 开始计数

                    -

                    如果不存在该节点数据,返回 -1

                    -
                    -

                    function 举例

                    -

                    1. 获取当前选中的第一个节点在同级节点中的序号

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getSelectedNodes();
                    -if (nodes.length>0) {
                    -	var index = treeObj.getNodeIndex(nodes[0]);
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getNodes.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getNodes.html deleted file mode 100644 index b368535e..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getNodes.html +++ /dev/null @@ -1,26 +0,0 @@ -
                    -
                    -

                    Function()zTreeObj.getNodes

                    -

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

                    -
                    -

                    -
                    -

                    获取 zTree 的全部节点数据

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    返回值Array(JSON)

                    -

                    全部节点数据

                    -

                    1、Array 仅仅是根节点的集合(默认情况子节点都处于 children 属性下);

                    -

                    2、如需遍历全部节点需要利用递归,或利用 transformToArray 方法 将数据变成简单的 Array 集合

                    -

                    3、对于异步加载模式下,尚未加载的子节点是无法通过此方法获取的。

                    -
                    -

                    function 举例

                    -

                    1. 获取全部节点数据

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodes();
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getNodesByFilter.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getNodesByFilter.html deleted file mode 100644 index 69174251..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getNodesByFilter.html +++ /dev/null @@ -1,43 +0,0 @@ -
                    -
                    -

                    Function(filter, isSingle, parentNode, invokeParam)zTreeObj.getNodesByFilter

                    -

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

                    -
                    -

                    -
                    -

                    根据自定义规则搜索节点数据 JSON 对象集合 或 单个节点数据

                    -

                    可自定义复杂的搜索规则

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    filterFunction

                    -

                    自定义过滤器函数 function filter(node) {...}

                    -

                    filter 参数:node (节点数据 JSON)

                    -

                    filter 返回值:boolean (true 表示符合搜索条件;false 表示不符合搜索条件)

                    -

                    isSingleBoolean

                    -

                    isSingle = true 表示只查找单个节点

                    -

                    isSingle = false 表示查找节点集合

                    -

                    忽略此参数,表示查找节点集合

                    -

                    parentNodeJSON

                    -

                    可以指定在某个父节点下的子节点中搜索

                    -

                    忽略此参数,表示在全部节点中搜索

                    -

                    invokeParam任意类型

                    -

                    用户自定义的数据对象,用于 filter 中进行计算

                    -

                    返回值Array(JSON) / JSON

                    -

                    isSingle = true 返回 第一个找到的节点数据 JSON,无结果时返回 null

                    -

                    isSingle = false 返回 节点数据集合 Array(JSON),无结果时返回 [ ]

                    -
                    -

                    function 举例

                    -

                    1. 查找 level = 2 & name 中包含 "test" 的节点数据

                    -
                    function filter(node) {
                    -    return (node.level == 2 && node.name.indexOf("test")>-1);
                    -}
                    -......
                    -var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var node = treeObj.getNodesByFilter(filter, true); // 仅查找一个节点
                    -var nodes = treeObj.getNodesByFilter(filter); // 查找节点集合
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getNodesByParam.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getNodesByParam.html deleted file mode 100644 index cf45939c..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getNodesByParam.html +++ /dev/null @@ -1,31 +0,0 @@ -
                    -
                    -

                    Function(key, value, parentNode)zTreeObj.getNodesByParam

                    -

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

                    -
                    -

                    -
                    -

                    根据节点数据的属性搜索,获取条件完全匹配的节点数据 JSON 对象集合

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    keyString

                    -

                    需要精确匹配的属性名称

                    -

                    value?

                    -

                    需要精确匹配的属性值,可以是任何类型,只要保证与 key 指定的属性值保持一致即可

                    -

                    parentNodeJSON

                    -

                    可以指定在某个父节点下的子节点中搜索

                    -

                    忽略此参数,表示在全部节点中搜索

                    -

                    返回值Array(JSON)

                    -

                    匹配精确搜索的节点数据集合

                    -

                    如无结果,返回 [ ]

                    -
                    -

                    function 举例

                    -

                    1. 查找 name = "test" 的节点数据

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodesByParam("name", "test", null);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getNodesByParamFuzzy.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getNodesByParamFuzzy.html deleted file mode 100644 index 04d183f9..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getNodesByParamFuzzy.html +++ /dev/null @@ -1,32 +0,0 @@ -
                    -
                    -

                    Function(key, value, parentNode)zTreeObj.getNodesByParamFuzzy

                    -

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

                    -
                    -

                    -
                    -

                    根据节点数据的属性搜索,获取条件模糊匹配的节点数据 JSON 对象集合

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    keyString

                    -

                    需要模糊匹配的属性名称

                    -

                    valueString

                    -

                    需要模糊匹配的属性值

                    -

                    模糊匹配只能针对 String 类型的数据

                    -

                    parentNodeJSON

                    -

                    可以指定在某个父节点下的子节点中搜索

                    -

                    忽略此参数,表示在全部节点中搜索

                    -

                    返回值Array(JSON)

                    -

                    匹配模糊搜索的节点数据集合

                    -

                    如无结果,返回 [ ]

                    -
                    -

                    function 举例

                    -

                    1. 查找 name 包含 "test" 的节点数据

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodesByParamFuzzy("name", "test", null);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getSelectedNodes.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getSelectedNodes.html deleted file mode 100644 index ab36f8ee..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.getSelectedNodes.html +++ /dev/null @@ -1,23 +0,0 @@ -
                    -
                    -

                    Function()zTreeObj.getSelectedNodes

                    -

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

                    -
                    -

                    -
                    -

                    获取 zTree 当前被选中的节点数据集合

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    返回值Array(JSON)

                    -

                    当前被选中的节点数据集合

                    -
                    -

                    function 举例

                    -

                    1. 获取当前被选中的节点数据集合

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getSelectedNodes();
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.hideNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.hideNode.html deleted file mode 100644 index a1996b88..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.hideNode.html +++ /dev/null @@ -1,29 +0,0 @@ -
                    -
                    -

                    Function(treeNode)zTreeObj.hideNode

                    -

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

                    -
                    -

                    -
                    -

                    隐藏某个节点。

                    -

                    1、此功能不支持 exedit 扩展,因此不要在编辑状态时使用隐藏节点的方法。

                    -

                    2、隐藏/显示节点,会影响节点的 isFirstNode 和 isLastNode 属性。

                    -

                    3、请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeNodeJSON

                    -

                    指定被隐藏的节点 JSON 数据

                    -

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    -

                    返回值无

                    -

                    目前无任何返回值

                    -
                    -

                    function 举例

                    -

                    1. 隐藏根节点第一个节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodes();
                    -treeObj.hideNode(nodes[0]);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.hideNodes.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.hideNodes.html deleted file mode 100644 index cf752b50..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.hideNodes.html +++ /dev/null @@ -1,29 +0,0 @@ -
                    -
                    -

                    Function(treeNodes)zTreeObj.hideNodes

                    -

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

                    -
                    -

                    -
                    -

                    隐藏一批节点。

                    -

                    1、此功能不支持 exedit 扩展,因此不要在编辑状态时使用隐藏节点的方法。

                    -

                    2、隐藏/显示节点,会影响节点的 isFirstNode 和 isLastNode 属性。

                    -

                    3、请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeNodesArray(JSON)

                    -

                    指定被隐藏的节点 JSON 数据集合

                    -

                    请务必保证这些节点数据对象 是 zTree 内部的数据对象

                    -

                    返回值无

                    -

                    目前无任何返回值

                    -
                    -

                    function 举例

                    -

                    1. 隐藏根节点第一个节点的子节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodes();
                    -treeObj.hideNodes(nodes[0].children);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.moveNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.moveNode.html deleted file mode 100644 index 9c9180b9..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.moveNode.html +++ /dev/null @@ -1,46 +0,0 @@ -
                    -
                    -

                    Function(targetNode, treeNode, moveType, isSilent)zTreeObj.moveNode

                    -

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

                    -
                    -

                    -
                    -

                    移动节点。

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    targetNodeJSON

                    -

                    要移动到的目标节点 JSON 数据

                    -

                    如果移动成为根节点,请设置 targetNode 为 null 即可

                    -

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    -

                    treeNodeJSON

                    -

                    需要被移动的节点数据

                    -

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    -

                    moveTypeString

                    -

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

                    -

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

                    -

                    isSilentBoolean

                    -

                    设定移动节点后是否自动展开父节点。

                    -

                    isSilent = true 时,不展开父节点,其他值或缺省状态都自动展开。

                    -

                    返回值JSON

                    -

                    返回值是最终被移动的节点数据,正常情况下与 treeNode 参数完全相同

                    -

                    如果 返回值 为 null,说明 移动失败,主要原因有:
                    -  1、targetNode 是 treeNode 父节点,且 moveType = "inner"
                    -  2、targetNode 是 treeNode 子孙节点 -

                    -
                    -

                    function 举例

                    -

                    1. 将根节点中第二个节点 移动成为 第一个节点的子节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodes();
                    -treeObj.moveNode(nodes[0], nodes[1], "inner");
                    -
                    -

                    2. 将根节点中第二个节点 移动成为 第一个节点的前一个节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodes();
                    -treeObj.moveNode(nodes[0], nodes[1], "prev");
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.reAsyncChildNodes.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.reAsyncChildNodes.html deleted file mode 100644 index 4a354e2f..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.reAsyncChildNodes.html +++ /dev/null @@ -1,42 +0,0 @@ -
                    -
                    -

                    Function(parentNode, reloadType, isSilent)zTreeObj.reAsyncChildNodes

                    -

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

                    -
                    -

                    -
                    -

                    强行异步加载父节点的子节点。[setting.async.enable = true 时有效]

                    -

                    已经加载过的父节点可反复使用此方法重新加载。

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    parentNodeJSON

                    -

                    指定需要异步加载的父节点 JSON 数据

                    -

                    1、parentNode = null 时,相当于从根节点 Root 进行异步加载

                    -

                    2、parentNode.isParent = false 时,不进行异步加载

                    -

                    3、请务必保证此节点数据对象 是 zTree 内部的数据对象

                    -

                    reloadTypeString

                    -

                    reloadType = "refresh" 表示清空后重新加载。

                    -

                    reloadType != "refresh" 时,表示追加子节点处理。

                    -

                    isSilentBoolean

                    -

                    设定异步加载后是否自动展开父节点。

                    -

                    isSilent = true 时,不展开父节点,其他值或缺省状态都自动展开。

                    -

                    返回值无

                    -

                    目前无任何返回值

                    -
                    -

                    function 举例

                    -

                    1. 重新异步加载 zTree

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -treeObj.reAsyncChildNodes(null, "refresh");
                    -
                    -

                    2. 重新异步加载当前选中的第一个节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getSelectedNodes();
                    -if (nodes.length>0) {
                    -	treeObj.reAsyncChildNodes(nodes[0], "refresh");
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.refresh.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.refresh.html deleted file mode 100644 index 09a74ca3..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.refresh.html +++ /dev/null @@ -1,24 +0,0 @@ -
                    -
                    -

                    Function()zTreeObj.refresh

                    -

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

                    -
                    -

                    -
                    -

                    刷新 zTree 。

                    -

                    没有特殊必要,尽量不要使用此方法。单个节点更新请使用 updateNode 方法,异步加载模式下请使用 reAsyncChildNodes 方法。

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    返回值无

                    -

                    目前无任何返回值

                    -
                    -

                    function 举例

                    -

                    1. 刷新 zTree

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -treeObj.refresh();
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.removeChildNodes.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.removeChildNodes.html deleted file mode 100644 index 588639fb..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.removeChildNodes.html +++ /dev/null @@ -1,32 +0,0 @@ -
                    -
                    -

                    Function(parentNode)zTreeObj.removeChildNodes

                    -

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

                    -
                    -

                    -
                    -

                    清空某父节点的子节点。

                    -

                    1、清空子节点后,父节点会自动变为叶子节点,如需要父节点保持父节点状态,请设置 setting.data.keep.parent 属性。

                    -

                    2、请勿用此方法清空根节点,如果需要清空根节点,直接初始化 zTree,并且设置初始节点为 null 即可。

                    -

                    3、此方法不会触发任何事件回调函数。

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    parentNodeJSON

                    -

                    需要清空子节点的父节点数据

                    -

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    -

                    返回值Array(JSON)

                    -

                    将该父节点的子节点数据返回,如果不存在则返回 null

                    -
                    -

                    function 举例

                    -

                    1. 清空选中的第一个节点的子节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getSelectedNodes();
                    -if (nodes && nodes.length>0) {
                    -	treeObj.removeChildNodes(nodes[0]);
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.removeNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.removeNode.html deleted file mode 100644 index 442f5c7e..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.removeNode.html +++ /dev/null @@ -1,34 +0,0 @@ -
                    -
                    -

                    Function(treeNode, callbackFlag)zTreeObj.removeNode

                    -

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

                    -
                    -

                    -
                    -

                    删除节点。

                    -

                    v3.x 中删除节点可以触发 beforeRemove / onRemove 事件回调函数。便于减少冗余代码

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeNodeJSON

                    -

                    需要被删除的节点数据

                    -

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    -

                    callbackFlagBoolean

                    -

                    callbackFlag = true 表示执行此方法时触发 beforeRemove & onRemove 事件回调函数

                    -

                    callbackFlag = false 表示执行此方法时不触发事件回调函数

                    -

                    省略此参数,等同于 false

                    -

                    返回值无

                    -

                    目前无任何返回值

                    -
                    -

                    function 举例

                    -

                    1. 删除所有选中的节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getSelectedNodes();
                    -for (var i=0, l=nodes.length; i < l; i++) {
                    -	treeObj.removeNode(nodes[i]);
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.selectNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.selectNode.html deleted file mode 100644 index 6e80d813..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.selectNode.html +++ /dev/null @@ -1,34 +0,0 @@ -
                    -
                    -

                    Function(treeNode, addFlag)zTreeObj.selectNode

                    -

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

                    -
                    -

                    -
                    -

                    选中指定节点

                    -

                    v3.x 支持同时选中多个节点。

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeNodeJSON

                    -

                    需要被选中的节点数据

                    -

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    -

                    addFlagBoolean

                    -

                    addFlag = true 表示追加选中,会出现多点同时被选中的情况

                    -

                    addFlag = false 表示单独选中,原先被选中的节点会被取消选中状态

                    -

                    setting.view.selectedMulti = false 时,此参数无效,始终进行单独选中

                    -

                    返回值无

                    -

                    目前无任何返回值

                    -
                    -

                    function 举例

                    -

                    1. 单独选中根节点中第一个节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodes();
                    -if (nodes.length>0) {
                    -	treeObj.selectNode(nodes[0]);
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.setChkDisabled.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.setChkDisabled.html deleted file mode 100644 index b042ab43..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.setChkDisabled.html +++ /dev/null @@ -1,44 +0,0 @@ -
                    -
                    -

                    Function(node, disabled, inheritParent, inheritChildren)zTreeObj.setChkDisabled

                    -

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

                    -
                    -

                    -
                    -

                    禁用 或 解禁 某个节点的 checkbox / radio [setting.check.enable = true 时有效]

                    -

                    1、节点的 checkbox / radio 被禁用后,无法勾选或取消勾选,但能够影响父节点的半选状态

                    -

                    2、请不要直接修改已加载节点的 treeNode.chkDisabled 属性。

                    -

                    3、请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeNodeJSON

                    -

                    需要禁用 或 解禁 checkbox / radio 的节点数据

                    -

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    -

                    disabledBoolean

                    -

                    disabled = true 表示禁用 checkbox / radio

                    -

                    disabled = false 表示解禁 checkbox / radio

                    -

                    省略此参数,等同于 disabled = false

                    -

                    不影响 treeNode.nochecked = true 的节点。

                    -

                    inheritParentBoolean

                    -

                    inheritParent = true 表示全部父节点进行同样的操作

                    -

                    inheritParent = false 表示不影响父节点

                    -

                    省略此参数,等同于 inheritParent = false

                    -

                    inheritChildrenBoolean

                    -

                    inheritChildren = true 表示全部子节点进行同样的操作

                    -

                    inheritChildren = false 表示不影响子节点

                    -

                    省略此参数,等同于 inheritChildren = false

                    -

                    返回值无

                    -

                    目前无任何返回值

                    -
                    -

                    function 举例

                    -

                    1. 禁用当前选中的节点的 checkbox / radio

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getSelectedNodes();
                    -for (var i=0, l=nodes.length; i < l; i++) {
                    -	treeObj.setChkDisabled(nodes[i], true);
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.setEditable.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.setEditable.html deleted file mode 100644 index c90c8de6..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.setEditable.html +++ /dev/null @@ -1,27 +0,0 @@ -
                    -
                    -

                    Function(editable)zTreeObj.setEditable

                    -

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

                    -
                    -

                    -
                    -

                    设置 zTree 进入 / 取消 编辑状态。

                    -

                    对于编辑状态的各种功能需要提前设置对应 setting 中的不同属性

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    editableBoolean

                    -

                    true 表示进入 编辑状态

                    -

                    false 表示取消 编辑状态

                    -

                    返回值无

                    -

                    目前无任何返回值

                    -
                    -

                    function 举例

                    -

                    1. 设置 zTree 进入编辑状态

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -treeObj.setEditable(true);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.setting.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.setting.html deleted file mode 100644 index 61abd531..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.setting.html +++ /dev/null @@ -1,13 +0,0 @@ -
                    -
                    -

                    JSONzTreeObj.setting

                    -

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

                    -
                    -

                    -
                    -

                    zTree 对象使用的 setting 配置数据,详细请参考 “setting 配置详解”中的各个属性详细说明

                    -

                    v3.x 取消了原先操作 setting 的方法,让用户可以较自由的修改参数,但请注意,对于 zTree 初始化有影响的参数后期修改是不会起作用的,请对各个属性有较深入的了解以后再考虑进行修改。

                    -
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.showNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.showNode.html deleted file mode 100644 index ed22d510..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.showNode.html +++ /dev/null @@ -1,31 +0,0 @@ -
                    -
                    -

                    Function(treeNode)zTreeObj.showNode

                    -

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

                    -
                    -

                    -
                    -

                    显示某个被隐藏的节点。

                    -

                    1、此功能不支持 exedit 扩展,因此不要在编辑状态时使用隐藏节点的方法。

                    -

                    2、隐藏/显示节点,会影响节点的 isFirstNode 和 isLastNode 属性。

                    -

                    3、请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeNodeJSON

                    -

                    指定被显示的节点 JSON 数据

                    -

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    -

                    返回值无

                    -

                    目前无任何返回值

                    -
                    -

                    function 举例

                    -

                    1. 显示某个隐藏的节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var node = treeObj.getNodeByParam("isHidden", true);
                    -if (node) {
                    -  treeObj.showNode(node);
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.showNodes.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.showNodes.html deleted file mode 100644 index b0906574..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.showNodes.html +++ /dev/null @@ -1,29 +0,0 @@ -
                    -
                    -

                    Function(treeNodes)zTreeObj.showNodes

                    -

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

                    -
                    -

                    -
                    -

                    显示一批已经被隐藏的节点。

                    -

                    1、此功能不支持 exedit 扩展,因此不要在编辑状态时使用隐藏节点的方法。

                    -

                    2、隐藏/显示节点,会影响节点的 isFirstNode 和 isLastNode 属性。

                    -

                    3、请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeNodesArray(JSON)

                    -

                    指定被显示的节点 JSON 数据集合

                    -

                    请务必保证这些节点数据对象 是 zTree 内部的数据对象

                    -

                    返回值无

                    -

                    目前无任何返回值

                    -
                    -

                    function 举例

                    -

                    1. 显示全部隐藏的节点

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodesByParam("isHidden", true);
                    -treeObj.showNodes(nodes);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.transformToArray.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.transformToArray.html deleted file mode 100644 index a46dc61e..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.transformToArray.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    Function(treeNodes)zTreeObj.transformToArray

                    -

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

                    -
                    -

                    -
                    -

                    将 zTree 使用的标准 JSON 嵌套格式的数据转换为简单 Array 格式。(免去用户自行编写递归遍历全部节点的麻烦)

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeNodesArray(JSON) / JSON

                    -

                    需要被转换的 zTree 节点数据对象集合 或 某个单独节点的数据对象

                    -

                    返回值Array(JSON)

                    -

                    转换后的简单 Array 数据格式

                    -
                    -

                    function 举例

                    -

                    1. 将 zTree 节点数据转换为简单 Array 格式

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.transformToArray(treeObj.getNodes());
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.transformTozTreeNodes.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.transformTozTreeNodes.html deleted file mode 100644 index 4b026509..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.transformTozTreeNodes.html +++ /dev/null @@ -1,43 +0,0 @@ -
                    -
                    -

                    Function(simpleNodes)zTreeObj.transformTozTreeNodes

                    -

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

                    -
                    -

                    -
                    -

                    将简单 Array 格式数据转换为 zTree 使用的标准 JSON 嵌套数据格式。

                    -

                    使用此方法,请务必设置节点唯一标识属性名称 setting.data.simpleData.idKey 和 父节点唯一标识属性名称 setting.data.simpleData.pIdKey,并且让数据满足父子关系。

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    simpleNodesArray(JSON) / JSON

                    -

                    需要被转换的简单 Array 格式数据 或 某个单独的数据对象

                    -

                    返回值Array(JSON)

                    -

                    zTree 使用的标准数据,子节点都存在于父节点数据的 children 属性中

                    -

                    如果 simpleNodes 是一个 JSON 对象,则被简单封装成长度为 1 的数组。

                    -
                    -

                    function 举例

                    -

                    1. 将简单 Array 格式转换为zTree使用的标准格式

                    -
                    var setting = {
                    -	data: {
                    -		simpleData: {
                    -			enable: true,
                    -			idKey: "id",
                    -			pIdKey: "pId",
                    -			rootPId: 0
                    -		}
                    -	}
                    -};
                    -var simpleNodes = [
                    -    {"id":1, "pId":0, "name":"test1"},
                    -    {"id":11, "pId":1, "name":"test11"},
                    -    {"id":12, "pId":1, "name":"test12"},
                    -    {"id":111, "pId":11, "name":"test111"}
                    -];
                    -var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.transformTozTreeNodes(simpleNodes);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.updateNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.updateNode.html deleted file mode 100644 index 847fa6ee..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/cn/zTreeObj.updateNode.html +++ /dev/null @@ -1,37 +0,0 @@ -
                    -
                    -

                    Function(treeNode, checkTypeFlag)zTreeObj.updateNode

                    -

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

                    -
                    -

                    -
                    -

                    更新某节点数据,主要用于该节点显示属性的更新。

                    -

                    1、可针对 name、target、 url、icon、 iconSkin、checked、nocheck 等这几个用于显示效果的参数进行更新,其他用于 zTreeNodes 的参数请不要随意更新,对于展开节点,还请调用 expandNode方法,因此请勿随意修改 open 属性。

                    -

                    2、用此方法修改 checked 勾选状态不会触发 beforeCheck / onCheck 事件回调函数。

                    -

                    请通过 zTree 对象执行此方法。

                    -
                    -
                    -

                    Function 参数说明

                    -
                    -

                    treeNodeJSON

                    -

                    指定需要更新的节点 JSON 数据

                    -

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    -

                    checkTypeFlagBoolean

                    -

                    checkTypeFlag = true 表示按照 setting.check.chkboxType 属性进行父子节点的勾选联动操作

                    -

                    checkTypeFlag = false 表示只修改此节点勾选状态,无任何勾选联动操作

                    -

                    当 setting.check.enable = true 且 setting.check.chkStyle = "checkbox" 时才有效

                    -

                    不影响父子节点中 treeNode.nochecked = true 的节点。

                    -

                    返回值无

                    -

                    目前无任何返回值

                    -
                    -

                    function 举例

                    -

                    1. 更新根节点中第一个节点的名称

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodes();
                    -if (nodes.length>0) {
                    -	nodes[0].name = "test";
                    -	treeObj.updateNode(nodes[0]);
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/fn.zTree._z.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/fn.zTree._z.html deleted file mode 100644 index e2ae61d6..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/fn.zTree._z.html +++ /dev/null @@ -1,15 +0,0 @@ -
                    -
                    -

                    JSON$.fn.zTree._z

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    All of the internal methods in zTree v3.x are available through '$. fn.zTree._z', - use this if you want to develop your own zTree plug-ins.

                    -

                    Unless you are writing a plugin, - you should not use this object.

                    -
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/fn.zTree.destroy.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/fn.zTree.destroy.html deleted file mode 100644 index c53cb800..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/fn.zTree.destroy.html +++ /dev/null @@ -1,29 +0,0 @@ -
                    -
                    -

                    Function(treeId)$.fn.zTree.destroy

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    From zTree v3.4, zTree provides a method for destruction.

                    -

                    1. This method can destroy a zTree by treeId, or destroy all zTree instances.

                    -

                    2. If you want to destroy a zTree, you can use the 'zTreeObj.destroy()' method.

                    -

                    3. If you want to re-use the tree which has been destroyed, - you must first re-initialise it with the 'init()' method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier

                    -

                    If this parameter is omitted, all zTree instances will be destroyed.

                    -

                    Return none

                    -

                    no return value

                    -
                    -

                    Examples of function

                    -

                    1. Destroy the zTree with id === 'treeDemo'

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

                    2. Destroy all zTree instances

                    -
                    $.fn.zTree.destroy();
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/fn.zTree.getZTreeObj.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/fn.zTree.getZTreeObj.html deleted file mode 100644 index 49dadaa9..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/fn.zTree.getZTreeObj.html +++ /dev/null @@ -1,27 +0,0 @@ -
                    -
                    -

                    Function(treeId)$.fn.zTree.getZTreeObj

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    zTree v3.x provides this method to get zTree object from the tree's Id.

                    -

                    Please initialize zTree first, then you can use this method.

                    -

                    Users don't need to use a global variable to reference the zTree object, - as all of the callback methods will pass 'treeId' parameters, - and you can always call this method to get the zTree object.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier

                    -

                    Return JSON

                    -

                    zTree object

                    -

                    This is a reference to the zTree object.

                    -
                    -

                    Examples of function

                    -

                    1. Get the zTree object with id='tree'

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/fn.zTree.init.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/fn.zTree.init.html deleted file mode 100644 index b8c5e2a6..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/fn.zTree.init.html +++ /dev/null @@ -1,81 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    This method is used to create a zTree.

                    -

                    1. The web page must use the W3C DTD. For example: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

                    -

                    2. Needs jquery-1.4.2.js or better.

                    -

                    3. Needs jquery-ztree.core-3.0.js or better. - If you are using edit mode or checkbox / radio mode, - make sure you load jquery-ztree.exedit-3.0.js and jquery-ztree.excheck-3.0.js.

                    -

                    4. Needs zTreeStyle.css and image files

                    -

                    5. If you plan to use custom icons, please refer to the Demo, - or see the help on iconSkin.

                    -

                    6. Note: You need to set zTree container's class name to "ztree". - If you need to change it, don't forget to modify the css file. - If you need other special styles, you can modify the css file.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    objectjQuery Object

                    -

                    DOM Container for zTree

                    -

                    zSettingJSON

                    -

                    zTree's configuration data, please refer to "setting details" in the API Document.

                    -

                    zNodesArray(JSON) / JSON

                    -

                    zTree's node data, please refer to "treeNode data details" in the API Document.

                    -

                    1. zTree v3.x support to add single node, that is, if only to add one node, - you can use JSON without using Array.

                    -

                    2. If you are planning on using asynchronous loading of root nodes, set it to null or [ ]

                    -

                    3. If you are using simple data mode, please refer to "setting.data.simpleData" in the API Document.

                    -

                    Return JSON

                    -

                    zTree object

                    -

                    This object can provide the methods of operate the zTree

                    -

                    You can use $.fn.zTree.getZTreeObj method at any time to obtain.

                    -
                    -

                    Examples of setting & function

                    -

                    1. create a simple tree

                    -
                    <!DOCTYPE html>
                    -<HTML>
                    - <HEAD>
                    -  <TITLE> ZTREE DEMO </TITLE>
                    -  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
                    -  <link rel="stylesheet" href="zTreeStyle/zTreeStyle.css" type="text/css">
                    -  <script type="text/javascript" src="jquery-1.4.2.js"></script>
                    -  <script type="text/javascript" src="jquery.ztree.core-3.5.js"></script>
                    -<!--
                    -  <script type="text/javascript" src="jquery.ztree.excheck-3.5.js"></script>
                    -  <script type="text/javascript" src="jquery.ztree.exedit-3.5.js"></script>
                    --->
                    -  <SCRIPT type="text/javascript" >
                    -	var zTreeObj,
                    -	setting = {
                    -		view: {
                    -			selectedMulti: false
                    -		}
                    -	},
                    -	zTreeNodes = [
                    -		{"name":"Site Map", open:true, children: [
                    -			{ "name":"google", "url":"http://www.google.com", "target":"_blank"},
                    -			{ "name":"baidu", "url":"http://baidu.com", "target":"_blank"},
                    -			{ "name":"sina", "url":"http://www.sina.com.cn", "target":"_blank"}
                    -			]
                    -		}
                    -	];
                    -
                    -	$(document).ready(function(){
                    -		zTreeObj = $.fn.zTree.init($("#tree"), setting, zTreeNodes);
                    -
                    -	});
                    -  </SCRIPT>
                    - </HEAD>
                    -
                    -<BODY>
                    -<ul id="tree" class="ztree" style="width:230px; overflow:auto;"></ul>
                    - </BODY>
                    -</HTML>
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.autoParam.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.autoParam.html deleted file mode 100644 index e187b16e..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.autoParam.html +++ /dev/null @@ -1,42 +0,0 @@ -
                    -
                    -

                    Array(String)setting.async.autoParam

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    During asynchronous loading, a request is sent to the server, which contains the identify of the parent node, - so it can retrieve the children. - This attribute is an array of strings, which is the identity parameter (or parameters). - It applies when [setting.async.enable = true]

                    -

                    Default:[ ]

                    -
                    -
                    -

                    Array(String) Format

                    -
                    -

                    1. Put the attribute name(s) of node to the array. For example: ["id", "name"]

                    -

                    2. You can rename the parameter name as sent to the server. For example: server only accepts "zId" -- ["id=zId"]

                    -
                    -

                    Examples of setting

                    -

                    1. set auto commit 'id' attribute

                    -
                    var setting = {
                    -	async: {
                    -		enable: true,
                    -		url: "http://host/getNode.php",
                    -		autoParam: ["id"]
                    -	}
                    -};
                    -If we have a parent node: {id:1, name:"test"}, When we are asynchronously loading this parent node's children, it will be submitted to the server with parameters: id=1
                    -......
                    -

                    2. set auto commit 'id' attribute, but the parameter name expected by the server is 'zId'

                    -
                    var setting = {
                    -	async: {
                    -		enable: true,
                    -		url: "http://host/getNode.php",
                    -		autoParam: ["id=zId"]
                    -	}
                    -};
                    -If we have a parent node: {id:1, name:"test"}, When we are asynchronously loading this parent node's children, it will be submitted to the server with parameters: zId=1
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.contentType.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.contentType.html deleted file mode 100644 index c9e15099..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.contentType.html +++ /dev/null @@ -1,30 +0,0 @@ -
                    -
                    -

                    Stringsetting.async.contentType

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    When Ajax sends data to the server, it uses this content-type. - It is used when [setting.async.enable = true]

                    -

                    Default:"application/x-www-form-urlencoded"

                    -
                    -
                    -

                    String Format

                    -
                    -

                    contentType = "application/x-www-form-urlencoded", means: the sending data format is "form" format.

                    -

                    contentType = "application/json", means: the sending data format is "json" format. (for .Net)

                    -
                    -

                    Examples of setting

                    -

                    1. set the sending data format to "json" format.

                    -
                    var setting = {
                    -	async: {
                    -		enable: true,
                    -		contentType: "application/json",
                    -		url: "http://host/getNode.php",
                    -		autoParam: ["id", "name"]
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.dataFilter.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.dataFilter.html deleted file mode 100644 index 4347a082..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.dataFilter.html +++ /dev/null @@ -1,45 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Callback function to pre-process Ajax return data. It is valid when [setting.async.enable = true]

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId

                    -

                    parentNodeJSON

                    -

                    Parent node's JSON data object

                    -

                    When asynchronously loading the root, the parentNode = null

                    -

                    responseDataArray(JSON) / JSON / String

                    -

                    Array (JSON) / JSON / String data objects

                    -

                    From v3.4, support XML strings.

                    -

                    Return Array(JSON) / JSON

                    -

                    The return value should be the JSON data structure which is supported by the zTree.

                    -

                    v3.x supports to load single node JSON data object.

                    -
                    -

                    Examples of setting & function

                    -

                    1. Modify the node name attributes returned by an Ajax request.

                    -
                    function ajaxDataFilter(treeId, parentNode, responseData) {
                    -    if (responseData) {
                    -      for(var i =0; i < responseData.length; i++) {
                    -        responseData[i].name += "_filter";
                    -      }
                    -    }
                    -    return responseData;
                    -};
                    -var setting = {
                    -	async: {
                    -		enable: true,
                    -		url: "http://host/getNode.php",
                    -		dataFilter: ajaxDataFilter
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.dataType.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.dataType.html deleted file mode 100644 index 41db3007..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.dataType.html +++ /dev/null @@ -1,29 +0,0 @@ -
                    -
                    -

                    Stringsetting.async.dataType

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    The data type of Ajax requests. It is valid when [setting.async.enable = true]

                    -

                    Default:"text"

                    -
                    -
                    -

                    String Format

                    -
                    -

                    dataType = "text", There is probably no need to change this.

                    -

                    The 'dataType' in zTree and jQuery's ajax requests is same.

                    -
                    -

                    Examples of setting

                    -

                    1. Set the dataType which ajax retrieves to "text".

                    -
                    var setting = {
                    -	async: {
                    -		enable: true,
                    -		dataType: "text",
                    -		url: "http://host/getNode.php",
                    -		autoParam: ["id", "name"]
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.enable.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.enable.html deleted file mode 100644 index c2844764..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.enable.html +++ /dev/null @@ -1,30 +0,0 @@ -
                    -
                    -

                    Booleansetting.async.enable

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Set zTree asynchronous loading mode on/off.

                    -

                    Default: false

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true - turn on asynchronous loading mode

                    -

                    false - turn off asynchronous loading mode

                    -

                    If set it is true, you must set other attributes in setting.async

                    -

                    If you don't pass the 'treeNodes' parameter when you initialize zTree, the root nodes will be retrieved using ajax.

                    -
                    -

                    Examples of setting

                    -

                    1. Turn on asynchronous loading mode

                    -
                    var setting = {
                    -	async: {
                    -		enable: true,
                    -		url: "http://host/getNode.php",
                    -		autoParam: ["id", "name"]
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.otherParam.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.otherParam.html deleted file mode 100644 index 54ae95bc..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.otherParam.html +++ /dev/null @@ -1,40 +0,0 @@ -
                    -
                    -

                    Array(String) / JSONsetting.async.otherParam

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    The query parameters of the Ajax request. (key - value) It is valid when [setting.async.enable = true]

                    -

                    Default: [ ]

                    -
                    -
                    -

                    Array(String) Format

                    -
                    -

                    Can be an empty array. e.g. [ ]. The array should contain key value pairs, e.g. [key, value]. (Either or [key] or [key, value, key] is wrong!!)

                    -
                    -

                    JSON Format

                    -
                    -

                    Use JSON hash data to set the key-value pairs. e.g. { key1:value1, key2:value2 }

                    -
                    -

                    Examples of setting

                    -

                    1. Using Array(String) Format

                    -
                    var setting = {
                    -	async: {
                    -		enable: true,
                    -		url: "http://host/getNode.php",
                    -		otherParam: ["id", "1", "name", "test"]
                    -	}
                    -};
                    -when zTree sends the ajax request, the query string will be like this: id=1&name=test
                    -

                    2. Using JSON data Format

                    -
                    var setting = {
                    -	async: {
                    -		enable: true,
                    -		url: "http://host/getNode.php",
                    -		otherParam: { "id":"1", "name":"test"}
                    -	}
                    -};
                    -when zTree sends the ajax request, the query string will be like this: id=1&name=test
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.type.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.type.html deleted file mode 100644 index c67599a0..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.type.html +++ /dev/null @@ -1,30 +0,0 @@ -
                    -
                    -

                    Stringsetting.async.type

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Http request tyoe in ajax. It is valid when [setting.async.enable = true]

                    -

                    Default: "post"

                    -
                    -
                    -

                    String Format

                    -
                    -

                    "post" - http request mode

                    -

                    "get" - http request mode

                    -

                    Both zTree and jQuery's this 'type' for ajax requests.

                    -
                    -

                    Examples of setting

                    -

                    1. Set http request mode is 'get'

                    -
                    var setting = {
                    -	async: {
                    -		enable: true,
                    -		type: "get",
                    -		url: "http://host/getNode.php",
                    -		autoParam: ["id", "name"]
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.url.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.url.html deleted file mode 100644 index 2384c08d..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.async.url.html +++ /dev/null @@ -1,50 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    The URL to which the ajax request is sent. It is valid when [setting.async.enable = true]

                    -

                    Default: ""

                    -
                    -
                    -

                    String Format

                    -
                    -

                    A url string(e.g. "http://www.domain.com/cgi-bin/my-script.cgi"). Note: please check that the url can be loaded with a browser

                    -

                    Url can also take parameters, please note that they need to be urlencoded.

                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    Parent node's JSON data object

                    -

                    When asynchronously loading the root, the treeNode = null

                    -

                    Return String

                    -

                    Return value is same as 'String Format'

                    -
                    -

                    Examples of setting & function

                    -

                    1. set ajax url is "nodes.php"

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

                    2. set ajax url is "function"

                    -
                    function getAsyncUrl(treeId, treeNode) {
                    -    return treeNode.isParent ? "nodes1.php" : "nodes2.php";
                    -};
                    -var setting = {
                    -	async: {
                    -		enable: true,
                    -		url: getAsyncUrl,
                    -		autoParam: ["id", "name"]
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeAsync.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeAsync.html deleted file mode 100644 index 55f52ee5..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeAsync.html +++ /dev/null @@ -1,36 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.callback.beforeAsync

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    This callback is made before zTree makes an ajax request, giving you an opportunity to decide if it should proceed or not. - Return false to prevent zTree from sending the ajax request.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the parent node

                    -

                    When asynchronously loading the root, treeNode = null

                    -

                    Return Boolean

                    -

                    return true or false

                    -

                    If the function returns false, zTree will not send the ajax request, and will not trigger the 'onAsyncSuccess / onAsyncError' callback.

                    -
                    -

                    Examples of setting & function

                    -

                    1. If the parent node's attribute 'id' is 1, don't send the ajax request.

                    -
                    function myBeforeCallBack(treeId, treeNode) {
                    -    return (treeNode.id !== 1);
                    -};
                    -var setting = {
                    -	callback: {
                    -		beforeAsync: myBeforeCallBack
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeCheck.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeCheck.html deleted file mode 100644 index b2d71e56..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeCheck.html +++ /dev/null @@ -1,34 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.callback.beforeCheck

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    Callback before checking or unchecking a node, A false return value from the callback will prevent any change in the checked state.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which is checked or unchecked

                    -

                    Return Boolean

                    -

                    return true or false

                    -

                    If return false, zTree will not change the checkbox state, and will not trigger the 'onCheck' callback.

                    -
                    -

                    Examples of setting & function

                    -

                    1. This example returns false, preventing all checkboxes in the tree from toggling.

                    -
                    function myBeforeCheckCallBack(treeId, treeNode) {
                    -    return false;
                    -};
                    -var setting = {
                    -	callback: {
                    -		beforeCheck: myBeforeCheckCallBack
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeClick.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeClick.html deleted file mode 100644 index 250416b3..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeClick.html +++ /dev/null @@ -1,49 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Before click callback, return false to prevent the 'onClick' callback.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which is clicked

                    -

                    clickFlagNumber

                    -

                    Node is selected or deselected state, please see table below for details

                    - - - - - - - - - - - - -
                    clickFlagselectedMultiautoCancelSelected
                    &&
                    event.ctrlKey / metaKey
                    isSelectedoperate for selected
                    1truefalsefalsenode is selected (single)
                    1truefalsetruenode is selected (single)
                    2truetruefalsenode is selected (multi)
                    0truetruetruenode is deselected
                    1falsefalsefalsenode is selected (single)
                    1falsefalsetruenode is selected (single)
                    1falsetruefalsenode is selected (single)
                    0falsetruetruenode is deselected
                    -

                    Return Boolean

                    -

                    return true or false

                    -

                    If return false, zTree will not change selected state, and will not trigger the 'onClick' callback.

                    -
                    -

                    Examples of setting & function

                    -

                    1. disabled to click the node

                    -
                    function myBeforeClick(treeId, treeNode, clickFlag) {
                    -    return (treeNode.id !== 1);
                    -};
                    -var setting = {
                    -	callback: {
                    -		beforeClick: myBeforeClick
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeCollapse.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeCollapse.html deleted file mode 100644 index 950b728a..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeCollapse.html +++ /dev/null @@ -1,34 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.callback.beforeCollapse

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Specify callback function to be called before collapse node, The return value controls the collapse node.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node to be collapsed

                    -

                    Return Boolean

                    -

                    return true or false

                    -

                    If return false, zTree will not collapse node, and will not trigger the 'onCollapse' callback.

                    -
                    -

                    Examples of setting & function

                    -

                    1. disabled to collapse node which is expanded

                    -
                    function myBeforeCollapse(treeId, treeNode) {
                    -    return false;
                    -};
                    -var setting = {
                    -	callback: {
                    -		beforeCollapse: myBeforeCollapse
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeDblClick.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeDblClick.html deleted file mode 100644 index 3d4ead19..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeDblClick.html +++ /dev/null @@ -1,36 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.callback.beforeDblClick

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Specify callback function, executed before the 'onDblClick' callback, The return value controls the 'onDblClick' callback.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which is double clicked

                    -

                    If the DOM which dblclicked isn't a node, it will return null.

                    -

                    Return Boolean

                    -

                    return true or false

                    -

                    If return false, ztree will not trigger the 'onDblClick' callback, no effect on other operations.

                    -

                    This callback function does not affect the auto expand of the parent node , please refer to setting.view.dblClickExpand properties.

                    -
                    -

                    Examples of setting & function

                    -

                    1. disable to trigger the 'onDblClick' callback

                    -
                    function myBeforeDblClick(treeId, treeNode) {
                    -    return false;
                    -};
                    -var setting = {
                    -	callback: {
                    -		beforeDblClick: myBeforeDblClick
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeDrag.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeDrag.html deleted file mode 100644 index fca278d6..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeDrag.html +++ /dev/null @@ -1,39 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNodes)setting.callback.beforeDrag

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Specify callback function to be called before the drag node callback, The return value controls whether the drag node callback will execute.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId, the id of the containing tree.

                    -

                    treeNodesArray(JSON)

                    -

                    A collection of the nodes being dragged

                    -

                    v3.x allows the drag and drop of multiple sibling nodes, so this parameter's type is changed to Array(JSON).

                    -

                    If the selected nodes aren't sibling nodes, you can only drag one node.

                    -

                    Return Boolean

                    -

                    return true or false

                    -

                    If return false, zTree will abort the drag and drop, and will not trigger the 'onDrag / beforeDrop / onDrop' sequence of callbacks.

                    -
                    -

                    Examples of setting & function

                    -

                    1. disable drag completely (by returning false)

                    -
                    function myBeforeDrag(treeId, treeNodes) {
                    -    return false;
                    -};
                    -var setting = {
                    -	edit: {
                    -		enable: true
                    -	},
                    -	callback: {
                    -		beforeDrag: myBeforeDrag
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeDragOpen.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeDragOpen.html deleted file mode 100644 index d28bafe2..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeDragOpen.html +++ /dev/null @@ -1,37 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.callback.beforeDragOpen

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Callback executed before drag node to collapsed parent node, The return value controls the auto expand behaviour of the parent node.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId, the tree is what the treeNode(parent node) is belong to.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the parent node which will be auto expanded

                    -

                    Return Boolean

                    -

                    return true or false

                    -

                    If return false, zTree will not auto expand parent node.

                    -
                    -

                    Examples of setting & function

                    -

                    1. disable to auto expand parent node.

                    -
                    function myBeforeDragOpen(treeId, treeNode) {
                    -    return false;
                    -};
                    -var setting = {
                    -	edit: {
                    -		enable: true
                    -	},
                    -	callback: {
                    -		beforeDragOpen: myBeforeDragOpen
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeDrop.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeDrop.html deleted file mode 100644 index 9b244758..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeDrop.html +++ /dev/null @@ -1,50 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Specify callback function to be called before drag-drop of a node, The return value controls the execution of drag-drop callback.

                    -

                    Default: null

                    -

                    When a node is dropped, if the drop is not in a valid location, this callback will not be triggered, and will revert to the original position.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId, the id of the containing tree.

                    -

                    treeNodesArray(JSON)

                    -

                    A collection of the nodes which has been dragged

                    -

                    The treeNodes which have been dragged, when copying nodes or moving nodes.

                    -

                    targetNodeJSON

                    -

                    JSON data object of the destination node on which treeNodes are being dropped.

                    -

                    If the treeNodes is the root node, the targetNode = null

                    -

                    moveTypeString

                    -

                    the relative position of move to the target node

                    -

                    "inner": will be child of targetNode

                    -

                    "prev": will be sibling node, and be in front of targetNode

                    -

                    "next": will be sibling node, and be behind targetNode

                    -

                    isCopyBoolean

                    -

                    the flag used to determine if the drop is to copy or move the node

                    -

                    true: copy node; false: move node

                    -

                    Return Boolean

                    -

                    return true or false

                    -

                    If return false, zTree will restore the dragged nodes, and will not trigger the 'onDrop' callback.

                    -
                    -

                    Examples of setting & function

                    -

                    1. disable to drag nodes to root

                    -
                    function myBeforeDrop(treeId, treeNodes, targetNode, moveType) {
                    -    return !(targetNode == null || (moveType != "inner" && !targetNode.parentTId));
                    -};
                    -var setting = {
                    -	edit: {
                    -		enable: true
                    -	},
                    -	callback: {
                    -		beforeDrop: myBeforeDrop
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeEditName.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeEditName.html deleted file mode 100644 index a8200807..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeEditName.html +++ /dev/null @@ -1,38 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.callback.beforeEditName

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Specify callback function to be called before click edit button, The return value controls the editing of the name.

                    -

                    This callback is fired when the edit button is clicked, to control the custom editing operation.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node to be edited.

                    -

                    Return Boolean

                    -

                    return true or false

                    -

                    If return false, allow editing of the name.

                    -
                    -

                    Examples of setting & function

                    -

                    1. disable editing of any parent node's name

                    -
                    function myBeforeEditName(treeId, treeNode) {
                    -	return !treeNode.isParent;
                    -}
                    -var setting = {
                    -	edit: {
                    -		enable: true
                    -	},
                    -	callback: {
                    -		beforeEditName: myBeforeEditName
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeExpand.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeExpand.html deleted file mode 100644 index 8b0a6e73..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeExpand.html +++ /dev/null @@ -1,34 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.callback.beforeExpand

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Specify callback function to be called before expanding a node, The return value controls the expand node callback.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node to be expanded

                    -

                    Return Boolean

                    -

                    return true or false

                    -

                    If return false, zTree will not expand node, and will not trigger the 'onExpand' callback.

                    -
                    -

                    Examples of setting & function

                    -

                    1. disables expanding of all nodes

                    -
                    function myBeforeExpand(treeId, treeNode) {
                    -    return false;
                    -};
                    -var setting = {
                    -	callback: {
                    -		beforeExpand: myBeforeExpand
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeMouseDown.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeMouseDown.html deleted file mode 100644 index d27f431d..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeMouseDown.html +++ /dev/null @@ -1,35 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.callback.beforeMouseDown

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Specify callback function, executed before the 'onMouseDown' callback, The return value controls the 'onMouseDown' callback.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which mouse over

                    -

                    If the DOM which mouse over isn't a node, it will return null.

                    -

                    Return Boolean

                    -

                    return true or false

                    -

                    If return false, zTree will not trigger the 'onMouseDown' callback, no effect on other operations.

                    -
                    -

                    Examples of setting & function

                    -

                    1. disable to trigger the 'onMouseDown' callback

                    -
                    function myBeforeMouseDown(treeId, treeNode) {
                    -    return false;
                    -};
                    -var setting = {
                    -	callback: {
                    -		beforeMouseDown: myBeforeMouseDown
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeMouseUp.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeMouseUp.html deleted file mode 100644 index e7d10de5..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeMouseUp.html +++ /dev/null @@ -1,35 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.callback.beforeMouseUp

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Specify callback function, executed before the 'onMouseUp' callback, The return value controls the 'onMouseUp' callback.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which mouse over

                    -

                    If the DOM which mouse over isn't a node, it will return null.

                    -

                    Return Boolean

                    -

                    return true or false

                    -

                    If return false, zTree will not trigger the 'onMouseUp' callback, no effect on other operations.

                    -
                    -

                    Examples of setting & function

                    -

                    1. disable to trigger the 'onMouseUp' callback

                    -
                    function myBeforeMouseUp(treeId, treeNode) {
                    -    return false;
                    -};
                    -var setting = {
                    -	callback: {
                    -		beforeMouseUp: myBeforeMouseUp
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeRemove.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeRemove.html deleted file mode 100644 index 0e155d49..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeRemove.html +++ /dev/null @@ -1,37 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.callback.beforeRemove

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Specify callback function to be called before remove node, The return value controls the allow to remove node.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node to be removed.

                    -

                    Return Boolean

                    -

                    return true or false

                    -

                    If return false, zTree will not remove node, and will not trigger the 'onRemove' callback.

                    -
                    -

                    Examples of setting & function

                    -

                    1. disable to remove node

                    -
                    function myBeforeRemove(treeId, treeNode) {
                    -	return false;
                    -}
                    -var setting = {
                    -	edit: {
                    -		enable: true
                    -	},
                    -	callback: {
                    -		beforeRemove: myBeforeRemove
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeRename.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeRename.html deleted file mode 100644 index bfed1446..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeRename.html +++ /dev/null @@ -1,46 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Specify callback function to be called before rename(when input DOM blur or press Enter Key), The return value controls the allow to rename node.

                    -

                    When node is editing name, press the ESC key to restore the original name and stop edit name.

                    -

                    From v3.5.13, zTree will trigger this callback when user cancel edit name. please see 'isCancel' parameter.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node to be rename.

                    -

                    newNameString

                    -

                    the new name

                    -

                    isCancelBoolean

                    -

                    the status about cancel edit name (v3.5.13+)

                    -

                    isCancel = true means: user cancel edit name. (press ESC or use cancelEditName() function)

                    -

                    isCancel = false means: user submit edit name.

                    -

                    Return Boolean

                    -

                    return true or false

                    -

                    If return false, the treeNode will keep the editing name, don't trigger the 'onRename' callback, and will ignore other enents, until the callback return true.

                    -

                    If returns false, zTree will not set the input box to get focus to avoid the warning message which led to repeated triggering ‘beforeRename’ callback. Please use editName() method to set the input box to get focus when user close the warning message.

                    -
                    -

                    Examples of setting & function

                    -

                    1. the length of the new name can't less than 5

                    -
                    function myBeforeRename(treeId, treeNode, newName, isCancel) {
                    -	return newName.length > 5;
                    -}
                    -var setting = {
                    -	edit: {
                    -		enable: true
                    -	},
                    -	callback: {
                    -		beforeRename: myBeforeRename
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeRightClick.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeRightClick.html deleted file mode 100644 index 9d05a0b1..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.beforeRightClick.html +++ /dev/null @@ -1,35 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.callback.beforeRightClick

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Used to capture the right click event before the 'onRightClick' callback, The return value controls the 'onRightClick' callback.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which is mouse right clicked

                    -

                    If the DOM which mouse right clicked isn't a node, it will return null.

                    -

                    ReturnBoolean

                    -

                    return true or false

                    -

                    If return false, ztree will not trigger the 'onRightClick' callback, no effect on other operations.

                    -
                    -

                    Examples of setting & function

                    -

                    1. disable to trigger the 'onRightClick' callback

                    -
                    function myBeforeRightClick(treeId, treeNode) {
                    -    return false;
                    -};
                    -var setting = {
                    -	callback: {
                    -		beforeRightClick: myBeforeRightClick
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onAsyncError.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onAsyncError.html deleted file mode 100644 index 239f3ffc..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onAsyncError.html +++ /dev/null @@ -1,42 +0,0 @@ -
                    -
                    -

                    setting.callback.onAsyncError

                    -

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

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Used to capture the error event when execute ajax.

                    -

                    If you set 'setting.callback.beforeAsync',and return false, zTree will not execute ajax, and will not trigger the 'onAsyncSuccess / onAsyncError' callback.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    eventjs event Object

                    -

                    event Object

                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the parent node

                    -

                    When load root nodes, treeNode = null

                    -

                    XMLHttpRequestString

                    -

                    XMLHttpRequest Object, please refer to JQuery API documentation.

                    -

                    textStatusString

                    -

                    a string categorizing the status of the request("success", "error"...), please refer to JQuery API documentation.

                    -

                    errorThrownString

                    -

                    eWhen an HTTP error occurs, errorThrown receives the textual portion of the HTTP status, please refer to JQuery API documentation.

                    -
                    -

                    Examples of setting & function

                    -

                    1. When execute ajax make error, alert message.

                    -
                    function myOnAsyncError(event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown) {
                    -    alert(XMLHttpRequest);
                    -};
                    -var setting = {
                    -	callback: {
                    -		onAsyncError: myOnAsyncError
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onAsyncSuccess.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onAsyncSuccess.html deleted file mode 100644 index b8deca54..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onAsyncSuccess.html +++ /dev/null @@ -1,38 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Used to capture the complete success event when execute ajax.

                    -

                    If you set 'setting.callback.beforeAsync',and return false, zTree will not execute ajax, and will not trigger the 'onAsyncSuccess / onAsyncError' callback.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    eventjs event Object

                    -

                    event Object

                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the parent node

                    -

                    When load root nodes, treeNode = null

                    -

                    msgString / Object

                    -

                    The actualnode data which got by ajax. User-friendly debugging.

                    -

                    The actual data's type of msg is affected by 'setting.async.dataType', please refer to JQuery API documentation.

                    -
                    -

                    Examples of setting & function

                    -

                    1. When execute ajax complete success, alert message.

                    -
                    function myOnAsyncSuccess(event, treeId, treeNode, msg) {
                    -    alert(msg);
                    -};
                    -var setting = {
                    -	callback: {
                    -		onAsyncSuccess: myOnAsyncSuccess
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onCheck.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onCheck.html deleted file mode 100644 index eadfadcb..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onCheck.html +++ /dev/null @@ -1,34 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    Used to capture the check or uncheck event when check or uncheck the checkbox and radio.

                    -

                    If you set 'setting.callback.beforeCheck',and return false, zTree will not change check state, and will not trigger the 'onCheck' callback.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    eventjs event Object

                    -

                    event Object

                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which is checked or unchecked

                    -
                    -

                    Examples of setting & function

                    -

                    1. When check or uncheck the checkbox and radio, alert info about 'tId' and 'name' and 'checked'.

                    -
                    function myOnCheck(event, treeId, treeNode) {
                    -    alert(treeNode.tId + ", " + treeNode.name + "," + treeNode.checked);
                    -};
                    -var setting = {
                    -	callback: {
                    -		onCheck: myOnCheck
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onClick.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onClick.html deleted file mode 100644 index 537dbe09..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onClick.html +++ /dev/null @@ -1,49 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Used to capture the click event when click node.

                    -

                    If you set 'setting.callback.beforeClick',and return false, zTree will not change selected state, and will not trigger the 'onClick' callback.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    eventjs event Object

                    -

                    event Object

                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which is clicked

                    -

                    clickFlagNumber

                    -

                    Node is selected or deselected state, please see table below for details

                    - - - - - - - - - - - - -
                    clickFlagselectedMultiautoCancelSelected
                    &&
                    event.ctrlKey / metaKey
                    isSelectedoperate for selected
                    1truefalsefalsenode is selected (single)
                    1truefalsetruenode is selected (single)
                    2truetruefalsenode is selected (multi)
                    0truetruetruenode is deselected
                    1falsefalsefalsenode is selected (single)
                    1falsefalsetruenode is selected (single)
                    1falsetruefalsenode is selected (single)
                    0falsetruetruenode is deselected
                    -
                    -

                    Examples of setting & function

                    -

                    1. When click node, alert info about 'tId' and 'name'.

                    -
                    function myOnClick(event, treeId, treeNode) {
                    -    alert(treeNode.tId + ", " + treeNode.name);
                    -};
                    -var setting = {
                    -	callback: {
                    -		onClick: myOnClick
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onCollapse.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onCollapse.html deleted file mode 100644 index d62f3fe6..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onCollapse.html +++ /dev/null @@ -1,34 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Callback for collapse node.

                    -

                    If you set 'setting.callback.beforeCollapse',and return false, zTree will not collapse node, and will not trigger the 'onCollapse' callback.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    eventjs event Object

                    -

                    event Object

                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node to be collapsed

                    -
                    -

                    Examples of setting & function

                    -

                    1. When collapse node, alert info about 'tId' and 'name'.

                    -
                    function myOnCollapse(event, treeId, treeNode) {
                    -    alert(treeNode.tId + ", " + treeNode.name);
                    -};
                    -var setting = {
                    -	callback: {
                    -		onCollapse: myOnCollapse
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onDblClick.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onDblClick.html deleted file mode 100644 index d59602cf..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onDblClick.html +++ /dev/null @@ -1,35 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Used to capture the dblclick event when double click node.

                    -

                    If you set 'setting.callback.beforeDblClick',and return false, zTree will not trigger the 'onDblClick' callback.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    eventjs event Object

                    -

                    event Object

                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which is double clicked

                    -

                    If the DOM which dblclicked isn't a node, it will return null.

                    -
                    -

                    Examples of setting & function

                    -

                    1. When double click node, alert info about 'tId' and 'name'.

                    -
                    function myOnDblClick(event, treeId, treeNode) {
                    -    alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
                    -};
                    -var setting = {
                    -	callback: {
                    -		onDblClick: myOnDblClick
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onDrag.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onDrag.html deleted file mode 100644 index 7c975bc7..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onDrag.html +++ /dev/null @@ -1,34 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Used to capture the drag event when drag node.

                    -

                    If you set 'setting.callback.beforeDrag',and return false, zTree will stop drag, and will not trigger the 'onDragMove' & 'onDrag' callback.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    eventjs event Object

                    -

                    event Object

                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId, the id of the containing tree.

                    -

                    treeNodesArray(JSON)

                    -

                    A collection of the nodes which will be dragged

                    -
                    -

                    Examples of setting & function

                    -

                    1. When drag nodes, alert the number of dragged nodes.

                    -
                    function myOnDrag(event, treeId, treeNodes) {
                    -    alert(treeNodes.length);
                    -};
                    -var setting = {
                    -	callback: {
                    -		onDrag: myOnDrag
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onDragMove.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onDragMove.html deleted file mode 100644 index b8596b92..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onDragMove.html +++ /dev/null @@ -1,34 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Used to capture the drag-move event when drag & drop node.

                    -

                    Mainly used to capture the DOM which the nodes was drag in.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    eventjs event Object

                    -

                    event Object

                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId, the id of the containing tree.

                    -

                    treeNodesArray(JSON)

                    -

                    A collection of the nodes which will be dragged

                    -
                    -

                    Examples of setting & function

                    -

                    1. When drag nodes, output the target dom.

                    -
                    function myOnDragMove(event, treeId, treeNodes) {
                    -	console.log(event.target);
                    -};
                    -var setting = {
                    -	callback: {
                    -		onDragMove: myOnDragMove
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onDrop.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onDrop.html deleted file mode 100644 index 475526d7..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onDrop.html +++ /dev/null @@ -1,48 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Used to capture the drop event when drag-drop node.

                    -

                    If you set 'setting.callback.beforeDrop',and return false, zTree will restore the dragged nodes, and will not trigger the 'onDrop' callback.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    eventjs event Object

                    -

                    event Object

                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId, the id of the containing tree.

                    -

                    treeNodesArray(JSON)

                    -

                    A collection of the nodes which has been dragged

                    -

                    The treeNodes are the data of the nodes which be dragged, when move nodes.

                    -

                    The treeNodes are the clone data of the nodes which be dragged, when copy nodes.

                    -

                    targetNodeJSON

                    -

                    JSON data object of the target node which treeNodes are drag-dropped.

                    -

                    If the treeNodes will be root node, the targetNode = null

                    -

                    moveTypeString

                    -

                    the relative position of move to the target node

                    -

                    "inner": will be child of targetNode

                    -

                    "prev": will be sibling node, and be in front of targetNode

                    -

                    "next": will be sibling node, and be behind targetNode

                    -

                    If moveType is null, means drag & drop is cancel.

                    -

                    isCopyBoolean

                    -

                    the flag used to judge copy node or move node

                    -

                    true: copy node; false: move node

                    -
                    -

                    Examples of setting & function

                    -

                    1. When drag-drop nodes complete, alert the number of dragged nodes and info about targetNode.

                    -
                    function myOnDrop(event, treeId, treeNodes, targetNode, moveType) {
                    -    alert(treeNodes.length + "," + (targetNode ? (targetNode.tId + ", " + targetNode.name) : "isRoot" ));
                    -};
                    -var setting = {
                    -	callback: {
                    -		onDrop: myOnDrop
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onExpand.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onExpand.html deleted file mode 100644 index 70024fee..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onExpand.html +++ /dev/null @@ -1,34 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Callback for expand node.

                    -

                    If you set 'setting.callback.beforeExpand',and return false, zTree will not expand node, and will not trigger the 'onExpand' callback.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    eventjs event Object

                    -

                    event Object

                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node to be expanded

                    -
                    -

                    Examples of setting & function

                    -

                    1. When expand node, alert info about 'tId' and 'name'.

                    -
                    function myOnExpand(event, treeId, treeNode) {
                    -    alert(treeNode.tId + ", " + treeNode.name);
                    -};
                    -var setting = {
                    -	callback: {
                    -		onExpand: myOnExpand
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onMouseDown.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onMouseDown.html deleted file mode 100644 index 255469fe..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onMouseDown.html +++ /dev/null @@ -1,35 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Callback for mouse down.

                    -

                    If you set 'setting.callback.beforeMouseDown',and return false, zTree will not trigger the 'onMouseDown' callback.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    eventjs event Object

                    -

                    event Object

                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which mouse over

                    -

                    If the DOM which mouse over isn't a node, it will return null.

                    -
                    -

                    Examples of setting & function

                    -

                    1. When mouse down, alert info about 'tId' and 'name'.

                    -
                    function myOnMouseDown(event, treeId, treeNode) {
                    -    alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
                    -};
                    -var setting = {
                    -	callback: {
                    -		onMouseDown: myOnMouseDown
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onMouseUp.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onMouseUp.html deleted file mode 100644 index 84e06a9b..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onMouseUp.html +++ /dev/null @@ -1,35 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Callback for mouse up.

                    -

                    If you set 'setting.callback.beforeMouseUp',and return false, zTree will not trigger the 'onMouseUp' callback.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    eventjs event Object

                    -

                    event Object

                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which mouse over

                    -

                    If the DOM which mouse over isn't a node, it will return null.

                    -
                    -

                    Examples of setting & function

                    -

                    1. When mouse up, alert info about 'tId' and 'name'.

                    -
                    function myOnMouseUp(event, treeId, treeNode) {
                    -    alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
                    -};
                    -var setting = {
                    -	callback: {
                    -		onMouseUp: myOnMouseUp
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onNodeCreated.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onNodeCreated.html deleted file mode 100644 index 4e5c8ae7..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onNodeCreated.html +++ /dev/null @@ -1,35 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Callback for node's DOM is created.

                    -

                    Because v3.x uses lazy loading technology, so the nodes which doesn't create DOM when initialized will not trigger this callback, until its parent node is expanded.

                    -

                    Large amount of data to load, please note: do not set onNodeCreated, can improve performance as when initialized.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    eventjs event Object

                    -

                    event Object

                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which DOM is created

                    -
                    -

                    Examples of setting & function

                    -

                    1. When node's DOM is created, alert info about 'tId' and 'name'.

                    -
                    function myOnNodeCreated(event, treeId, treeNode) {
                    -    alert(treeNode.tId + ", " + treeNode.name);
                    -};
                    -var setting = {
                    -	callback: {
                    -		onNodeCreated: myOnNodeCreated
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onRemove.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onRemove.html deleted file mode 100644 index 37ed1f7e..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onRemove.html +++ /dev/null @@ -1,34 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Callback for remove node.

                    -

                    If you set 'setting.callback.beforeRemove',and return false, zTree will not remove node, and will not trigger the 'onRemove' callback.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    eventjs event Object

                    -

                    event Object

                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which was removed.

                    -
                    -

                    Examples of setting & function

                    -

                    1. When remove node, alert info about 'tId' and 'name'.

                    -
                    function myOnRemove(event, treeId, treeNode) {
                    -	alert(treeNode.tId + ", " + treeNode.name);
                    -}
                    -var setting = {
                    -	callback: {
                    -		onRemove: myOnRemove
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onRename.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onRename.html deleted file mode 100644 index c83206f7..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onRename.html +++ /dev/null @@ -1,40 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Callback for remove node.

                    -

                    1. If you set 'setting.callback.beforeRename',and return false, zTree will keep the editing name, and will not trigger the 'onRename' callback.

                    -

                    2. If you modify treeNode data, and use 'updateNode' function, zTree will not trigger the 'onRename' callback.

                    -

                    3. From v3.5.13, zTree will trigger this callback when user cancel edit name. please see 'isCancel' parameter.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    eventjs event Object

                    -

                    event Object

                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which was rename.

                    -

                    isCancelBoolean

                    -

                    the status about cancel edit name (v3.5.13+)

                    -

                    isCancel = true means: user cancel edit name. (press ESC or use cancelEditName() function)

                    -

                    isCancel = false means: user submit edit name.

                    -
                    -

                    Examples of setting & function

                    -

                    1. When rename node, alert info about 'tId' and 'name'.

                    -
                    function myOnRename(event, treeId, treeNode, isCancel) {
                    -	alert(treeNode.tId + ", " + treeNode.name);
                    -}
                    -var setting = {
                    -	callback: {
                    -		onRename: myOnRename
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onRightClick.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onRightClick.html deleted file mode 100644 index 110c9526..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.callback.onRightClick.html +++ /dev/null @@ -1,36 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Callback for mouse right click node.

                    -

                    If you set 'setting.callback.beforeRightClick',and return false, zTree will not trigger the 'onRightClick' callback.

                    -

                    If you set 'setting.callback.onRightClick', zTree will shield the browser context menu when mouse right click on zTree.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    eventjs event Object

                    -

                    event Object

                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which is mouse right clicked

                    -

                    If the DOM which mouse right clicked isn't a node, it will return null.

                    -
                    -

                    Examples of setting & function

                    -

                    1. When mouse right click node, alert info about 'tId' and 'name'.

                    -
                    function myOnRightClick(event, treeId, treeNode) {
                    -    alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
                    -};
                    -var setting = {
                    -	callback: {
                    -		onRightClick: myOnRightClick
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.check.autoCheckTrigger.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.check.autoCheckTrigger.html deleted file mode 100644 index b8b04cca..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.check.autoCheckTrigger.html +++ /dev/null @@ -1,29 +0,0 @@ -
                    -
                    -

                    Booleansetting.check.autoCheckTrigger

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    When node is automatically checked or unchecked, this parameter used to set to trigger 'beforeCheck / onCheck' callback. It is valid when [setting.check.enable = true & setting.check.chkStyle = "checkbox"]

                    -

                    1. If you set 'setting.check.chkboxType' to { "Y": "", "N": "" }, will not automatically checked or unchecked.

                    -

                    2. If you turn on the trigger and there are many more nodes, will affect the performance, because the check or uncheck node can cause many nodes to be automatically checked or unchecked, it will trigger a lot of callbacks, according to the need to decide whether to use this feature.

                    -

                    Default: false

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: trigger callback

                    -

                    false means: don't trigger callback

                    -
                    -

                    Examples of setting

                    -

                    1. When node is automatically checked or unchecked, zTree trigger 'beforeCheck / onCheck' callback.

                    -
                    var setting = {
                    -	check: {
                    -		enable: true,
                    -		autoCheckTrigger: true
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.check.chkDisabledInherit.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.check.chkDisabledInherit.html deleted file mode 100644 index 98d824e4..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.check.chkDisabledInherit.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    Booleansetting.check.chkDisabledInherit

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    When the parent node's 'chkDisabled' attribute is true, set the child nodes automatically inherit the 'chkDisabled' attribute. It is valid when [setting.check.enable = true]

                    -

                    1. Only be used to initialize the nodes, easy batch operations. Please use the 'updateNode' method modify existing node.

                    -

                    Default: false

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: When add new child nodes, if parent node's 'chkDisabled' attribute is true, the child nodes automatically inherit the 'chkDisabled' attribute.

                    -

                    false means: When add new child nodes, the child nodes don't inherit the 'chkDisabled' attribute from parent node.

                    -
                    -

                    Examples of setting

                    -

                    1. When add new child nodes, the child nodes automatically inherit the 'chkDisabled' attribute from parent node.

                    -
                    var setting = {
                    -	check: {
                    -		enable: true,
                    -		chkDisabledInherit: true
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.check.chkStyle.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.check.chkStyle.html deleted file mode 100644 index d42e757a..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.check.chkStyle.html +++ /dev/null @@ -1,48 +0,0 @@ -
                    -
                    -

                    Stringsetting.check.chkStyle

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    Use the checkbox or radio. It is valid when [setting.check.enable = true]

                    -

                    Default: "checkbox"

                    -
                    -
                    -

                    String Format

                    -
                    -

                    When chkStyle = "checkbox", zTree show checkbox, and 'setting.check.chkboxType' attribute is valid. -
                    When chkStyle = "radio", zTree show radio, and 'setting.check.radioType' attribute is valid.

                    -

                    Please note that letter case, do not change.

                    -
                    -

                    checkbox States Descriptions

                    -
                    -

                    -
                    -

                    not checked; If node is parent, so its child nodes have been not checked. when mouse over:

                    -

                    not checked; (only parent node) some of its child nodes have been checked. when mouse over:

                    -

                    be checked; If node is parent, so its all child nodes have been checked. when mouse over:

                    -

                    be checked; (only parent node) some of its child nodes or all have been not checked. when mouse over:

                    -
                    -
                    -

                    radio States Descriptions

                    -
                    -

                    -
                    -

                    not checked; If node is parent, so its child have been not checked. when mouse over:

                    -

                    not checked; (only parent node) some of its child have been checked. when mouse over:

                    -

                    be checked; If node is parent, so its child have been not checked. when mouse over:

                    -

                    be checked; (only parent node) some of its child have been checked. when mouse over:

                    -
                    -
                    -

                    Examples of setting

                    -

                    1. use radio

                    -
                    var setting = {
                    -	check: {
                    -		enable: true,
                    -		chkStyle: "radio"
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.check.chkboxType.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.check.chkboxType.html deleted file mode 100644 index 5cecc9ee..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.check.chkboxType.html +++ /dev/null @@ -1,31 +0,0 @@ -
                    -
                    -

                    JSONsetting.check.chkboxType

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    When one node is checked or unchecked, control its parent node and its child node auto checked or unchecked. It is valid when [setting.check.enable = true & setting.check.chkStyle = "checkbox"]

                    -

                    Default: { "Y": "ps", "N": "ps" }

                    -
                    -
                    -

                    JSON Format

                    -
                    -

                    "Y" attribute use to set auto check after checkbox was checked. -
                    "N" attribute use to set auto uncheck after checkbox was unchecked. -
                    If value has "p", so parent nodes will be checked or unchecked. -
                    If value has "s", so child nodes will be checked or unchecked.

                    -

                    Please note that letter case, do not change.

                    -
                    -

                    Examples of setting

                    -

                    1. If check the node, so only auto check parent nodes; If uncheck the node, so only auto uncheck child nodes;

                    -
                    var setting = {
                    -	check: {
                    -		enable: true,
                    -		chkStyle: "checkbox",
                    -		chkboxType: { "Y": "p", "N": "s" }
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.check.enable.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.check.enable.html deleted file mode 100644 index 0236b5f8..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.check.enable.html +++ /dev/null @@ -1,26 +0,0 @@ -
                    -
                    -

                    Booleansetting.check.enable

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    Set to use checkbox or radio in zTree

                    -

                    Default: false

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: use the checkbox or radio

                    -

                    false means: don't use the checkbox or radio

                    -
                    -

                    Examples of setting

                    -

                    1. use the checkbox

                    -
                    var setting = {
                    -	check: {
                    -		enable: true
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.check.nocheckInherit.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.check.nocheckInherit.html deleted file mode 100644 index 758b437e..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.check.nocheckInherit.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    Booleansetting.check.nocheckInherit

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    When the parent node's 'nocheck' attribute is true, set the child nodes automatically inherit the 'nocheck' attribute. It is valid when [setting.check.enable = true]

                    -

                    1. Only be used to initialize the nodes, easy batch operations. Please use the 'updateNode' method modify existing node.

                    -

                    Default: false

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: When add new child nodes, if parent node's 'nocheck' attribute is true, the child nodes automatically inherit the 'nocheck' attribute.

                    -

                    false means: When add new child nodes, the child nodes don't inherit the 'nocheck' attribute from parent node.

                    -
                    -

                    Examples of setting

                    -

                    1. When add new child nodes, the child nodes automatically inherit the 'nocheck' attribute from parent node.

                    -
                    var setting = {
                    -	check: {
                    -		enable: true,
                    -		nocheckInherit: true
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.check.radioType.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.check.radioType.html deleted file mode 100644 index be867d75..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.check.radioType.html +++ /dev/null @@ -1,29 +0,0 @@ -
                    -
                    -

                    Stringsetting.check.radioType

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    The group about radio. It is valid when [setting.check.enable = true & setting.check.chkStyle = "radio"]

                    -

                    Default: "level"

                    -
                    -
                    -

                    String Format

                    -
                    -

                    When radioType = "level", will be grouped with same level nodes which have the same parent node. -
                    When radioType = "all", will be grouped with all nodes.

                    -

                    Please note that letter case, do not change.

                    -
                    -

                    Examples of setting

                    -

                    1. Set the group about radio is all nodes.

                    -
                    var setting = {
                    -	check: {
                    -		enable: true,
                    -		chkStyle: "radio",
                    -		radioType: "all"
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.keep.leaf.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.keep.leaf.html deleted file mode 100644 index 71c573e4..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.keep.leaf.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    Booleansetting.data.keep.leaf

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    The leaf node's lock, the leaf node will lock the 'isParent' attribute to false.

                    -

                    Default: false

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: lock the leaf node, and the node which 'isParent' attribute is false can't add child nodes.

                    -

                    false means: don't lock the leaf node, and the node which 'isParent' attribute is false can add child nodes.

                    -
                    -

                    Examples of setting

                    -

                    1. lock the leaf node

                    -
                    var setting = {
                    -	data: {
                    -		keep: {
                    -			leaf: true
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.keep.parent.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.keep.parent.html deleted file mode 100644 index 5bab2f1e..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.keep.parent.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    Booleansetting.data.keep.parent

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    The parent node's lock, the parent node will lock 'isParent' attribute to true.

                    -

                    Default: false

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: lock the parent node, and if remove all of the parent node's child nodes, its 'isParent' attribute still keep to be true..

                    -

                    false means: don't lock the parent node, and if remove all of the parent node's child nodes, its 'isParent' attribute will change to be false..

                    -
                    -

                    Examples of setting

                    -

                    1. lock the parent node

                    -
                    var setting = {
                    -	data: {
                    -		keep: {
                    -			parent: true
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.key.checked.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.key.checked.html deleted file mode 100644 index 2678cf25..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.key.checked.html +++ /dev/null @@ -1,24 +0,0 @@ -
                    -
                    -

                    Stringsetting.data.key.checked

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    The node data's attribute to save the checked state.

                    -

                    Default: "checked"

                    -

                    Please don't set the other node attribute which zTree used. (e.g., checkedOld)

                    -
                    -
                    -

                    Examples of setting

                    -

                    1. set the 'isChecked' attribute to save the checked state.

                    -
                    var setting = {
                    -	data: {
                    -		key: {
                    -			checked: "isChecked"
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.key.children.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.key.children.html deleted file mode 100644 index 321a1a7d..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.key.children.html +++ /dev/null @@ -1,23 +0,0 @@ -
                    -
                    -

                    Stringsetting.data.key.children

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    The node data's attribute to save the child nodes.

                    -

                    Default: "children"

                    -
                    -
                    -

                    Examples of setting

                    -

                    1. Set the 'nodes' attribute to save the child nodes.

                    -
                    var setting = {
                    -	data: {
                    -		key: {
                    -			children: "nodes"
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.key.name.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.key.name.html deleted file mode 100644 index 0208c559..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.key.name.html +++ /dev/null @@ -1,23 +0,0 @@ -
                    -
                    -

                    Stringsetting.data.key.name

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    The node data's attribute to save the node name.

                    -

                    Default: "name"

                    -
                    -
                    -

                    Examples of setting

                    -

                    1. Set the 'ename' attribute to save the node name.

                    -
                    var setting = {
                    -	data: {
                    -		key: {
                    -			name: "ename"
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.key.title.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.key.title.html deleted file mode 100644 index 96540eb6..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.key.title.html +++ /dev/null @@ -1,24 +0,0 @@ -
                    -
                    -

                    Stringsetting.data.key.title

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    The node data's attribute to save the 'title' attribute of node DOM. It is valid when [setting.view.showTitle = true]

                    -

                    If set it to "", the title of node DOM will be same as 'setting.data.key.name' attribute.

                    -

                    Default: ""

                    -
                    -
                    -

                    Examples of setting

                    -

                    1. Set the 'fullName' attribute to save the title of node DOM.

                    -
                    var setting = {
                    -	data: {
                    -		key: {
                    -			title: "fullName"
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.key.url.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.key.url.html deleted file mode 100644 index e9a08cea..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.key.url.html +++ /dev/null @@ -1,24 +0,0 @@ -
                    -
                    -

                    Stringsetting.data.key.url

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    The node data's attribute to save the node link's url.

                    -

                    Special: If the nodes's data can only use the 'url' attribute, and don't use the link to jump feature, you can modify this attribute to any nonexistent attribute.

                    -

                    Default: "url"

                    -
                    -
                    -

                    Examples of setting

                    -

                    1. Set the 'xUrl' attribute to save the node link's url.

                    -
                    var setting = {
                    -	data: {
                    -		key: {
                    -			url: "xUrl"
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.simpleData.enable.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.simpleData.enable.html deleted file mode 100644 index 9bb56d17..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.simpleData.enable.html +++ /dev/null @@ -1,39 +0,0 @@ -
                    -
                    -

                    Booleansetting.data.simpleData.enable

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Set zTree's node to accept the simple data format, when zTree is initialized or when ajax get / or when use addNodes method.

                    -

                    Don't have to generate the complex nested data.

                    -

                    Default: false

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: zTree's node accept the simple data format.

                    -

                    false means: zTree's node only accept the nested data format.

                    -

                    If set it is true, you must set the other attributes in 'setting.data.simpleData'. (e.g., idKey, pIdKey, rootPId) And let the data satisfy the parent-child relationship.

                    -
                    -

                    Examples of setting

                    -

                    1. use the simple data format

                    -
                    var setting = {
                    -	data: {
                    -		simpleData: {
                    -			enable: true,
                    -			idKey: "id",
                    -			pIdKey: "pId",
                    -			rootPId: 0
                    -		}
                    -	}
                    -};
                    -var treeNodes = [
                    -    {"id":1, "pId":0, "name":"test1"},
                    -    {"id":11, "pId":1, "name":"test11"},
                    -    {"id":12, "pId":1, "name":"test12"},
                    -    {"id":111, "pId":11, "name":"test111"}
                    -];
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.simpleData.idKey.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.simpleData.idKey.html deleted file mode 100644 index 1216e0c7..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.simpleData.idKey.html +++ /dev/null @@ -1,32 +0,0 @@ -
                    -
                    -

                    Stringsetting.data.simpleData.idKey

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    The node data's attribute to save node data's unique identifier. It is valid when [setting.data.simpleData.enable = true]

                    -

                    Default: "id"

                    -
                    -
                    -

                    Examples of setting

                    -

                    1. use the simple data format

                    -
                    var setting = {
                    -	data: {
                    -		simpleData: {
                    -			enable: true,
                    -			idKey: "id",
                    -			pIdKey: "pId",
                    -			rootPId: 0
                    -		}
                    -	}
                    -};
                    -var treeNodes = [
                    -    {"id":1, "pId":0, "name":"test1"},
                    -    {"id":11, "pId":1, "name":"test11"},
                    -    {"id":12, "pId":1, "name":"test12"},
                    -    {"id":111, "pId":11, "name":"test111"}
                    -];
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.simpleData.pIdKey.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.simpleData.pIdKey.html deleted file mode 100644 index 8378c6e3..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.simpleData.pIdKey.html +++ /dev/null @@ -1,32 +0,0 @@ -
                    -
                    -

                    Stringsetting.data.simpleData.pIdKey

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    The node data's attribute to save its parent node data's unique identifier. It is valid when [setting.data.simpleData.enable = true]

                    -

                    Default: "pId"

                    -
                    -
                    -

                    Examples of setting

                    -

                    1. use the simple data format

                    -
                    var setting = {
                    -	data: {
                    -		simpleData: {
                    -			enable: true,
                    -			idKey: "id",
                    -			pIdKey: "pId",
                    -			rootPId: 0
                    -		}
                    -	}
                    -};
                    -var treeNodes = [
                    -    {"id":1, "pId":0, "name":"test1"},
                    -    {"id":11, "pId":1, "name":"test11"},
                    -    {"id":12, "pId":1, "name":"test12"},
                    -    {"id":111, "pId":11, "name":"test111"}
                    -];
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.simpleData.rootPId.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.simpleData.rootPId.html deleted file mode 100644 index 61c9bbd0..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.data.simpleData.rootPId.html +++ /dev/null @@ -1,32 +0,0 @@ -
                    -
                    -

                    String / Numbersetting.data.simpleData.rootPId

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Set the default value of root's 'pIdKey' specified attribute values​​. It is valid when [setting.data.simpleData.enable = true]

                    -

                    Default: null

                    -
                    -
                    -

                    Examples of setting

                    -

                    1. use the simple data format

                    -
                    var setting = {
                    -	data: {
                    -		simpleData: {
                    -			enable: true,
                    -			idKey: "id",
                    -			pIdKey: "pId",
                    -			rootPId: 0
                    -		}
                    -	}
                    -};
                    -var treeNodes = [
                    -    {"id":1, "pId":0, "name":"test1"},
                    -    {"id":11, "pId":1, "name":"test11"},
                    -    {"id":12, "pId":1, "name":"test12"},
                    -    {"id":111, "pId":11, "name":"test111"}
                    -];
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.autoExpandTrigger.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.autoExpandTrigger.html deleted file mode 100644 index 804ee66a..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.autoExpandTrigger.html +++ /dev/null @@ -1,29 +0,0 @@ -
                    -
                    -

                    Booleansetting.edit.drag.autoExpandTrigger

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    When drag node cause the parent node is automatically expanded, set whether to allow to trigger the 'onExpand' callback. It is valid when [setting.edit.enable = true]

                    -

                    Default: false

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: trigger the 'onExpand' callback.

                    -

                    false means: don't trigger the 'onExpand' callback.

                    -
                    -

                    Examples of setting

                    -

                    1. Set to allow to trigger the 'onExpand' callback

                    -
                    var setting = {
                    -	edit: {
                    -		enable: true,
                    -		drag: {
                    -			autoExpandTrigger: true
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.autoOpenTime.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.autoOpenTime.html deleted file mode 100644 index 74982afa..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.autoOpenTime.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    Numbersetting.edit.drag.autoOpenTime

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Drag to the parent node, the parent node auto expand time interval. (Unit: ms) It is valid when [setting.edit.enable = true]

                    -

                    Default: 500

                    -

                    Please adjust the value according to needs.

                    -
                    -
                    -

                    Examples of setting

                    -

                    1. When drag node to other parent node, expand it at once.

                    -
                    var setting = {
                    -	edit: {
                    -		enable: true,
                    -		drag: {
                    -			autoOpenTime: 0
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.borderMax.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.borderMax.html deleted file mode 100644 index edbb752b..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.borderMax.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    Numbersetting.edit.drag.borderMax

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    When drag a node to root, the zTree's inner border width. (Unit: px) It is valid when [setting.edit.enable = true]

                    -

                    Default: 10

                    -

                    Please adjust the value according to needs.

                    -
                    -
                    -

                    Examples of setting

                    -

                    1. adjust the inner border width is 20px

                    -
                    var setting = {
                    -	edit: {
                    -		enable: true,
                    -		drag: {
                    -			borderMax: 20
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.borderMin.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.borderMin.html deleted file mode 100644 index e8458530..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.borderMin.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    Numbersetting.edit.drag.borderMin

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    When drag a node to root, the zTree's outer border width. (Unit: px) It is valid when [setting.edit.enable = true]

                    -

                    Default: -5

                    -

                    Please adjust the value according to needs.

                    -
                    -
                    -

                    Examples of setting

                    -

                    1. adjust the outer border width is 10px

                    -
                    var setting = {
                    -	edit: {
                    -		enable: true,
                    -		drag: {
                    -			borderMin: -10
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.inner.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.inner.html deleted file mode 100644 index 5258e2f6..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.inner.html +++ /dev/null @@ -1,60 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    When drag one node to the target node, set whether to allow the node to be the target node's child. It is valid when [setting.edit.enable = true]

                    -

                    If the target node is root, so zTree will only trigger 'inner' and not trigger 'prev / next'.

                    -

                    This function mainly for the appropriate limit drag and drop (auxiliary arrow), it requires a combination of 'prev, next' together, to achieve full functionality.

                    -

                    Default: true

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: allow the node to be the target node's child.

                    -

                    false means: don't allow the node to be the target node's child.

                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodesArray(JSON)

                    -

                    A collection of the nodes which has been dragged

                    -

                    targetNodeJSON

                    -

                    JSON data object of the target node which treeNodes are draged over.

                    -

                    If the treeNodes will be root node, the targetNode = null

                    -

                    Return Boolean

                    -

                    return true or false

                    -
                    -

                    Examples of setting & function

                    -

                    1. disable to drag the node to the target node's inner.

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

                    2. disable to drag the node to be root node's child.

                    -
                    function canInner(treeId, nodes, targetNode) {
                    -	return !(targetNode && targetNode.level === 0);
                    -}
                    -var setting = {
                    -	edit: {
                    -		enable: true,
                    -		drag: {
                    -			prev: true,
                    -			next: true,
                    -			inner: canInner
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.isCopy.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.isCopy.html deleted file mode 100644 index 1207d2ae..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.isCopy.html +++ /dev/null @@ -1,32 +0,0 @@ -
                    -
                    -

                    Booleansetting.edit.drag.isCopy

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    When drag-drop node, set whether to allow to copy node. It is valid when [setting.edit.enable = true]

                    -

                    Default: true

                    -
                    -
                    -

                    Rules Description

                    -
                    -

                    1. If isCopy = true and isMove = true, when drag-drop node, press Ctrl-Key or Cmd-key can copy node, don't press Ctrl-Key or Cmd-key can move node.

                    -

                    2. If isCopy = true and isMove = false, when drag-drop node, will copy node.

                    -

                    3. If isCopy = false and isMove = true, when drag-drop node, will move node.

                    -

                    4. If isCopy = false and isMove = false, so disable to drag-drop node.

                    -
                    -

                    Examples of setting

                    -

                    1. all of the drag-drop operation will copy node.

                    -
                    var setting = {
                    -	edit: {
                    -		enable: true,
                    -		drag: {
                    -			isCopy: true,
                    -			isMove: false
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.isMove.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.isMove.html deleted file mode 100644 index e4a7ca3a..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.isMove.html +++ /dev/null @@ -1,32 +0,0 @@ -
                    -
                    -

                    Booleansetting.edit.drag.isMove

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    When drag-drop node, set whether to allow to move node. It is valid when [setting.edit.enable = true]

                    -

                    Default: true

                    -
                    -
                    -

                    Rules Description

                    -
                    -

                    1. If isCopy = true and isMove = true, when drag-drop node, press Ctrl-Key or Cmd-key can copy node, don't press Ctrl-Key or Cmd-key can move node.

                    -

                    2. If isCopy = true and isMove = false, when drag-drop node, will copy node.

                    -

                    3. If isCopy = false and isMove = true, when drag-drop node, will move node.

                    -

                    4. If isCopy = false and isMove = false, so disable to drag-drop node.

                    -
                    -

                    Examples of setting

                    -

                    1. all of the drag-drop operation will move node.

                    -
                    var setting = {
                    -	edit: {
                    -		enable: true,
                    -		drag: {
                    -			isCopy: false,
                    -			isMove: true
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.maxShowNodeNum.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.maxShowNodeNum.html deleted file mode 100644 index dbc3ae47..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.maxShowNodeNum.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    Numbersetting.edit.drag.maxShowNodeNum

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    When dragging more than one sibling node, the floating layer shows the maximum number of nodes. zTree using '...' instead of redundant nodes. It is valid when [setting.edit.enable = true]

                    -

                    Default: 5

                    -

                    Please adjust the value according to needs.

                    -
                    -
                    -

                    Examples of setting

                    -

                    1. Set the maximum number is 10

                    -
                    var setting = {
                    -	edit: {
                    -		enable: true,
                    -		drag: {
                    -			maxShowNodeNum: 10
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.minMoveSize.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.minMoveSize.html deleted file mode 100644 index 8270a993..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.minMoveSize.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    Numbersetting.edit.drag.minMoveSize

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    The minimum offset which used to determine the drag operator start. (Unit: px) It is valid when [setting.edit.enable = true]

                    -

                    Please adjust the value according to needs. Note: If it is too small, will easily lead to misoperation when you click mouse.

                    -

                    Default: 5

                    -
                    -
                    -

                    Examples of setting

                    -

                    1. Set the minimum offset is 10px.

                    -
                    var setting = {
                    -	edit: {
                    -		enable: true,
                    -		drag: {
                    -			minMoveSize: 10
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.next.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.next.html deleted file mode 100644 index 11323f1e..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.next.html +++ /dev/null @@ -1,59 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    When drag one node to the target node, set whether to allow the node to be the target node's next sibling. It is valid when [setting.edit.enable = true]

                    -

                    If the target node is root, so zTree will only trigger 'inner' and not trigger 'prev / next'.

                    -

                    This function mainly for the appropriate limit drag and drop (auxiliary arrow), it requires a combination of 'prev, inner' together, to achieve full functionality.

                    -

                    Default: true

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: allow the node to be the target node's next sibling.

                    -

                    false means: don't allow the node to be the target node's next sibling.

                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodesArray(JSON)

                    -

                    A collection of the nodes which has been dragged

                    -

                    targetNodeJSON

                    -

                    JSON data object of the target node which treeNodes are draged over.

                    -

                    Return Boolean

                    -

                    return true or false

                    -
                    -

                    Examples of setting & function

                    -

                    1. disable to drag the node to the target node's next sibling.

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

                    2. disable to drag the node to be all of the parent nodes's next sibling.

                    -
                    function canNext(treeId, nodes, targetNode) {
                    -	return !targetNode.isParent;
                    -}
                    -var setting = {
                    -	edit: {
                    -		enable: true,
                    -		drag: {
                    -			prev: true,
                    -			next: canNext,
                    -			inner: true
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.prev.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.prev.html deleted file mode 100644 index 84e3b1a5..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.drag.prev.html +++ /dev/null @@ -1,59 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    When drag one node to the target node, set whether to allow the node to be the target node's previous sibling. It is valid when [setting.edit.enable = true]

                    -

                    If the target node is root, so zTree will only trigger 'inner' and not trigger 'prev / next'.

                    -

                    This function mainly for the appropriate limit drag and drop (auxiliary arrow), it requires a combination of 'next, inner' together, to achieve full functionality.

                    -

                    Default: true

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: allow the node to be the target node's previous sibling.

                    -

                    false means: don't allow the node to be the target node's previous sibling.

                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodesArray(JSON)

                    -

                    A collection of the nodes which has been dragged

                    -

                    targetNodeJSON

                    -

                    JSON data object of the target node which treeNodes are draged over.

                    -

                    Return Boolean

                    -

                    return true or false

                    -
                    -

                    Examples of setting & function

                    -

                    1. disable to drag the node to the target node's previous sibling.

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

                    2. disable to drag the node to be all of the parent nodes's previous sibling.

                    -
                    function canPrev(treeId, nodes, targetNode) {
                    -	return !targetNode.isParent;
                    -}
                    -var setting = {
                    -	edit: {
                    -		enable: true,
                    -		drag: {
                    -			prev: canPrev,
                    -			next: true,
                    -			inner: true
                    -		}
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.editNameSelectAll.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.editNameSelectAll.html deleted file mode 100644 index a030359d..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.editNameSelectAll.html +++ /dev/null @@ -1,27 +0,0 @@ -
                    -
                    -

                    Booleansetting.edit.editNameSelectAll

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    When edit node's name, the text in input is selected or unselected. It is valid when [setting.edit.enable = true]

                    -

                    Default: false

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: when show the input, the text in input is selected

                    -

                    false means: when show the input, the text in input is not selected

                    -
                    -

                    Examples of setting

                    -

                    1. When edit node's name, the text in input is selected.

                    -
                    var setting = {
                    -	edit: {
                    -		enable: true,
                    -		editNameSelectAll: true
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.enable.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.enable.html deleted file mode 100644 index ec9d2b31..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.enable.html +++ /dev/null @@ -1,39 +0,0 @@ -
                    -
                    -

                    Booleansetting.edit.enable

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Set zTree is in edit mode

                    -

                    Please set this attribute before zTree initialization. If you need to change the edit mode after the initialization, please use zTreeObj.setEditable() method.

                    -

                    Default: false

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: zTree is in edit mode.

                    -

                    false means: zTree is not in edit mode.

                    -
                    -

                    Editing Rules Description

                    -
                    -

                    1. When click the node, it will not open 'node.url' specified URL. -
                    2. Support for dynamic tree editing. -
                    3. You can drag-drop nodes, and support drag-drop nodes between multiple trees. -
                    4. Support use drag-drop to copy or move the node. (Reference: setting.edit.drag.isCopy / setting.edit.drag.isMove) -
                    5. You can use the Edit button to modify the name attribute. -
                    6. You can use the Remove button to remove the node. -
                    -

                    -

                    Please note that letter case, do not change.

                    -
                    -

                    Examples of setting

                    -

                    1. edit the tree

                    -
                    var setting = {
                    -	edit: {
                    -		enable: true
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.removeTitle.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.removeTitle.html deleted file mode 100644 index d749c053..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.removeTitle.html +++ /dev/null @@ -1,48 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    the title of the remove button DOM. It is valid when [setting.edit.enable = true & setting.edit.showRemoveBtn = true]

                    -

                    Default: "remove"

                    -
                    -
                    -

                    String Format

                    -
                    -

                    When the mouse over the remove button, the browser auto pop-up message content.

                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which show the remove button

                    -

                    Return String

                    -

                    Return value is same as 'String Format'

                    -
                    -

                    Examples of setting & function

                    -

                    1. Set title is 'remove the node' about all the remove button

                    -
                    var setting = {
                    -	edit: {
                    -		enable: true,
                    -		showRemoveBtn: true,
                    -		removeTitle: "remove the node"
                    -	}
                    -};
                    -......
                    -

                    2. Set title is 'remove the parent node' about the parent node, and is 'remove the leaf node' about the leaf node

                    -
                    function setRemoveTitle(treeId, treeNode) {
                    -	return treeNode.isParent ? "remove the parent node":"remove the leaf node";
                    -}
                    -var setting = {
                    -	edit: {
                    -		enable: true,
                    -		showRemoveBtn: true,
                    -		removeTitle: setRemoveTitle
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.renameTitle.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.renameTitle.html deleted file mode 100644 index aa2d719b..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.renameTitle.html +++ /dev/null @@ -1,48 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    the title of the rename button DOM. It is valid when [setting.edit.enable = true & setting.edit.showRenameBtn = true]

                    -

                    Default: "rename"

                    -
                    -
                    -

                    String Format

                    -
                    -

                    When the mouse over the rename button, the browser auto pop-up message content.

                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which show the rename button

                    -

                    Return String

                    -

                    return value is same as 'String Format'

                    -
                    -

                    Examples of setting & function

                    -

                    1. Set title is 'rename the node' about all the rename button

                    -
                    var setting = {
                    -	edit: {
                    -		enable: true,
                    -		showRenameBtn: true,
                    -		renameTitle: "rename the node"
                    -	}
                    -};
                    -......
                    -

                    2. Set title is 'rename the parent node' about the parent node, and is 'rename the leaf node' about the leaf node

                    -
                    function setRenameTitle(treeId, treeNode) {
                    -	return treeNode.isParent ? "rename the parent node":"rename the leaf node";
                    -}
                    -var setting = {
                    -	edit: {
                    -		enable: true,
                    -		showRenameBtn: true,
                    -		renameTitle: setRenameTitle
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.showRemoveBtn.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.showRemoveBtn.html deleted file mode 100644 index 2c64ac18..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.showRemoveBtn.html +++ /dev/null @@ -1,50 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Set to show or hide the remove button. It is valid when [setting.edit.enable = true]

                    -

                    When you click the remove button:

                    -

                    1. zTree will trigger the setting.callback.beforeRemove callback, and you can decide whether to allow delete.

                    -

                    2. If you don't set the 'beforeRemove' or the 'beforeRemove' callback return true, so zTree will trigger the setting.callback.onRemove callback after remove the node.

                    -

                    Default: true

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: show the remove button

                    -

                    false means: hide the remove button

                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which show the remove button

                    -

                    Return Boolean

                    -

                    Return value is same as 'Boolean Format'

                    -
                    -

                    Examples of setting & function

                    -

                    1. Hide the remove button

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

                    2. Hide the remove button of parent node

                    -
                    function setRemoveBtn(treeId, treeNode) {
                    -	return !treeNode.isParent;
                    -}
                    -var setting = {
                    -	edit: {
                    -		enable: true,
                    -		showRemoveBtn: setRemoveBtn
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.showRenameBtn.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.showRenameBtn.html deleted file mode 100644 index 390f0a12..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.edit.showRenameBtn.html +++ /dev/null @@ -1,52 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Set to show or hide the rename button. It is valid when [setting.edit.enable = true]

                    -

                    When you click the rename button:

                    -

                    1. Click the rename button, you can rename the node.

                    -

                    2. After rename operation (the input DOM blur or press the Enter Key), zTree will trigger the setting.callback.beforeRename callback, and you can decide whether to allow rename.

                    -

                    3. If the 'beforeRename' callback return false, so zTree will keep the edit status. (Press the ESC key, can be restored to the original state.

                    -

                    4. If you don't set the 'beforeRename' or the 'beforeRename' callback return true, so zTree will trigger the setting.callback.onRename callback after rename the node.

                    -

                    Default: true

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: show the rename button

                    -

                    false means: hide the rename button

                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which show the rename button

                    -

                    Return Boolean

                    -

                    Return value is same as 'Boolean Format'

                    -
                    -

                    Examples of setting & function

                    -

                    1. Hide the rename button

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

                    2. Hide the rename button of parent node

                    -
                    function setRenameBtn(treeId, treeNode) {
                    -	return !treeNode.isParent;
                    -}
                    -var setting = {
                    -	edit: {
                    -		enable: true,
                    -		showRenameBtn: setRenameBtn
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.treeId.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.treeId.html deleted file mode 100644 index e4b04b37..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.treeId.html +++ /dev/null @@ -1,14 +0,0 @@ -
                    -
                    -

                    Stringsetting.treeId

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    zTree unique identifier. After the initialization, it equals to the id attribute value of the user-defined zTree container.

                    -

                    Do not initialize or modify it, it is an internal argument.

                    -
                    -
                    - -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.treeObj.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.treeObj.html deleted file mode 100644 index 30eb66c4..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.treeObj.html +++ /dev/null @@ -1,14 +0,0 @@ -
                    -
                    -

                    Objectsetting.treeObj

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    zTree DOM's jQuery object, the main function: easy to internal operations.

                    -

                    Do not initialize or modify it, it is an internal argument.

                    -
                    -
                    - -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.addDiyDom.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.addDiyDom.html deleted file mode 100644 index efcc8d4b..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.addDiyDom.html +++ /dev/null @@ -1,40 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.view.addDiyDom

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    This function used to display the custom control on the node.

                    -

                    1. If you have huge node data, please note: this function will affect the initialization performance. If not required, it is recommended not to use this function.

                    -

                    2. This function is an advanced application, please make sure that a better understanding of zTree before you use it.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which display the custom control.

                    -
                    -

                    Examples of setting & function

                    -

                    1. Display button in all nodes.

                    -
                    var setting = {
                    -	view: {
                    -		addDiyDom: addDiyDom
                    -	}
                    -};
                    -function addDiyDom(treeId, treeNode) {
                    -	var aObj = $("#" + treeNode.tId + "_a");
                    -	if ($("#diyBtn_"+treeNode.id).length>0) return;
                    -	var editStr = "<span id='diyBtn_space_" +treeNode.id+ "' > </span>"
                    -		+ "<button type='button' class='diyBtn1' id='diyBtn_" + treeNode.id
                    -		+ "' title='"+treeNode.name+"' onfocus='this.blur();'></button>";
                    -	aObj.append(editStr);
                    -	var btn = $("#diyBtn_"+treeNode.id);
                    -	if (btn) btn.bind("click", function(){alert("diy Button for " + treeNode.name);});
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.addHoverDom.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.addHoverDom.html deleted file mode 100644 index 9c6ccf6e..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.addHoverDom.html +++ /dev/null @@ -1,45 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.view.addHoverDom

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Used to display custom control when mouse move over the node. (e.g. the rename and remove button)

                    -

                    If you use this function, so must set setting.view.removeHoverDom, please make sure that a better understanding of zTree before you use it.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which need to display the custom control.

                    -
                    -

                    Examples of setting & function

                    -

                    1. Display a button when mouse move over the node, and hide the button when mouse move out.

                    -
                    var setting = {
                    -	view: {
                    -		addHoverDom: addHoverDom,
                    -		removeHoverDom: removeHoverDom,
                    -		......
                    -	}
                    -};
                    -function addHoverDom(treeId, treeNode) {
                    -	var aObj = $("#" + treeNode.tId + "_a");
                    -	if ($("#diyBtn_"+treeNode.id).length>0) return;
                    -	var editStr = "<span id='diyBtn_space_" +treeNode.id+ "' > </span>"
                    -		+ "<button type='button' class='diyBtn1' id='diyBtn_" + treeNode.id
                    -		+ "' title='"+treeNode.name+"' onfocus='this.blur();'></button>";
                    -	aObj.append(editStr);
                    -	var btn = $("#diyBtn_"+treeNode.id);
                    -	if (btn) btn.bind("click", function(){alert("diy Button for " + treeNode.name);});
                    -};
                    -function removeHoverDom(treeId, treeNode) {
                    -	$("#diyBtn_"+treeNode.id).unbind().remove();
                    -	$("#diyBtn_space_" +treeNode.id).unbind().remove();
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.autoCancelSelected.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.autoCancelSelected.html deleted file mode 100644 index 44ab90d0..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.autoCancelSelected.html +++ /dev/null @@ -1,27 +0,0 @@ -
                    -
                    -

                    Booleansetting.view.autoCancelSelected

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    When click the selected node while pressing the Ctrl-key or Cmd-key, allow to cancel selected the node.

                    -

                    If you don't need this function, please set to false.

                    -

                    Default: true

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: press the Ctrl-key or Cmd-key, can cancel selected node.

                    -

                    false means: press the Ctrl-key or Cmd-key, can't cancel selected node.

                    -
                    -

                    Examples of setting

                    -

                    1. Press the Ctrl-key or Cmd-key, can't cancel selected node.

                    -
                    var setting = {
                    -	view: {
                    -		autoCancelSelected: false
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.dblClickExpand.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.dblClickExpand.html deleted file mode 100644 index 210dfecb..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.dblClickExpand.html +++ /dev/null @@ -1,45 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    When double-click the parent node, 'dblClickExpand' is used to decide whether to expand the parent node.

                    -

                    Default: true

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: When double-click the parent node, zTree will expand the parent node.

                    -

                    false means: When double-click the parent node, zTree will not expand the parent node.

                    -
                    -

                    Function Pamameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which be double-clicked.

                    -

                    Return Boolean

                    -

                    Return value is same as 'Boolean Format'

                    -
                    -

                    Example of setting

                    -

                    1. When double-click the parent node, zTree will not expand the parent node.

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

                    2. When double-click the parent node, zTree will expand the parent node which level>0.

                    -
                    function dblClickExpand(treeId, treeNode) {
                    -	return treeNode.level > 0;
                    -};
                    -var setting = {
                    -	view: {
                    -		dblClickExpand: dblClickExpand
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.expandSpeed.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.expandSpeed.html deleted file mode 100644 index 1911e74e..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.expandSpeed.html +++ /dev/null @@ -1,31 +0,0 @@ -
                    -
                    -

                    String / Numbersetting.view.expandSpeed

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    The animation speed of expand or collapse node. As same as 'speed' parameter in jQuery

                    -

                    In order to ensure zTree operating speed, if use the IE6, zTree will not use animation.

                    -

                    Default: "fast"

                    -
                    -
                    -

                    String Format

                    -
                    -

                    e.g. "slow", "normal", or "fast"

                    -

                    If set to "", zTree will not use animation.

                    -
                    -

                    Number Format

                    -
                    -

                    How long the animation will run. [Unit: ms] (e.g. 1000)

                    -
                    -

                    Examples of setting

                    -

                    1. Set the animation speed to slow

                    -
                    var setting = {
                    -	view: {
                    -		expandSpeed: "slow"
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.fontCss.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.fontCss.html deleted file mode 100644 index 02bddeac..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.fontCss.html +++ /dev/null @@ -1,42 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Personalized text style, only applies to <A> object in the node DOM

                    -

                    Default: {}

                    -
                    -
                    -

                    JSON Format

                    -
                    -

                    As same as .css() method in jQuery. e.g. {color:"#ff0011", background:"blue"}

                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which use the personalized text style

                    -

                    Return JSON

                    -

                    Return value is same as 'JSON Format'. e.g. {color:"#ff0011", background:"blue"}

                    -
                    -

                    Examples of setting & function

                    -

                    1. Don't modify css file, and set the node name's color to red

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

                    2. Don't modify css file, and set the root node name's color to red

                    -
                    function setFontCss(treeId, treeNode) {
                    -	return treeNode.level == 0 ? {color:"red"} : {};
                    -};
                    -var setting = {
                    -	view: {
                    -		fontCss: setFontCss
                    -	}
                    -};
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.nameIsHTML.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.nameIsHTML.html deleted file mode 100644 index 4fe19ada..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.nameIsHTML.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    Booleansetting.view.nameIsHTML

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Set to use HTML in 'name' attribute.

                    -

                    If allow HTML, please do check to avoid security issues, e.g. JavaScript Injection...

                    -

                    Default: false

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: 'name' attribute can be HTML.

                    -

                    false means: 'name' attribute is only TEXT.

                    -
                    -

                    Examples of setting

                    -

                    1. Set to allow HTML

                    -
                    var setting = {
                    -	view: {
                    -		nameIsHTML: true
                    -	}
                    -};
                    -var node = {"name":"<font color='red'>test</font>"};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.removeHoverDom.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.removeHoverDom.html deleted file mode 100644 index 83f80477..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.removeHoverDom.html +++ /dev/null @@ -1,45 +0,0 @@ -
                    -
                    -

                    Function(treeId, treeNode)setting.view.removeHoverDom

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Used to hide custom control when mouse move out the node. (e.g. the rename and remove button)

                    -

                    If you use this function, so must set setting.view.addHoverDom, please make sure that a better understanding of zTree before you use it.

                    -

                    Default: null

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which need to hide the custom control.

                    -
                    -

                    Examples of setting & function

                    -

                    1. Display a button when mouse move over the node, and hide the button when mouse move out.

                    -
                    var setting = {
                    -	view: {
                    -		addHoverDom: addHoverDom,
                    -		removeHoverDom: removeHoverDom,
                    -		......
                    -	}
                    -};
                    -function addHoverDom(treeId, treeNode) {
                    -	var aObj = $("#" + treeNode.tId + "_a");
                    -	if ($("#diyBtn_"+treeNode.id).length>0) return;
                    -	var editStr = "<span id='diyBtn_space_" +treeNode.id+ "' > </span>"
                    -		+ "<button type='button' class='diyBtn1' id='diyBtn_" + treeNode.id
                    -		+ "' title='"+treeNode.name+"' onfocus='this.blur();'></button>";
                    -	aObj.append(editStr);
                    -	var btn = $("#diyBtn_"+treeNode.id);
                    -	if (btn) btn.bind("click", function(){alert("diy Button for " + treeNode.name);});
                    -};
                    -function removeHoverDom(treeId, treeNode) {
                    -	$("#diyBtn_"+treeNode.id).unbind().remove();
                    -	$("#diyBtn_space_" +treeNode.id).unbind().remove();
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.selectedMulti.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.selectedMulti.html deleted file mode 100644 index 074fb685..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.selectedMulti.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    Booleansetting.view.selectedMulti

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Set whether to allow select multiple nodes.

                    -

                    Default: true

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true mean: you can select multiple nodes.

                    -

                    false mean: you can only select one node.

                    -

                    1. Press Ctrl-key or Cmd-key, you can select multiple nodes.

                    -

                    2、This attribute don't affect the feature of cancel select node. ( please see setting.view.autoCancelSelected )

                    -
                    -

                    Examples of setting

                    -

                    1. Only select one node.

                    -
                    var setting = {
                    -	view: {
                    -		selectedMulti: false
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.showIcon.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.showIcon.html deleted file mode 100644 index 69f1b056..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.showIcon.html +++ /dev/null @@ -1,45 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Set to show or hide node icon.

                    -

                    Default: true

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: show node icon.

                    -

                    false means: hide node icon.

                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which need to show icon.

                    -

                    Return Boolean

                    -

                    Return value is same as 'Boolean Format'

                    -
                    -

                    Examples of setting & function

                    -

                    1. Hide node icon

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

                    2. Hide node icon which level=2

                    -
                    function showIconForTree(treeId, treeNode) {
                    -	return treeNode.level != 2;
                    -};
                    -var setting = {
                    -	view: {
                    -		showIcon: showIconForTree
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.showLine.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.showLine.html deleted file mode 100644 index a5540149..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.showLine.html +++ /dev/null @@ -1,26 +0,0 @@ -
                    -
                    -

                    Booleansetting.view.showLine

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Set to show or hide line.

                    -

                    Default: true

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: show line.

                    -

                    false means: hide line.

                    -
                    -

                    Examples of setting

                    -

                    1. Hide line

                    -
                    var setting = {
                    -	view: {
                    -		showLine: false
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.showTitle.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.showTitle.html deleted file mode 100644 index 8af69844..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.showTitle.html +++ /dev/null @@ -1,47 +0,0 @@ -
                    -
                    -

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

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Set to show or hide the 'title' attribute of node DOM.

                    -

                    Please see the setting.data.key.title attribute

                    -

                    Default: true

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: show the 'title' attribute of node DOM.

                    -

                    false means: hide the 'title' attribute of node DOM.

                    -

                    When setting.view.showTitle = true & setting.data.key.title = '', zTree will set the 'setting.data.key.name' attribute to the 'setting.data.key.title'.

                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeIdString

                    -

                    zTree unique identifier: treeId.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which need to show title.

                    -

                    Return Boolean

                    -

                    Return value is same as 'Boolean Format'

                    -
                    -

                    Examples of setting & function

                    -

                    1. Hide the 'title' attribute of node DOM.

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

                    2. Hide the 'title' attribute of node DOM which level=2.

                    -
                    function showTitleForTree(treeId, treeNode) {
                    -	return treeNode.level != 2;
                    -};
                    -var setting = {
                    -	view: {
                    -		showTitle: showTitleForTree
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.txtSelectedEnable.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.txtSelectedEnable.html deleted file mode 100644 index a3809300..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/setting.view.txtSelectedEnable.html +++ /dev/null @@ -1,26 +0,0 @@ -
                    -
                    -

                    Booleansetting.view.txtSelectedEnable

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Set to allow or don't allow to select the text which in zTree's DOM.

                    -

                    Default: false

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: Allow to select the txt which in zTree's DOM.

                    -

                    false means: Don't allow to select the txt which in zTree's DOM.

                    -
                    -

                    Examples of setting & function

                    -

                    1. Allow to select the txt which in zTree's DOM.

                    -
                    var setting = {
                    -	view: {
                    -		txtSelectedEnable: true
                    -	}
                    -};
                    -......
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.check_Child_State.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.check_Child_State.html deleted file mode 100644 index 48efb79a..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.check_Child_State.html +++ /dev/null @@ -1,43 +0,0 @@ -
                    -
                    -

                    NumbertreeNode.check_Child_State

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    Used to record the node's half-checked state about its all child nodes's checkbox or radio. It is valid when [setting.check.enable = true]

                    -

                    zTree v3.x provides treeNode.getCheckStatus () method to get an accurate the half-checked status.

                    -

                    Do not initialize or modify it, it is an internal argument.

                    -

                    Default: true

                    -
                    -
                    -

                    Number Format

                    -
                    -

                    Rules:

                    - - - - - - - - - - - -
                    setting.check.checkType = "checkbox"
                    treeNode.check_Child_StateChecked Status Description
                    -1Has no child nodes or all child nodes's 'nocheck' attribute is true.
                    0All of the child nodes has not been checked.
                    1Some of the child nodes has been checked.
                    2All of the child nodes has been checked.
                    -
                    - - - - - - - - - - -
                    setting.check.checkType = "radio"
                    treeNode.check_Child_StateChecked Status Description
                    -1Has no child nodes or all child nodes's 'nocheck' attribute is true.
                    0All of the child nodes has not been checked.
                    2Some of the child nodes has been checked.
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.check_Focus.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.check_Focus.html deleted file mode 100644 index 77b73598..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.check_Focus.html +++ /dev/null @@ -1,19 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.check_Focus

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    Used to record the status which the checkbox or radio get focus. It is valid when [setting.check.enable = true]

                    -

                    Do not initialize or modify it, it is an internal argument.

                    -

                    Default: false

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: mouse move over the checkbox

                    -

                    false means: mouse move out the checkbox

                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.checked.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.checked.html deleted file mode 100644 index 8a55f3d6..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.checked.html +++ /dev/null @@ -1,32 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.checked

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    The checked status about node's checkbox or radio. It is valid when [setting.check.enable = true & treeNode.nocheck = false]

                    -

                    1. If change the 'checked' to other attribute, please set the 'setting.data.key.checked' attribute.

                    -

                    2. If you create node data, and set 'checked' attribute to true, zTree will check this node's checkbox or radio when zTree is initialized.

                    -

                    3. Use the treeObj.checkNode or checkAllNodes or updateNode method, you can check or uncheck the node. Please see the API about these methods.

                    -

                    4. zTree support identification string 'true' & 'false'.

                    -

                    Default: false

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: check the checkbox or radio when zTree is initialized.

                    -

                    false means: uncheck the checkbox or radio when zTree is initialized.

                    -
                    -

                    Examples of treeNode

                    -

                    1. check the checkbox when zTree is initialized

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

                    2. Get the checked status of the first root node

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var checked = treeObj.getNodes()[0].checked;
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.checkedOld.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.checkedOld.html deleted file mode 100644 index ee516260..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.checkedOld.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.checkedOld

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    The checked status about node's checkbox or radio when zTree was initialized. It is valid when [setting.check.enable = true & treeNode.nocheck = false]

                    -

                    1. Do not initialize it, it will be initialized when the node is initialized.

                    -

                    2. If you need to achieve special features, you can use the zTreeObj.getChangeCheckedNodes method and modify the value of 'checkedOld' attribute.

                    -

                    Default: the value of 'checked' attribute when zTree is initialized

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: the checkbox or radio is checked when zTree is initialized.

                    -

                    false means: the checkbox or radio is not checked when zTree is initialized.

                    -
                    -

                    Examples of treeNode

                    -

                    1. Get the original checked status of the first root node

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var checkedOld = treeObj.getNodes()[0].checkedOld;
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.children.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.children.html deleted file mode 100644 index d765bb96..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.children.html +++ /dev/null @@ -1,35 +0,0 @@ -
                    -
                    -

                    Array(JSON)treeNode.children

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    The data collections of node's child nodes.

                    -

                    1. If change the 'children' to other attribute, please set the 'setting.data.key.children' attribute.

                    -

                    2. If you set to use dynamic tree, when a node is expanded which 'isParent' attribute is true and which has no child nodes, zTree will use ajax to get its child nodes.

                    -

                    Default: undefined

                    -
                    -
                    -

                    Array(JSON) Format

                    -
                    -

                    Standard JSON Data object

                    -
                    -

                    Examples of treeNode

                    -

                    1. Use the standard JSON data object.

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

                    2. Get the first root node's child nodes

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodes()[0].children;
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.chkDisabled.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.chkDisabled.html deleted file mode 100644 index 7a5fcf38..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.chkDisabled.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.chkDisabled

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    1. Set node's checkbox / radio to disabled. It is valid when [setting.check.enable = true]

                    -

                    2. zTree support identification string 'true' & 'false'.

                    -

                    3. Please don't change this attribute of the nodes which have been created. If you want to disable or undisable the nodes, please use 'setChkDisabled()' methods.

                    -

                    4. When zTree initialize the nodes, if you need to the child nodes automatically inherit the 'chkDisabled' attribute, please see 'setting.check.chkDisabledInherit'.

                    -

                    Default: false

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: this node's checkbox / radio is disabled.

                    -

                    false means: this node's checkbox / radio is able.

                    -
                    -

                    Examples of treeNode

                    -

                    1. disable some node's checkbox / radio

                    -
                    var nodes = [
                    -	{ "id":1, "name":"test1", "checked":true, "chkDisabled":true},
                    -	{ "id":2, "name":"test2", "chkDisabled":true},
                    -	{ "id":3, "name":"test3"}
                    -]
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.click.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.click.html deleted file mode 100644 index 1f9db626..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.click.html +++ /dev/null @@ -1,24 +0,0 @@ -
                    -
                    -

                    StringtreeNode.click

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Simple click event operations. As same as : (onclick ="...") the code. If the operation is more complex, please use the onClick callback.

                    -

                    Because IE is different to other browsers in operating the event of ‘onclick’ and ‘click’ coexistence, please do not use this parameter to control whether to allow the redirection operation (for example: treeNode.click = "return false;"). If there is similar requirements, please do not use the 'url' attribute to save the website address, but use the 'onClick' callback to control jumps.

                    -

                    Default: undefined

                    -
                    -
                    -

                    String Format

                    -
                    -

                    Standard javascript syntax, for example: alert ("test"); etc.

                    -
                    -

                    Examples of treeNode

                    -

                    1. When click this node, will alert msg.

                    -
                    var nodes = [
                    -	{ "id":1, "name":"Google CN", "url":"http://g.cn", "click":"alert('test');"},
                    -	......
                    -]
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.diy.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.diy.html deleted file mode 100644 index 68c39ba6..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.diy.html +++ /dev/null @@ -1,15 +0,0 @@ -
                    -
                    -

                    ?treeNode.* DIY *

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Used to save other custom data of node, do not use the same attribute name with ztree used, the user can freely set.

                    -
                    -
                    -

                    Examples of treeNode

                    -

                    1. Use 'ename' attribute to save more info

                    -
                    var node = { "id":1, "name":"test1", "ename":"test eName"};
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.editNameFlag.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.editNameFlag.html deleted file mode 100644 index f60ef2ab..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.editNameFlag.html +++ /dev/null @@ -1,19 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.editNameFlag

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Used to save the node editing name status. It is valid when [setting.edit.enable = true]

                    -

                    Do not initialize or modify it, it is an internal argument.

                    -

                    Default: false

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: node is being edited.

                    -

                    false means: node is not being edited.

                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.getCheckStatus.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.getCheckStatus.html deleted file mode 100644 index 3c9a2e6b..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.getCheckStatus.html +++ /dev/null @@ -1,63 +0,0 @@ -
                    -
                    -

                    Function()treeNode.getCheckStatus

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    Get the node's half-checked status of checkbox or radio. It is valid when [setting.check.enable = true]

                    -

                    Do not initialize or modify it, it is created by the zTree.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    ReturnJSON

                    -
                    {
                    -	checked: true, //As same as 'treeNode.checked'
                    -	half: true  //Rule the table below
                    -}
                    - - - - - - - - - - - - - - - - - - -
                    setting.check.checkType = "checkbox"
                    treeNode.checkedtreeNode.check_Child_StatetreeNode.halfCheck half
                    --truetrue
                     
                    true-1falsefalse
                    true0falsetrue
                    true1falsetrue
                    true2falsefalse
                     
                    false-1falsefalse
                    false0falsefalse
                    false1falsetrue
                    false2falsetrue
                    -
                    - - - - - - - - - - - - - - - - -
                    setting.check.checkType = "radio"
                    treeNode.checkedtreeNode.check_Child_StatetreeNode.halfCheck half
                    --truetrue
                     
                    true-1falsefalse
                    true0falsefalse
                    true2falsetrue
                     
                    false-1falsefalse
                    false0falsefalse
                    false2falsetrue
                    -
                    -

                    Examples of treeNode

                    -

                    1. Get the first root node's half-checked status

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var halfCheck = treeObj.getNodes()[0].getCheckStatus();
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.getNextNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.getNextNode.html deleted file mode 100644 index 755aa6ee..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.getNextNode.html +++ /dev/null @@ -1,27 +0,0 @@ -
                    -
                    -

                    Function()treeNode.getNextNode

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Get the treeNode's next sibling node.

                    -

                    Do not initialize or modify it, it is created by the zTree.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    ReturnJSON

                    -

                    JSON data object of the treeNode's next sibling node

                    -

                    If have not the next node, return null.

                    -
                    -

                    Examples of treeNode

                    -

                    1. Get the first selected node's next sibling node.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var node = sNodes[0].getNextNode();
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.getParentNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.getParentNode.html deleted file mode 100644 index 16bab306..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.getParentNode.html +++ /dev/null @@ -1,27 +0,0 @@ -
                    -
                    -

                    Function()treeNode.getParentNode

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Get the treeNode's parent node.

                    -

                    Do not initialize or modify it, it is created by the zTree.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    ReturnJSON

                    -

                    JSON data object of treeNode's parent node.

                    -

                    If treeNode is root, return null.

                    -
                    -

                    Examples of treeNode

                    -

                    1. Get the first selected node's parent node.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var node = sNodes[0].getParentNode();
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.getPreNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.getPreNode.html deleted file mode 100644 index f6745b14..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.getPreNode.html +++ /dev/null @@ -1,27 +0,0 @@ -
                    -
                    -

                    Function()treeNode.getPreNode

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Get the treeNode's previous sibling node.

                    -

                    Do not initialize or modify it, it is created by the zTree.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    ReturnJSON

                    -

                    JSON data object of the treeNode's previous sibling node

                    -

                    If have not the previous node, return null.

                    -
                    -

                    Examples of treeNode

                    -

                    1. Get the first selected node's previous sibling node.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var node = sNodes[0].getPreNode();
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.halfCheck.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.halfCheck.html deleted file mode 100644 index 8375326b..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.halfCheck.html +++ /dev/null @@ -1,29 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.halfCheck

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    Force node checkBox / radio to the half-checked status. It is valid when [setting.check.enable = true & treeNode.nocheck = false]

                    -

                    1. If you force to the half-checked status, zTree will not automatically calculated the half-checked status about this node.

                    -

                    2. Until you set treeNode.halfCheck to false or null, zTree will automatically calculated the half-checked status about this node.

                    -

                    3. zTree support identification string 'true' & 'false'.

                    -

                    Defaul: false

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: the checkbox or radio is half-checked when zTree is initialized.

                    -

                    false means: the half-checked status will be automatically calculated

                    -
                    -

                    Examples of treeNode

                    -

                    1. set the half-checked status when zTree is initialized

                    -
                    var nodes = [
                    -{ "id":1, "name":"test1", isParent:true, checked:true, halfCheck:true },
                    -{ "id":2, "name":"test2", isParent:true, checked:false, halfCheck:true },
                    -{ "id":3, "name":"test3", isParent:true, checked:true },
                    -{ "id":4, "name":"test4", isParent:true, checked:false }
                    -]
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.icon.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.icon.html deleted file mode 100644 index 4e1c99fa..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.icon.html +++ /dev/null @@ -1,33 +0,0 @@ -
                    -
                    -

                    StringtreeNode.icon

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    URL path of node's custom icon.

                    -

                    1. If you only set the 'icon' attribute to parent node, the parent node will only show one icon when it is expanded or collapsed.

                    -

                    2. If you need to show two icons when it is expanded or collapsed, please set the 'treeNode.iconOpen' and 'treeNode.iconClose' attribute.

                    -

                    3. If you need to use css to set the custom icon, please set the 'treeNode.iconSkin' attribute.

                    -

                    Default: undefined

                    -
                    -
                    -

                    String Format

                    -
                    -

                    Icon image url can be a relative path or absolute path.

                    -

                    If use a relative path, please note the relationship between icon image and the page, ensure the correct image path.

                    -
                    -

                    Examples of treeNode

                    -

                    1. Set the custom icon

                    -
                    var nodes = [
                    -	//Only show one icon when it is expanded or collapsed.
                    -	{ name:"Parent Node 1", icon:"/img/parent.gif"},
                    -
                    -	//Show two icons when it is expanded or collapsed.
                    -	{ name:"Parent Node 2", iconOpen:"/img/open.gif", iconClose:"/img/close.gif"},
                    -
                    -	//the custom icon for leaf node
                    -	{ name:"Leaf Node", icon:"/img/leaf.gif"}
                    -]
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.iconClose.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.iconClose.html deleted file mode 100644 index 2259e8f3..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.iconClose.html +++ /dev/null @@ -1,33 +0,0 @@ -
                    -
                    -

                    StringtreeNode.iconClose

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    URL path of parent node's custom icon when it is collapsed.

                    -

                    1. Only parent node support this attribute.

                    -

                    2. This attribute must be used simultaneously with 'iconOpen' attribute.

                    -

                    3. If you need to use css to set the custom icon, please set the 'treeNode.iconSkin' attribute.

                    -

                    Default: undefined

                    -
                    -
                    -

                    String Format

                    -
                    -

                    Icon image url can be a relative path or absolute path.

                    -

                    If use a relative path, please note the relationship between icon image and the page, ensure the correct image path.

                    -
                    -

                    Examples of treeNode

                    -

                    1. Set the custom icon

                    -
                    var nodes = [
                    -	//Only show one icon when it is expanded or collapsed.
                    -	{ name:"Parent Node 1", icon:"/img/parent.gif"},
                    -
                    -	//Show two icons when it is expanded or collapsed.
                    -	{ name:"Parent Node 2", iconOpen:"/img/open.gif", iconClose:"/img/close.gif"},
                    -
                    -	//the custom icon for leaf node
                    -	{ name:"Leaf Node", icon:"/img/leaf.gif"}
                    -]
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.iconOpen.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.iconOpen.html deleted file mode 100644 index 3203615d..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.iconOpen.html +++ /dev/null @@ -1,33 +0,0 @@ -
                    -
                    -

                    StringtreeNode.iconOpen

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    URL path of parent node's custom icon when it is expanded.

                    -

                    1. Only parent node support this attribute.

                    -

                    2. This attribute must be used simultaneously with 'iconClose' attribute.

                    -

                    3. If you need to use css to set the custom icon, please set the 'treeNode.iconSkin' attribute.

                    -

                    Default: undefined

                    -
                    -
                    -

                    String Format

                    -
                    -

                    Icon image url can be a relative path or absolute path.

                    -

                    If use a relative path, please note the relationship between icon image and the page, ensure the correct image path.

                    -
                    -

                    Examples of treeNode

                    -

                    1. Set the custom icon

                    -
                    var nodes = [
                    -	//Only show one icon when it is expanded or collapsed.
                    -	{ name:"Parent Node 1", icon:"/img/parent.gif"},
                    -
                    -	//Show two icons when it is expanded or collapsed.
                    -	{ name:"Parent Node 2", iconOpen:"/img/open.gif", iconClose:"/img/close.gif"},
                    -
                    -	//the custom icon for leaf node
                    -	{ name:"Leaf Node", icon:"/img/leaf.gif"}
                    -]
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.iconSkin.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.iconSkin.html deleted file mode 100644 index fca7fbf2..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.iconSkin.html +++ /dev/null @@ -1,43 +0,0 @@ -
                    -
                    -

                    StringtreeNode.iconSkin

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    The className of node's custom icon.

                    -

                    1. You need to modify the css, add the definition of className.

                    -

                    2. The css is simple, convenient, and support the parent node to switch icons when it is expanded or collapsed.

                    -

                    3. Recommend the use of CSS Sprites, can reduce repeating load the image, to avoid image flicker.

                    -

                    4. The 'iconSkin' support IE6 in zTree v3.x.

                    -

                    5. If you need to use image's URL to set the custom icon, please set the 'treeNode.icon' or 'treeNode.iconOpen' or 'treeNode.iconClose' attribute.

                    -

                    Default: undefined

                    -
                    -
                    -

                    String Format

                    -
                    -

                    The string about custom icon's className.

                    -
                    -

                    Examples of css & treeNode

                    -

                    1. Set the custom icon

                    -
                    css example:
                    -.ztree li span.button.diy01_ico_open, .ztree li span.button.diy01_ico_close{...}
                    -
                    -.ztree li span.button.diy02_ico_open{...}
                    -.ztree li span.button.diy02_ico_close{...}
                    -
                    -.ztree li span.button.diy03_ico_docu{...}
                    -
                    -node's data example:
                    -var nodes = [
                    -	//Only show one icon when it is expanded or collapsed.
                    -	{ name:"Parent Node 1", iconSkin:"diy01"},
                    -
                    -	//Show two icons when it is expanded or collapsed.
                    -	{ name:"Parent Node 2", iconSkin:"diy02"},
                    -
                    -	//the custom icon for leaf node
                    -	{ name:"Leaf Node", iconSkin:"diy03"}
                    -]
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.isAjaxing.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.isAjaxing.html deleted file mode 100644 index ddadf41b..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.isAjaxing.html +++ /dev/null @@ -1,26 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.isAjaxing

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Judge whether the node's child nodes being loaded asynchronously.

                    -

                    Do not initialize or modify it, it is created by the zTree.

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: the node's child nodes is being loaded asynchronously

                    -

                    false means: the node's child nodes is not being loaded asynchronously

                    -
                    -

                    Examples of treeNode

                    -

                    1. Judge whether the first selected node's child nodes being loaded asynchronously

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var isAjaxing = sNodes[0].isAjaxing;
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.isFirstNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.isFirstNode.html deleted file mode 100644 index a8ee61ce..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.isFirstNode.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.isFirstNode

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Judge whether the node is the sibling nodes's first node.

                    -

                    If you use the 'exhide' pack, so this attribute will only support the node which be shown.

                    -

                    Do not initialize or modify it, it is created by the zTree.

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: the node is first node.

                    -

                    false means: the node is not first node.

                    -

                    If the node has been hidden, isFirstNode = false

                    -
                    -

                    Examples of treeNode

                    -

                    1. Judge whether the first selected node is the sibling nodes's first node.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var isFirstNode = sNodes[0].isFirstNode;
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.isHidden.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.isHidden.html deleted file mode 100644 index 3a07b94c..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.isHidden.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.isHidden

                    -

                    Overview[ depends on jquery.ztree.exhide js ]

                    -
                    -

                    -
                    -

                    Judge whether the node has been hidden.

                    -

                    1. When initialize zTree, the nodes which be set 'isHidden = true' will be hidden.

                    -

                    -

                    2. Please don't change this attribute of the nodes which have been created. If you want to hide or show nodes, please use 'hideNode() / hideNodes() / showNode() / showNodes()' methods.

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: this node is hidden.

                    -

                    false means: this node is shown.

                    -
                    -

                    Examples of treeNode

                    -

                    1. Judge whether the first root node has been hidden.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getNodes();
                    -if (sNodes.length > 0) {
                    -	var isHidden = sNodes[0].isHidden;
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.isHover.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.isHover.html deleted file mode 100644 index e18ed0cf..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.isHover.html +++ /dev/null @@ -1,19 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.isHover

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Used to record the hover status of node's DOM. For 'setting.view.addHoverDom / removeHoverDom'.

                    -

                    Do not initialize or modify it, it is an internal argument.

                    -

                    Default: false

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: the node's DOM is in hover.

                    -

                    false means: the node's DOM is not in hover.

                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.isLastNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.isLastNode.html deleted file mode 100644 index cd2ca26b..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.isLastNode.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.isLastNode

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Judge whether the node is the sibling nodes's last node.

                    -

                    If you use the 'exhide' pack, so this attribute will only support the node which be shown.

                    -

                    Do not initialize or modify it, it is created by the zTree.

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: the node is last node.

                    -

                    false means: the node is not last node.

                    -

                    If the node has been hidden, isLastNode = false

                    -
                    -

                    Examples of treeNode

                    -

                    1. Judge whether the first selected node is the sibling nodes's last node.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var isLastNode = sNodes[0].isLastNode;
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.isParent.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.isParent.html deleted file mode 100644 index dad4b819..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.isParent.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.isParent

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Judge whether the node is the parent node.

                    -

                    1. When zTree initialize the node data, the node which has children is set to true, otherwise false.

                    -

                    2. When zTree initialize the node data, if set treeNode.isParent to true, the node will be set to be parent node.

                    -

                    3. In order to solve the problem of someone make json data, supporting "false", "true" format of the data string.

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: the node is parent node.

                    -

                    false means: the node is not parent node.

                    -
                    -

                    Examples of treeNode

                    -

                    1. Judge whether the first selected node is the parent node.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var isParent = sNodes[0].isParent;
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.level.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.level.html deleted file mode 100644 index d1511624..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.level.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    NumbertreeNode.level

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    The level of node

                    -

                    Do not initialize or modify it, it is created by the zTree.

                    -
                    -
                    -

                    Number Format

                    -
                    -

                    The root node's level = 0, and next level = 1, ...

                    -
                    -

                    Examples of treeNode

                    -

                    1. Get the first selected node's level

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var level = sNodes[0].level;
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.name.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.name.html deleted file mode 100644 index fa508ccb..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.name.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    StringtreeNode.name

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    The node's name

                    -

                    1. If you want to change 'name' attribute, please modify the 'setting.data.key.name' attribute.

                    -

                    Default: undenfined

                    -
                    -
                    -

                    String Format

                    -
                    -

                    String object. The HTML special characters are escaped

                    -
                    -

                    Examples of treeNode

                    -

                    1. Set node's name to 'test1', 'test2', 'test3'

                    -
                    var nodes = [
                    -	{ "id":1, "name":"test1"},
                    -	{ "id":2, "name":"test2"},
                    -	{ "id":3, "name":"test3"}
                    -]
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.nocheck.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.nocheck.html deleted file mode 100644 index 6c4880c8..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.nocheck.html +++ /dev/null @@ -1,26 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.nocheck

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    1. Set node to hide the checkbox or radio. It is valid when [setting.check.enable = true]

                    -

                    2. zTree support identification string 'true' & 'false'.

                    -

                    Default: false

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: the node hide the checkbox or radio, and don't affect the checked association, and don't affect its parent node's half-checked status.

                    -

                    false means: the node show the checkbox or radio.

                    -
                    -

                    Examples of treeNode

                    -

                    1. Hide some node's checkbox / radio

                    -
                    var nodes = [
                    -	{ "id":1, "name":"test1", "nocheck":true},
                    -	{ "id":2, "name":"test2"},
                    -	{ "id":3, "name":"test3"}
                    -]
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.open.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.open.html deleted file mode 100644 index bc910de3..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.open.html +++ /dev/null @@ -1,30 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.open

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Used to record the parent node's expand status.

                    -

                    1. When zTree initialize the node data, if you set treeNode.open = true, zTree will default expand this parent node.

                    -

                    2. Leaf node's 'open' attribute is false.

                    -

                    3. In order to solve the problem of someone make json data, supporting "false", "true" format of the data string.

                    -

                    4. When setting.async.enable = false, the parent node will be expanded which have no child nodes and its attribute 'open' is true. (v3.5.15+)

                    -

                    Default: false

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: the parent node is expanded.

                    -

                    false means: the parent node is collapsed.

                    -
                    -

                    Examples of treeNode

                    -

                    1. Get the first selected node's expand status.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var isOpen = sNodes[0].open;
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.parentTId.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.parentTId.html deleted file mode 100644 index 0bc2a6d6..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.parentTId.html +++ /dev/null @@ -1,27 +0,0 @@ -
                    -
                    -

                    StringtreeNode.parentTId

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    The unique identifier of node's parent node.

                    -

                    1. zTree v3.x using 'parentTId' replaced the original 'parentNode' attribute, and increased getParentNode () method, in order to avoid the original 'parentNode' cause the clone () method infinite loop.

                    -

                    2. Do not initialize or modify it, it is created by the zTree.

                    -
                    -
                    -

                    String Format

                    -
                    -

                    String object of node's parent node's tId. please see API about 'treeNode.tId'

                    -

                    If treeNode is root node, parentTId is null.

                    -
                    -

                    Examples of treeNode

                    -

                    1. Get the first selected node's parent node's tId

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var parentTId = sNodes[0].parentTId;
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.tId.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.tId.html deleted file mode 100644 index 18c2855a..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.tId.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    StringtreeNode.tId

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    The unique identifier of node.

                    -

                    Do not initialize or modify it, it is created by the zTree.

                    -
                    -
                    -

                    String Format

                    -
                    -

                    tId rules: setting.treeId + "_" + zTree counter

                    -
                    -

                    Examples of treeNode

                    -

                    1. Get the first selected node's tId

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var tId = sNodes[0].tId;
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.target.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.target.html deleted file mode 100644 index 176a7a35..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.target.html +++ /dev/null @@ -1,24 +0,0 @@ -
                    -
                    -

                    StringtreeNode.target

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Used to set the target where the node is clicked to open url. It is valid when [treeNode.url exists]

                    -

                    Default: undefined

                    -
                    -
                    -

                    String Format

                    -
                    -

                    As same as <a> tag's 'target' attribute. e.g. '_blank', '_self' or other window name.

                    -

                    if this attribute is omitted, zTree default set it to '_blank'

                    -
                    -

                    Exmaples of treeNode

                    -

                    1. Set target is '_blank'

                    -
                    var nodes = [
                    -	{ "id":1, "name":"test1", "url":"http://myTest.com", "target":"_blank"},
                    -	......
                    -]
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.url.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.url.html deleted file mode 100644 index 55524455..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.url.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    StringtreeNode.url

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    The URL of node link

                    -

                    1. In edit mode (setting.edit.enable = true) , this feature fails. If you must use a similar feature, please use the 'onClick' callback for their own control.

                    -

                    2. If you use the 'onClick' callback function to control opening URL , then set the URL in the other custom attribute, do not use the 'url' attribute.

                    -

                    Default: undefined

                    -
                    -
                    -

                    String Format

                    -
                    -

                    As same as <a> tag's 'href' attribute.

                    -
                    -

                    Examples of treeNode

                    -

                    1. Set the URL is 'g.cn'

                    -
                    var nodes = [
                    -	{ "id":1, "name":"Google CN", "url":"http://g.cn"},
                    -	......
                    -]
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.zAsync.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.zAsync.html deleted file mode 100644 index b3ff4145..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/treeNode.zAsync.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    BooleantreeNode.zAsync

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Judge whether the parent node's child nodes will be loaded asynchronously when the parent node is expanded.

                    -

                    Do not initialize or modify it, it is created by the zTree.

                    -

                    Default:false (the parent node which have no child nodes); true (the parent node which have child nodes or the leaf node)

                    -
                    -
                    -

                    Boolean Format

                    -
                    -

                    true means: the node's child nodes will not be loaded asynchronously when the parent node is expanded.

                    -

                    false means: the node's child nodes will be loaded asynchronously when the parent node is expanded.

                    -

                    This attribute will not effect to 'reAsyncChildNodes()' method

                    -
                    -

                    Examples of treeNode

                    -

                    1. Judge whether the first selected node's child nodes has been loaded asynchronously

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var sNodes = treeObj.getSelectedNodes();
                    -if (sNodes.length > 0) {
                    -	var zAsync = sNodes[0].zAsync;
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.addNodes.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.addNodes.html deleted file mode 100644 index 680ccc4e..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.addNodes.html +++ /dev/null @@ -1,42 +0,0 @@ -
                    -
                    -

                    Function(parentNode, newNodes, isSilent)zTreeObj.addNodes

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Add nodes

                    -

                    In order to avoid duplication data resulting from repeated initialization, zTree v3.x will automatically clone node data when zTree initialized or add nodes. If you need to get the data objects within the zTree, please get the return value of this method.

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    parentNodeJSON

                    -

                    The additional node's parent node. If additional node is root node, please the parentNode is null.

                    -

                    Please ensure this node data object is a data object within zTree.

                    -

                    newNodesJSON / Array(JSON)

                    -

                    The node data's JSON object collection which need to increase, refer to 'treeNode treeNode data details'

                    -

                    1. zTree v3.x support to add single node, that is, if you only add a node, you can don't use the array.

                    -

                    2. If you use simple data model, please refer to the attributes within the 'setting.data.simpleData'.

                    -

                    isSilentBoolean

                    -

                    Set whether to automatically expand the parent node, after add nodes.

                    -

                    isSilent = true means: don't auto expand the parent node. Otherwise auto expand.

                    -

                    Return Array(JSON)

                    -

                    return the new nodes in zTree

                    -

                    If the newNodes is single data object, the return value is a array with length is 1.

                    -

                    Note: the node data JSON object in the return value is not equal to the JSON object in the 'newNodes'.

                    -
                    -

                    Examples of function

                    -

                    1. Add one root node to zTree which id is 'tree'

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var newNode = {name:"newNode1"};
                    -newNode = treeObj.addNodes(null, newNode);
                    -
                    -

                    2. Add three root nodes to zTree which id is 'tree'

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var newNodes = [{name:"newNode1"}, {name:"newNode2"}, {name:"newNode3"}];
                    -newNodes = treeObj.addNodes(null, newNodes);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.cancelEditName.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.cancelEditName.html deleted file mode 100644 index 8afdae0b..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.cancelEditName.html +++ /dev/null @@ -1,30 +0,0 @@ -
                    -
                    -

                    Function(newName)zTreeObj.cancelEditName

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Cancel the edit name status. Can restore the original name, and can also force assigned to a new name.

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    newNameString

                    -

                    Re given a new name

                    -

                    If this parameter is omitted, then restore the original name.

                    -

                    Return none

                    -

                    no return value

                    -
                    -

                    Examples of function

                    -

                    1. Cancel edit name, and restore the original name.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -treeObj.cancelEditName();
                    -
                    -

                    2. Cancel edit name , and set the new name.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -treeObj.cancelEditName("test_new_name");
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.cancelSelectedNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.cancelSelectedNode.html deleted file mode 100644 index 84c6c80b..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.cancelSelectedNode.html +++ /dev/null @@ -1,35 +0,0 @@ -
                    -
                    -

                    Function(treeNode)zTreeObj.cancelSelectedNode

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    To cancel the selected node.

                    -

                    zTree v3.x support to select multiple nodes, so you can cancel a single selected node, and you can cancel all of the selected nodes too.

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which need to cancel selected.

                    -

                    Please ensure that this data object is an internal node data object in zTree.

                    -

                    If you omit this parameter, zTree will cancel all of the selected nodes.

                    -

                    Return none

                    -

                    no return value

                    -
                    -

                    Examples of function

                    -

                    1. Cancel all of the selected nodes

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -treeObj.cancelSelectedNode();
                    -
                    -

                    2. Cancel the first node of the selected nodes

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getSelectedNodes();
                    -if (nodes.length>0) { 
                    -	treeObj.cancelSelectedNode(nodes[0]);
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.checkAllNodes.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.checkAllNodes.html deleted file mode 100644 index 276b6294..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.checkAllNodes.html +++ /dev/null @@ -1,29 +0,0 @@ -
                    -
                    -

                    Function(checked)zTreeObj.checkAllNodes

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    Check or unCheck all nodes which have been initialized. It is valid when [setting.check.enable = true & setting.check.chkStyle = "checkbox"]

                    -

                    This method does not trigger 'beforeCheck' or 'onCheck' callback function.

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    checkedBoolean

                    -

                    checked = true means: check all nodes.

                    -

                    checked = false means: uncheck all nodes.

                    -

                    Don't affect the node which 'nochecked' attribute is true.

                    -

                    Don't affect the node is not loaded.

                    -

                    Return none

                    -

                    no return value

                    -
                    -

                    Examples of function

                    -

                    1. check all nodes

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -treeObj.checkAllNodes(true);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.checkNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.checkNode.html deleted file mode 100644 index 7411ef86..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.checkNode.html +++ /dev/null @@ -1,44 +0,0 @@ -
                    -
                    -

                    Function(treeNode, checked, checkTypeFlag, callbackFlag)zTreeObj.checkNode

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    Check or unCheck a single node. It is valid when [setting.check.enable = true]

                    -

                    Use checkNode() method of zTree v3.x can trigger 'beforeCheck' or 'onCheck' callback function. for reduce redundant code.

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which need to be checked or unchecked.

                    -

                    Please ensure that this data object is an internal node data object in zTree.

                    -

                    checkedBoolean

                    -

                    checked = true means: check node.

                    -

                    checked = false means: uncheck node.

                    -

                    If this parameter is omitted, then toggle check or uncheck depend this node's expanded state.

                    -

                    Don't affect the node which 'nochecked' attribute is true.

                    -

                    checkTypeFlagBoolean

                    -

                    checkTypeFlag = true means: According to 'setting.check.chkboxType' attribute automatically check or uncheck the parent and child nodes.

                    -

                    checkTypeFlag = false means: only check or uncheck this node, don't affect its parent and child nodes.

                    -

                    When checkTypeFlag = false and treeNode.checked = checked, will not trigger callback function.

                    -

                    Don't affect the parent and child nodes which 'nochecked' attribute is true.

                    -

                    callbackFlagBoolean

                    -

                    callbackFlag = true means: call this method, will trigger 'beforeCheck' & 'onCheck' callback.

                    -

                    callbackFlag = false means: call this method, will not trigger callback.

                    -

                    If this parameter is omitted, it is same as 'callbackFlag = false'

                    -

                    Return none

                    -

                    no return value

                    -
                    -

                    Examples of function

                    -

                    1. check the selected nodes

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getSelectedNodes();
                    -for (var i=0, l=nodes.length; i < l; i++) {
                    -	treeObj.checkNode(nodes[i], true, true);
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.copyNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.copyNode.html deleted file mode 100644 index ff7b5b59..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.copyNode.html +++ /dev/null @@ -1,47 +0,0 @@ -
                    -
                    -

                    Function(targetNode, treeNode, moveType, isSilent)zTreeObj.copyNode

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Copy the node

                    -

                    When copy nodes, zTree v3.x will clone nodes. If you need to get the data object in zTree, please get the return value of this method.

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    targetNodeJSON

                    -

                    JSON data object of the node to be target.

                    -

                    If copy the node to root node, please set the 'targetNode' to null.

                    -

                    Please ensure that this data object is an internal node data object in zTree.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node to be copied.

                    -

                    Please ensure that this data object is an internal node data object in zTree.

                    -

                    moveTypeString

                    -

                    Copied to the target node's relative position.

                    -

                    "inner" means: to be taregetNode's child node.

                    -

                    "prev" means: to be taregetNode's previous sibling node.

                    -

                    "next" means: to be taregetNode's next sibling node.

                    -

                    isSilentBoolean

                    -

                    After copy the node, whether to automatically expand its parent node.

                    -

                    isSilent = true means: don't expand its parent node.

                    -

                    isSilent = false or omit this parameter means: expand its parent node.

                    -

                    Return JSON

                    -

                    return the new node in zTree

                    -

                    Note: the node data JSON object in the return value is not equal to the treeNode.

                    -
                    -

                    Examples of function

                    -

                    1. Copy the second root node to the first root node's child node.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodes();
                    -treeObj.copyNode(nodes[0], nodes[1], "inner");
                    -
                    -

                    2. Copy the second root node to the first root node's previous sibling node.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodes();
                    -treeObj.copyNode(nodes[0], nodes[1], "before");
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.destroy.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.destroy.html deleted file mode 100644 index 80c52811..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.destroy.html +++ /dev/null @@ -1,25 +0,0 @@ -
                    -
                    -

                    Function(treeId)zTreeObj.destroy

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    From zTree v3.4, zTree support the method for destruction.

                    -

                    1. This method can destroy the zTreeObj's zTree.

                    -

                    2. If you want to destory all of the zTrees, you can use the '$.fn.zTree.destroy()' method.

                    -

                    3. If you want to use the tree which has been destroyed, you must use the 'init()' method at first.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    Return none

                    -

                    no return value

                    -
                    -

                    Examples of function

                    -

                    1. destroy the zTree which its id is 'treeDemo'

                    -
                    var zTreeObj = $.fn.zTree.getZTreeObj("treeDemo");
                    -zTreeObj.destroy();
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.editName.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.editName.html deleted file mode 100644 index f8df2643..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.editName.html +++ /dev/null @@ -1,29 +0,0 @@ -
                    -
                    -

                    Function(treeNode)zTreeObj.editName

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Start editing the node's name.

                    -

                    1. If need to cancel editing the node's name, please use cancelEditName(newName) method.

                    -

                    2. This method can be used to set the editing node‘s input box to get focus.

                    -

                    3. Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeNodeJSON

                    -

                    JSON data object of the node to be editing name

                    -

                    Please ensure that this data object is an internal node data object in zTree.

                    -

                    Retrun none

                    -

                    no return value

                    -
                    -

                    Examples of function

                    -

                    1. Start editing the first selected node's name.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodes();
                    -treeObj.editName(nodes[0]);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.expandAll.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.expandAll.html deleted file mode 100644 index ef28a316..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.expandAll.html +++ /dev/null @@ -1,30 +0,0 @@ -
                    -
                    -

                    Function(expandFlag)zTreeObj.expandAll

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Expand or collapse all nodes.

                    -

                    This method does not trigger 'beforeExpand / onExpand' or 'beforeCollapse / onCollapse' callback function.

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    expandFlagBoolean

                    -

                    expandFlag = true means: expand all nodes.

                    -

                    expandFlag = false means: collapse all nodes.

                    -

                    Return Boolean

                    -

                    return the result of expand or collapse.

                    -

                    true means: expand all nodes

                    -

                    false means: collapse all nodes

                    -

                    null means: have no parent node to expand or collapse.

                    -
                    -

                    Examples of function

                    -

                    1. Expand all nodes

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -treeObj.expandAll(true);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.expandNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.expandNode.html deleted file mode 100644 index 01e7442a..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.expandNode.html +++ /dev/null @@ -1,50 +0,0 @@ -
                    -
                    -

                    Function(treeNode, expandFlag, sonSign, focus, callbackFlag)zTreeObj.expandNode

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Expand or collapse single node.

                    -

                    Use expandNode() method of zTree v3.x can trigger 'beforeExpand / onExpand' or 'beforeCollapse / onCollapse' callback function. for reduce redundant code.

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeNodeJSON

                    -

                    JSON data object of the node to be expanded or collapsed

                    -

                    Please ensure that this data object is an internal node data object in zTree.

                    -

                    expandFlagBoolean

                    -

                    expandFlag = true means: expand the node.

                    -

                    expandFlag = false means: collapse the node.

                    -

                    If this parameter is omitted, then toggle expand or collapse depend this node's expanded state.

                    -

                    sonSignBoolean

                    -

                    sonSign = true means: expand or collapse all of the child nodes depend the 'expandFlag' parameter.

                    -

                    sonSign = false means: only expand or collapse this node.

                    -

                    When sonSign = false and treeNode.open = expandFlag, will not trigger the callback.

                    -

                    If this parameter is omitted, it is same as 'sonSign = false'.

                    -

                    focusBoolean

                    -

                    focus = true means: after expand or collapse, set the focus of this node for view.

                    -

                    focus = false means: after expand or coolapse, don't set the focus of this node.

                    -

                    If this parameter is omitted, it is same as 'focus = true'.

                    -

                    callbackFlagBoolean

                    -

                    callbackFlag = true means: call this method, will trigger 'beforeExpand / onExpand' or 'beforeCollapse / onCollapse' callback.

                    -

                    callbackFlag = false means: call this method, will not trigger callback.

                    -

                    If this parameter is omitted, it is same as 'callbackFlag = false'

                    -

                    Return Boolean

                    -

                    return the result of expand or collapse.

                    -

                    true means: expand node

                    -

                    false means: collapse node

                    -

                    null means: the node is not parent node.

                    -
                    -

                    Examples of function

                    -

                    1. Expand the first selected node. (and expand this node's child nodes)

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getSelectedNodes();
                    -if (nodes.length>0) {
                    -	treeObj.expandNode(nodes[0], true, true, true);
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getChangeCheckedNodes.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getChangeCheckedNodes.html deleted file mode 100644 index d0f9cf3b..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getChangeCheckedNodes.html +++ /dev/null @@ -1,24 +0,0 @@ -
                    -
                    -

                    Function()zTreeObj.getChangeCheckedNodes

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    Get the collection of nodes which be changed checked status. (Compared with the original data checkedOld) It is valid when [setting.check.enable = true]

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    Return Array(JSON)

                    -

                    return the collection of nodes which be changed checked status (Array)

                    -

                    If you need to get the collection of nodes which changed the checked status, when nodes be checked or unchecked, so please set treeNode.checkedOld = treeNode.checked ( for all of the be changed checked status nodes ).

                    -
                    -

                    Examples of function

                    -

                    1. Get the collection of nodes which be changed checked status

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getChangeCheckedNodes();
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getCheckedNodes.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getCheckedNodes.html deleted file mode 100644 index 7a7c3b97..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getCheckedNodes.html +++ /dev/null @@ -1,28 +0,0 @@ -
                    -
                    -

                    Function(checked)zTreeObj.getCheckedNodes

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    Get the collection of nodes which be checked or unchecked. It is valid when [setting.check.enable = true]

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    checkedBoolean

                    -

                    checked = true means: get the collection of nodes which be checked

                    -

                    checked = false means: get the collection of nodes which be unchecked

                    -

                    If this parameter is omitted, it is same as 'checked = true'

                    -

                    Don't get the nodes which 'nochecked' attribute is true.

                    -

                    Return Array(JSON)

                    -

                    return the collection of nodes which be checked or unchecked. (Array)

                    -
                    -

                    Examples of function

                    -

                    1. Get the collection of nodes which be checked.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getCheckedNodes(true);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getNodeByParam.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getNodeByParam.html deleted file mode 100644 index 05572e73..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getNodeByParam.html +++ /dev/null @@ -1,32 +0,0 @@ -
                    -
                    -

                    Function(key, value, parentNode)zTreeObj.getNodeByParam

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    According to the node data attribute, search the node which exactly matches, and get the JSON object of node.

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    keyString

                    -

                    The name of attribute which need to exactly match

                    -

                    value?

                    -

                    The value which need to exactly match, can be any type, please ensure its type consistent with the attribute values.

                    -

                    parentNodeJSON

                    -

                    The search range, you can search node from a parent node's child nodes.

                    -

                    If this parameter is omitted, zTree will search node from all nodes.

                    -

                    Return JSON

                    -

                    JSON data object of the node which be searched.

                    -

                    1. If search none node, return null.

                    -

                    2. If there are many nodes can be searched, return the first node.

                    -
                    -

                    Examples of function

                    -

                    1. Search the node which its 'id' attribute is 1.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var node = treeObj.getNodeByParam("id", 1, null);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getNodeByTId.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getNodeByTId.html deleted file mode 100644 index 8fd26ea0..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getNodeByTId.html +++ /dev/null @@ -1,27 +0,0 @@ -
                    -
                    -

                    Function(tId)zTreeObj.getNodeByTId

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    According the unique identifier tId of zTree, quick get the node's JSON data object.

                    -

                    Get the node from the cache, don't need to search from all nodes.

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    tIdString

                    -

                    The unique identifier of node.

                    -

                    Return JSON

                    -

                    JSON data object of the node which be searched.

                    -

                    If no result, return null.

                    -
                    -

                    Examples of function

                    -

                    1. 1. Search the node which its 'tId' attribute is 'tree_10'

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var node = treeObj.getNodeByTId("tree_10");
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getNodeIndex.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getNodeIndex.html deleted file mode 100644 index ad828e7a..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getNodeIndex.html +++ /dev/null @@ -1,30 +0,0 @@ -
                    -
                    -

                    Function(treeNode)zTreeObj.getNodeIndex

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Get the node's index in the same level nodes. (start from 0)

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which need to get index.

                    -

                    Please ensure that this data object is an internal node data object in zTree.

                    -

                    Return Number

                    -

                    return the index. (start from 0)

                    -

                    If there is no this node, return -1.

                    -
                    -

                    Examples of function

                    -

                    1. Get the first selected node's index in the same level nodes.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getSelectedNodes();
                    -if (nodes.length>0) {
                    -	var index = treeObj.getNodeIndex(nodes[0]);
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getNodes.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getNodes.html deleted file mode 100644 index 5906a434..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getNodes.html +++ /dev/null @@ -1,26 +0,0 @@ -
                    -
                    -

                    Function()zTreeObj.getNodes

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Get all of the nodes in zTree

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    Return Array(JSON)

                    -

                    return all of the nodes

                    -

                    1. This array is a collection of the root nodes (the default child nodes are in the 'children' attributes);

                    -

                    2. Traverse all the nodes need to use recursion, or the use of transformToArray() method make the nodes to be a simple array.

                    -

                    3. For the asynchronous loading mode, can't get the nodes which are yet loaded.

                    -
                    -

                    Examples of function

                    -

                    1. Get all of the nodes

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodes();
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getNodesByFilter.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getNodesByFilter.html deleted file mode 100644 index 2cd6baa8..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getNodesByFilter.html +++ /dev/null @@ -1,43 +0,0 @@ -
                    -
                    -

                    Function(filter, isSingle, parentNode, invokeParam)zTreeObj.getNodesByFilter

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Search the single node's data or collection of nodes's data by custom rules.

                    -

                    Can be customized complex search rules.

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    filterFunction

                    -

                    Custom search function. e.g. function filter(node) {...}

                    -

                    filter's parameter: node (node's data -- JSON)

                    -

                    filter's return: boolean (true means: match the rules; false means: don't match the rules)

                    -

                    isSingleBoolean

                    -

                    isSingle = true means: search only one node

                    -

                    isSingle = false means: search the array of the nodes

                    -

                    If this parameter is omitted, as same as false

                    -

                    parentNodeJSON

                    -

                    The search range, you can search node from a parent node's child nodes.

                    -

                    If this parameter is omitted, zTree will search node from all nodes.

                    -

                    invokeParamanything

                    -

                    Custom data object by user, used to calculate in the filter function.

                    -

                    Return Array(JSON) / JSON

                    -

                    If isSingle = true, will return the first node's data (JSON) what be matched. If no match, return null.

                    -

                    If isSingle = false, will return the array of all nodes's data what be matched. if no match, return [ ].

                    -
                    -

                    Examples of function

                    -

                    1. Search the nodes which their 'name' contains 'test' and 'level' is 2.

                    -
                    function filter(node) {
                    -    return (node.level == 2 && node.name.indexOf("test")>-1);
                    -}
                    -......
                    -var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var node = treeObj.getNodesByFilter(filter, true); // search only one node
                    -var nodes = treeObj.getNodesByFilter(filter); // search the array of the nodes
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getNodesByParam.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getNodesByParam.html deleted file mode 100644 index 3173af47..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getNodesByParam.html +++ /dev/null @@ -1,31 +0,0 @@ -
                    -
                    -

                    Function(key, value, parentNode)zTreeObj.getNodesByParam

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    According to the node data attribute, search the nodes which exactly matches, and get the JSON objects collection of nodes.

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    keyString

                    -

                    The name of attribute which need to exactly match

                    -

                    value?

                    -

                    The value which need to exactly match, can be any type, please ensure its type consistent with the attribute values.

                    -

                    parentNodeJSON

                    -

                    The search range, you can search node from a parent node's child nodes.

                    -

                    If this parameter is omitted, zTree will search node from all nodes.

                    -

                    Return Array(JSON)

                    -

                    The JSON data objects collection of the nodes which be searched.

                    -

                    If search none node, return [ ].

                    -
                    -

                    Examples of function

                    -

                    1. Search the nodes which their 'name' attribute is 'test'.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodesByParam("name", "test", null);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getNodesByParamFuzzy.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getNodesByParamFuzzy.html deleted file mode 100644 index 14b6c294..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getNodesByParamFuzzy.html +++ /dev/null @@ -1,32 +0,0 @@ -
                    -
                    -

                    Function(key, value, parentNode)zTreeObj.getNodesByParamFuzzy

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    According to the node data attribute, search the nodes which fuzzy matches, and get the JSON objects collection of nodes.

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    keyString

                    -

                    The name of attribute which need to fuzzy match

                    -

                    valueString

                    -

                    The value which need to fuzzy match.

                    -

                    The type of value can only be String

                    -

                    parentNodeJSON

                    -

                    The search range, you can search node from a parent node's child nodes.

                    -

                    If this parameter is omitted, zTree will search node from all nodes.

                    -

                    Return Array(JSON)

                    -

                    The JSON data objects collection of the nodes which be searched.

                    -

                    If search none node, return [ ].

                    -
                    -

                    Examples of function

                    -

                    1. Search the nodes which their 'name' attribute contains the string 'test'.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodesByParamFuzzy("name", "test", null);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getSelectedNodes.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getSelectedNodes.html deleted file mode 100644 index 4a0f0608..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.getSelectedNodes.html +++ /dev/null @@ -1,23 +0,0 @@ -
                    -
                    -

                    Function()zTreeObj.getSelectedNodes

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Get the JSON data objects collection of the selected nodes in zTree.

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    Return Array(JSON)

                    -

                    The JSON data objects collection of the selected nodes.

                    -
                    -

                    Examples of function

                    -

                    1. get the selected nodes

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getSelectedNodes();
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.hideNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.hideNode.html deleted file mode 100644 index 8ddb6843..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.hideNode.html +++ /dev/null @@ -1,29 +0,0 @@ -
                    -
                    -

                    Function(treeNode)zTreeObj.hideNode

                    -

                    Overview[ depends on jquery.ztree.exhide js ]

                    -
                    -

                    -
                    -

                    To hide any node.

                    -

                    1. This feature can't support the 'exedit' feature, so please don't use this feature in edit mode.

                    -

                    2. If you hide or show the nodes, it will effect the 'isFirstNode' and 'isLastNode' attribute.

                    -

                    3. Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeNodeJSON

                    -

                    JSON data object of the node to be hidden

                    -

                    Please ensure that this data object is an internal node data object in zTree.

                    -

                    Retrun none

                    -

                    no return value

                    -
                    -

                    Examples of function

                    -

                    1. hide the first root node.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodes();
                    -treeObj.hideNode(nodes[0]);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.hideNodes.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.hideNodes.html deleted file mode 100644 index 9bf8e6b5..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.hideNodes.html +++ /dev/null @@ -1,29 +0,0 @@ -
                    -
                    -

                    Function(treeNodes)zTreeObj.hideNodes

                    -

                    Overview[ depends on jquery.ztree.exhide js ]

                    -
                    -

                    -
                    -

                    To hide a group of nodes.

                    -

                    1. This feature can't support the 'exedit' feature, so please don't use this feature in edit mode.

                    -

                    2. If you hide or show the nodes, it will effect the 'isFirstNode' and 'isLastNode' attribute.

                    -

                    3. Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeNodesArray(JSON)

                    -

                    the array of the nodes which will be hidden

                    -

                    Please ensure that this data object is an internal node data object in zTree.

                    -

                    Retrun none

                    -

                    no return value

                    -
                    -

                    Examples of function

                    -

                    1. hide the first root node's children.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodes();
                    -treeObj.hideNodes(nodes[0].children);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.moveNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.moveNode.html deleted file mode 100644 index 1f3b88c3..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.moveNode.html +++ /dev/null @@ -1,49 +0,0 @@ -
                    -
                    -

                    Function(targetNode, treeNode, moveType, isSilent)zTreeObj.moveNode

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Move the node

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    targetNodeJSON

                    -

                    JSON data object of the node to be target.

                    -

                    If move the node to root node, please set the 'targetNode' to null.

                    -

                    Please ensure that this data object is an internal node data object in zTree.

                    -

                    treeNodeJSON

                    -

                    JSON data object of the node to be moved.

                    -

                    Please ensure that this data object is an internal node data object in zTree.

                    -

                    moveTypeString

                    -

                    Moved to the target node's relative position.

                    -

                    "inner" means: to be taregetNode's child node.

                    -

                    "prev" means: to be taregetNode's previous sibling node.

                    -

                    "next" means: to be taregetNode's next sibling node.

                    -

                    isSilentBoolean

                    -

                    After move the node, whether to automatically expand its parent node.

                    -

                    isSilent = true means: don't expand its parent node.

                    -

                    isSilent = false or omit this parameter means: expand its parent node.

                    -

                    Return JSON

                    -

                    return the node which be moved, it is same as the 'treeNode' parameter.

                    -

                    Return null means: move node has failed. The cause:
                    -  1. the targetNode is the treeNode's parent node, and moveType = "inner"
                    -  2. the targetNode is the treeNode's child node. -

                    -
                    -

                    Examples of function

                    -

                    1. Move the second root node to the first root node's child node.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodes();
                    -treeObj.moveNode(nodes[0], nodes[1], "inner");
                    -
                    -

                    2. Move the second root node to the first root node's previous sibling node.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodes();
                    -treeObj.moveNode(nodes[0], nodes[1], "prev");
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.reAsyncChildNodes.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.reAsyncChildNodes.html deleted file mode 100644 index 63a0896c..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.reAsyncChildNodes.html +++ /dev/null @@ -1,42 +0,0 @@ -
                    -
                    -

                    Function(parentNode, reloadType, isSilent)zTreeObj.reAsyncChildNodes

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Forced asynchronous loading child nodes of parent node. It is valid when [setting.async.enable = true]

                    -

                    You can use this method to reload child nodes.

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    parentNodeJSON

                    -

                    The parent node which will asynchronous loading child nodes.

                    -

                    1. If parentNode = null, it is same as reload root nodes.

                    -

                    2. If parentNode.isParent = false, don't load nodes.

                    -

                    3. Please ensure that this data object is an internal node data object in zTree.

                    -

                    reloadTypeString

                    -

                    reloadType = "refresh" means: reload child nodes.

                    -

                    reloadType != "refresh" means: append to load child nodes.

                    -

                    isSilentBoolean

                    -

                    Set whether to automatically expand the parent node, after load nodes.

                    -

                    isSilent = true means: don't auto expand the parent node. Otherwise auto expand.

                    -

                    Return none

                    -

                    no return value

                    -
                    -

                    Examples of function

                    -

                    1. reload root nodes

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -treeObj.reAsyncChildNodes(null, "refresh");
                    -
                    -

                    2. reload the first selected node's child nodes.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getSelectedNodes();
                    -if (nodes.length>0) {
                    -	treeObj.reAsyncChildNodes(nodes[0], "refresh");
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.refresh.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.refresh.html deleted file mode 100644 index 8316192c..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.refresh.html +++ /dev/null @@ -1,24 +0,0 @@ -
                    -
                    -

                    Function()zTreeObj.refresh

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Refresh zTree

                    -

                    If you have no special need, try not to use this method. If you refresh single node, please use updateNode() method. If you refresh child nodes in dynamic mode, please use the reAsyncChildNodes() method.

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    Return none

                    -

                    no return value

                    -
                    -

                    Examples of function

                    -

                    1. refresh zTree

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -treeObj.refresh();
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.removeChildNodes.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.removeChildNodes.html deleted file mode 100644 index c249e175..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.removeChildNodes.html +++ /dev/null @@ -1,32 +0,0 @@ -
                    -
                    -

                    Function(parentNode)zTreeObj.removeChildNodes

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Remove a parent node's child nodes

                    -

                    1. After remove child nodes, the parent node will become a leaf node. Such as the need to maintain the parent node is still a parent node, set 'setting.data.keep.parent' attribute.

                    -

                    2. Do not use this method to empty the root. If you need to empty the root, you can initialization zTree, and set the initial nodes is null.

                    -

                    3. This method does not trigger any callback function.

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    parentNodeJSON

                    -

                    The parent node which need to clear its child nodes.

                    -

                    Please ensure that this data object is an internal node data object in zTree.

                    -

                    Return Array(JSON)

                    -

                    Return the parent node's child nodes which have been removed. If has no child nodes, return null.

                    -
                    -

                    Examples of function

                    -

                    1. Remove the first selected node's child nodes

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getSelectedNodes();
                    -if (nodes && nodes.length>0) {
                    -	treeObj.removeChildNodes(nodes[0]);
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.removeNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.removeNode.html deleted file mode 100644 index 67ad7e23..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.removeNode.html +++ /dev/null @@ -1,34 +0,0 @@ -
                    -
                    -

                    Function(treeNode, callbackFlag)zTreeObj.removeNode

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Remove a node

                    -

                    Use removeNode() method of zTree v3.x can trigger 'beforeRemove / onRemove' callback function. for reduce redundant code.

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeNodeJSON

                    -

                    JSON data object of the node to be removed.

                    -

                    Please ensure that this data object is an internal node data object in zTree.

                    -

                    callbackFlagBoolean

                    -

                    callbackFlag = true means: call this method, will trigger 'beforeRemove' & 'onRemove' callback.

                    -

                    callbackFlag = false means: call this method, will not trigger callback.

                    -

                    If this parameter is omitted, it is same as 'callbackFlag = false'

                    -

                    Return none

                    -

                    no return value

                    -
                    -

                    Examples of function

                    -

                    1. Remove all of the selected nodes.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getSelectedNodes();
                    -for (var i=0, l=nodes.length; i < l; i++) {
                    -	treeObj.removeNode(nodes[i]);
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.selectNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.selectNode.html deleted file mode 100644 index 46d62345..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.selectNode.html +++ /dev/null @@ -1,34 +0,0 @@ -
                    -
                    -

                    Function(treeNode, addFlag)zTreeObj.selectNode

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Select a node

                    -

                    zTree v3.x supports select multiple nodes.

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeNodeJSON

                    -

                    JSON data object of the node to be selected.

                    -

                    Please ensure that this data object is an internal node data object in zTree.

                    -

                    addFlagBoolean

                    -

                    addFlag = true means: append to select node, don't affect the previously selected node, can select multiple nodes.

                    -

                    addFlag = false means: select single node, prior the selected node is deselected.

                    -

                    If setting.view.selectedMulti = false, this para, this parameter is not valid, always select single node

                    -

                    Return none

                    -

                    no return value

                    -
                    -

                    Exampleso of function

                    -

                    1. Select single node which be first selected.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodes();
                    -if (nodes.length>0) {
                    -	treeObj.selectNode(nodes[0]);
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.setChkDisabled.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.setChkDisabled.html deleted file mode 100644 index ced58690..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.setChkDisabled.html +++ /dev/null @@ -1,44 +0,0 @@ -
                    -
                    -

                    Function(node, disabled, inheritParent, inheritChildren)zTreeObj.setChkDisabled

                    -

                    Overview[ depends on jquery.ztree.excheck js ]

                    -
                    -

                    -
                    -

                    Set the node's checkbox or radio is disabled or remove disabled. It is valid when [setting.check.enable = true]

                    -

                    1. After the node's checkbox / radio is disabled, it can not be checked or unchecked, but it can affect the half-checked status of the parent node.

                    -

                    2. Please do not directly modify the 'chkDisabled' attribute of the loaded node.

                    -

                    3. Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which need to be checked or unchecked.

                    -

                    Please ensure that this data object is an internal node data object in zTree.

                    -

                    disabledBoolean

                    -

                    disabled = true means: the node's checkbox / radio is disabled.

                    -

                    disabled = false means: the node's checkbox / radio is removed disabled.

                    -

                    If this parameter is omitted, it is same as disabled = false

                    -

                    Don't affect the node which 'nochecked' attribute is true.

                    -

                    inheritParentBoolean

                    -

                    inheritParent = true means: all parent nodes's disabled status will be same as this node.

                    -

                    inheritParent = false means: all parent nodes's disabled status will be not affected.

                    -

                    If this parameter is omitted, it is same as 'inheritParent = false'

                    -

                    inheritChildrenBoolean

                    -

                    inheritChildren = true means: all child nodes's disabled status will be same as this node.

                    -

                    inheritChildren = false means: all child nodes's disabled status will be not affected.

                    -

                    If this parameter is omitted, it is same as 'inheritChildren = false'

                    -

                    Return none

                    -

                    no return value

                    -
                    -

                    Examples of function

                    -

                    1. Set the selected nodes's checkbox / radio to disable.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getSelectedNodes();
                    -for (var i=0, l=nodes.length; i < l; i++) {
                    -	treeObj.setChkDisabled(nodes[i], true);
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.setEditable.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.setEditable.html deleted file mode 100644 index a44b0ff6..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.setEditable.html +++ /dev/null @@ -1,27 +0,0 @@ -
                    -
                    -

                    Function(editable)zTreeObj.setEditable

                    -

                    Overview[ depends on jquery.ztree.exedit js ]

                    -
                    -

                    -
                    -

                    Edit mode and normal mode switch.

                    -

                    To use edit mode, please set the attributes in 'setting.edit'

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    editableBoolean

                    -

                    true means: set zTree to edit mode.

                    -

                    false means: set zTree to normal mode.

                    -

                    Return none

                    -

                    no return value

                    -
                    -

                    Examples of function

                    -

                    1. set zTree to edit mode

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -treeObj.setEditable(true);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.setting.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.setting.html deleted file mode 100644 index d80c139a..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.setting.html +++ /dev/null @@ -1,14 +0,0 @@ -
                    -
                    -

                    JSONzTreeObj.setting

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    The configuration data of zTree, refer to "setting details"

                    -

                    zTree v3.x to cancel the original operation setting method, so users can modify.

                    -

                    Note: Modify the parameters which affect zTree initialization will not work, please first understand the different attributes.

                    -
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.showNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.showNode.html deleted file mode 100644 index 08b2a068..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.showNode.html +++ /dev/null @@ -1,31 +0,0 @@ -
                    -
                    -

                    Function(treeNode)zTreeObj.showNode

                    -

                    Overview[ depends on jquery.ztree.exhide js ]

                    -
                    -

                    -
                    -

                    To hide any node which be hidden.

                    -

                    1. This feature can't support the 'exedit' feature, so please don't use this feature in edit mode.

                    -

                    2. If you hide or show the nodes, it will effect the 'isFirstNode' and 'isLastNode' attribute.

                    -

                    3. Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeNodesArray(JSON)

                    -

                    JSON data object of the node to be shown

                    -

                    Please ensure that this data object is an internal node data object in zTree.

                    -

                    Retrun none

                    -

                    no return value

                    -
                    -

                    Examples of function

                    -

                    1. show someone node which be hidden.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var node = treeObj.getNodeByParam("isHidden", true);
                    -if (node) {
                    -  treeObj.showNode(node);
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.showNodes.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.showNodes.html deleted file mode 100644 index c0c926c3..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.showNodes.html +++ /dev/null @@ -1,29 +0,0 @@ -
                    -
                    -

                    Function(treeNodes)zTreeObj.showNodes

                    -

                    Overview[ depends on jquery.ztree.exhide js ]

                    -
                    -

                    -
                    -

                    To show a group of nodes which be hidden.

                    -

                    1. This feature can't support the 'exedit' feature, so please don't use this feature in edit mode.

                    -

                    2. If you hide or show the nodes, it will effect the 'isFirstNode' and 'isLastNode' attribute.

                    -

                    3. Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeNodesArray(JSON)

                    -

                    the array of the nodes which will be shown

                    -

                    Please ensure that this data object is an internal node data object in zTree.

                    -

                    Retrun none

                    -

                    no return value

                    -
                    -

                    Examples of function

                    -

                    1. show all of the nodes which be hidden.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodesByParam("isHidden", true);
                    -treeObj.showNodes(nodes);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.transformToArray.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.transformToArray.html deleted file mode 100644 index 4b2296d5..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.transformToArray.html +++ /dev/null @@ -1,27 +0,0 @@ -
                    -
                    -

                    Function(treeNodes)zTreeObj.transformToArray

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    -

                    Transform the zTree nodes data into simple array. (To avoid the user to write code to traverse all nodes)

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeNodesArray(JSON) / JSON

                    -

                    JSON data object of the node which need to be transformed.

                    -

                    or JSON data objects collection of the nodes which need to be transformed.

                    -

                    Return Array(JSON)

                    -

                    The JSON data objects array of the nodes which be transformed.

                    -
                    -

                    Examples of function

                    -

                    1. Transform the zTree nodes data into simple array.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.transformToArray(treeObj.getNodes());
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.transformTozTreeNodes.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.transformTozTreeNodes.html deleted file mode 100644 index 70150165..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.transformTozTreeNodes.html +++ /dev/null @@ -1,44 +0,0 @@ -
                    -
                    -

                    Function(simpleNodes)zTreeObj.transformTozTreeNodes

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Transform the simple array into zTree nodes data.

                    -

                    If you use this method, you must set 'setting.data.simpleData.idKey' and 'setting.data.simpleData.pIdKey' attribute, and let the data are consistent with parent-child relationship.

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    simpleNodesArray(JSON) / JSON

                    -

                    JSON data object of the node which need to be transformed.

                    -

                    or JSON data objects array of the nodes which need to be transformed.

                    -

                    Return Array(JSON)

                    -

                    Standard data which zTree use. The child nodes are stored in the parent node's 'children' attribute.

                    -

                    If simpleNodes is a single JSON, so the return array's length is 1.

                    -
                    -

                    Examples of function

                    -

                    1. Transform the simple array data into zTree nodes format.

                    -
                    var setting = {
                    -	data: {
                    -		simpleData: {
                    -			enable: true,
                    -			idKey: "id",
                    -			pIdKey: "pId",
                    -			rootPId: 0
                    -		}
                    -	}
                    -};
                    -var simpleNodes = [
                    -    {"id":1, "pId":0, "name":"test1"},
                    -    {"id":11, "pId":1, "name":"test11"},
                    -    {"id":12, "pId":1, "name":"test12"},
                    -    {"id":111, "pId":11, "name":"test111"}
                    -];
                    -var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.transformTozTreeNodes(simpleNodes);
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.updateNode.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.updateNode.html deleted file mode 100644 index 7639ff41..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/api/en/zTreeObj.updateNode.html +++ /dev/null @@ -1,37 +0,0 @@ -
                    -
                    -

                    Function(treeNode, checkTypeFlag)zTreeObj.updateNode

                    -

                    Overview[ depends on jquery.ztree.core js ]

                    -
                    -

                    -
                    -

                    Update node data. Primarily used to update the node's DOM.

                    -

                    1. Can update the attributes for display (e.g. 'name', 'target', 'url', 'icon', 'iconSkin', 'checked', 'nocheck'), do not update the other attributes. For example: If you need to expand the node, please use expandNode() method, do not modify the 'open' attribute.

                    -

                    2. Use updateNode() method of zTree can't trigger 'beforeCheck' or 'onCheck' callback function.

                    -

                    Please use zTree object to executing the method.

                    -
                    -
                    -

                    Function Parameter Descriptions

                    -
                    -

                    treeNodeJSON

                    -

                    JSON data object of the node which need to update.

                    -

                    Please ensure that this data object is an internal node data object in zTree.

                    -

                    checkTypeFlagBoolean

                    -

                    checkTypeFlag = true means: According to 'setting.check.chkboxType' attribute automatically check or uncheck the parent and child nodes.

                    -

                    checkTypeFlag = false means: only check or uncheck this node, don't affect its parent and child nodes.

                    -

                    This parameter is valid when 'setting.check.enable = true' and 'setting.check.chkStyle = "checkbox"'

                    -

                    Don't affect the parent and child nodes which 'nochecked' attribute is true.

                    -

                    Return none

                    -

                    no return value

                    -
                    -

                    Examples of function

                    -

                    1. Modify the first selected node's name, and update it.

                    -
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    -var nodes = treeObj.getNodes();
                    -if (nodes.length>0) {
                    -	nodes[0].name = "test";
                    -	treeObj.updateNode(nodes[0]);
                    -}
                    -
                    -
                    -
                    \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/metroStyle/img/line_conn.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/metroStyle/img/line_conn.png deleted file mode 100644 index b211da2f..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/metroStyle/img/line_conn.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/metroStyle/img/loading.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/metroStyle/img/loading.gif deleted file mode 100644 index e8c28929..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/metroStyle/img/loading.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/metroStyle/img/metro.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/metroStyle/img/metro.gif deleted file mode 100644 index 664b969a..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/metroStyle/img/metro.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/metroStyle/img/metro.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/metroStyle/img/metro.png deleted file mode 100644 index e9e58a3a..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/metroStyle/img/metro.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/metroStyle/metroStyle.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/metroStyle/metroStyle.css deleted file mode 100644 index e20c37d4..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/metroStyle/metroStyle.css +++ /dev/null @@ -1,96 +0,0 @@ -/*------------------------------------- -zTree Style - -version: 3.4 -author: Hunter.z -email: hunter.z@263.net -website: http://code.google.com/p/jquerytree/ - --------------------------------------*/ - -.ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif} -.ztree {margin:0; padding:5px; color:#333} -.ztree li{padding:0; margin:0; list-style:none; line-height:17px; text-align:left; white-space:nowrap; outline:0} -.ztree li ul{ margin:0; padding:0 0 0 18px} -.ztree li ul.line{ background:url(./img/line_conn.png) 0 0 repeat-y;} - -.ztree li a {padding-right:3px; margin:0; cursor:pointer; height:21px; color:#333; background-color: transparent; text-decoration:none; vertical-align:top; display: inline-block} -.ztree li a:hover {text-decoration:underline} -.ztree li a.curSelectedNode {padding-top:0px; background-color:#e5e5e5; color:black; height:21px; opacity:0.8;} -.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#e5e5e5; color:black; height:21px; border:1px #666 solid; opacity:0.8;} -.ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#aaa; color:white; height:21px; border:1px #666 solid; - opacity:0.8; filter:alpha(opacity=80)} -.ztree li a.tmpTargetNode_prev {} -.ztree li a.tmpTargetNode_next {} -.ztree li a input.rename {height:14px; width:80px; padding:0; margin:0; - font-size:12px; border:1px #585956 solid; *border:0px} -.ztree li span {line-height:21px; margin-right:2px} -.ztree li span.button {line-height:0; margin:0; padding: 0; width:21px; height:21px; display: inline-block; vertical-align:middle; - border:0 none; cursor: pointer;outline:none; - background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; - background-image:url("./img/metro.png"); *background-image:url("./img/metro.gif")} - -.ztree li span.button.chk {width:13px; height:13px; margin:0 2px; cursor: auto} -.ztree li span.button.chk.checkbox_false_full {background-position: -5px -5px;} -.ztree li span.button.chk.checkbox_false_full_focus {background-position: -5px -26px;} -.ztree li span.button.chk.checkbox_false_part {background-position: -5px -48px;} -.ztree li span.button.chk.checkbox_false_part_focus {background-position: -5px -68px;} -.ztree li span.button.chk.checkbox_false_disable {background-position: -5px -89px;} -.ztree li span.button.chk.checkbox_true_full {background-position: -26px -5px;} -.ztree li span.button.chk.checkbox_true_full_focus {background-position: -26px -26px;} -.ztree li span.button.chk.checkbox_true_part {background-position: -26px -48px;} -.ztree li span.button.chk.checkbox_true_part_focus {background-position: -26px -68px;} -.ztree li span.button.chk.checkbox_true_disable {background-position: -26px -89px;} -.ztree li span.button.chk.radio_false_full {background-position: -47px -5px;} -.ztree li span.button.chk.radio_false_full_focus {background-position: -47px -26px;} -.ztree li span.button.chk.radio_false_part {background-position: -47px -47px;} -.ztree li span.button.chk.radio_false_part_focus {background-position: -47px -68px;} -.ztree li span.button.chk.radio_false_disable {background-position: -47px -89px;} -.ztree li span.button.chk.radio_true_full {background-position: -68px -5px;} -.ztree li span.button.chk.radio_true_full_focus {background-position: -68px -26px;} -.ztree li span.button.chk.radio_true_part {background-position: -68px -47px;} -.ztree li span.button.chk.radio_true_part_focus {background-position: -68px -68px;} -.ztree li span.button.chk.radio_true_disable {background-position: -68px -89px;} - -.ztree li span.button.switch {width:21px; height:21px} -.ztree li span.button.root_open{background-position:-105px -63px} -.ztree li span.button.root_close{background-position:-126px -63px} -.ztree li span.button.roots_open{background-position: -105px 0;} -.ztree li span.button.roots_close{background-position: -126px 0;} -.ztree li span.button.center_open{background-position: -105px -21px;} -.ztree li span.button.center_close{background-position: -126px -21px;} -.ztree li span.button.bottom_open{background-position: -105px -42px;} -.ztree li span.button.bottom_close{background-position: -126px -42px;} -.ztree li span.button.noline_open{background-position: -105px -84px;} -.ztree li span.button.noline_close{background-position: -126px -84px;} -.ztree li span.button.root_docu{ background:none;} -.ztree li span.button.roots_docu{background-position: -84px 0;} -.ztree li span.button.center_docu{background-position: -84px -21px;} -.ztree li span.button.bottom_docu{background-position: -84px -42px;} -.ztree li span.button.noline_docu{ background:none;} - -.ztree li span.button.ico_open{margin-right:2px; background-position: -147px -21px; vertical-align:top; *vertical-align:middle} -.ztree li span.button.ico_close{margin-right:2px; margin-right:2px; background-position: -147px 0; vertical-align:top; *vertical-align:middle} -.ztree li span.button.ico_docu{margin-right:2px; background-position: -147px -42px; vertical-align:top; *vertical-align:middle} -.ztree li span.button.edit {margin-left:2px; margin-right: -1px; background-position: -189px -21px; vertical-align:top; *vertical-align:middle} -.ztree li span.button.edit:hover { - background-position: -168px -21px; -} -.ztree li span.button.remove {margin-left:2px; margin-right: -1px; background-position: -189px -42px; vertical-align:top; *vertical-align:middle} -.ztree li span.button.remove:hover { - background-position: -168px -42px; -} -.ztree li span.button.add {margin-left:2px; margin-right: -1px; background-position: -189px 0; vertical-align:top; *vertical-align:middle} -.ztree li span.button.add:hover { - background-position: -168px 0; -} -.ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle} - -ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)} - -span.tmpzTreeMove_arrow {width:16px; height:21px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute; - background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; - background-position:-168px -84px; background-image:url("./img/metro.png"); *background-image:url("./img/metro.gif")} - -ul.ztreeul.ztreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)} -.ztreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute} diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/1_close.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/1_close.png deleted file mode 100644 index 68ccb3c3..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/1_close.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/1_open.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/1_open.png deleted file mode 100644 index d6ff36d3..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/1_open.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/2.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/2.png deleted file mode 100644 index 9eff506b..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/2.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/3.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/3.png deleted file mode 100644 index d7ba6d0c..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/3.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/4.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/4.png deleted file mode 100644 index 753e2bfd..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/4.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/5.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/5.png deleted file mode 100644 index 0c5eccd5..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/5.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/6.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/6.png deleted file mode 100644 index 070b8352..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/6.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/7.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/7.png deleted file mode 100644 index 532b037f..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/7.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/8.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/8.png deleted file mode 100644 index a8f3a86e..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/8.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/9.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/9.png deleted file mode 100644 index 4db73cd4..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/diy/9.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/line_conn.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/line_conn.gif deleted file mode 100644 index d561d36a..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/line_conn.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/loading.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/loading.gif deleted file mode 100644 index e8c28929..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/loading.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/zTreeStandard.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/zTreeStandard.gif deleted file mode 100644 index 50c94fd4..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/zTreeStandard.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/zTreeStandard.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/zTreeStandard.png deleted file mode 100644 index ffda01ef..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/img/zTreeStandard.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/zTreeStyle.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/zTreeStyle.css deleted file mode 100644 index a6845a44..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/css/zTreeStyle/zTreeStyle.css +++ /dev/null @@ -1,97 +0,0 @@ -/*------------------------------------- -zTree Style - -version: 3.5.17 -author: Hunter.z -email: hunter.z@263.net -website: http://code.google.com/p/jquerytree/ - --------------------------------------*/ - -.ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif} -.ztree {margin:0; padding:5px; color:#333} -.ztree li{padding:0; margin:0; list-style:none; line-height:14px; text-align:left; white-space:nowrap; outline:0} -.ztree li ul{ margin:0; padding:0 0 0 18px} -.ztree li ul.line{ background:url(./img/line_conn.gif) 0 0 repeat-y;} - -.ztree li a {padding:1px 3px 0 0; margin:0; cursor:pointer; height:17px; color:#333; background-color: transparent; - text-decoration:none; vertical-align:top; display: inline-block} -.ztree li a:hover {text-decoration:underline} -.ztree li a.curSelectedNode {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;} -.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;} -.ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#316AC5; color:white; height:16px; border:1px #316AC5 solid; - opacity:0.8; filter:alpha(opacity=80)} -.ztree li a.tmpTargetNode_prev {} -.ztree li a.tmpTargetNode_next {} -.ztree li a input.rename {height:14px; width:80px; padding:0; margin:0; - font-size:12px; border:1px #7EC4CC solid; *border:0px} -.ztree li span {line-height:16px; margin-right:2px} -.ztree li span.button {line-height:0; margin:0; width:16px; height:16px; display: inline-block; vertical-align:middle; - border:0 none; cursor: pointer;outline:none; - background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; - background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")} - -.ztree li span.button.chk {width:13px; height:13px; margin:0 3px 0 0; cursor: auto} -.ztree li span.button.chk.checkbox_false_full {background-position:0 0} -.ztree li span.button.chk.checkbox_false_full_focus {background-position:0 -14px} -.ztree li span.button.chk.checkbox_false_part {background-position:0 -28px} -.ztree li span.button.chk.checkbox_false_part_focus {background-position:0 -42px} -.ztree li span.button.chk.checkbox_false_disable {background-position:0 -56px} -.ztree li span.button.chk.checkbox_true_full {background-position:-14px 0} -.ztree li span.button.chk.checkbox_true_full_focus {background-position:-14px -14px} -.ztree li span.button.chk.checkbox_true_part {background-position:-14px -28px} -.ztree li span.button.chk.checkbox_true_part_focus {background-position:-14px -42px} -.ztree li span.button.chk.checkbox_true_disable {background-position:-14px -56px} -.ztree li span.button.chk.radio_false_full {background-position:-28px 0} -.ztree li span.button.chk.radio_false_full_focus {background-position:-28px -14px} -.ztree li span.button.chk.radio_false_part {background-position:-28px -28px} -.ztree li span.button.chk.radio_false_part_focus {background-position:-28px -42px} -.ztree li span.button.chk.radio_false_disable {background-position:-28px -56px} -.ztree li span.button.chk.radio_true_full {background-position:-42px 0} -.ztree li span.button.chk.radio_true_full_focus {background-position:-42px -14px} -.ztree li span.button.chk.radio_true_part {background-position:-42px -28px} -.ztree li span.button.chk.radio_true_part_focus {background-position:-42px -42px} -.ztree li span.button.chk.radio_true_disable {background-position:-42px -56px} - -.ztree li span.button.switch {width:18px; height:18px} -.ztree li span.button.root_open{background-position:-92px -54px} -.ztree li span.button.root_close{background-position:-74px -54px} -.ztree li span.button.roots_open{background-position:-92px 0} -.ztree li span.button.roots_close{background-position:-74px 0} -.ztree li span.button.center_open{background-position:-92px -18px} -.ztree li span.button.center_close{background-position:-74px -18px} -.ztree li span.button.bottom_open{background-position:-92px -36px} -.ztree li span.button.bottom_close{background-position:-74px -36px} -.ztree li span.button.noline_open{background-position:-92px -72px} -.ztree li span.button.noline_close{background-position:-74px -72px} -.ztree li span.button.root_docu{ background:none;} -.ztree li span.button.roots_docu{background-position:-56px 0} -.ztree li span.button.center_docu{background-position:-56px -18px} -.ztree li span.button.bottom_docu{background-position:-56px -36px} -.ztree li span.button.noline_docu{ background:none;} - -.ztree li span.button.ico_open{margin-right:2px; background-position:-110px -16px; vertical-align:top; *vertical-align:middle} -.ztree li span.button.ico_close{margin-right:2px; background-position:-110px 0; vertical-align:top; *vertical-align:middle} -.ztree li span.button.ico_docu{margin-right:2px; background-position:-110px -32px; vertical-align:top; *vertical-align:middle} -.ztree li span.button.edit {margin-right:2px; background-position:-110px -48px; vertical-align:top; *vertical-align:middle} -.ztree li span.button.remove {margin-right:2px; background-position:-110px -64px; vertical-align:top; *vertical-align:middle} - -.ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle} - -ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)} - -span.tmpzTreeMove_arrow {width:16px; height:16px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute; - background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; - background-position:-110px -80px; background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")} - -ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)} -.zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute} - -/* level style*/ -/*.ztree li span.button.level0 { - display:none; -} -.ztree li ul.level0 { - padding:0; - background:none; -}*/ \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/js/jquery.ztree.all-3.5.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/js/jquery.ztree.all-3.5.js deleted file mode 100644 index 9902c895..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/js/jquery.ztree.all-3.5.js +++ /dev/null @@ -1,3534 +0,0 @@ - -/* - * JQuery zTree core v3.5.18 - * http://zTree.me/ - * - * Copyright (c) 2010 Hunter.z - * - * Licensed same as jquery - MIT License - * http://www.opensource.org/licenses/mit-license.php - * - * email: hunter.z@263.net - * Date: 2015-05-25 - */ -(function($){ - var settings = {}, roots = {}, caches = {}, - //default consts of core - _consts = { - className: { - BUTTON: "button", - LEVEL: "level", - ICO_LOADING: "ico_loading", - SWITCH: "switch" - }, - event: { - NODECREATED: "ztree_nodeCreated", - CLICK: "ztree_click", - EXPAND: "ztree_expand", - COLLAPSE: "ztree_collapse", - ASYNC_SUCCESS: "ztree_async_success", - ASYNC_ERROR: "ztree_async_error", - REMOVE: "ztree_remove", - SELECTED: "ztree_selected", - UNSELECTED: "ztree_unselected" - }, - id: { - A: "_a", - ICON: "_ico", - SPAN: "_span", - SWITCH: "_switch", - UL: "_ul" - }, - line: { - ROOT: "root", - ROOTS: "roots", - CENTER: "center", - BOTTOM: "bottom", - NOLINE: "noline", - LINE: "line" - }, - folder: { - OPEN: "open", - CLOSE: "close", - DOCU: "docu" - }, - node: { - CURSELECTED: "curSelectedNode" - } - }, - //default setting of core - _setting = { - treeId: "", - treeObj: null, - view: { - addDiyDom: null, - autoCancelSelected: true, - dblClickExpand: true, - expandSpeed: "fast", - fontCss: {}, - nameIsHTML: false, - selectedMulti: true, - showIcon: true, - showLine: true, - showTitle: true, - txtSelectedEnable: false - }, - data: { - key: { - children: "children", - name: "name", - title: "", - url: "url" - }, - simpleData: { - enable: false, - idKey: "id", - pIdKey: "pId", - rootPId: null - }, - keep: { - parent: false, - leaf: false - } - }, - async: { - enable: false, - contentType: "application/x-www-form-urlencoded", - type: "post", - dataType: "text", - url: "", - autoParam: [], - otherParam: [], - dataFilter: null - }, - callback: { - beforeAsync:null, - beforeClick:null, - beforeDblClick:null, - beforeRightClick:null, - beforeMouseDown:null, - beforeMouseUp:null, - beforeExpand:null, - beforeCollapse:null, - beforeRemove:null, - - onAsyncError:null, - onAsyncSuccess:null, - onNodeCreated:null, - onClick:null, - onDblClick:null, - onRightClick:null, - onMouseDown:null, - onMouseUp:null, - onExpand:null, - onCollapse:null, - onRemove:null - } - }, - //default root of core - //zTree use root to save full data - _initRoot = function (setting) { - var r = data.getRoot(setting); - if (!r) { - r = {}; - data.setRoot(setting, r); - } - r[setting.data.key.children] = []; - r.expandTriggerFlag = false; - r.curSelectedList = []; - r.noSelection = true; - r.createdNodes = []; - r.zId = 0; - r._ver = (new Date()).getTime(); - }, - //default cache of core - _initCache = function(setting) { - var c = data.getCache(setting); - if (!c) { - c = {}; - data.setCache(setting, c); - } - c.nodes = []; - c.doms = []; - }, - //default bindEvent of core - _bindEvent = function(setting) { - var o = setting.treeObj, - c = consts.event; - o.bind(c.NODECREATED, function (event, treeId, node) { - tools.apply(setting.callback.onNodeCreated, [event, treeId, node]); - }); - - o.bind(c.CLICK, function (event, srcEvent, treeId, node, clickFlag) { - tools.apply(setting.callback.onClick, [srcEvent, treeId, node, clickFlag]); - }); - - o.bind(c.EXPAND, function (event, treeId, node) { - tools.apply(setting.callback.onExpand, [event, treeId, node]); - }); - - o.bind(c.COLLAPSE, function (event, treeId, node) { - tools.apply(setting.callback.onCollapse, [event, treeId, node]); - }); - - o.bind(c.ASYNC_SUCCESS, function (event, treeId, node, msg) { - tools.apply(setting.callback.onAsyncSuccess, [event, treeId, node, msg]); - }); - - o.bind(c.ASYNC_ERROR, function (event, treeId, node, XMLHttpRequest, textStatus, errorThrown) { - tools.apply(setting.callback.onAsyncError, [event, treeId, node, XMLHttpRequest, textStatus, errorThrown]); - }); - - o.bind(c.REMOVE, function (event, treeId, treeNode) { - tools.apply(setting.callback.onRemove, [event, treeId, treeNode]); - }); - - o.bind(c.SELECTED, function (event, srcEvent, treeId, node) { - tools.apply(setting.callback.onSelected, [srcEvent, treeId, node]); - }); - o.bind(c.UNSELECTED, function (event, srcEvent, treeId, node) { - tools.apply(setting.callback.onUnSelected, [srcEvent, treeId, node]); - }); - }, - _unbindEvent = function(setting) { - var o = setting.treeObj, - c = consts.event; - o.unbind(c.NODECREATED) - .unbind(c.CLICK) - .unbind(c.EXPAND) - .unbind(c.COLLAPSE) - .unbind(c.ASYNC_SUCCESS) - .unbind(c.ASYNC_ERROR) - .unbind(c.REMOVE) - .unbind(c.SELECTED) - .unbind(c.UNSELECTED); - }, - //default event proxy of core - _eventProxy = function(event) { - var target = event.target, - setting = data.getSetting(event.data.treeId), - tId = "", node = null, - nodeEventType = "", treeEventType = "", - nodeEventCallback = null, treeEventCallback = null, - tmp = null; - - if (tools.eqs(event.type, "mousedown")) { - treeEventType = "mousedown"; - } else if (tools.eqs(event.type, "mouseup")) { - treeEventType = "mouseup"; - } else if (tools.eqs(event.type, "contextmenu")) { - treeEventType = "contextmenu"; - } else if (tools.eqs(event.type, "click")) { - if (tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.SWITCH) !== null) { - tId = tools.getNodeMainDom(target).id; - nodeEventType = "switchNode"; - } else { - tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]); - if (tmp) { - tId = tools.getNodeMainDom(tmp).id; - nodeEventType = "clickNode"; - } - } - } else if (tools.eqs(event.type, "dblclick")) { - treeEventType = "dblclick"; - tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]); - if (tmp) { - tId = tools.getNodeMainDom(tmp).id; - nodeEventType = "switchNode"; - } - } - if (treeEventType.length > 0 && tId.length == 0) { - tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]); - if (tmp) {tId = tools.getNodeMainDom(tmp).id;} - } - // event to node - if (tId.length>0) { - node = data.getNodeCache(setting, tId); - switch (nodeEventType) { - case "switchNode" : - if (!node.isParent) { - nodeEventType = ""; - } else if (tools.eqs(event.type, "click") - || (tools.eqs(event.type, "dblclick") && tools.apply(setting.view.dblClickExpand, [setting.treeId, node], setting.view.dblClickExpand))) { - nodeEventCallback = handler.onSwitchNode; - } else { - nodeEventType = ""; - } - break; - case "clickNode" : - nodeEventCallback = handler.onClickNode; - break; - } - } - // event to zTree - switch (treeEventType) { - case "mousedown" : - treeEventCallback = handler.onZTreeMousedown; - break; - case "mouseup" : - treeEventCallback = handler.onZTreeMouseup; - break; - case "dblclick" : - treeEventCallback = handler.onZTreeDblclick; - break; - case "contextmenu" : - treeEventCallback = handler.onZTreeContextmenu; - break; - } - var proxyResult = { - stop: false, - node: node, - nodeEventType: nodeEventType, - nodeEventCallback: nodeEventCallback, - treeEventType: treeEventType, - treeEventCallback: treeEventCallback - }; - return proxyResult - }, - //default init node of core - _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { - if (!n) return; - var r = data.getRoot(setting), - childKey = setting.data.key.children; - n.level = level; - n.tId = setting.treeId + "_" + (++r.zId); - n.parentTId = parentNode ? parentNode.tId : null; - n.open = (typeof n.open == "string") ? tools.eqs(n.open, "true") : !!n.open; - if (n[childKey] && n[childKey].length > 0) { - n.isParent = true; - n.zAsync = true; - } else { - n.isParent = (typeof n.isParent == "string") ? tools.eqs(n.isParent, "true") : !!n.isParent; - n.open = (n.isParent && !setting.async.enable) ? n.open : false; - n.zAsync = !n.isParent; - } - n.isFirstNode = isFirstNode; - n.isLastNode = isLastNode; - n.getParentNode = function() {return data.getNodeCache(setting, n.parentTId);}; - n.getPreNode = function() {return data.getPreNode(setting, n);}; - n.getNextNode = function() {return data.getNextNode(setting, n);}; - n.isAjaxing = false; - data.fixPIdKeyValue(setting, n); - }, - _init = { - bind: [_bindEvent], - unbind: [_unbindEvent], - caches: [_initCache], - nodes: [_initNode], - proxys: [_eventProxy], - roots: [_initRoot], - beforeA: [], - afterA: [], - innerBeforeA: [], - innerAfterA: [], - zTreeTools: [] - }, - //method of operate data - data = { - addNodeCache: function(setting, node) { - data.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = node; - }, - getNodeCacheId: function(tId) { - return tId.substring(tId.lastIndexOf("_")+1); - }, - addAfterA: function(afterA) { - _init.afterA.push(afterA); - }, - addBeforeA: function(beforeA) { - _init.beforeA.push(beforeA); - }, - addInnerAfterA: function(innerAfterA) { - _init.innerAfterA.push(innerAfterA); - }, - addInnerBeforeA: function(innerBeforeA) { - _init.innerBeforeA.push(innerBeforeA); - }, - addInitBind: function(bindEvent) { - _init.bind.push(bindEvent); - }, - addInitUnBind: function(unbindEvent) { - _init.unbind.push(unbindEvent); - }, - addInitCache: function(initCache) { - _init.caches.push(initCache); - }, - addInitNode: function(initNode) { - _init.nodes.push(initNode); - }, - addInitProxy: function(initProxy, isFirst) { - if (!!isFirst) { - _init.proxys.splice(0,0,initProxy); - } else { - _init.proxys.push(initProxy); - } - }, - addInitRoot: function(initRoot) { - _init.roots.push(initRoot); - }, - addNodesData: function(setting, parentNode, nodes) { - var childKey = setting.data.key.children; - if (!parentNode[childKey]) parentNode[childKey] = []; - if (parentNode[childKey].length > 0) { - parentNode[childKey][parentNode[childKey].length - 1].isLastNode = false; - view.setNodeLineIcos(setting, parentNode[childKey][parentNode[childKey].length - 1]); - } - parentNode.isParent = true; - parentNode[childKey] = parentNode[childKey].concat(nodes); - }, - addSelectedNode: function(setting, node) { - var root = data.getRoot(setting); - if (!data.isSelectedNode(setting, node)) { - root.curSelectedList.push(node); - } - }, - addCreatedNode: function(setting, node) { - if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) { - var root = data.getRoot(setting); - root.createdNodes.push(node); - } - }, - addZTreeTools: function(zTreeTools) { - _init.zTreeTools.push(zTreeTools); - }, - exSetting: function(s) { - $.extend(true, _setting, s); - }, - fixPIdKeyValue: function(setting, node) { - if (setting.data.simpleData.enable) { - node[setting.data.simpleData.pIdKey] = node.parentTId ? node.getParentNode()[setting.data.simpleData.idKey] : setting.data.simpleData.rootPId; - } - }, - getAfterA: function(setting, node, array) { - for (var i=0, j=_init.afterA.length; i-1) { - result.push(nodes[i]); - } - result = result.concat(data.getNodesByParamFuzzy(setting, nodes[i][childKey], key, value)); - } - return result; - }, - getNodesByFilter: function(setting, nodes, filter, isSingle, invokeParam) { - if (!nodes) return (isSingle ? null : []); - var childKey = setting.data.key.children, - result = isSingle ? null : []; - for (var i = 0, l = nodes.length; i < l; i++) { - if (tools.apply(filter, [nodes[i], invokeParam], false)) { - if (isSingle) {return nodes[i];} - result.push(nodes[i]); - } - var tmpResult = data.getNodesByFilter(setting, nodes[i][childKey], filter, isSingle, invokeParam); - if (isSingle && !!tmpResult) {return tmpResult;} - result = isSingle ? tmpResult : result.concat(tmpResult); - } - return result; - }, - getPreNode: function(setting, node) { - if (!node) return null; - var childKey = setting.data.key.children, - p = node.parentTId ? node.getParentNode() : data.getRoot(setting); - for (var i=0, l=p[childKey].length; i 0))); - }, - clone: function (obj){ - if (obj === null) return null; - var o = tools.isArray(obj) ? [] : {}; - for(var i in obj){ - o[i] = (obj[i] instanceof Date) ? new Date(obj[i].getTime()) : (typeof obj[i] === "object" ? arguments.callee(obj[i]) : obj[i]); - } - return o; - }, - eqs: function(str1, str2) { - return str1.toLowerCase() === str2.toLowerCase(); - }, - isArray: function(arr) { - return Object.prototype.toString.apply(arr) === "[object Array]"; - }, - $: function(node, exp, setting) { - if (!!exp && typeof exp != "string") { - setting = exp; - exp = ""; - } - if (typeof node == "string") { - return $(node, setting ? setting.treeObj.get(0).ownerDocument : null); - } else { - return $("#" + node.tId + exp, setting ? setting.treeObj : null); - } - }, - getMDom: function (setting, curDom, targetExpr) { - if (!curDom) return null; - while (curDom && curDom.id !== setting.treeId) { - for (var i=0, l=targetExpr.length; curDom.tagName && i 0 ); - }, - uCanDo: function(setting, e) { - return true; - } - }, - //method of operate ztree dom - view = { - addNodes: function(setting, parentNode, newNodes, isSilent) { - if (setting.data.keep.leaf && parentNode && !parentNode.isParent) { - return; - } - if (!tools.isArray(newNodes)) { - newNodes = [newNodes]; - } - if (setting.data.simpleData.enable) { - newNodes = data.transformTozTreeFormat(setting, newNodes); - } - if (parentNode) { - var target_switchObj = $$(parentNode, consts.id.SWITCH, setting), - target_icoObj = $$(parentNode, consts.id.ICON, setting), - target_ulObj = $$(parentNode, consts.id.UL, setting); - - if (!parentNode.open) { - view.replaceSwitchClass(parentNode, target_switchObj, consts.folder.CLOSE); - view.replaceIcoClass(parentNode, target_icoObj, consts.folder.CLOSE); - parentNode.open = false; - target_ulObj.css({ - "display": "none" - }); - } - - data.addNodesData(setting, parentNode, newNodes); - view.createNodes(setting, parentNode.level + 1, newNodes, parentNode); - if (!isSilent) { - view.expandCollapseParentNode(setting, parentNode, true); - } - } else { - data.addNodesData(setting, data.getRoot(setting), newNodes); - view.createNodes(setting, 0, newNodes, null); - } - }, - appendNodes: function(setting, level, nodes, parentNode, initFlag, openFlag) { - if (!nodes) return []; - var html = [], - childKey = setting.data.key.children; - for (var i = 0, l = nodes.length; i < l; i++) { - var node = nodes[i]; - if (initFlag) { - var tmpPNode = (parentNode) ? parentNode: data.getRoot(setting), - tmpPChild = tmpPNode[childKey], - isFirstNode = ((tmpPChild.length == nodes.length) && (i == 0)), - isLastNode = (i == (nodes.length - 1)); - data.initNode(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag); - data.addNodeCache(setting, node); - } - - var childHtml = []; - if (node[childKey] && node[childKey].length > 0) { - //make child html first, because checkType - childHtml = view.appendNodes(setting, level + 1, node[childKey], node, initFlag, openFlag && node.open); - } - if (openFlag) { - - view.makeDOMNodeMainBefore(html, setting, node); - view.makeDOMNodeLine(html, setting, node); - data.getBeforeA(setting, node, html); - view.makeDOMNodeNameBefore(html, setting, node); - data.getInnerBeforeA(setting, node, html); - view.makeDOMNodeIcon(html, setting, node); - data.getInnerAfterA(setting, node, html); - view.makeDOMNodeNameAfter(html, setting, node); - data.getAfterA(setting, node, html); - if (node.isParent && node.open) { - view.makeUlHtml(setting, node, html, childHtml.join('')); - } - view.makeDOMNodeMainAfter(html, setting, node); - data.addCreatedNode(setting, node); - } - } - return html; - }, - appendParentULDom: function(setting, node) { - var html = [], - nObj = $$(node, setting); - if (!nObj.get(0) && !!node.parentTId) { - view.appendParentULDom(setting, node.getParentNode()); - nObj = $$(node, setting); - } - var ulObj = $$(node, consts.id.UL, setting); - if (ulObj.get(0)) { - ulObj.remove(); - } - var childKey = setting.data.key.children, - childHtml = view.appendNodes(setting, node.level+1, node[childKey], node, false, true); - view.makeUlHtml(setting, node, html, childHtml.join('')); - nObj.append(html.join('')); - }, - asyncNode: function(setting, node, isSilent, callback) { - var i, l; - if (node && !node.isParent) { - tools.apply(callback); - return false; - } else if (node && node.isAjaxing) { - return false; - } else if (tools.apply(setting.callback.beforeAsync, [setting.treeId, node], true) == false) { - tools.apply(callback); - return false; - } - if (node) { - node.isAjaxing = true; - var icoObj = $$(node, consts.id.ICON, setting); - icoObj.attr({"style":"", "class":consts.className.BUTTON + " " + consts.className.ICO_LOADING}); - } - - var tmpParam = {}; - for (i = 0, l = setting.async.autoParam.length; node && i < l; i++) { - var pKey = setting.async.autoParam[i].split("="), spKey = pKey; - if (pKey.length>1) { - spKey = pKey[1]; - pKey = pKey[0]; - } - tmpParam[spKey] = node[pKey]; - } - if (tools.isArray(setting.async.otherParam)) { - for (i = 0, l = setting.async.otherParam.length; i < l; i += 2) { - tmpParam[setting.async.otherParam[i]] = setting.async.otherParam[i + 1]; - } - } else { - for (var p in setting.async.otherParam) { - tmpParam[p] = setting.async.otherParam[p]; - } - } - - var _tmpV = data.getRoot(setting)._ver; - $.ajax({ - contentType: setting.async.contentType, - cache: false, - type: setting.async.type, - url: tools.apply(setting.async.url, [setting.treeId, node], setting.async.url), - data: tmpParam, - dataType: setting.async.dataType, - success: function(msg) { - if (_tmpV != data.getRoot(setting)._ver) { - return; - } - var newNodes = []; - try { - if (!msg || msg.length == 0) { - newNodes = []; - } else if (typeof msg == "string") { - newNodes = eval("(" + msg + ")"); - } else { - newNodes = msg; - } - } catch(err) { - newNodes = msg; - } - - if (node) { - node.isAjaxing = null; - node.zAsync = true; - } - view.setNodeLineIcos(setting, node); - if (newNodes && newNodes !== "") { - newNodes = tools.apply(setting.async.dataFilter, [setting.treeId, node, newNodes], newNodes); - view.addNodes(setting, node, !!newNodes ? tools.clone(newNodes) : [], !!isSilent); - } else { - view.addNodes(setting, node, [], !!isSilent); - } - setting.treeObj.trigger(consts.event.ASYNC_SUCCESS, [setting.treeId, node, msg]); - tools.apply(callback); - }, - error: function(XMLHttpRequest, textStatus, errorThrown) { - if (_tmpV != data.getRoot(setting)._ver) { - return; - } - if (node) node.isAjaxing = null; - view.setNodeLineIcos(setting, node); - setting.treeObj.trigger(consts.event.ASYNC_ERROR, [setting.treeId, node, XMLHttpRequest, textStatus, errorThrown]); - } - }); - return true; - }, - cancelPreSelectedNode: function (setting, node, excludeNode) { - var list = data.getRoot(setting).curSelectedList, - i, n; - for (i=list.length-1; i>=0; i--) { - n = list[i]; - if (node === n || (!node && (!excludeNode || excludeNode !== n))) { - $$(n, consts.id.A, setting).removeClass(consts.node.CURSELECTED); - if (node) { - data.removeSelectedNode(setting, node); - setting.treeObj.trigger(consts.event.UNSELECTED, [event, setting.treeId, n]); - break; - } else { - list.splice(i, 1); - setting.treeObj.trigger(consts.event.UNSELECTED, [event, setting.treeId, n]); - } - } - } - }, - createNodeCallback: function(setting) { - if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) { - var root = data.getRoot(setting); - while (root.createdNodes.length>0) { - var node = root.createdNodes.shift(); - tools.apply(setting.view.addDiyDom, [setting.treeId, node]); - if (!!setting.callback.onNodeCreated) { - setting.treeObj.trigger(consts.event.NODECREATED, [setting.treeId, node]); - } - } - } - }, - createNodes: function(setting, level, nodes, parentNode) { - if (!nodes || nodes.length == 0) return; - var root = data.getRoot(setting), - childKey = setting.data.key.children, - openFlag = !parentNode || parentNode.open || !!$$(parentNode[childKey][0], setting).get(0); - root.createdNodes = []; - var zTreeHtml = view.appendNodes(setting, level, nodes, parentNode, true, openFlag); - if (!parentNode) { - setting.treeObj.append(zTreeHtml.join('')); - } else { - var ulObj = $$(parentNode, consts.id.UL, setting); - if (ulObj.get(0)) { - ulObj.append(zTreeHtml.join('')); - } - } - view.createNodeCallback(setting); - }, - destroy: function(setting) { - if (!setting) return; - data.initCache(setting); - data.initRoot(setting); - event.unbindTree(setting); - event.unbindEvent(setting); - setting.treeObj.empty(); - delete settings[setting.treeId]; - }, - expandCollapseNode: function(setting, node, expandFlag, animateFlag, callback) { - var root = data.getRoot(setting), - childKey = setting.data.key.children; - if (!node) { - tools.apply(callback, []); - return; - } - if (root.expandTriggerFlag) { - var _callback = callback; - callback = function(){ - if (_callback) _callback(); - if (node.open) { - setting.treeObj.trigger(consts.event.EXPAND, [setting.treeId, node]); - } else { - setting.treeObj.trigger(consts.event.COLLAPSE, [setting.treeId, node]); - } - }; - root.expandTriggerFlag = false; - } - if (!node.open && node.isParent && ((!$$(node, consts.id.UL, setting).get(0)) || (node[childKey] && node[childKey].length>0 && !$$(node[childKey][0], setting).get(0)))) { - view.appendParentULDom(setting, node); - view.createNodeCallback(setting); - } - if (node.open == expandFlag) { - tools.apply(callback, []); - return; - } - var ulObj = $$(node, consts.id.UL, setting), - switchObj = $$(node, consts.id.SWITCH, setting), - icoObj = $$(node, consts.id.ICON, setting); - - if (node.isParent) { - node.open = !node.open; - if (node.iconOpen && node.iconClose) { - icoObj.attr("style", view.makeNodeIcoStyle(setting, node)); - } - - if (node.open) { - view.replaceSwitchClass(node, switchObj, consts.folder.OPEN); - view.replaceIcoClass(node, icoObj, consts.folder.OPEN); - if (animateFlag == false || setting.view.expandSpeed == "") { - ulObj.show(); - tools.apply(callback, []); - } else { - if (node[childKey] && node[childKey].length > 0) { - ulObj.slideDown(setting.view.expandSpeed, callback); - } else { - ulObj.show(); - tools.apply(callback, []); - } - } - } else { - view.replaceSwitchClass(node, switchObj, consts.folder.CLOSE); - view.replaceIcoClass(node, icoObj, consts.folder.CLOSE); - if (animateFlag == false || setting.view.expandSpeed == "" || !(node[childKey] && node[childKey].length > 0)) { - ulObj.hide(); - tools.apply(callback, []); - } else { - ulObj.slideUp(setting.view.expandSpeed, callback); - } - } - } else { - tools.apply(callback, []); - } - }, - expandCollapseParentNode: function(setting, node, expandFlag, animateFlag, callback) { - if (!node) return; - if (!node.parentTId) { - view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback); - return; - } else { - view.expandCollapseNode(setting, node, expandFlag, animateFlag); - } - if (node.parentTId) { - view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, animateFlag, callback); - } - }, - expandCollapseSonNode: function(setting, node, expandFlag, animateFlag, callback) { - var root = data.getRoot(setting), - childKey = setting.data.key.children, - treeNodes = (node) ? node[childKey]: root[childKey], - selfAnimateSign = (node) ? false : animateFlag, - expandTriggerFlag = data.getRoot(setting).expandTriggerFlag; - data.getRoot(setting).expandTriggerFlag = false; - if (treeNodes) { - for (var i = 0, l = treeNodes.length; i < l; i++) { - if (treeNodes[i]) view.expandCollapseSonNode(setting, treeNodes[i], expandFlag, selfAnimateSign); - } - } - data.getRoot(setting).expandTriggerFlag = expandTriggerFlag; - view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback ); - }, - isSelectedNode: function (setting, node) { - if (!node) { - return false; - } - var list = data.getRoot(setting).curSelectedList, - i; - for (i=list.length-1; i>=0; i--) { - if (node === list[i]) { - return true; - } - } - return false; - }, - makeDOMNodeIcon: function(html, setting, node) { - var nameStr = data.getNodeName(setting, node), - name = setting.view.nameIsHTML ? nameStr : nameStr.replace(/&/g,'&').replace(//g,'>'); - html.push("",name,""); - }, - makeDOMNodeLine: function(html, setting, node) { - html.push(""); - }, - makeDOMNodeMainAfter: function(html, setting, node) { - html.push("
                  • "); - }, - makeDOMNodeMainBefore: function(html, setting, node) { - html.push("
                  • "); - }, - makeDOMNodeNameAfter: function(html, setting, node) { - html.push(""); - }, - makeDOMNodeNameBefore: function(html, setting, node) { - var title = data.getNodeTitle(setting, node), - url = view.makeNodeUrl(setting, node), - fontcss = view.makeNodeFontCss(setting, node), - fontStyle = []; - for (var f in fontcss) { - fontStyle.push(f, ":", fontcss[f], ";"); - } - html.push(" 0) ? "href='" + url + "'" : ""), " target='",view.makeNodeTarget(node),"' style='", fontStyle.join(''), - "'"); - if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && title) {html.push("title='", title.replace(/'/g,"'").replace(//g,'>'),"'");} - html.push(">"); - }, - makeNodeFontCss: function(setting, node) { - var fontCss = tools.apply(setting.view.fontCss, [setting.treeId, node], setting.view.fontCss); - return (fontCss && ((typeof fontCss) != "function")) ? fontCss : {}; - }, - makeNodeIcoClass: function(setting, node) { - var icoCss = ["ico"]; - if (!node.isAjaxing) { - icoCss[0] = (node.iconSkin ? node.iconSkin + "_" : "") + icoCss[0]; - if (node.isParent) { - icoCss.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE); - } else { - icoCss.push(consts.folder.DOCU); - } - } - return consts.className.BUTTON + " " + icoCss.join('_'); - }, - makeNodeIcoStyle: function(setting, node) { - var icoStyle = []; - if (!node.isAjaxing) { - var icon = (node.isParent && node.iconOpen && node.iconClose) ? (node.open ? node.iconOpen : node.iconClose) : node.icon; - if (icon) icoStyle.push("background:url(", icon, ") 0 0 no-repeat;"); - if (setting.view.showIcon == false || !tools.apply(setting.view.showIcon, [setting.treeId, node], true)) { - icoStyle.push("width:0px;height:0px;"); - } - } - return icoStyle.join(''); - }, - makeNodeLineClass: function(setting, node) { - var lineClass = []; - if (setting.view.showLine) { - if (node.level == 0 && node.isFirstNode && node.isLastNode) { - lineClass.push(consts.line.ROOT); - } else if (node.level == 0 && node.isFirstNode) { - lineClass.push(consts.line.ROOTS); - } else if (node.isLastNode) { - lineClass.push(consts.line.BOTTOM); - } else { - lineClass.push(consts.line.CENTER); - } - } else { - lineClass.push(consts.line.NOLINE); - } - if (node.isParent) { - lineClass.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE); - } else { - lineClass.push(consts.folder.DOCU); - } - return view.makeNodeLineClassEx(node) + lineClass.join('_'); - }, - makeNodeLineClassEx: function(node) { - return consts.className.BUTTON + " " + consts.className.LEVEL + node.level + " " + consts.className.SWITCH + " "; - }, - makeNodeTarget: function(node) { - return (node.target || "_blank"); - }, - makeNodeUrl: function(setting, node) { - var urlKey = setting.data.key.url; - return node[urlKey] ? node[urlKey] : null; - }, - makeUlHtml: function(setting, node, html, content) { - html.push("
                      "); - html.push(content); - html.push("
                    "); - }, - makeUlLineClass: function(setting, node) { - return ((setting.view.showLine && !node.isLastNode) ? consts.line.LINE : ""); - }, - removeChildNodes: function(setting, node) { - if (!node) return; - var childKey = setting.data.key.children, - nodes = node[childKey]; - if (!nodes) return; - - for (var i = 0, l = nodes.length; i < l; i++) { - data.removeNodeCache(setting, nodes[i]); - } - data.removeSelectedNode(setting); - delete node[childKey]; - - if (!setting.data.keep.parent) { - node.isParent = false; - node.open = false; - var tmp_switchObj = $$(node, consts.id.SWITCH, setting), - tmp_icoObj = $$(node, consts.id.ICON, setting); - view.replaceSwitchClass(node, tmp_switchObj, consts.folder.DOCU); - view.replaceIcoClass(node, tmp_icoObj, consts.folder.DOCU); - $$(node, consts.id.UL, setting).remove(); - } else { - $$(node, consts.id.UL, setting).empty(); - } - }, - setFirstNode: function(setting, parentNode) { - var childKey = setting.data.key.children, childLength = parentNode[childKey].length; - if ( childLength > 0) { - parentNode[childKey][0].isFirstNode = true; - } - }, - setLastNode: function(setting, parentNode) { - var childKey = setting.data.key.children, childLength = parentNode[childKey].length; - if ( childLength > 0) { - parentNode[childKey][childLength - 1].isLastNode = true; - } - }, - removeNode: function(setting, node) { - var root = data.getRoot(setting), - childKey = setting.data.key.children, - parentNode = (node.parentTId) ? node.getParentNode() : root; - - node.isFirstNode = false; - node.isLastNode = false; - node.getPreNode = function() {return null;}; - node.getNextNode = function() {return null;}; - - if (!data.getNodeCache(setting, node.tId)) { - return; - } - - $$(node, setting).remove(); - data.removeNodeCache(setting, node); - data.removeSelectedNode(setting, node); - - for (var i = 0, l = parentNode[childKey].length; i < l; i++) { - if (parentNode[childKey][i].tId == node.tId) { - parentNode[childKey].splice(i, 1); - break; - } - } - view.setFirstNode(setting, parentNode); - view.setLastNode(setting, parentNode); - - var tmp_ulObj,tmp_switchObj,tmp_icoObj, - childLength = parentNode[childKey].length; - - //repair nodes old parent - if (!setting.data.keep.parent && childLength == 0) { - //old parentNode has no child nodes - parentNode.isParent = false; - parentNode.open = false; - tmp_ulObj = $$(parentNode, consts.id.UL, setting); - tmp_switchObj = $$(parentNode, consts.id.SWITCH, setting); - tmp_icoObj = $$(parentNode, consts.id.ICON, setting); - view.replaceSwitchClass(parentNode, tmp_switchObj, consts.folder.DOCU); - view.replaceIcoClass(parentNode, tmp_icoObj, consts.folder.DOCU); - tmp_ulObj.css("display", "none"); - - } else if (setting.view.showLine && childLength > 0) { - //old parentNode has child nodes - var newLast = parentNode[childKey][childLength - 1]; - tmp_ulObj = $$(newLast, consts.id.UL, setting); - tmp_switchObj = $$(newLast, consts.id.SWITCH, setting); - tmp_icoObj = $$(newLast, consts.id.ICON, setting); - if (parentNode == root) { - if (parentNode[childKey].length == 1) { - //node was root, and ztree has only one root after move node - view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.ROOT); - } else { - var tmp_first_switchObj = $$(parentNode[childKey][0], consts.id.SWITCH, setting); - view.replaceSwitchClass(parentNode[childKey][0], tmp_first_switchObj, consts.line.ROOTS); - view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM); - } - } else { - view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM); - } - tmp_ulObj.removeClass(consts.line.LINE); - } - }, - replaceIcoClass: function(node, obj, newName) { - if (!obj || node.isAjaxing) return; - var tmpName = obj.attr("class"); - if (tmpName == undefined) return; - var tmpList = tmpName.split("_"); - switch (newName) { - case consts.folder.OPEN: - case consts.folder.CLOSE: - case consts.folder.DOCU: - tmpList[tmpList.length-1] = newName; - break; - } - obj.attr("class", tmpList.join("_")); - }, - replaceSwitchClass: function(node, obj, newName) { - if (!obj) return; - var tmpName = obj.attr("class"); - if (tmpName == undefined) return; - var tmpList = tmpName.split("_"); - switch (newName) { - case consts.line.ROOT: - case consts.line.ROOTS: - case consts.line.CENTER: - case consts.line.BOTTOM: - case consts.line.NOLINE: - tmpList[0] = view.makeNodeLineClassEx(node) + newName; - break; - case consts.folder.OPEN: - case consts.folder.CLOSE: - case consts.folder.DOCU: - tmpList[1] = newName; - break; - } - obj.attr("class", tmpList.join("_")); - if (newName !== consts.folder.DOCU) { - obj.removeAttr("disabled"); - } else { - obj.attr("disabled", "disabled"); - } - }, - selectNode: function(setting, node, addFlag) { - if (!addFlag) { - view.cancelPreSelectedNode(setting, null, node); - } - $$(node, consts.id.A, setting).addClass(consts.node.CURSELECTED); - data.addSelectedNode(setting, node); - setting.treeObj.trigger(consts.event.SELECTED, [event, setting.treeId, node]); - }, - setNodeFontCss: function(setting, treeNode) { - var aObj = $$(treeNode, consts.id.A, setting), - fontCss = view.makeNodeFontCss(setting, treeNode); - if (fontCss) { - aObj.css(fontCss); - } - }, - setNodeLineIcos: function(setting, node) { - if (!node) return; - var switchObj = $$(node, consts.id.SWITCH, setting), - ulObj = $$(node, consts.id.UL, setting), - icoObj = $$(node, consts.id.ICON, setting), - ulLine = view.makeUlLineClass(setting, node); - if (ulLine.length==0) { - ulObj.removeClass(consts.line.LINE); - } else { - ulObj.addClass(ulLine); - } - switchObj.attr("class", view.makeNodeLineClass(setting, node)); - if (node.isParent) { - switchObj.removeAttr("disabled"); - } else { - switchObj.attr("disabled", "disabled"); - } - icoObj.removeAttr("style"); - icoObj.attr("style", view.makeNodeIcoStyle(setting, node)); - icoObj.attr("class", view.makeNodeIcoClass(setting, node)); - }, - setNodeName: function(setting, node) { - var title = data.getNodeTitle(setting, node), - nObj = $$(node, consts.id.SPAN, setting); - nObj.empty(); - if (setting.view.nameIsHTML) { - nObj.html(data.getNodeName(setting, node)); - } else { - nObj.text(data.getNodeName(setting, node)); - } - if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle)) { - var aObj = $$(node, consts.id.A, setting); - aObj.attr("title", !title ? "" : title); - } - }, - setNodeTarget: function(setting, node) { - var aObj = $$(node, consts.id.A, setting); - aObj.attr("target", view.makeNodeTarget(node)); - }, - setNodeUrl: function(setting, node) { - var aObj = $$(node, consts.id.A, setting), - url = view.makeNodeUrl(setting, node); - if (url == null || url.length == 0) { - aObj.removeAttr("href"); - } else { - aObj.attr("href", url); - } - }, - switchNode: function(setting, node) { - if (node.open || !tools.canAsync(setting, node)) { - view.expandCollapseNode(setting, node, !node.open); - } else if (setting.async.enable) { - if (!view.asyncNode(setting, node)) { - view.expandCollapseNode(setting, node, !node.open); - return; - } - } else if (node) { - view.expandCollapseNode(setting, node, !node.open); - } - } - }; - // zTree defind - $.fn.zTree = { - consts : _consts, - _z : { - tools: tools, - view: view, - event: event, - data: data - }, - getZTreeObj: function(treeId) { - var o = data.getZTreeTools(treeId); - return o ? o : null; - }, - destroy: function(treeId) { - if (!!treeId && treeId.length > 0) { - view.destroy(data.getSetting(treeId)); - } else { - for(var s in settings) { - view.destroy(settings[s]); - } - } - }, - init: function(obj, zSetting, zNodes) { - var setting = tools.clone(_setting); - $.extend(true, setting, zSetting); - setting.treeId = obj.attr("id"); - setting.treeObj = obj; - setting.treeObj.empty(); - settings[setting.treeId] = setting; - //For some older browser,(e.g., ie6) - if(typeof document.body.style.maxHeight === "undefined") { - setting.view.expandSpeed = ""; - } - data.initRoot(setting); - var root = data.getRoot(setting), - childKey = setting.data.key.children; - zNodes = zNodes ? tools.clone(tools.isArray(zNodes)? zNodes : [zNodes]) : []; - if (setting.data.simpleData.enable) { - root[childKey] = data.transformTozTreeFormat(setting, zNodes); - } else { - root[childKey] = zNodes; - } - - data.initCache(setting); - event.unbindTree(setting); - event.bindTree(setting); - event.unbindEvent(setting); - event.bindEvent(setting); - - var zTreeTools = { - setting : setting, - addNodes : function(parentNode, newNodes, isSilent) { - if (!newNodes) return null; - if (!parentNode) parentNode = null; - if (parentNode && !parentNode.isParent && setting.data.keep.leaf) return null; - var xNewNodes = tools.clone(tools.isArray(newNodes)? newNodes: [newNodes]); - function addCallback() { - view.addNodes(setting, parentNode, xNewNodes, (isSilent==true)); - } - - if (tools.canAsync(setting, parentNode)) { - view.asyncNode(setting, parentNode, isSilent, addCallback); - } else { - addCallback(); - } - return xNewNodes; - }, - cancelSelectedNode : function(node) { - view.cancelPreSelectedNode(setting, node); - }, - destroy : function() { - view.destroy(setting); - }, - expandAll : function(expandFlag) { - expandFlag = !!expandFlag; - view.expandCollapseSonNode(setting, null, expandFlag, true); - return expandFlag; - }, - expandNode : function(node, expandFlag, sonSign, focus, callbackFlag) { - if (!node || !node.isParent) return null; - if (expandFlag !== true && expandFlag !== false) { - expandFlag = !node.open; - } - callbackFlag = !!callbackFlag; - - if (callbackFlag && expandFlag && (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false)) { - return null; - } else if (callbackFlag && !expandFlag && (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false)) { - return null; - } - if (expandFlag && node.parentTId) { - view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, false); - } - if (expandFlag === node.open && !sonSign) { - return null; - } - - data.getRoot(setting).expandTriggerFlag = callbackFlag; - if (!tools.canAsync(setting, node) && sonSign) { - view.expandCollapseSonNode(setting, node, expandFlag, true, function() { - if (focus !== false) {try{$$(node, setting).focus().blur();}catch(e){}} - }); - } else { - node.open = !expandFlag; - view.switchNode(this.setting, node); - if (focus !== false) {try{$$(node, setting).focus().blur();}catch(e){}} - } - return expandFlag; - }, - getNodes : function() { - return data.getNodes(setting); - }, - getNodeByParam : function(key, value, parentNode) { - if (!key) return null; - return data.getNodeByParam(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value); - }, - getNodeByTId : function(tId) { - return data.getNodeCache(setting, tId); - }, - getNodesByParam : function(key, value, parentNode) { - if (!key) return null; - return data.getNodesByParam(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value); - }, - getNodesByParamFuzzy : function(key, value, parentNode) { - if (!key) return null; - return data.getNodesByParamFuzzy(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value); - }, - getNodesByFilter: function(filter, isSingle, parentNode, invokeParam) { - isSingle = !!isSingle; - if (!filter || (typeof filter != "function")) return (isSingle ? null : []); - return data.getNodesByFilter(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), filter, isSingle, invokeParam); - }, - getNodeIndex : function(node) { - if (!node) return null; - var childKey = setting.data.key.children, - parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting); - for (var i=0, l = parentNode[childKey].length; i < l; i++) { - if (parentNode[childKey][i] == node) return i; - } - return -1; - }, - getSelectedNodes : function() { - var r = [], list = data.getRoot(setting).curSelectedList; - for (var i=0, l=list.length; i 0) { - view.createNodes(setting, 0, root[childKey]); - } else if (setting.async.enable && setting.async.url && setting.async.url !== '') { - view.asyncNode(setting); - } - return zTreeTools; - } - }; - - var zt = $.fn.zTree, - $$ = tools.$, - consts = zt.consts; -})(jQuery); -/* - * JQuery zTree excheck v3.5.18 - * http://zTree.me/ - * - * Copyright (c) 2010 Hunter.z - * - * Licensed same as jquery - MIT License - * http://www.opensource.org/licenses/mit-license.php - * - * email: hunter.z@263.net - * Date: 2015-05-25 - */ -(function($){ - //default consts of excheck - var _consts = { - event: { - CHECK: "ztree_check" - }, - id: { - CHECK: "_check" - }, - checkbox: { - STYLE: "checkbox", - DEFAULT: "chk", - DISABLED: "disable", - FALSE: "false", - TRUE: "true", - FULL: "full", - PART: "part", - FOCUS: "focus" - }, - radio: { - STYLE: "radio", - TYPE_ALL: "all", - TYPE_LEVEL: "level" - } - }, - //default setting of excheck - _setting = { - check: { - enable: false, - autoCheckTrigger: false, - chkStyle: _consts.checkbox.STYLE, - nocheckInherit: false, - chkDisabledInherit: false, - radioType: _consts.radio.TYPE_LEVEL, - chkboxType: { - "Y": "ps", - "N": "ps" - } - }, - data: { - key: { - checked: "checked" - } - }, - callback: { - beforeCheck:null, - onCheck:null - } - }, - //default root of excheck - _initRoot = function (setting) { - var r = data.getRoot(setting); - r.radioCheckedList = []; - }, - //default cache of excheck - _initCache = function(treeId) {}, - //default bind event of excheck - _bindEvent = function(setting) { - var o = setting.treeObj, - c = consts.event; - o.bind(c.CHECK, function (event, srcEvent, treeId, node) { - event.srcEvent = srcEvent; - tools.apply(setting.callback.onCheck, [event, treeId, node]); - }); - }, - _unbindEvent = function(setting) { - var o = setting.treeObj, - c = consts.event; - o.unbind(c.CHECK); - }, - //default event proxy of excheck - _eventProxy = function(e) { - var target = e.target, - setting = data.getSetting(e.data.treeId), - tId = "", node = null, - nodeEventType = "", treeEventType = "", - nodeEventCallback = null, treeEventCallback = null; - - if (tools.eqs(e.type, "mouseover")) { - if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { - tId = tools.getNodeMainDom(target).id; - nodeEventType = "mouseoverCheck"; - } - } else if (tools.eqs(e.type, "mouseout")) { - if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { - tId = tools.getNodeMainDom(target).id; - nodeEventType = "mouseoutCheck"; - } - } else if (tools.eqs(e.type, "click")) { - if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { - tId = tools.getNodeMainDom(target).id; - nodeEventType = "checkNode"; - } - } - if (tId.length>0) { - node = data.getNodeCache(setting, tId); - switch (nodeEventType) { - case "checkNode" : - nodeEventCallback = _handler.onCheckNode; - break; - case "mouseoverCheck" : - nodeEventCallback = _handler.onMouseoverCheck; - break; - case "mouseoutCheck" : - nodeEventCallback = _handler.onMouseoutCheck; - break; - } - } - var proxyResult = { - stop: nodeEventType === "checkNode", - node: node, - nodeEventType: nodeEventType, - nodeEventCallback: nodeEventCallback, - treeEventType: treeEventType, - treeEventCallback: treeEventCallback - }; - return proxyResult - }, - //default init node of excheck - _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { - if (!n) return; - var checkedKey = setting.data.key.checked; - if (typeof n[checkedKey] == "string") n[checkedKey] = tools.eqs(n[checkedKey], "true"); - n[checkedKey] = !!n[checkedKey]; - n.checkedOld = n[checkedKey]; - if (typeof n.nocheck == "string") n.nocheck = tools.eqs(n.nocheck, "true"); - n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck); - if (typeof n.chkDisabled == "string") n.chkDisabled = tools.eqs(n.chkDisabled, "true"); - n.chkDisabled = !!n.chkDisabled || (setting.check.chkDisabledInherit && parentNode && !!parentNode.chkDisabled); - if (typeof n.halfCheck == "string") n.halfCheck = tools.eqs(n.halfCheck, "true"); - n.halfCheck = !!n.halfCheck; - n.check_Child_State = -1; - n.check_Focus = false; - n.getCheckStatus = function() {return data.getCheckStatus(setting, n);}; - - if (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && n[checkedKey] ) { - var r = data.getRoot(setting); - r.radioCheckedList.push(n); - } - }, - //add dom for check - _beforeA = function(setting, node, html) { - var checkedKey = setting.data.key.checked; - if (setting.check.enable) { - data.makeChkFlag(setting, node); - html.push(""); - } - }, - //update zTreeObj, add method of check - _zTreeTools = function(setting, zTreeTools) { - zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) { - var checkedKey = this.setting.data.key.checked; - if (node.chkDisabled === true) return; - if (checked !== true && checked !== false) { - checked = !node[checkedKey]; - } - callbackFlag = !!callbackFlag; - - if (node[checkedKey] === checked && !checkTypeFlag) { - return; - } else if (callbackFlag && tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) { - return; - } - if (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) { - node[checkedKey] = checked; - var checkObj = $$(node, consts.id.CHECK, this.setting); - if (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node); - view.setChkClass(this.setting, checkObj, node); - view.repairParentChkClassWithSelf(this.setting, node); - if (callbackFlag) { - this.setting.treeObj.trigger(consts.event.CHECK, [null, this.setting.treeId, node]); - } - } - } - - zTreeTools.checkAllNodes = function(checked) { - view.repairAllChk(this.setting, !!checked); - } - - zTreeTools.getCheckedNodes = function(checked) { - var childKey = this.setting.data.key.children; - checked = (checked !== false); - return data.getTreeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey], checked); - } - - zTreeTools.getChangeCheckedNodes = function() { - var childKey = this.setting.data.key.children; - return data.getTreeChangeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey]); - } - - zTreeTools.setChkDisabled = function(node, disabled, inheritParent, inheritChildren) { - disabled = !!disabled; - inheritParent = !!inheritParent; - inheritChildren = !!inheritChildren; - view.repairSonChkDisabled(this.setting, node, disabled, inheritChildren); - view.repairParentChkDisabled(this.setting, node.getParentNode(), disabled, inheritParent); - } - - var _updateNode = zTreeTools.updateNode; - zTreeTools.updateNode = function(node, checkTypeFlag) { - if (_updateNode) _updateNode.apply(zTreeTools, arguments); - if (!node || !this.setting.check.enable) return; - var nObj = $$(node, this.setting); - if (nObj.get(0) && tools.uCanDo(this.setting)) { - var checkObj = $$(node, consts.id.CHECK, this.setting); - if (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node); - view.setChkClass(this.setting, checkObj, node); - view.repairParentChkClassWithSelf(this.setting, node); - } - } - }, - //method of operate data - _data = { - getRadioCheckedList: function(setting) { - var checkedList = data.getRoot(setting).radioCheckedList; - for (var i=0, j=checkedList.length; i -1 && node.check_Child_State < 2) : (node.check_Child_State > 0))) - }; - return r; - }, - getTreeCheckedNodes: function(setting, nodes, checked, results) { - if (!nodes) return []; - var childKey = setting.data.key.children, - checkedKey = setting.data.key.checked, - onlyOne = (checked && setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL); - results = !results ? [] : results; - for (var i = 0, l = nodes.length; i < l; i++) { - if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] == checked) { - results.push(nodes[i]); - if(onlyOne) { - break; - } - } - data.getTreeCheckedNodes(setting, nodes[i][childKey], checked, results); - if(onlyOne && results.length > 0) { - break; - } - } - return results; - }, - getTreeChangeCheckedNodes: function(setting, nodes, results) { - if (!nodes) return []; - var childKey = setting.data.key.children, - checkedKey = setting.data.key.checked; - results = !results ? [] : results; - for (var i = 0, l = nodes.length; i < l; i++) { - if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] != nodes[i].checkedOld) { - results.push(nodes[i]); - } - data.getTreeChangeCheckedNodes(setting, nodes[i][childKey], results); - } - return results; - }, - makeChkFlag: function(setting, node) { - if (!node) return; - var childKey = setting.data.key.children, - checkedKey = setting.data.key.checked, - chkFlag = -1; - if (node[childKey]) { - for (var i = 0, l = node[childKey].length; i < l; i++) { - var cNode = node[childKey][i]; - var tmp = -1; - if (setting.check.chkStyle == consts.radio.STYLE) { - if (cNode.nocheck === true || cNode.chkDisabled === true) { - tmp = cNode.check_Child_State; - } else if (cNode.halfCheck === true) { - tmp = 2; - } else if (cNode[checkedKey]) { - tmp = 2; - } else { - tmp = cNode.check_Child_State > 0 ? 2:0; - } - if (tmp == 2) { - chkFlag = 2; break; - } else if (tmp == 0){ - chkFlag = 0; - } - } else if (setting.check.chkStyle == consts.checkbox.STYLE) { - if (cNode.nocheck === true || cNode.chkDisabled === true) { - tmp = cNode.check_Child_State; - } else if (cNode.halfCheck === true) { - tmp = 1; - } else if (cNode[checkedKey] ) { - tmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1; - } else { - tmp = (cNode.check_Child_State > 0) ? 1 : 0; - } - if (tmp === 1) { - chkFlag = 1; break; - } else if (tmp === 2 && chkFlag > -1 && i > 0 && tmp !== chkFlag) { - chkFlag = 1; break; - } else if (chkFlag === 2 && tmp > -1 && tmp < 2) { - chkFlag = 1; break; - } else if (tmp > -1) { - chkFlag = tmp; - } - } - } - } - node.check_Child_State = chkFlag; - } - }, - //method of event proxy - _event = { - - }, - //method of event handler - _handler = { - onCheckNode: function (event, node) { - if (node.chkDisabled === true) return false; - var setting = data.getSetting(event.data.treeId), - checkedKey = setting.data.key.checked; - if (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true; - node[checkedKey] = !node[checkedKey]; - view.checkNodeRelation(setting, node); - var checkObj = $$(node, consts.id.CHECK, setting); - view.setChkClass(setting, checkObj, node); - view.repairParentChkClassWithSelf(setting, node); - setting.treeObj.trigger(consts.event.CHECK, [event, setting.treeId, node]); - return true; - }, - onMouseoverCheck: function(event, node) { - if (node.chkDisabled === true) return false; - var setting = data.getSetting(event.data.treeId), - checkObj = $$(node, consts.id.CHECK, setting); - node.check_Focus = true; - view.setChkClass(setting, checkObj, node); - return true; - }, - onMouseoutCheck: function(event, node) { - if (node.chkDisabled === true) return false; - var setting = data.getSetting(event.data.treeId), - checkObj = $$(node, consts.id.CHECK, setting); - node.check_Focus = false; - view.setChkClass(setting, checkObj, node); - return true; - } - }, - //method of tools for zTree - _tools = { - - }, - //method of operate ztree dom - _view = { - checkNodeRelation: function(setting, node) { - var pNode, i, l, - childKey = setting.data.key.children, - checkedKey = setting.data.key.checked, - r = consts.radio; - if (setting.check.chkStyle == r.STYLE) { - var checkedList = data.getRadioCheckedList(setting); - if (node[checkedKey]) { - if (setting.check.radioType == r.TYPE_ALL) { - for (i = checkedList.length-1; i >= 0; i--) { - pNode = checkedList[i]; - if (pNode[checkedKey] && pNode != node) { - pNode[checkedKey] = false; - checkedList.splice(i, 1); - - view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode); - if (pNode.parentTId != node.parentTId) { - view.repairParentChkClassWithSelf(setting, pNode); - } - } - } - checkedList.push(node); - } else { - var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting); - for (i = 0, l = parentNode[childKey].length; i < l; i++) { - pNode = parentNode[childKey][i]; - if (pNode[checkedKey] && pNode != node) { - pNode[checkedKey] = false; - view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode); - } - } - } - } else if (setting.check.radioType == r.TYPE_ALL) { - for (i = 0, l = checkedList.length; i < l; i++) { - if (node == checkedList[i]) { - checkedList.splice(i, 1); - break; - } - } - } - - } else { - if (node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.Y.indexOf("s") > -1)) { - view.setSonNodeCheckBox(setting, node, true); - } - if (!node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.N.indexOf("s") > -1)) { - view.setSonNodeCheckBox(setting, node, false); - } - if (node[checkedKey] && setting.check.chkboxType.Y.indexOf("p") > -1) { - view.setParentNodeCheckBox(setting, node, true); - } - if (!node[checkedKey] && setting.check.chkboxType.N.indexOf("p") > -1) { - view.setParentNodeCheckBox(setting, node, false); - } - } - }, - makeChkClass: function(setting, node) { - var checkedKey = setting.data.key.checked, - c = consts.checkbox, r = consts.radio, - fullStyle = ""; - if (node.chkDisabled === true) { - fullStyle = c.DISABLED; - } else if (node.halfCheck) { - fullStyle = c.PART; - } else if (setting.check.chkStyle == r.STYLE) { - fullStyle = (node.check_Child_State < 1)? c.FULL:c.PART; - } else { - fullStyle = node[checkedKey] ? ((node.check_Child_State === 2 || node.check_Child_State === -1) ? c.FULL:c.PART) : ((node.check_Child_State < 1)? c.FULL:c.PART); - } - var chkName = setting.check.chkStyle + "_" + (node[checkedKey] ? c.TRUE : c.FALSE) + "_" + fullStyle; - chkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + "_" + c.FOCUS : chkName; - return consts.className.BUTTON + " " + c.DEFAULT + " " + chkName; - }, - repairAllChk: function(setting, checked) { - if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) { - var checkedKey = setting.data.key.checked, - childKey = setting.data.key.children, - root = data.getRoot(setting); - for (var i = 0, l = root[childKey].length; i 0) { - view.repairParentChkClass(setting, node[childKey][0]); - } else { - view.repairParentChkClass(setting, node); - } - }, - repairSonChkDisabled: function(setting, node, chkDisabled, inherit) { - if (!node) return; - var childKey = setting.data.key.children; - if (node.chkDisabled != chkDisabled) { - node.chkDisabled = chkDisabled; - } - view.repairChkClass(setting, node); - if (node[childKey] && inherit) { - for (var i = 0, l = node[childKey].length; i < l; i++) { - var sNode = node[childKey][i]; - view.repairSonChkDisabled(setting, sNode, chkDisabled, inherit); - } - } - }, - repairParentChkDisabled: function(setting, node, chkDisabled, inherit) { - if (!node) return; - if (node.chkDisabled != chkDisabled && inherit) { - node.chkDisabled = chkDisabled; - } - view.repairChkClass(setting, node); - view.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled, inherit); - }, - setChkClass: function(setting, obj, node) { - if (!obj) return; - if (node.nocheck === true) { - obj.hide(); - } else { - obj.show(); - } - obj.attr('class', view.makeChkClass(setting, node)); - }, - setParentNodeCheckBox: function(setting, node, value, srcNode) { - var childKey = setting.data.key.children, - checkedKey = setting.data.key.checked, - checkObj = $$(node, consts.id.CHECK, setting); - if (!srcNode) srcNode = node; - data.makeChkFlag(setting, node); - if (node.nocheck !== true && node.chkDisabled !== true) { - node[checkedKey] = value; - view.setChkClass(setting, checkObj, node); - if (setting.check.autoCheckTrigger && node != srcNode) { - setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]); - } - } - if (node.parentTId) { - var pSign = true; - if (!value) { - var pNodes = node.getParentNode()[childKey]; - for (var i = 0, l = pNodes.length; i < l; i++) { - if ((pNodes[i].nocheck !== true && pNodes[i].chkDisabled !== true && pNodes[i][checkedKey]) - || ((pNodes[i].nocheck === true || pNodes[i].chkDisabled === true) && pNodes[i].check_Child_State > 0)) { - pSign = false; - break; - } - } - } - if (pSign) { - view.setParentNodeCheckBox(setting, node.getParentNode(), value, srcNode); - } - } - }, - setSonNodeCheckBox: function(setting, node, value, srcNode) { - if (!node) return; - var childKey = setting.data.key.children, - checkedKey = setting.data.key.checked, - checkObj = $$(node, consts.id.CHECK, setting); - if (!srcNode) srcNode = node; - - var hasDisable = false; - if (node[childKey]) { - for (var i = 0, l = node[childKey].length; i < l && node.chkDisabled !== true; i++) { - var sNode = node[childKey][i]; - view.setSonNodeCheckBox(setting, sNode, value, srcNode); - if (sNode.chkDisabled === true) hasDisable = true; - } - } - - if (node != data.getRoot(setting) && node.chkDisabled !== true) { - if (hasDisable && node.nocheck !== true) { - data.makeChkFlag(setting, node); - } - if (node.nocheck !== true && node.chkDisabled !== true) { - node[checkedKey] = value; - if (!hasDisable) node.check_Child_State = (node[childKey] && node[childKey].length > 0) ? (value ? 2 : 0) : -1; - } else { - node.check_Child_State = -1; - } - view.setChkClass(setting, checkObj, node); - if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true && node.chkDisabled !== true) { - setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]); - } - } - - } - }, - - _z = { - tools: _tools, - view: _view, - event: _event, - data: _data - }; - $.extend(true, $.fn.zTree.consts, _consts); - $.extend(true, $.fn.zTree._z, _z); - - var zt = $.fn.zTree, - tools = zt._z.tools, - consts = zt.consts, - view = zt._z.view, - data = zt._z.data, - event = zt._z.event, - $$ = tools.$; - - data.exSetting(_setting); - data.addInitBind(_bindEvent); - data.addInitUnBind(_unbindEvent); - data.addInitCache(_initCache); - data.addInitNode(_initNode); - data.addInitProxy(_eventProxy, true); - data.addInitRoot(_initRoot); - data.addBeforeA(_beforeA); - data.addZTreeTools(_zTreeTools); - - var _createNodes = view.createNodes; - view.createNodes = function(setting, level, nodes, parentNode) { - if (_createNodes) _createNodes.apply(view, arguments); - if (!nodes) return; - view.repairParentChkClassWithSelf(setting, parentNode); - } - var _removeNode = view.removeNode; - view.removeNode = function(setting, node) { - var parentNode = node.getParentNode(); - if (_removeNode) _removeNode.apply(view, arguments); - if (!node || !parentNode) return; - view.repairChkClass(setting, parentNode); - view.repairParentChkClass(setting, parentNode); - } - - var _appendNodes = view.appendNodes; - view.appendNodes = function(setting, level, nodes, parentNode, initFlag, openFlag) { - var html = ""; - if (_appendNodes) { - html = _appendNodes.apply(view, arguments); - } - if (parentNode) { - data.makeChkFlag(setting, parentNode); - } - return html; - } -})(jQuery); -/* - * JQuery zTree exedit v3.5.18 - * http://zTree.me/ - * - * Copyright (c) 2010 Hunter.z - * - * Licensed same as jquery - MIT License - * http://www.opensource.org/licenses/mit-license.php - * - * email: hunter.z@263.net - * Date: 2015-05-25 - */ -(function($){ - //default consts of exedit - var _consts = { - event: { - DRAG: "ztree_drag", - DROP: "ztree_drop", - RENAME: "ztree_rename", - DRAGMOVE:"ztree_dragmove" - }, - id: { - EDIT: "_edit", - INPUT: "_input", - REMOVE: "_remove" - }, - move: { - TYPE_INNER: "inner", - TYPE_PREV: "prev", - TYPE_NEXT: "next" - }, - node: { - CURSELECTED_EDIT: "curSelectedNode_Edit", - TMPTARGET_TREE: "tmpTargetzTree", - TMPTARGET_NODE: "tmpTargetNode" - } - }, - //default setting of exedit - _setting = { - edit: { - enable: false, - editNameSelectAll: false, - showRemoveBtn: true, - showRenameBtn: true, - removeTitle: "remove", - renameTitle: "rename", - drag: { - autoExpandTrigger: false, - isCopy: true, - isMove: true, - prev: true, - next: true, - inner: true, - minMoveSize: 5, - borderMax: 10, - borderMin: -5, - maxShowNodeNum: 5, - autoOpenTime: 500 - } - }, - view: { - addHoverDom: null, - removeHoverDom: null - }, - callback: { - beforeDrag:null, - beforeDragOpen:null, - beforeDrop:null, - beforeEditName:null, - beforeRename:null, - onDrag:null, - onDragMove:null, - onDrop:null, - onRename:null - } - }, - //default root of exedit - _initRoot = function (setting) { - var r = data.getRoot(setting), rs = data.getRoots(); - r.curEditNode = null; - r.curEditInput = null; - r.curHoverNode = null; - r.dragFlag = 0; - r.dragNodeShowBefore = []; - r.dragMaskList = new Array(); - rs.showHoverDom = true; - }, - //default cache of exedit - _initCache = function(treeId) {}, - //default bind event of exedit - _bindEvent = function(setting) { - var o = setting.treeObj; - var c = consts.event; - o.bind(c.RENAME, function (event, treeId, treeNode, isCancel) { - tools.apply(setting.callback.onRename, [event, treeId, treeNode, isCancel]); - }); - - o.bind(c.DRAG, function (event, srcEvent, treeId, treeNodes) { - tools.apply(setting.callback.onDrag, [srcEvent, treeId, treeNodes]); - }); - - o.bind(c.DRAGMOVE,function(event, srcEvent, treeId, treeNodes){ - tools.apply(setting.callback.onDragMove,[srcEvent, treeId, treeNodes]); - }); - - o.bind(c.DROP, function (event, srcEvent, treeId, treeNodes, targetNode, moveType, isCopy) { - tools.apply(setting.callback.onDrop, [srcEvent, treeId, treeNodes, targetNode, moveType, isCopy]); - }); - }, - _unbindEvent = function(setting) { - var o = setting.treeObj; - var c = consts.event; - o.unbind(c.RENAME); - o.unbind(c.DRAG); - o.unbind(c.DRAGMOVE); - o.unbind(c.DROP); - }, - //default event proxy of exedit - _eventProxy = function(e) { - var target = e.target, - setting = data.getSetting(e.data.treeId), - relatedTarget = e.relatedTarget, - tId = "", node = null, - nodeEventType = "", treeEventType = "", - nodeEventCallback = null, treeEventCallback = null, - tmp = null; - - if (tools.eqs(e.type, "mouseover")) { - tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]); - if (tmp) { - tId = tools.getNodeMainDom(tmp).id; - nodeEventType = "hoverOverNode"; - } - } else if (tools.eqs(e.type, "mouseout")) { - tmp = tools.getMDom(setting, relatedTarget, [{tagName:"a", attrName:"treeNode"+consts.id.A}]); - if (!tmp) { - tId = "remove"; - nodeEventType = "hoverOutNode"; - } - } else if (tools.eqs(e.type, "mousedown")) { - tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]); - if (tmp) { - tId = tools.getNodeMainDom(tmp).id; - nodeEventType = "mousedownNode"; - } - } - if (tId.length>0) { - node = data.getNodeCache(setting, tId); - switch (nodeEventType) { - case "mousedownNode" : - nodeEventCallback = _handler.onMousedownNode; - break; - case "hoverOverNode" : - nodeEventCallback = _handler.onHoverOverNode; - break; - case "hoverOutNode" : - nodeEventCallback = _handler.onHoverOutNode; - break; - } - } - var proxyResult = { - stop: false, - node: node, - nodeEventType: nodeEventType, - nodeEventCallback: nodeEventCallback, - treeEventType: treeEventType, - treeEventCallback: treeEventCallback - }; - return proxyResult - }, - //default init node of exedit - _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { - if (!n) return; - n.isHover = false; - n.editNameFlag = false; - }, - //update zTreeObj, add method of edit - _zTreeTools = function(setting, zTreeTools) { - zTreeTools.cancelEditName = function(newName) { - var root = data.getRoot(this.setting); - if (!root.curEditNode) return; - view.cancelCurEditNode(this.setting, newName?newName:null, true); - } - zTreeTools.copyNode = function(targetNode, node, moveType, isSilent) { - if (!node) return null; - if (targetNode && !targetNode.isParent && this.setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) return null; - var _this = this, - newNode = tools.clone(node); - if (!targetNode) { - targetNode = null; - moveType = consts.move.TYPE_INNER; - } - if (moveType == consts.move.TYPE_INNER) { - function copyCallback() { - view.addNodes(_this.setting, targetNode, [newNode], isSilent); - } - - if (tools.canAsync(this.setting, targetNode)) { - view.asyncNode(this.setting, targetNode, isSilent, copyCallback); - } else { - copyCallback(); - } - } else { - view.addNodes(this.setting, targetNode.parentNode, [newNode], isSilent); - view.moveNode(this.setting, targetNode, newNode, moveType, false, isSilent); - } - return newNode; - } - zTreeTools.editName = function(node) { - if (!node || !node.tId || node !== data.getNodeCache(this.setting, node.tId)) return; - if (node.parentTId) view.expandCollapseParentNode(this.setting, node.getParentNode(), true); - view.editNode(this.setting, node) - } - zTreeTools.moveNode = function(targetNode, node, moveType, isSilent) { - if (!node) return node; - if (targetNode && !targetNode.isParent && this.setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) { - return null; - } else if (targetNode && ((node.parentTId == targetNode.tId && moveType == consts.move.TYPE_INNER) || $$(node, this.setting).find("#" + targetNode.tId).length > 0)) { - return null; - } else if (!targetNode) { - targetNode = null; - } - var _this = this; - function moveCallback() { - view.moveNode(_this.setting, targetNode, node, moveType, false, isSilent); - } - if (tools.canAsync(this.setting, targetNode) && moveType === consts.move.TYPE_INNER) { - view.asyncNode(this.setting, targetNode, isSilent, moveCallback); - } else { - moveCallback(); - } - return node; - } - zTreeTools.setEditable = function(editable) { - this.setting.edit.enable = editable; - return this.refresh(); - } - }, - //method of operate data - _data = { - setSonNodeLevel: function(setting, parentNode, node) { - if (!node) return; - var childKey = setting.data.key.children; - node.level = (parentNode)? parentNode.level + 1 : 0; - if (!node[childKey]) return; - for (var i = 0, l = node[childKey].length; i < l; i++) { - if (node[childKey][i]) data.setSonNodeLevel(setting, node, node[childKey][i]); - } - } - }, - //method of event proxy - _event = { - - }, - //method of event handler - _handler = { - onHoverOverNode: function(event, node) { - var setting = data.getSetting(event.data.treeId), - root = data.getRoot(setting); - if (root.curHoverNode != node) { - _handler.onHoverOutNode(event); - } - root.curHoverNode = node; - view.addHoverDom(setting, node); - }, - onHoverOutNode: function(event, node) { - var setting = data.getSetting(event.data.treeId), - root = data.getRoot(setting); - if (root.curHoverNode && !data.isSelectedNode(setting, root.curHoverNode)) { - view.removeTreeDom(setting, root.curHoverNode); - root.curHoverNode = null; - } - }, - onMousedownNode: function(eventMouseDown, _node) { - var i,l, - setting = data.getSetting(eventMouseDown.data.treeId), - root = data.getRoot(setting), roots = data.getRoots(); - //right click can't drag & drop - if (eventMouseDown.button == 2 || !setting.edit.enable || (!setting.edit.drag.isCopy && !setting.edit.drag.isMove)) return true; - - //input of edit node name can't drag & drop - var target = eventMouseDown.target, - _nodes = data.getRoot(setting).curSelectedList, - nodes = []; - if (!data.isSelectedNode(setting, _node)) { - nodes = [_node]; - } else { - for (i=0, l=_nodes.length; i1) { - var pNodes = nodes[0].parentTId ? nodes[0].getParentNode()[childKey] : data.getNodes(setting); - tmpNodes = []; - for (i=0, l=pNodes.length; i -1 && (lastIndex+1) !== i) { - isOrder = false; - } - tmpNodes.push(pNodes[i]); - lastIndex = i; - } - if (nodes.length === tmpNodes.length) { - nodes = tmpNodes; - break; - } - } - } - if (isOrder) { - preNode = nodes[0].getPreNode(); - nextNode = nodes[nodes.length-1].getNextNode(); - } - - //set node in selected - curNode = $$("
                      ", setting); - for (i=0, l=nodes.length; i0); - view.removeTreeDom(setting, tmpNode); - - if (i > setting.edit.drag.maxShowNodeNum-1) { - continue; - } - - tmpDom = $$("
                    • ", setting); - tmpDom.append($$(tmpNode, consts.id.A, setting).clone()); - tmpDom.css("padding", "0"); - tmpDom.children("#" + tmpNode.tId + consts.id.A).removeClass(consts.node.CURSELECTED); - curNode.append(tmpDom); - if (i == setting.edit.drag.maxShowNodeNum-1) { - tmpDom = $$("
                    • ...
                    • ", setting); - curNode.append(tmpDom); - } - } - curNode.attr("id", nodes[0].tId + consts.id.UL + "_tmp"); - curNode.addClass(setting.treeObj.attr("class")); - curNode.appendTo(body); - - tmpArrow = $$("", setting); - tmpArrow.attr("id", "zTreeMove_arrow_tmp"); - tmpArrow.appendTo(body); - - setting.treeObj.trigger(consts.event.DRAG, [event, setting.treeId, nodes]); - } - - if (root.dragFlag == 1) { - if (tmpTarget && tmpArrow.attr("id") == event.target.id && tmpTargetNodeId && (event.clientX + doc.scrollLeft()+2) > ($("#" + tmpTargetNodeId + consts.id.A, tmpTarget).offset().left)) { - var xT = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget); - event.target = (xT.length > 0) ? xT.get(0) : event.target; - } else if (tmpTarget) { - tmpTarget.removeClass(consts.node.TMPTARGET_TREE); - if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV) - .removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER); - } - tmpTarget = null; - tmpTargetNodeId = null; - - //judge drag & drop in multi ztree - isOtherTree = false; - targetSetting = setting; - var settings = data.getSettings(); - for (var s in settings) { - if (settings[s].treeId && settings[s].edit.enable && settings[s].treeId != setting.treeId - && (event.target.id == settings[s].treeId || $(event.target).parents("#" + settings[s].treeId).length>0)) { - isOtherTree = true; - targetSetting = settings[s]; - } - } - - var docScrollTop = doc.scrollTop(), - docScrollLeft = doc.scrollLeft(), - treeOffset = targetSetting.treeObj.offset(), - scrollHeight = targetSetting.treeObj.get(0).scrollHeight, - scrollWidth = targetSetting.treeObj.get(0).scrollWidth, - dTop = (event.clientY + docScrollTop - treeOffset.top), - dBottom = (targetSetting.treeObj.height() + treeOffset.top - event.clientY - docScrollTop), - dLeft = (event.clientX + docScrollLeft - treeOffset.left), - dRight = (targetSetting.treeObj.width() + treeOffset.left - event.clientX - docScrollLeft), - isTop = (dTop < setting.edit.drag.borderMax && dTop > setting.edit.drag.borderMin), - isBottom = (dBottom < setting.edit.drag.borderMax && dBottom > setting.edit.drag.borderMin), - isLeft = (dLeft < setting.edit.drag.borderMax && dLeft > setting.edit.drag.borderMin), - isRight = (dRight < setting.edit.drag.borderMax && dRight > setting.edit.drag.borderMin), - isTreeInner = dTop > setting.edit.drag.borderMin && dBottom > setting.edit.drag.borderMin && dLeft > setting.edit.drag.borderMin && dRight > setting.edit.drag.borderMin, - isTreeTop = (isTop && targetSetting.treeObj.scrollTop() <= 0), - isTreeBottom = (isBottom && (targetSetting.treeObj.scrollTop() + targetSetting.treeObj.height()+10) >= scrollHeight), - isTreeLeft = (isLeft && targetSetting.treeObj.scrollLeft() <= 0), - isTreeRight = (isRight && (targetSetting.treeObj.scrollLeft() + targetSetting.treeObj.width()+10) >= scrollWidth); - - if (event.target && tools.isChildOrSelf(event.target, targetSetting.treeId)) { - //get node
                    • dom - var targetObj = event.target; - while (targetObj && targetObj.tagName && !tools.eqs(targetObj.tagName, "li") && targetObj.id != targetSetting.treeId) { - targetObj = targetObj.parentNode; - } - - var canMove = true; - //don't move to self or children of self - for (i=0, l=nodes.length; i 0) { - canMove = false; - break; - } - } - if (canMove && event.target && tools.isChildOrSelf(event.target, targetObj.id + consts.id.A)) { - tmpTarget = $(targetObj); - tmpTargetNodeId = targetObj.id; - } - } - - //the mouse must be in zTree - tmpNode = nodes[0]; - if (isTreeInner && tools.isChildOrSelf(event.target, targetSetting.treeId)) { - //judge mouse move in root of ztree - if (!tmpTarget && (event.target.id == targetSetting.treeId || isTreeTop || isTreeBottom || isTreeLeft || isTreeRight) && (isOtherTree || (!isOtherTree && tmpNode.parentTId))) { - tmpTarget = targetSetting.treeObj; - } - //auto scroll top - if (isTop) { - targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop()-10); - } else if (isBottom) { - targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop()+10); - } - if (isLeft) { - targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()-10); - } else if (isRight) { - targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()+10); - } - //auto scroll left - if (tmpTarget && tmpTarget != targetSetting.treeObj && tmpTarget.offset().left < targetSetting.treeObj.offset().left) { - targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()+ tmpTarget.offset().left - targetSetting.treeObj.offset().left); - } - } - - curNode.css({ - "top": (event.clientY + docScrollTop + 3) + "px", - "left": (event.clientX + docScrollLeft + 3) + "px" - }); - - var dX = 0; - var dY = 0; - if (tmpTarget && tmpTarget.attr("id")!=targetSetting.treeId) { - var tmpTargetNode = tmpTargetNodeId == null ? null: data.getNodeCache(targetSetting, tmpTargetNodeId), - isCopy = ((event.ctrlKey || event.metaKey) && setting.edit.drag.isMove && setting.edit.drag.isCopy) || (!setting.edit.drag.isMove && setting.edit.drag.isCopy), - isPrev = !!(preNode && tmpTargetNodeId === preNode.tId), - isNext = !!(nextNode && tmpTargetNodeId === nextNode.tId), - isInner = (tmpNode.parentTId && tmpNode.parentTId == tmpTargetNodeId), - canPrev = (isCopy || !isNext) && tools.apply(targetSetting.edit.drag.prev, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.prev), - canNext = (isCopy || !isPrev) && tools.apply(targetSetting.edit.drag.next, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.next), - canInner = (isCopy || !isInner) && !(targetSetting.data.keep.leaf && !tmpTargetNode.isParent) && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.inner); - if (!canPrev && !canNext && !canInner) { - tmpTarget = null; - tmpTargetNodeId = ""; - moveType = consts.move.TYPE_INNER; - tmpArrow.css({ - "display":"none" - }); - if (window.zTreeMoveTimer) { - clearTimeout(window.zTreeMoveTimer); - window.zTreeMoveTargetNodeTId = null - } - } else { - var tmpTargetA = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget), - tmpNextA = tmpTargetNode.isLastNode ? null : $("#" + tmpTargetNode.getNextNode().tId + consts.id.A, tmpTarget.next()), - tmpTop = tmpTargetA.offset().top, - tmpLeft = tmpTargetA.offset().left, - prevPercent = canPrev ? (canInner ? 0.25 : (canNext ? 0.5 : 1) ) : -1, - nextPercent = canNext ? (canInner ? 0.75 : (canPrev ? 0.5 : 0) ) : -1, - dY_percent = (event.clientY + docScrollTop - tmpTop)/tmpTargetA.height(); - if ((prevPercent==1 ||dY_percent<=prevPercent && dY_percent>=-.2) && canPrev) { - dX = 1 - tmpArrow.width(); - dY = tmpTop - tmpArrow.height()/2; - moveType = consts.move.TYPE_PREV; - } else if ((nextPercent==0 || dY_percent>=nextPercent && dY_percent<=1.2) && canNext) { - dX = 1 - tmpArrow.width(); - dY = (tmpNextA == null || (tmpTargetNode.isParent && tmpTargetNode.open)) ? (tmpTop + tmpTargetA.height() - tmpArrow.height()/2) : (tmpNextA.offset().top - tmpArrow.height()/2); - moveType = consts.move.TYPE_NEXT; - }else { - dX = 5 - tmpArrow.width(); - dY = tmpTop; - moveType = consts.move.TYPE_INNER; - } - tmpArrow.css({ - "display":"block", - "top": dY + "px", - "left": (tmpLeft + dX) + "px" - }); - tmpTargetA.addClass(consts.node.TMPTARGET_NODE + "_" + moveType); - - if (preTmpTargetNodeId != tmpTargetNodeId || preTmpMoveType != moveType) { - startTime = (new Date()).getTime(); - } - if (tmpTargetNode && tmpTargetNode.isParent && moveType == consts.move.TYPE_INNER) { - var startTimer = true; - if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId !== tmpTargetNode.tId) { - clearTimeout(window.zTreeMoveTimer); - window.zTreeMoveTargetNodeTId = null; - }else if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId === tmpTargetNode.tId) { - startTimer = false; - } - if (startTimer) { - window.zTreeMoveTimer = setTimeout(function() { - if (moveType != consts.move.TYPE_INNER) return; - if (tmpTargetNode && tmpTargetNode.isParent && !tmpTargetNode.open && (new Date()).getTime() - startTime > targetSetting.edit.drag.autoOpenTime - && tools.apply(targetSetting.callback.beforeDragOpen, [targetSetting.treeId, tmpTargetNode], true)) { - view.switchNode(targetSetting, tmpTargetNode); - if (targetSetting.edit.drag.autoExpandTrigger) { - targetSetting.treeObj.trigger(consts.event.EXPAND, [targetSetting.treeId, tmpTargetNode]); - } - } - }, targetSetting.edit.drag.autoOpenTime+50); - window.zTreeMoveTargetNodeTId = tmpTargetNode.tId; - } - } - } - } else { - moveType = consts.move.TYPE_INNER; - if (tmpTarget && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, null], !!targetSetting.edit.drag.inner)) { - tmpTarget.addClass(consts.node.TMPTARGET_TREE); - } else { - tmpTarget = null; - } - tmpArrow.css({ - "display":"none" - }); - if (window.zTreeMoveTimer) { - clearTimeout(window.zTreeMoveTimer); - window.zTreeMoveTargetNodeTId = null; - } - } - preTmpTargetNodeId = tmpTargetNodeId; - preTmpMoveType = moveType; - - setting.treeObj.trigger(consts.event.DRAGMOVE, [event, setting.treeId, nodes]); - } - return false; - } - - doc.bind("mouseup", _docMouseUp); - function _docMouseUp(event) { - if (window.zTreeMoveTimer) { - clearTimeout(window.zTreeMoveTimer); - window.zTreeMoveTargetNodeTId = null; - } - preTmpTargetNodeId = null; - preTmpMoveType = null; - doc.unbind("mousemove", _docMouseMove); - doc.unbind("mouseup", _docMouseUp); - doc.unbind("selectstart", _docSelect); - body.css("cursor", "auto"); - if (tmpTarget) { - tmpTarget.removeClass(consts.node.TMPTARGET_TREE); - if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV) - .removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER); - } - tools.showIfameMask(setting, false); - - roots.showHoverDom = true; - if (root.dragFlag == 0) return; - root.dragFlag = 0; - - var i, l, tmpNode; - for (i=0, l=nodes.length; i 0) { - root.dragMaskList[0].remove(); - root.dragMaskList.shift(); - } - if (showSign) { - //show mask - var iframeList = $$("iframe", setting); - for (var i = 0, l = iframeList.length; i < l; i++) { - var obj = iframeList.get(i), - r = tools.getAbs(obj), - dragMask = $$("
                      ", setting); - dragMask.appendTo($$("body", setting)); - root.dragMaskList.push(dragMask); - } - } - } - }, - //method of operate ztree dom - _view = { - addEditBtn: function(setting, node) { - if (node.editNameFlag || $$(node, consts.id.EDIT, setting).length > 0) { - return; - } - if (!tools.apply(setting.edit.showRenameBtn, [setting.treeId, node], setting.edit.showRenameBtn)) { - return; - } - var aObj = $$(node, consts.id.A, setting), - editStr = ""; - aObj.append(editStr); - - $$(node, consts.id.EDIT, setting).bind('click', - function() { - if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeEditName, [setting.treeId, node], true) == false) return false; - view.editNode(setting, node); - return false; - } - ).show(); - }, - addRemoveBtn: function(setting, node) { - if (node.editNameFlag || $$(node, consts.id.REMOVE, setting).length > 0) { - return; - } - if (!tools.apply(setting.edit.showRemoveBtn, [setting.treeId, node], setting.edit.showRemoveBtn)) { - return; - } - var aObj = $$(node, consts.id.A, setting), - removeStr = ""; - aObj.append(removeStr); - - $$(node, consts.id.REMOVE, setting).bind('click', - function() { - if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return false; - view.removeNode(setting, node); - setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]); - return false; - } - ).bind('mousedown', - function(eventMouseDown) { - return true; - } - ).show(); - }, - addHoverDom: function(setting, node) { - if (data.getRoots().showHoverDom) { - node.isHover = true; - if (setting.edit.enable) { - view.addEditBtn(setting, node); - view.addRemoveBtn(setting, node); - } - tools.apply(setting.view.addHoverDom, [setting.treeId, node]); - } - }, - cancelCurEditNode: function (setting, forceName, isCancel) { - var root = data.getRoot(setting), - nameKey = setting.data.key.name, - node = root.curEditNode; - - if (node) { - var inputObj = root.curEditInput, - newName = forceName ? forceName:(isCancel ? node[nameKey]: inputObj.val()); - if (tools.apply(setting.callback.beforeRename, [setting.treeId, node, newName, isCancel], true) === false) { - return false; - } - node[nameKey] = newName; - var aObj = $$(node, consts.id.A, setting); - aObj.removeClass(consts.node.CURSELECTED_EDIT); - inputObj.unbind(); - view.setNodeName(setting, node); - node.editNameFlag = false; - root.curEditNode = null; - root.curEditInput = null; - view.selectNode(setting, node, false); - setting.treeObj.trigger(consts.event.RENAME, [setting.treeId, node, isCancel]); - } - root.noSelection = true; - return true; - }, - editNode: function(setting, node) { - var root = data.getRoot(setting); - view.editNodeBlur = false; - if (data.isSelectedNode(setting, node) && root.curEditNode == node && node.editNameFlag) { - setTimeout(function() {tools.inputFocus(root.curEditInput);}, 0); - return; - } - var nameKey = setting.data.key.name; - node.editNameFlag = true; - view.removeTreeDom(setting, node); - view.cancelCurEditNode(setting); - view.selectNode(setting, node, false); - $$(node, consts.id.SPAN, setting).html(""); - var inputObj = $$(node, consts.id.INPUT, setting); - inputObj.attr("value", node[nameKey]); - if (setting.edit.editNameSelectAll) { - tools.inputSelect(inputObj); - } else { - tools.inputFocus(inputObj); - } - - inputObj.bind('blur', function(event) { - if (!view.editNodeBlur) { - view.cancelCurEditNode(setting); - } - }).bind('keydown', function(event) { - if (event.keyCode=="13") { - view.editNodeBlur = true; - view.cancelCurEditNode(setting); - } else if (event.keyCode=="27") { - view.cancelCurEditNode(setting, null, true); - } - }).bind('click', function(event) { - return false; - }).bind('dblclick', function(event) { - return false; - }); - - $$(node, consts.id.A, setting).addClass(consts.node.CURSELECTED_EDIT); - root.curEditInput = inputObj; - root.noSelection = false; - root.curEditNode = node; - }, - moveNode: function(setting, targetNode, node, moveType, animateFlag, isSilent) { - var root = data.getRoot(setting), - childKey = setting.data.key.children; - if (targetNode == node) return; - if (setting.data.keep.leaf && targetNode && !targetNode.isParent && moveType == consts.move.TYPE_INNER) return; - var oldParentNode = (node.parentTId ? node.getParentNode(): root), - targetNodeIsRoot = (targetNode === null || targetNode == root); - if (targetNodeIsRoot && targetNode === null) targetNode = root; - if (targetNodeIsRoot) moveType = consts.move.TYPE_INNER; - var targetParentNode = (targetNode.parentTId ? targetNode.getParentNode() : root); - - if (moveType != consts.move.TYPE_PREV && moveType != consts.move.TYPE_NEXT) { - moveType = consts.move.TYPE_INNER; - } - - if (moveType == consts.move.TYPE_INNER) { - if (targetNodeIsRoot) { - //parentTId of root node is null - node.parentTId = null; - } else { - if (!targetNode.isParent) { - targetNode.isParent = true; - targetNode.open = !!targetNode.open; - view.setNodeLineIcos(setting, targetNode); - } - node.parentTId = targetNode.tId; - } - } - - //move node Dom - var targetObj, target_ulObj; - if (targetNodeIsRoot) { - targetObj = setting.treeObj; - target_ulObj = targetObj; - } else { - if (!isSilent && moveType == consts.move.TYPE_INNER) { - view.expandCollapseNode(setting, targetNode, true, false); - } else if (!isSilent) { - view.expandCollapseNode(setting, targetNode.getParentNode(), true, false); - } - targetObj = $$(targetNode, setting); - target_ulObj = $$(targetNode, consts.id.UL, setting); - if (!!targetObj.get(0) && !target_ulObj.get(0)) { - var ulstr = []; - view.makeUlHtml(setting, targetNode, ulstr, ''); - targetObj.append(ulstr.join('')); - } - target_ulObj = $$(targetNode, consts.id.UL, setting); - } - var nodeDom = $$(node, setting); - if (!nodeDom.get(0)) { - nodeDom = view.appendNodes(setting, node.level, [node], null, false, true).join(''); - } else if (!targetObj.get(0)) { - nodeDom.remove(); - } - if (target_ulObj.get(0) && moveType == consts.move.TYPE_INNER) { - target_ulObj.append(nodeDom); - } else if (targetObj.get(0) && moveType == consts.move.TYPE_PREV) { - targetObj.before(nodeDom); - } else if (targetObj.get(0) && moveType == consts.move.TYPE_NEXT) { - targetObj.after(nodeDom); - } - - //repair the data after move - var i,l, - tmpSrcIndex = -1, - tmpTargetIndex = 0, - oldNeighbor = null, - newNeighbor = null, - oldLevel = node.level; - if (node.isFirstNode) { - tmpSrcIndex = 0; - if (oldParentNode[childKey].length > 1 ) { - oldNeighbor = oldParentNode[childKey][1]; - oldNeighbor.isFirstNode = true; - } - } else if (node.isLastNode) { - tmpSrcIndex = oldParentNode[childKey].length -1; - oldNeighbor = oldParentNode[childKey][tmpSrcIndex - 1]; - oldNeighbor.isLastNode = true; - } else { - for (i = 0, l = oldParentNode[childKey].length; i < l; i++) { - if (oldParentNode[childKey][i].tId == node.tId) { - tmpSrcIndex = i; - break; - } - } - } - if (tmpSrcIndex >= 0) { - oldParentNode[childKey].splice(tmpSrcIndex, 1); - } - if (moveType != consts.move.TYPE_INNER) { - for (i = 0, l = targetParentNode[childKey].length; i < l; i++) { - if (targetParentNode[childKey][i].tId == targetNode.tId) tmpTargetIndex = i; - } - } - if (moveType == consts.move.TYPE_INNER) { - if (!targetNode[childKey]) targetNode[childKey] = new Array(); - if (targetNode[childKey].length > 0) { - newNeighbor = targetNode[childKey][targetNode[childKey].length - 1]; - newNeighbor.isLastNode = false; - } - targetNode[childKey].splice(targetNode[childKey].length, 0, node); - node.isLastNode = true; - node.isFirstNode = (targetNode[childKey].length == 1); - } else if (targetNode.isFirstNode && moveType == consts.move.TYPE_PREV) { - targetParentNode[childKey].splice(tmpTargetIndex, 0, node); - newNeighbor = targetNode; - newNeighbor.isFirstNode = false; - node.parentTId = targetNode.parentTId; - node.isFirstNode = true; - node.isLastNode = false; - - } else if (targetNode.isLastNode && moveType == consts.move.TYPE_NEXT) { - targetParentNode[childKey].splice(tmpTargetIndex + 1, 0, node); - newNeighbor = targetNode; - newNeighbor.isLastNode = false; - node.parentTId = targetNode.parentTId; - node.isFirstNode = false; - node.isLastNode = true; - - } else { - if (moveType == consts.move.TYPE_PREV) { - targetParentNode[childKey].splice(tmpTargetIndex, 0, node); - } else { - targetParentNode[childKey].splice(tmpTargetIndex + 1, 0, node); - } - node.parentTId = targetNode.parentTId; - node.isFirstNode = false; - node.isLastNode = false; - } - data.fixPIdKeyValue(setting, node); - data.setSonNodeLevel(setting, node.getParentNode(), node); - - //repair node what been moved - view.setNodeLineIcos(setting, node); - view.repairNodeLevelClass(setting, node, oldLevel) - - //repair node's old parentNode dom - if (!setting.data.keep.parent && oldParentNode[childKey].length < 1) { - //old parentNode has no child nodes - oldParentNode.isParent = false; - oldParentNode.open = false; - var tmp_ulObj = $$(oldParentNode, consts.id.UL, setting), - tmp_switchObj = $$(oldParentNode, consts.id.SWITCH, setting), - tmp_icoObj = $$(oldParentNode, consts.id.ICON, setting); - view.replaceSwitchClass(oldParentNode, tmp_switchObj, consts.folder.DOCU); - view.replaceIcoClass(oldParentNode, tmp_icoObj, consts.folder.DOCU); - tmp_ulObj.css("display", "none"); - - } else if (oldNeighbor) { - //old neigbor node - view.setNodeLineIcos(setting, oldNeighbor); - } - - //new neigbor node - if (newNeighbor) { - view.setNodeLineIcos(setting, newNeighbor); - } - - //repair checkbox / radio - if (!!setting.check && setting.check.enable && view.repairChkClass) { - view.repairChkClass(setting, oldParentNode); - view.repairParentChkClassWithSelf(setting, oldParentNode); - if (oldParentNode != node.parent) - view.repairParentChkClassWithSelf(setting, node); - } - - //expand parents after move - if (!isSilent) { - view.expandCollapseParentNode(setting, node.getParentNode(), true, animateFlag); - } - }, - removeEditBtn: function(setting, node) { - $$(node, consts.id.EDIT, setting).unbind().remove(); - }, - removeRemoveBtn: function(setting, node) { - $$(node, consts.id.REMOVE, setting).unbind().remove(); - }, - removeTreeDom: function(setting, node) { - node.isHover = false; - view.removeEditBtn(setting, node); - view.removeRemoveBtn(setting, node); - tools.apply(setting.view.removeHoverDom, [setting.treeId, node]); - }, - repairNodeLevelClass: function(setting, node, oldLevel) { - if (oldLevel === node.level) return; - var liObj = $$(node, setting), - aObj = $$(node, consts.id.A, setting), - ulObj = $$(node, consts.id.UL, setting), - oldClass = consts.className.LEVEL + oldLevel, - newClass = consts.className.LEVEL + node.level; - liObj.removeClass(oldClass); - liObj.addClass(newClass); - aObj.removeClass(oldClass); - aObj.addClass(newClass); - ulObj.removeClass(oldClass); - ulObj.addClass(newClass); - }, - selectNodes : function(setting, nodes) { - for (var i=0, l=nodes.length; i0); - } - } - }, - - _z = { - tools: _tools, - view: _view, - event: _event, - data: _data - }; - $.extend(true, $.fn.zTree.consts, _consts); - $.extend(true, $.fn.zTree._z, _z); - - var zt = $.fn.zTree, - tools = zt._z.tools, - consts = zt.consts, - view = zt._z.view, - data = zt._z.data, - event = zt._z.event, - $$ = tools.$; - - data.exSetting(_setting); - data.addInitBind(_bindEvent); - data.addInitUnBind(_unbindEvent); - data.addInitCache(_initCache); - data.addInitNode(_initNode); - data.addInitProxy(_eventProxy); - data.addInitRoot(_initRoot); - data.addZTreeTools(_zTreeTools); - - var _cancelPreSelectedNode = view.cancelPreSelectedNode; - view.cancelPreSelectedNode = function (setting, node) { - var list = data.getRoot(setting).curSelectedList; - for (var i=0, j=list.length; i0?(c.isParent=!0,c.zAsync=!0):(c.isParent=typeof c.isParent=="string"?j.eqs(c.isParent,"true"):!!c.isParent,c.open=c.isParent&&!b.async.enable?c.open:!1,c.zAsync=!c.isParent);c.isFirstNode=f;c.isLastNode=g;c.getParentNode=function(){return h.getNodeCache(b,c.parentTId)};c.getPreNode=function(){return h.getPreNode(b,c)};c.getNextNode=function(){return h.getNextNode(b, -c)};c.isAjaxing=!1;h.fixPIdKeyValue(b,c)}}],s=[function(b){var a=b.target,c=h.getSetting(b.data.treeId),d="",f=null,g="",l="",i=null,o=null,k=null;if(j.eqs(b.type,"mousedown"))l="mousedown";else if(j.eqs(b.type,"mouseup"))l="mouseup";else if(j.eqs(b.type,"contextmenu"))l="contextmenu";else if(j.eqs(b.type,"click"))if(j.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+e.id.SWITCH)!==null)d=j.getNodeMainDom(a).id,g="switchNode";else{if(k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}]))d=j.getNodeMainDom(k).id, -g="clickNode"}else if(j.eqs(b.type,"dblclick")&&(l="dblclick",k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}])))d=j.getNodeMainDom(k).id,g="switchNode";if(l.length>0&&d.length==0&&(k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}])))d=j.getNodeMainDom(k).id;if(d.length>0)switch(f=h.getNodeCache(c,d),g){case "switchNode":f.isParent?j.eqs(b.type,"click")||j.eqs(b.type,"dblclick")&&j.apply(c.view.dblClickExpand,[c.treeId,f],c.view.dblClickExpand)?i=G:g="":g="";break;case "clickNode":i= -H}switch(l){case "mousedown":o=I;break;case "mouseup":o=J;break;case "dblclick":o=K;break;case "contextmenu":o=L}return{stop:!1,node:f,nodeEventType:g,nodeEventCallback:i,treeEventType:l,treeEventCallback:o}}],A=[function(b){var a=h.getRoot(b);a||(a={},h.setRoot(b,a));a[b.data.key.children]=[];a.expandTriggerFlag=!1;a.curSelectedList=[];a.noSelection=!0;a.createdNodes=[];a.zId=0;a._ver=(new Date).getTime()}],B=[],C=[],D=[],E=[],F=[],h={addNodeCache:function(b,a){h.getCache(b).nodes[h.getNodeCacheId(a.tId)]= -a},getNodeCacheId:function(b){return b.substring(b.lastIndexOf("_")+1)},addAfterA:function(b){C.push(b)},addBeforeA:function(b){B.push(b)},addInnerAfterA:function(b){E.push(b)},addInnerBeforeA:function(b){D.push(b)},addInitBind:function(b){w.push(b)},addInitUnBind:function(b){x.push(b)},addInitCache:function(b){y.push(b)},addInitNode:function(b){z.push(b)},addInitProxy:function(b,a){a?s.splice(0,0,b):s.push(b)},addInitRoot:function(b){A.push(b)},addNodesData:function(b,a,c){var d=b.data.key.children; -a[d]||(a[d]=[]);if(a[d].length>0)a[d][a[d].length-1].isLastNode=!1,i.setNodeLineIcos(b,a[d][a[d].length-1]);a.isParent=!0;a[d]=a[d].concat(c)},addSelectedNode:function(b,a){var c=h.getRoot(b);h.isSelectedNode(b,a)||c.curSelectedList.push(a)},addCreatedNode:function(b,a){(b.callback.onNodeCreated||b.view.addDiyDom)&&h.getRoot(b).createdNodes.push(a)},addZTreeTools:function(b){F.push(b)},exSetting:function(b){p.extend(!0,M,b)},fixPIdKeyValue:function(b,a){b.data.simpleData.enable&&(a[b.data.simpleData.pIdKey]= -a.parentTId?a.getParentNode()[b.data.simpleData.idKey]:b.data.simpleData.rootPId)},getAfterA:function(b,a,c){for(var d=0,f=C.length;d-1&&g.push(a[l]),g=g.concat(h.getNodesByParamFuzzy(b,a[l][f],c,d));return g},getNodesByFilter:function(b,a,c,d,f){if(!a)return d?null:[];for(var g=b.data.key.children,e=d?null:[],i=0,o=a.length;i0)},clone:function(b){if(b===null)return null;var a=j.isArray(b)?[]:{},c;for(c in b)a[c]=b[c]instanceof Date?new Date(b[c].getTime()):typeof b[c]==="object"?arguments.callee(b[c]):b[c];return a},eqs:function(b,a){return b.toLowerCase()===a.toLowerCase()},isArray:function(b){return Object.prototype.toString.apply(b)==="[object Array]"},$:function(b,a,c){a&&typeof a!="string"&&(c=a,a="");return typeof b=="string"?p(b,c?c.treeObj.get(0).ownerDocument: -null):p("#"+b.tId+a,c?c.treeObj:null)},getMDom:function(b,a,c){if(!a)return null;for(;a&&a.id!==b.treeId;){for(var d=0,f=c.length;a.tagName&&d0},uCanDo:function(){return!0}},i={addNodes:function(b,a,c,d){if(!b.data.keep.leaf|| -!a||a.isParent)if(j.isArray(c)||(c=[c]),b.data.simpleData.enable&&(c=h.transformTozTreeFormat(b,c)),a){var f=k(a,e.id.SWITCH,b),g=k(a,e.id.ICON,b),l=k(a,e.id.UL,b);if(!a.open)i.replaceSwitchClass(a,f,e.folder.CLOSE),i.replaceIcoClass(a,g,e.folder.CLOSE),a.open=!1,l.css({display:"none"});h.addNodesData(b,a,c);i.createNodes(b,a.level+1,c,a);d||i.expandCollapseParentNode(b,a,!0)}else h.addNodesData(b,h.getRoot(b),c),i.createNodes(b,0,c,null)},appendNodes:function(b,a,c,d,f,g){if(!c)return[];for(var e= -[],j=b.data.key.children,k=0,m=c.length;k0&&(t=i.appendNodes(b,a+1,n[j],n,f,g&&n.open));g&&(i.makeDOMNodeMainBefore(e,b,n),i.makeDOMNodeLine(e,b,n),h.getBeforeA(b,n,e),i.makeDOMNodeNameBefore(e,b,n),h.getInnerBeforeA(b,n,e),i.makeDOMNodeIcon(e,b,n),h.getInnerAfterA(b,n,e),i.makeDOMNodeNameAfter(e,b,n),h.getAfterA(b,n,e),n.isParent&&n.open&&i.makeUlHtml(b, -n,e,t.join("")),i.makeDOMNodeMainAfter(e,b,n),h.addCreatedNode(b,n))}return e},appendParentULDom:function(b,a){var c=[],d=k(a,b);!d.get(0)&&a.parentTId&&(i.appendParentULDom(b,a.getParentNode()),d=k(a,b));var f=k(a,e.id.UL,b);f.get(0)&&f.remove();f=i.appendNodes(b,a.level+1,a[b.data.key.children],a,!1,!0);i.makeUlHtml(b,a,c,f.join(""));d.append(c.join(""))},asyncNode:function(b,a,c,d){var f,g;if(a&&!a.isParent)return j.apply(d),!1;else if(a&&a.isAjaxing)return!1;else if(j.apply(b.callback.beforeAsync, -[b.treeId,a],!0)==!1)return j.apply(d),!1;if(a)a.isAjaxing=!0,k(a,e.id.ICON,b).attr({style:"","class":e.className.BUTTON+" "+e.className.ICO_LOADING});var l={};for(f=0,g=b.async.autoParam.length;a&&f1&&(o=q[1],q=q[0]);l[o]=a[q]}if(j.isArray(b.async.otherParam))for(f=0,g=b.async.otherParam.length;f=0;f--)if(g=d[f],a===g||!a&&(!c||c!==g))if(k(g,e.id.A,b).removeClass(e.node.CURSELECTED),a){h.removeSelectedNode(b,a);b.treeObj.trigger(e.event.UNSELECTED,[m,b.treeId,g]);break}else d.splice(f,1),b.treeObj.trigger(e.event.UNSELECTED, -[m,b.treeId,g])},createNodeCallback:function(b){if(b.callback.onNodeCreated||b.view.addDiyDom)for(var a=h.getRoot(b);a.createdNodes.length>0;){var c=a.createdNodes.shift();j.apply(b.view.addDiyDom,[b.treeId,c]);b.callback.onNodeCreated&&b.treeObj.trigger(e.event.NODECREATED,[b.treeId,c])}},createNodes:function(b,a,c,d){if(c&&c.length!=0){var f=h.getRoot(b),g=b.data.key.children,g=!d||d.open||!!k(d[g][0],b).get(0);f.createdNodes=[];a=i.appendNodes(b,a,c,d,!0,g);d?(d=k(d,e.id.UL,b),d.get(0)&&d.append(a.join(""))): -b.treeObj.append(a.join(""));i.createNodeCallback(b)}},destroy:function(b){b&&(h.initCache(b),h.initRoot(b),m.unbindTree(b),m.unbindEvent(b),b.treeObj.empty(),delete r[b.treeId])},expandCollapseNode:function(b,a,c,d,f){var g=h.getRoot(b),l=b.data.key.children;if(a){if(g.expandTriggerFlag){var q=f,f=function(){q&&q();a.open?b.treeObj.trigger(e.event.EXPAND,[b.treeId,a]):b.treeObj.trigger(e.event.COLLAPSE,[b.treeId,a])};g.expandTriggerFlag=!1}if(!a.open&&a.isParent&&(!k(a,e.id.UL,b).get(0)||a[l]&&a[l].length> -0&&!k(a[l][0],b).get(0)))i.appendParentULDom(b,a),i.createNodeCallback(b);if(a.open==c)j.apply(f,[]);else{var c=k(a,e.id.UL,b),g=k(a,e.id.SWITCH,b),o=k(a,e.id.ICON,b);a.isParent?(a.open=!a.open,a.iconOpen&&a.iconClose&&o.attr("style",i.makeNodeIcoStyle(b,a)),a.open?(i.replaceSwitchClass(a,g,e.folder.OPEN),i.replaceIcoClass(a,o,e.folder.OPEN),d==!1||b.view.expandSpeed==""?(c.show(),j.apply(f,[])):a[l]&&a[l].length>0?c.slideDown(b.view.expandSpeed,f):(c.show(),j.apply(f,[]))):(i.replaceSwitchClass(a, -g,e.folder.CLOSE),i.replaceIcoClass(a,o,e.folder.CLOSE),d==!1||b.view.expandSpeed==""||!(a[l]&&a[l].length>0)?(c.hide(),j.apply(f,[])):c.slideUp(b.view.expandSpeed,f))):j.apply(f,[])}}else j.apply(f,[])},expandCollapseParentNode:function(b,a,c,d,f){a&&(a.parentTId?(i.expandCollapseNode(b,a,c,d),a.parentTId&&i.expandCollapseParentNode(b,a.getParentNode(),c,d,f)):i.expandCollapseNode(b,a,c,d,f))},expandCollapseSonNode:function(b,a,c,d,f){var g=h.getRoot(b),e=b.data.key.children,g=a?a[e]:g[e],e=a?!1: -d,j=h.getRoot(b).expandTriggerFlag;h.getRoot(b).expandTriggerFlag=!1;if(g)for(var k=0,m=g.length;k=0;d--)if(a===c[d])return!0;return!1},makeDOMNodeIcon:function(b,a,c){var d=h.getNodeName(a,c),d=a.view.nameIsHTML?d:d.replace(/&/g,"&").replace(//g,">");b.push("",d,"")},makeDOMNodeLine:function(b,a,c){b.push("")},makeDOMNodeMainAfter:function(b){b.push("
                    • ")},makeDOMNodeMainBefore:function(b,a,c){b.push("
                    • ")}, -makeDOMNodeNameAfter:function(b){b.push("")},makeDOMNodeNameBefore:function(b,a,c){var d=h.getNodeTitle(a,c),f=i.makeNodeUrl(a,c),g=i.makeNodeFontCss(a,c),l=[],k;for(k in g)l.push(k,":",g[k],";");b.push("0?"href='"+f+"'":""," target='",i.makeNodeTarget(c),"' style='",l.join(""),"'");j.apply(a.view.showTitle,[a.treeId,c],a.view.showTitle)&&d&&b.push("title='",d.replace(/'/g, -"'").replace(//g,">"),"'");b.push(">")},makeNodeFontCss:function(b,a){var c=j.apply(b.view.fontCss,[b.treeId,a],b.view.fontCss);return c&&typeof c!="function"?c:{}},makeNodeIcoClass:function(b,a){var c=["ico"];a.isAjaxing||(c[0]=(a.iconSkin?a.iconSkin+"_":"")+c[0],a.isParent?c.push(a.open?e.folder.OPEN:e.folder.CLOSE):c.push(e.folder.DOCU));return e.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(b,a){var c=[];if(!a.isAjaxing){var d=a.isParent&&a.iconOpen&& -a.iconClose?a.open?a.iconOpen:a.iconClose:a.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;");(b.view.showIcon==!1||!j.apply(b.view.showIcon,[b.treeId,a],!0))&&c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(b,a){var c=[];b.view.showLine?a.level==0&&a.isFirstNode&&a.isLastNode?c.push(e.line.ROOT):a.level==0&&a.isFirstNode?c.push(e.line.ROOTS):a.isLastNode?c.push(e.line.BOTTOM):c.push(e.line.CENTER):c.push(e.line.NOLINE);a.isParent?c.push(a.open?e.folder.OPEN:e.folder.CLOSE): -c.push(e.folder.DOCU);return i.makeNodeLineClassEx(a)+c.join("_")},makeNodeLineClassEx:function(b){return e.className.BUTTON+" "+e.className.LEVEL+b.level+" "+e.className.SWITCH+" "},makeNodeTarget:function(b){return b.target||"_blank"},makeNodeUrl:function(b,a){var c=b.data.key.url;return a[c]?a[c]:null},makeUlHtml:function(b,a,c,d){c.push("
                        ");c.push(d);c.push("
                      ")}, -makeUlLineClass:function(b,a){return b.view.showLine&&!a.isLastNode?e.line.LINE:""},removeChildNodes:function(b,a){if(a){var c=b.data.key.children,d=a[c];if(d){for(var f=0,g=d.length;f0)a[c][0].isFirstNode=!0},setLastNode:function(b,a){var c=b.data.key.children,d=a[c].length;if(d>0)a[c][d-1].isLastNode=!0},removeNode:function(b,a){var c=h.getRoot(b),d=b.data.key.children,f=a.parentTId?a.getParentNode():c;a.isFirstNode=!1;a.isLastNode=!1;a.getPreNode=function(){return null};a.getNextNode=function(){return null};if(h.getNodeCache(b,a.tId)){k(a,b).remove();h.removeNodeCache(b,a);h.removeSelectedNode(b,a);for(var g=0,l=f[d].length;g0){var o=f[d][g-1],g=k(o,e.id.UL,b),l=k(o,e.id.SWITCH,b);j=k(o,e.id.ICON,b);f==c?f[d].length==1?i.replaceSwitchClass(o,l,e.line.ROOT):(c=k(f[d][0],e.id.SWITCH,b),i.replaceSwitchClass(f[d][0],c,e.line.ROOTS), -i.replaceSwitchClass(o,l,e.line.BOTTOM)):i.replaceSwitchClass(o,l,e.line.BOTTOM);g.removeClass(e.line.LINE)}}},replaceIcoClass:function(b,a,c){if(a&&!b.isAjaxing&&(b=a.attr("class"),b!=void 0)){b=b.split("_");switch(c){case e.folder.OPEN:case e.folder.CLOSE:case e.folder.DOCU:b[b.length-1]=c}a.attr("class",b.join("_"))}},replaceSwitchClass:function(b,a,c){if(a){var d=a.attr("class");if(d!=void 0){d=d.split("_");switch(c){case e.line.ROOT:case e.line.ROOTS:case e.line.CENTER:case e.line.BOTTOM:case e.line.NOLINE:d[0]= -i.makeNodeLineClassEx(b)+c;break;case e.folder.OPEN:case e.folder.CLOSE:case e.folder.DOCU:d[1]=c}a.attr("class",d.join("_"));c!==e.folder.DOCU?a.removeAttr("disabled"):a.attr("disabled","disabled")}}},selectNode:function(b,a,c){c||i.cancelPreSelectedNode(b,null,a);k(a,e.id.A,b).addClass(e.node.CURSELECTED);h.addSelectedNode(b,a);b.treeObj.trigger(e.event.SELECTED,[m,b.treeId,a])},setNodeFontCss:function(b,a){var c=k(a,e.id.A,b),d=i.makeNodeFontCss(b,a);d&&c.css(d)},setNodeLineIcos:function(b,a){if(a){var c= -k(a,e.id.SWITCH,b),d=k(a,e.id.UL,b),f=k(a,e.id.ICON,b),g=i.makeUlLineClass(b,a);g.length==0?d.removeClass(e.line.LINE):d.addClass(g);c.attr("class",i.makeNodeLineClass(b,a));a.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled");f.removeAttr("style");f.attr("style",i.makeNodeIcoStyle(b,a));f.attr("class",i.makeNodeIcoClass(b,a))}},setNodeName:function(b,a){var c=h.getNodeTitle(b,a),d=k(a,e.id.SPAN,b);d.empty();b.view.nameIsHTML?d.html(h.getNodeName(b,a)):d.text(h.getNodeName(b,a));j.apply(b.view.showTitle, -[b.treeId,a],b.view.showTitle)&&k(a,e.id.A,b).attr("title",!c?"":c)},setNodeTarget:function(b,a){k(a,e.id.A,b).attr("target",i.makeNodeTarget(a))},setNodeUrl:function(b,a){var c=k(a,e.id.A,b),d=i.makeNodeUrl(b,a);d==null||d.length==0?c.removeAttr("href"):c.attr("href",d)},switchNode:function(b,a){a.open||!j.canAsync(b,a)?i.expandCollapseNode(b,a,!a.open):b.async.enable?i.asyncNode(b,a)||i.expandCollapseNode(b,a,!a.open):a&&i.expandCollapseNode(b,a,!a.open)}};p.fn.zTree={consts:{className:{BUTTON:"button", -LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch"},event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove",SELECTED:"ztree_selected",UNSELECTED:"ztree_unselected"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close", -DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_z:{tools:j,view:i,event:m,data:h},getZTreeObj:function(b){return(b=h.getZTreeTools(b))?b:null},destroy:function(b){if(b&&b.length>0)i.destroy(h.getSetting(b));else for(var a in r)i.destroy(r[a])},init:function(b,a,c){var d=j.clone(M);p.extend(!0,d,a);d.treeId=b.attr("id");d.treeObj=b;d.treeObj.empty();r[d.treeId]=d;if(typeof document.body.style.maxHeight==="undefined")d.view.expandSpeed="";h.initRoot(d);b=h.getRoot(d);a=d.data.key.children;c=c?j.clone(j.isArray(c)? -c:[c]):[];b[a]=d.data.simpleData.enable?h.transformTozTreeFormat(d,c):c;h.initCache(d);m.unbindTree(d);m.bindTree(d);m.unbindEvent(d);m.bindEvent(d);c={setting:d,addNodes:function(a,b,c){function e(){i.addNodes(d,a,h,c==!0)}if(!b)return null;a||(a=null);if(a&&!a.isParent&&d.data.keep.leaf)return null;var h=j.clone(j.isArray(b)?b:[b]);j.canAsync(d,a)?i.asyncNode(d,a,c,e):e();return h},cancelSelectedNode:function(a){i.cancelPreSelectedNode(d,a)},destroy:function(){i.destroy(d)},expandAll:function(a){a= -!!a;i.expandCollapseSonNode(d,null,a,!0);return a},expandNode:function(a,b,c,e,m){if(!a||!a.isParent)return null;b!==!0&&b!==!1&&(b=!a.open);if((m=!!m)&&b&&j.apply(d.callback.beforeExpand,[d.treeId,a],!0)==!1)return null;else if(m&&!b&&j.apply(d.callback.beforeCollapse,[d.treeId,a],!0)==!1)return null;b&&a.parentTId&&i.expandCollapseParentNode(d,a.getParentNode(),b,!1);if(b===a.open&&!c)return null;h.getRoot(d).expandTriggerFlag=m;if(!j.canAsync(d,a)&&c)i.expandCollapseSonNode(d,a,b,!0,function(){if(e!== -!1)try{k(a,d).focus().blur()}catch(b){}});else if(a.open=!b,i.switchNode(this.setting,a),e!==!1)try{k(a,d).focus().blur()}catch(p){}return b},getNodes:function(){return h.getNodes(d)},getNodeByParam:function(a,b,c){return!a?null:h.getNodeByParam(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodeByTId:function(a){return h.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return!a?null:h.getNodesByParam(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodesByParamFuzzy:function(a,b,c){return!a? -null:h.getNodesByParamFuzzy(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodesByFilter:function(a,b,c,e){b=!!b;return!a||typeof a!="function"?b?null:[]:h.getNodesByFilter(d,c?c[d.data.key.children]:h.getNodes(d),a,b,e)},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():h.getRoot(d),e=0,i=c[b].length;e0?i.createNodes(d,0,b[a]):d.async.enable&& -d.async.url&&d.async.url!==""&&i.asyncNode(d);return c}};var N=p.fn.zTree,k=j.$,e=N.consts})(jQuery); - -/* - * JQuery zTree excheck v3.5.18 - * http://zTree.me/ - * - * Copyright (c) 2010 Hunter.z - * - * Licensed same as jquery - MIT License - * http://www.opensource.org/licenses/mit-license.php - * - * email: hunter.z@263.net - * Date: 2015-05-25 - */ -(function(m){var p,q,r,o={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{STYLE:"checkbox",DEFAULT:"chk",DISABLED:"disable",FALSE:"false",TRUE:"true",FULL:"full",PART:"part",FOCUS:"focus"},radio:{STYLE:"radio",TYPE_ALL:"all",TYPE_LEVEL:"level"}},v={check:{enable:!1,autoCheckTrigger:!1,chkStyle:o.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:o.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}};p=function(c, -a){if(a.chkDisabled===!0)return!1;var b=f.getSetting(c.data.treeId),d=b.data.key.checked;if(k.apply(b.callback.beforeCheck,[b.treeId,a],!0)==!1)return!0;a[d]=!a[d];e.checkNodeRelation(b,a);d=n(a,j.id.CHECK,b);e.setChkClass(b,d,a);e.repairParentChkClassWithSelf(b,a);b.treeObj.trigger(j.event.CHECK,[c,b.treeId,a]);return!0};q=function(c,a){if(a.chkDisabled===!0)return!1;var b=f.getSetting(c.data.treeId),d=n(a,j.id.CHECK,b);a.check_Focus=!0;e.setChkClass(b,d,a);return!0};r=function(c,a){if(a.chkDisabled=== -!0)return!1;var b=f.getSetting(c.data.treeId),d=n(a,j.id.CHECK,b);a.check_Focus=!1;e.setChkClass(b,d,a);return!0};m.extend(!0,m.fn.zTree.consts,o);m.extend(!0,m.fn.zTree._z,{tools:{},view:{checkNodeRelation:function(c,a){var b,d,h,i=c.data.key.children,l=c.data.key.checked;b=j.radio;if(c.check.chkStyle==b.STYLE){var g=f.getRadioCheckedList(c);if(a[l])if(c.check.radioType==b.TYPE_ALL){for(d=g.length-1;d>=0;d--)b=g[d],b[l]&&b!=a&&(b[l]=!1,g.splice(d,1),e.setChkClass(c,n(b,j.id.CHECK,c),b),b.parentTId!= -a.parentTId&&e.repairParentChkClassWithSelf(c,b));g.push(a)}else{g=a.parentTId?a.getParentNode():f.getRoot(c);for(d=0,h=g[i].length;d-1)&&e.setSonNodeCheckBox(c,a,!0),!a[l]&&(!a[i]||a[i].length==0||c.check.chkboxType.N.indexOf("s")>-1)&&e.setSonNodeCheckBox(c, -a,!1),a[l]&&c.check.chkboxType.Y.indexOf("p")>-1&&e.setParentNodeCheckBox(c,a,!0),!a[l]&&c.check.chkboxType.N.indexOf("p")>-1&&e.setParentNodeCheckBox(c,a,!1)},makeChkClass:function(c,a){var b=c.data.key.checked,d=j.checkbox,h=j.radio,i="",i=a.chkDisabled===!0?d.DISABLED:a.halfCheck?d.PART:c.check.chkStyle==h.STYLE?a.check_Child_State<1?d.FULL:d.PART:a[b]?a.check_Child_State===2||a.check_Child_State===-1?d.FULL:d.PART:a.check_Child_State<1?d.FULL:d.PART,b=c.check.chkStyle+"_"+(a[b]?d.TRUE:d.FALSE)+ -"_"+i,b=a.check_Focus&&a.chkDisabled!==!0?b+"_"+d.FOCUS:b;return j.className.BUTTON+" "+d.DEFAULT+" "+b},repairAllChk:function(c,a){if(c.check.enable&&c.check.chkStyle===j.checkbox.STYLE)for(var b=c.data.key.checked,d=c.data.key.children,h=f.getRoot(c),i=0,l=h[d].length;i0?e.repairParentChkClass(c,a[b][0]):e.repairParentChkClass(c,a)}},repairSonChkDisabled:function(c,a,b,d){if(a){var h=c.data.key.children;if(a.chkDisabled!=b)a.chkDisabled=b;e.repairChkClass(c,a);if(a[h]&&d)for(var i=0,l=a[h].length;i0){l=!1;break}l&&e.setParentNodeCheckBox(c,a.getParentNode(),b,d)}},setSonNodeCheckBox:function(c,a,b,d){if(a){var h=c.data.key.children,i=c.data.key.checked,l=n(a,j.id.CHECK,c);d||(d=a);var g=!1;if(a[h])for(var k=0,m=a[h].length;k0?b?2:0:-1}else a.check_Child_State=-1;e.setChkClass(c,l,a);c.check.autoCheckTrigger&&a!=d&&a.nocheck!==!0&&a.chkDisabled!==!0&&c.treeObj.trigger(j.event.CHECK,[null,c.treeId,a])}}}},event:{},data:{getRadioCheckedList:function(c){for(var a=f.getRoot(c).radioCheckedList,b=0,d=a.length;b-1&&a.check_Child_State<2:a.check_Child_State>0}},getTreeCheckedNodes:function(c,a,b,d){if(!a)return[];for(var h=c.data.key.children,i=c.data.key.checked,e=b&&c.check.chkStyle==j.radio.STYLE&&c.check.radioType==j.radio.TYPE_ALL, -d=!d?[]:d,g=0,k=a.length;g0)break}return d},getTreeChangeCheckedNodes:function(c,a,b){if(!a)return[];for(var d=c.data.key.children,h=c.data.key.checked,b=!b?[]:b,i=0,e=a.length;i0?2:0,f==2){h=2;break}else f==0&&(h=0);else if(c.check.chkStyle==j.checkbox.STYLE)if(f=g.nocheck===!0||g.chkDisabled===!0?g.check_Child_State:g.halfCheck===!0?1:g[d]?g.check_Child_State===-1||g.check_Child_State===2?2:1:g.check_Child_State>0?1:0,f===1){h=1;break}else if(f=== -2&&h>-1&&i>0&&f!==h){h=1;break}else if(h===2&&f>-1&&f<2){h=1;break}else f>-1&&(h=f)}a.check_Child_State=h}}}});var m=m.fn.zTree,k=m._z.tools,j=m.consts,e=m._z.view,f=m._z.data,n=k.$;f.exSetting(v);f.addInitBind(function(c){c.treeObj.bind(j.event.CHECK,function(a,b,d,h){a.srcEvent=b;k.apply(c.callback.onCheck,[a,d,h])})});f.addInitUnBind(function(c){c.treeObj.unbind(j.event.CHECK)});f.addInitCache(function(){});f.addInitNode(function(c,a,b,d){if(b){a=c.data.key.checked;typeof b[a]=="string"&&(b[a]= -k.eqs(b[a],"true"));b[a]=!!b[a];b.checkedOld=b[a];if(typeof b.nocheck=="string")b.nocheck=k.eqs(b.nocheck,"true");b.nocheck=!!b.nocheck||c.check.nocheckInherit&&d&&!!d.nocheck;if(typeof b.chkDisabled=="string")b.chkDisabled=k.eqs(b.chkDisabled,"true");b.chkDisabled=!!b.chkDisabled||c.check.chkDisabledInherit&&d&&!!d.chkDisabled;if(typeof b.halfCheck=="string")b.halfCheck=k.eqs(b.halfCheck,"true");b.halfCheck=!!b.halfCheck;b.check_Child_State=-1;b.check_Focus=!1;b.getCheckStatus=function(){return f.getCheckStatus(c, -b)};c.check.chkStyle==j.radio.STYLE&&c.check.radioType==j.radio.TYPE_ALL&&b[a]&&f.getRoot(c).radioCheckedList.push(b)}});f.addInitProxy(function(c){var a=c.target,b=f.getSetting(c.data.treeId),d="",h=null,e="",l=null;if(k.eqs(c.type,"mouseover")){if(b.check.enable&&k.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+j.id.CHECK)!==null)d=k.getNodeMainDom(a).id,e="mouseoverCheck"}else if(k.eqs(c.type,"mouseout")){if(b.check.enable&&k.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+j.id.CHECK)!==null)d= -k.getNodeMainDom(a).id,e="mouseoutCheck"}else if(k.eqs(c.type,"click")&&b.check.enable&&k.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+j.id.CHECK)!==null)d=k.getNodeMainDom(a).id,e="checkNode";if(d.length>0)switch(h=f.getNodeCache(b,d),e){case "checkNode":l=p;break;case "mouseoverCheck":l=q;break;case "mouseoutCheck":l=r}return{stop:e==="checkNode",node:h,nodeEventType:e,nodeEventCallback:l,treeEventType:"",treeEventCallback:null}},!0);f.addInitRoot(function(c){f.getRoot(c).radioCheckedList=[]}); -f.addBeforeA(function(c,a,b){c.check.enable&&(f.makeChkFlag(c,a),b.push(""))});f.addZTreeTools(function(c,a){a.checkNode=function(a,b,c,f){var g=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[g]),f=!!f,(a[g]!==b||c)&&!(f&&k.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0)==!1)&&k.uCanDo(this.setting)&&this.setting.check.enable&& -a.nocheck!==!0))a[g]=b,b=n(a,j.id.CHECK,this.setting),(c||this.setting.check.chkStyle===j.radio.STYLE)&&e.checkNodeRelation(this.setting,a),e.setChkClass(this.setting,b,a),e.repairParentChkClassWithSelf(this.setting,a),f&&this.setting.treeObj.trigger(j.event.CHECK,[null,this.setting.treeId,a])};a.checkAllNodes=function(a){e.repairAllChk(this.setting,!!a)};a.getCheckedNodes=function(a){var b=this.setting.data.key.children;return f.getTreeCheckedNodes(this.setting,f.getRoot(this.setting)[b],a!==!1)}; -a.getChangeCheckedNodes=function(){var a=this.setting.data.key.children;return f.getTreeChangeCheckedNodes(this.setting,f.getRoot(this.setting)[a])};a.setChkDisabled=function(a,b,c,f){b=!!b;c=!!c;e.repairSonChkDisabled(this.setting,a,b,!!f);e.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var b=a.updateNode;a.updateNode=function(c,f){b&&b.apply(a,arguments);if(c&&this.setting.check.enable&&n(c,this.setting).get(0)&&k.uCanDo(this.setting)){var i=n(c,j.id.CHECK,this.setting);(f==!0||this.setting.check.chkStyle=== -j.radio.STYLE)&&e.checkNodeRelation(this.setting,c);e.setChkClass(this.setting,i,c);e.repairParentChkClassWithSelf(this.setting,c)}}});var s=e.createNodes;e.createNodes=function(c,a,b,d){s&&s.apply(e,arguments);b&&e.repairParentChkClassWithSelf(c,d)};var t=e.removeNode;e.removeNode=function(c,a){var b=a.getParentNode();t&&t.apply(e,arguments);a&&b&&(e.repairChkClass(c,b),e.repairParentChkClass(c,b))};var u=e.appendNodes;e.appendNodes=function(c,a,b,d,h,i){var j="";u&&(j=u.apply(e,arguments));d&&f.makeChkFlag(c, -d);return j}})(jQuery); - -/* - * JQuery zTree exedit v3.5.18 - * http://zTree.me/ - * - * Copyright (c) 2010 Hunter.z - * - * Licensed same as jquery - MIT License - * http://www.opensource.org/licenses/mit-license.php - * - * email: hunter.z@263.net - * Date: 2015-05-25 - */ -(function(w){var I={event:{DRAG:"ztree_drag",DROP:"ztree_drop",RENAME:"ztree_rename",DRAGMOVE:"ztree_dragmove"},id:{EDIT:"_edit",INPUT:"_input",REMOVE:"_remove"},move:{TYPE_INNER:"inner",TYPE_PREV:"prev",TYPE_NEXT:"next"},node:{CURSELECTED_EDIT:"curSelectedNode_Edit",TMPTARGET_TREE:"tmpTargetzTree",TMPTARGET_NODE:"tmpTargetNode"}},x={onHoverOverNode:function(b,a){var c=m.getSetting(b.data.treeId),d=m.getRoot(c);if(d.curHoverNode!=a)x.onHoverOutNode(b);d.curHoverNode=a;f.addHoverDom(c,a)},onHoverOutNode:function(b){var b= -m.getSetting(b.data.treeId),a=m.getRoot(b);if(a.curHoverNode&&!m.isSelectedNode(b,a.curHoverNode))f.removeTreeDom(b,a.curHoverNode),a.curHoverNode=null},onMousedownNode:function(b,a){function c(b){if(C.dragFlag==0&&Math.abs(N-b.clientX)1){var j=l[0].parentTId?l[0].getParentNode()[i]:m.getNodes(e);i=[];for(a=0,c=j.length;a-1&&k+1!==a&&(n=!1),i.push(j[a]),k=a),l.length===i.length){l=i;break}}n&&(H=l[0].getPreNode(),R=l[l.length-1].getNextNode());D=o("
                        ", -e);for(a=0,c=l.length;a0),f.removeTreeDom(e,n),a>e.edit.drag.maxShowNodeNum-1||(k=o("
                      • ",e),k.append(o(n,d.id.A,e).clone()),k.css("padding","0"),k.children("#"+n.tId+d.id.A).removeClass(d.node.CURSELECTED),D.append(k),a==e.edit.drag.maxShowNodeNum-1&&(k=o("
                      • ...
                      • ",e),D.append(k)));D.attr("id",l[0].tId+d.id.UL+"_tmp");D.addClass(e.treeObj.attr("class"));D.appendTo(M);B=o("", -e);B.attr("id","zTreeMove_arrow_tmp");B.appendTo(M);e.treeObj.trigger(d.event.DRAG,[b,e.treeId,l])}if(C.dragFlag==1){s&&B.attr("id")==b.target.id&&u&&b.clientX+F.scrollLeft()+2>w("#"+u+d.id.A,s).offset().left?(n=w("#"+u+d.id.A,s),b.target=n.length>0?n.get(0):b.target):s&&(s.removeClass(d.node.TMPTARGET_TREE),u&&w("#"+u+d.id.A,s).removeClass(d.node.TMPTARGET_NODE+"_"+d.move.TYPE_PREV).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_NEXT).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_INNER)); -u=s=null;J=!1;h=e;n=m.getSettings();for(var y in n)if(n[y].treeId&&n[y].edit.enable&&n[y].treeId!=e.treeId&&(b.target.id==n[y].treeId||w(b.target).parents("#"+n[y].treeId).length>0))J=!0,h=n[y];y=F.scrollTop();k=F.scrollLeft();i=h.treeObj.offset();a=h.treeObj.get(0).scrollHeight;n=h.treeObj.get(0).scrollWidth;c=b.clientY+y-i.top;var p=h.treeObj.height()+i.top-b.clientY-y,q=b.clientX+k-i.left,x=h.treeObj.width()+i.left-b.clientX-k;i=ce.edit.drag.borderMin;var j=pe.edit.drag.borderMin,K=qe.edit.drag.borderMin,G=xe.edit.drag.borderMin,p=c>e.edit.drag.borderMin&&p>e.edit.drag.borderMin&&q>e.edit.drag.borderMin&&x>e.edit.drag.borderMin,q=i&&h.treeObj.scrollTop()<=0,x=j&&h.treeObj.scrollTop()+h.treeObj.height()+10>=a,P=K&&h.treeObj.scrollLeft()<=0,Q=G&&h.treeObj.scrollLeft()+h.treeObj.width()+10>=n;if(b.target&&g.isChildOrSelf(b.target,h.treeId)){for(var E=b.target;E&&E.tagName&&!g.eqs(E.tagName,"li")&&E.id!= -h.treeId;)E=E.parentNode;var S=!0;for(a=0,c=l.length;a0){S=!1;break}if(S&&b.target&&g.isChildOrSelf(b.target,E.id+d.id.A))s=w(E),u=E.id}n=l[0];if(p&&g.isChildOrSelf(b.target,h.treeId)){if(!s&&(b.target.id==h.treeId||q||x||P||Q)&&(J||!J&&n.parentTId))s=h.treeObj;i?h.treeObj.scrollTop(h.treeObj.scrollTop()-10):j&&h.treeObj.scrollTop(h.treeObj.scrollTop()+10);K?h.treeObj.scrollLeft(h.treeObj.scrollLeft()-10):G&&h.treeObj.scrollLeft(h.treeObj.scrollLeft()+ -10);s&&s!=h.treeObj&&s.offset().left=-0.2)&&n?(a=1-B.width(),i=j-B.height()/2,v=d.move.TYPE_PREV):(G==0||y>=G&&y<=1.2)&&a?(a=1-B.width(),i=i==null||z.isParent&&z.open?j+c.height()-B.height()/2:i.offset().top-B.height()/2,v=d.move.TYPE_NEXT):(a=5-B.width(),i=j,v=d.move.TYPE_INNER);B.css({display:"block",top:i+"px",left:k+a+"px"});c.addClass(d.node.TMPTARGET_NODE+"_"+v);if(T!=u||U!=v)L=(new Date).getTime();if(z&&z.isParent&&v==d.move.TYPE_INNER&&(y=!0,window.zTreeMoveTimer&& -window.zTreeMoveTargetNodeTId!==z.tId?(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null):window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId===z.tId&&(y=!1),y))window.zTreeMoveTimer=setTimeout(function(){v==d.move.TYPE_INNER&&z&&z.isParent&&!z.open&&(new Date).getTime()-L>h.edit.drag.autoOpenTime&&g.apply(h.callback.beforeDragOpen,[h.treeId,z],!0)&&(f.switchNode(h,z),h.edit.drag.autoExpandTrigger&&h.treeObj.trigger(d.event.EXPAND,[h.treeId,z]))},h.edit.drag.autoOpenTime+50), -window.zTreeMoveTargetNodeTId=z.tId}}else if(v=d.move.TYPE_INNER,s&&g.apply(h.edit.drag.inner,[h.treeId,l,null],!!h.edit.drag.inner)?s.addClass(d.node.TMPTARGET_TREE):s=null,B.css({display:"none"}),window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null;T=u;U=v;e.treeObj.trigger(d.event.DRAGMOVE,[b,e.treeId,l])}return!1}function r(b){if(window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null;U=T=null;F.unbind("mousemove",c); -F.unbind("mouseup",r);F.unbind("selectstart",k);M.css("cursor","auto");s&&(s.removeClass(d.node.TMPTARGET_TREE),u&&w("#"+u+d.id.A,s).removeClass(d.node.TMPTARGET_NODE+"_"+d.move.TYPE_PREV).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_NEXT).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_INNER));g.showIfameMask(e,!1);t.showHoverDom=!0;if(C.dragFlag!=0){C.dragFlag=0;var a,i,j;for(a=0,i=l.length;a0;)c.dragMaskList[0].remove(),c.dragMaskList.shift();if(a)for(var d=o("iframe",b),f=0,i=d.length;f
                        ",b);j.appendTo(o("body",b));c.dragMaskList.push(j)}}},view:{addEditBtn:function(b, -a){if(!(a.editNameFlag||o(a,d.id.EDIT,b).length>0)&&g.apply(b.edit.showRenameBtn,[b.treeId,a],b.edit.showRenameBtn)){var c=o(a,d.id.A,b),r="";c.append(r);o(a,d.id.EDIT,b).bind("click",function(){if(!g.uCanDo(b)||g.apply(b.callback.beforeEditName,[b.treeId,a],!0)==!1)return!1;f.editNode(b,a);return!1}).show()}}, -addRemoveBtn:function(b,a){if(!(a.editNameFlag||o(a,d.id.REMOVE,b).length>0)&&g.apply(b.edit.showRemoveBtn,[b.treeId,a],b.edit.showRemoveBtn)){var c=o(a,d.id.A,b),r="";c.append(r);o(a,d.id.REMOVE,b).bind("click",function(){if(!g.uCanDo(b)||g.apply(b.callback.beforeRemove,[b.treeId,a],!0)==!1)return!1;f.removeNode(b, -a);b.treeObj.trigger(d.event.REMOVE,[b.treeId,a]);return!1}).bind("mousedown",function(){return!0}).show()}},addHoverDom:function(b,a){if(m.getRoots().showHoverDom)a.isHover=!0,b.edit.enable&&(f.addEditBtn(b,a),f.addRemoveBtn(b,a)),g.apply(b.view.addHoverDom,[b.treeId,a])},cancelCurEditNode:function(b,a,c){var r=m.getRoot(b),k=b.data.key.name,i=r.curEditNode;if(i){var j=r.curEditInput,a=a?a:c?i[k]:j.val();if(g.apply(b.callback.beforeRename,[b.treeId,i,a,c],!0)===!1)return!1;i[k]=a;o(i,d.id.A,b).removeClass(d.node.CURSELECTED_EDIT); -j.unbind();f.setNodeName(b,i);i.editNameFlag=!1;r.curEditNode=null;r.curEditInput=null;f.selectNode(b,i,!1);b.treeObj.trigger(d.event.RENAME,[b.treeId,i,c])}return r.noSelection=!0},editNode:function(b,a){var c=m.getRoot(b);f.editNodeBlur=!1;if(m.isSelectedNode(b,a)&&c.curEditNode==a&&a.editNameFlag)setTimeout(function(){g.inputFocus(c.curEditInput)},0);else{var r=b.data.key.name;a.editNameFlag=!0;f.removeTreeDom(b,a);f.cancelCurEditNode(b);f.selectNode(b,a,!1);o(a,d.id.SPAN,b).html("");var k=o(a,d.id.INPUT,b);k.attr("value",a[r]);b.edit.editNameSelectAll?g.inputSelect(k):g.inputFocus(k);k.bind("blur",function(){f.editNodeBlur||f.cancelCurEditNode(b)}).bind("keydown",function(a){a.keyCode=="13"?(f.editNodeBlur=!0,f.cancelCurEditNode(b)):a.keyCode=="27"&&f.cancelCurEditNode(b,null,!0)}).bind("click",function(){return!1}).bind("dblclick",function(){return!1});o(a,d.id.A,b).addClass(d.node.CURSELECTED_EDIT);c.curEditInput=k;c.noSelection= -!1;c.curEditNode=a}},moveNode:function(b,a,c,r,k,i){var j=m.getRoot(b),e=b.data.key.children;if(a!=c&&(!b.data.keep.leaf||!a||a.isParent||r!=d.move.TYPE_INNER)){var g=c.parentTId?c.getParentNode():j,t=a===null||a==j;t&&a===null&&(a=j);if(t)r=d.move.TYPE_INNER;j=a.parentTId?a.getParentNode():j;if(r!=d.move.TYPE_PREV&&r!=d.move.TYPE_NEXT)r=d.move.TYPE_INNER;if(r==d.move.TYPE_INNER)if(t)c.parentTId=null;else{if(!a.isParent)a.isParent=!0,a.open=!!a.open,f.setNodeLineIcos(b,a);c.parentTId=a.tId}var p; -t?p=t=b.treeObj:(!i&&r==d.move.TYPE_INNER?f.expandCollapseNode(b,a,!0,!1):i||f.expandCollapseNode(b,a.getParentNode(),!0,!1),t=o(a,b),p=o(a,d.id.UL,b),t.get(0)&&!p.get(0)&&(p=[],f.makeUlHtml(b,a,p,""),t.append(p.join(""))),p=o(a,d.id.UL,b));var q=o(c,b);q.get(0)?t.get(0)||q.remove():q=f.appendNodes(b,c.level,[c],null,!1,!0).join("");p.get(0)&&r==d.move.TYPE_INNER?p.append(q):t.get(0)&&r==d.move.TYPE_PREV?t.before(q):t.get(0)&&r==d.move.TYPE_NEXT&&t.after(q);var l=-1,w=0,x=null,t=null,D=c.level;if(c.isFirstNode){if(l= -0,g[e].length>1)x=g[e][1],x.isFirstNode=!0}else if(c.isLastNode)l=g[e].length-1,x=g[e][l-1],x.isLastNode=!0;else for(p=0,q=g[e].length;p=0&&g[e].splice(l,1);if(r!=d.move.TYPE_INNER)for(p=0,q=j[e].length;p0)t=a[e][a[e].length-1],t.isLastNode=!1;a[e].splice(a[e].length,0,c);c.isLastNode=!0;c.isFirstNode=a[e].length==1}else a.isFirstNode&&r==d.move.TYPE_PREV?(j[e].splice(w, -0,c),t=a,t.isFirstNode=!1,c.parentTId=a.parentTId,c.isFirstNode=!0,c.isLastNode=!1):a.isLastNode&&r==d.move.TYPE_NEXT?(j[e].splice(w+1,0,c),t=a,t.isLastNode=!1,c.parentTId=a.parentTId,c.isFirstNode=!1,c.isLastNode=!0):(r==d.move.TYPE_PREV?j[e].splice(w,0,c):j[e].splice(w+1,0,c),c.parentTId=a.parentTId,c.isFirstNode=!1,c.isLastNode=!1);m.fixPIdKeyValue(b,c);m.setSonNodeLevel(b,c.getParentNode(),c);f.setNodeLineIcos(b,c);f.repairNodeLevelClass(b,c,D);!b.data.keep.parent&&g[e].length<1?(g.isParent=!1, -g.open=!1,a=o(g,d.id.UL,b),r=o(g,d.id.SWITCH,b),e=o(g,d.id.ICON,b),f.replaceSwitchClass(g,r,d.folder.DOCU),f.replaceIcoClass(g,e,d.folder.DOCU),a.css("display","none")):x&&f.setNodeLineIcos(b,x);t&&f.setNodeLineIcos(b,t);b.check&&b.check.enable&&f.repairChkClass&&(f.repairChkClass(b,g),f.repairParentChkClassWithSelf(b,g),g!=c.parent&&f.repairParentChkClassWithSelf(b,c));i||f.expandCollapseParentNode(b,c.getParentNode(),!0,k)}},removeEditBtn:function(b,a){o(a,d.id.EDIT,b).unbind().remove()},removeRemoveBtn:function(b, -a){o(a,d.id.REMOVE,b).unbind().remove()},removeTreeDom:function(b,a){a.isHover=!1;f.removeEditBtn(b,a);f.removeRemoveBtn(b,a);g.apply(b.view.removeHoverDom,[b.treeId,a])},repairNodeLevelClass:function(b,a,c){if(c!==a.level){var f=o(a,b),g=o(a,d.id.A,b),b=o(a,d.id.UL,b),c=d.className.LEVEL+c,a=d.className.LEVEL+a.level;f.removeClass(c);f.addClass(a);g.removeClass(c);g.addClass(a);b.removeClass(c);b.addClass(a)}},selectNodes:function(b,a){for(var c=0,d=a.length;c0)}},event:{}, -data:{setSonNodeLevel:function(b,a,c){if(c){var d=b.data.key.children;c.level=a?a.level+1:0;if(c[d])for(var a=0,f=c[d].length;a0)switch(i=m.getNodeCache(c,k),j){case "mousedownNode":e=x.onMousedownNode;break;case "hoverOverNode":e=x.onHoverOverNode;break;case "hoverOutNode":e=x.onHoverOutNode}return{stop:!1, -node:i,nodeEventType:j,nodeEventCallback:e,treeEventType:"",treeEventCallback:null}});m.addInitRoot(function(b){var b=m.getRoot(b),a=m.getRoots();b.curEditNode=null;b.curEditInput=null;b.curHoverNode=null;b.dragFlag=0;b.dragNodeShowBefore=[];b.dragMaskList=[];a.showHoverDom=!0});m.addZTreeTools(function(b,a){a.cancelEditName=function(a){m.getRoot(this.setting).curEditNode&&f.cancelCurEditNode(this.setting,a?a:null,!0)};a.copyNode=function(a,b,k,i){if(!b)return null;if(a&&!a.isParent&&this.setting.data.keep.leaf&& -k===d.move.TYPE_INNER)return null;var j=this,e=g.clone(b);if(!a)a=null,k=d.move.TYPE_INNER;k==d.move.TYPE_INNER?(b=function(){f.addNodes(j.setting,a,[e],i)},g.canAsync(this.setting,a)?f.asyncNode(this.setting,a,i,b):b()):(f.addNodes(this.setting,a.parentNode,[e],i),f.moveNode(this.setting,a,e,k,!1,i));return e};a.editName=function(a){a&&a.tId&&a===m.getNodeCache(this.setting,a.tId)&&(a.parentTId&&f.expandCollapseParentNode(this.setting,a.getParentNode(),!0),f.editNode(this.setting,a))};a.moveNode= -function(a,b,k,i){function j(){f.moveNode(e.setting,a,b,k,!1,i)}if(!b)return b;if(a&&!a.isParent&&this.setting.data.keep.leaf&&k===d.move.TYPE_INNER)return null;else if(a&&(b.parentTId==a.tId&&k==d.move.TYPE_INNER||o(b,this.setting).find("#"+a.tId).length>0))return null;else a||(a=null);var e=this;g.canAsync(this.setting,a)&&k===d.move.TYPE_INNER?f.asyncNode(this.setting,a,i,j):j();return b};a.setEditable=function(a){this.setting.edit.enable=a;return this.refresh()}});var N=f.cancelPreSelectedNode; -f.cancelPreSelectedNode=function(b,a){for(var c=m.getRoot(b).curSelectedList,d=0,g=c.length;d 0 && tId.length == 0) { - tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]); - if (tmp) {tId = tools.getNodeMainDom(tmp).id;} - } - // event to node - if (tId.length>0) { - node = data.getNodeCache(setting, tId); - switch (nodeEventType) { - case "switchNode" : - if (!node.isParent) { - nodeEventType = ""; - } else if (tools.eqs(event.type, "click") - || (tools.eqs(event.type, "dblclick") && tools.apply(setting.view.dblClickExpand, [setting.treeId, node], setting.view.dblClickExpand))) { - nodeEventCallback = handler.onSwitchNode; - } else { - nodeEventType = ""; - } - break; - case "clickNode" : - nodeEventCallback = handler.onClickNode; - break; - } - } - // event to zTree - switch (treeEventType) { - case "mousedown" : - treeEventCallback = handler.onZTreeMousedown; - break; - case "mouseup" : - treeEventCallback = handler.onZTreeMouseup; - break; - case "dblclick" : - treeEventCallback = handler.onZTreeDblclick; - break; - case "contextmenu" : - treeEventCallback = handler.onZTreeContextmenu; - break; - } - var proxyResult = { - stop: false, - node: node, - nodeEventType: nodeEventType, - nodeEventCallback: nodeEventCallback, - treeEventType: treeEventType, - treeEventCallback: treeEventCallback - }; - return proxyResult - }, - //default init node of core - _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { - if (!n) return; - var r = data.getRoot(setting), - childKey = setting.data.key.children; - n.level = level; - n.tId = setting.treeId + "_" + (++r.zId); - n.parentTId = parentNode ? parentNode.tId : null; - n.open = (typeof n.open == "string") ? tools.eqs(n.open, "true") : !!n.open; - if (n[childKey] && n[childKey].length > 0) { - n.isParent = true; - n.zAsync = true; - } else { - n.isParent = (typeof n.isParent == "string") ? tools.eqs(n.isParent, "true") : !!n.isParent; - n.open = (n.isParent && !setting.async.enable) ? n.open : false; - n.zAsync = !n.isParent; - } - n.isFirstNode = isFirstNode; - n.isLastNode = isLastNode; - n.getParentNode = function() {return data.getNodeCache(setting, n.parentTId);}; - n.getPreNode = function() {return data.getPreNode(setting, n);}; - n.getNextNode = function() {return data.getNextNode(setting, n);}; - n.isAjaxing = false; - data.fixPIdKeyValue(setting, n); - }, - _init = { - bind: [_bindEvent], - unbind: [_unbindEvent], - caches: [_initCache], - nodes: [_initNode], - proxys: [_eventProxy], - roots: [_initRoot], - beforeA: [], - afterA: [], - innerBeforeA: [], - innerAfterA: [], - zTreeTools: [] - }, - //method of operate data - data = { - addNodeCache: function(setting, node) { - data.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = node; - }, - getNodeCacheId: function(tId) { - return tId.substring(tId.lastIndexOf("_")+1); - }, - addAfterA: function(afterA) { - _init.afterA.push(afterA); - }, - addBeforeA: function(beforeA) { - _init.beforeA.push(beforeA); - }, - addInnerAfterA: function(innerAfterA) { - _init.innerAfterA.push(innerAfterA); - }, - addInnerBeforeA: function(innerBeforeA) { - _init.innerBeforeA.push(innerBeforeA); - }, - addInitBind: function(bindEvent) { - _init.bind.push(bindEvent); - }, - addInitUnBind: function(unbindEvent) { - _init.unbind.push(unbindEvent); - }, - addInitCache: function(initCache) { - _init.caches.push(initCache); - }, - addInitNode: function(initNode) { - _init.nodes.push(initNode); - }, - addInitProxy: function(initProxy, isFirst) { - if (!!isFirst) { - _init.proxys.splice(0,0,initProxy); - } else { - _init.proxys.push(initProxy); - } - }, - addInitRoot: function(initRoot) { - _init.roots.push(initRoot); - }, - addNodesData: function(setting, parentNode, nodes) { - var childKey = setting.data.key.children; - if (!parentNode[childKey]) parentNode[childKey] = []; - if (parentNode[childKey].length > 0) { - parentNode[childKey][parentNode[childKey].length - 1].isLastNode = false; - view.setNodeLineIcos(setting, parentNode[childKey][parentNode[childKey].length - 1]); - } - parentNode.isParent = true; - parentNode[childKey] = parentNode[childKey].concat(nodes); - }, - addSelectedNode: function(setting, node) { - var root = data.getRoot(setting); - if (!data.isSelectedNode(setting, node)) { - root.curSelectedList.push(node); - } - }, - addCreatedNode: function(setting, node) { - if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) { - var root = data.getRoot(setting); - root.createdNodes.push(node); - } - }, - addZTreeTools: function(zTreeTools) { - _init.zTreeTools.push(zTreeTools); - }, - exSetting: function(s) { - $.extend(true, _setting, s); - }, - fixPIdKeyValue: function(setting, node) { - if (setting.data.simpleData.enable) { - node[setting.data.simpleData.pIdKey] = node.parentTId ? node.getParentNode()[setting.data.simpleData.idKey] : setting.data.simpleData.rootPId; - } - }, - getAfterA: function(setting, node, array) { - for (var i=0, j=_init.afterA.length; i-1) { - result.push(nodes[i]); - } - result = result.concat(data.getNodesByParamFuzzy(setting, nodes[i][childKey], key, value)); - } - return result; - }, - getNodesByFilter: function(setting, nodes, filter, isSingle, invokeParam) { - if (!nodes) return (isSingle ? null : []); - var childKey = setting.data.key.children, - result = isSingle ? null : []; - for (var i = 0, l = nodes.length; i < l; i++) { - if (tools.apply(filter, [nodes[i], invokeParam], false)) { - if (isSingle) {return nodes[i];} - result.push(nodes[i]); - } - var tmpResult = data.getNodesByFilter(setting, nodes[i][childKey], filter, isSingle, invokeParam); - if (isSingle && !!tmpResult) {return tmpResult;} - result = isSingle ? tmpResult : result.concat(tmpResult); - } - return result; - }, - getPreNode: function(setting, node) { - if (!node) return null; - var childKey = setting.data.key.children, - p = node.parentTId ? node.getParentNode() : data.getRoot(setting); - for (var i=0, l=p[childKey].length; i 0))); - }, - clone: function (obj){ - if (obj === null) return null; - var o = tools.isArray(obj) ? [] : {}; - for(var i in obj){ - o[i] = (obj[i] instanceof Date) ? new Date(obj[i].getTime()) : (typeof obj[i] === "object" ? arguments.callee(obj[i]) : obj[i]); - } - return o; - }, - eqs: function(str1, str2) { - return str1.toLowerCase() === str2.toLowerCase(); - }, - isArray: function(arr) { - return Object.prototype.toString.apply(arr) === "[object Array]"; - }, - $: function(node, exp, setting) { - if (!!exp && typeof exp != "string") { - setting = exp; - exp = ""; - } - if (typeof node == "string") { - return $(node, setting ? setting.treeObj.get(0).ownerDocument : null); - } else { - return $("#" + node.tId + exp, setting ? setting.treeObj : null); - } - }, - getMDom: function (setting, curDom, targetExpr) { - if (!curDom) return null; - while (curDom && curDom.id !== setting.treeId) { - for (var i=0, l=targetExpr.length; curDom.tagName && i 0 ); - }, - uCanDo: function(setting, e) { - return true; - } - }, - //method of operate ztree dom - view = { - addNodes: function(setting, parentNode, newNodes, isSilent) { - if (setting.data.keep.leaf && parentNode && !parentNode.isParent) { - return; - } - if (!tools.isArray(newNodes)) { - newNodes = [newNodes]; - } - if (setting.data.simpleData.enable) { - newNodes = data.transformTozTreeFormat(setting, newNodes); - } - if (parentNode) { - var target_switchObj = $$(parentNode, consts.id.SWITCH, setting), - target_icoObj = $$(parentNode, consts.id.ICON, setting), - target_ulObj = $$(parentNode, consts.id.UL, setting); - - if (!parentNode.open) { - view.replaceSwitchClass(parentNode, target_switchObj, consts.folder.CLOSE); - view.replaceIcoClass(parentNode, target_icoObj, consts.folder.CLOSE); - parentNode.open = false; - target_ulObj.css({ - "display": "none" - }); - } - - data.addNodesData(setting, parentNode, newNodes); - view.createNodes(setting, parentNode.level + 1, newNodes, parentNode); - if (!isSilent) { - view.expandCollapseParentNode(setting, parentNode, true); - } - } else { - data.addNodesData(setting, data.getRoot(setting), newNodes); - view.createNodes(setting, 0, newNodes, null); - } - }, - appendNodes: function(setting, level, nodes, parentNode, initFlag, openFlag) { - if (!nodes) return []; - var html = [], - childKey = setting.data.key.children; - for (var i = 0, l = nodes.length; i < l; i++) { - var node = nodes[i]; - if (initFlag) { - var tmpPNode = (parentNode) ? parentNode: data.getRoot(setting), - tmpPChild = tmpPNode[childKey], - isFirstNode = ((tmpPChild.length == nodes.length) && (i == 0)), - isLastNode = (i == (nodes.length - 1)); - data.initNode(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag); - data.addNodeCache(setting, node); - } - - var childHtml = []; - if (node[childKey] && node[childKey].length > 0) { - //make child html first, because checkType - childHtml = view.appendNodes(setting, level + 1, node[childKey], node, initFlag, openFlag && node.open); - } - if (openFlag) { - - view.makeDOMNodeMainBefore(html, setting, node); - view.makeDOMNodeLine(html, setting, node); - data.getBeforeA(setting, node, html); - view.makeDOMNodeNameBefore(html, setting, node); - data.getInnerBeforeA(setting, node, html); - view.makeDOMNodeIcon(html, setting, node); - data.getInnerAfterA(setting, node, html); - view.makeDOMNodeNameAfter(html, setting, node); - data.getAfterA(setting, node, html); - if (node.isParent && node.open) { - view.makeUlHtml(setting, node, html, childHtml.join('')); - } - view.makeDOMNodeMainAfter(html, setting, node); - data.addCreatedNode(setting, node); - } - } - return html; - }, - appendParentULDom: function(setting, node) { - var html = [], - nObj = $$(node, setting); - if (!nObj.get(0) && !!node.parentTId) { - view.appendParentULDom(setting, node.getParentNode()); - nObj = $$(node, setting); - } - var ulObj = $$(node, consts.id.UL, setting); - if (ulObj.get(0)) { - ulObj.remove(); - } - var childKey = setting.data.key.children, - childHtml = view.appendNodes(setting, node.level+1, node[childKey], node, false, true); - view.makeUlHtml(setting, node, html, childHtml.join('')); - nObj.append(html.join('')); - }, - asyncNode: function(setting, node, isSilent, callback) { - var i, l; - if (node && !node.isParent) { - tools.apply(callback); - return false; - } else if (node && node.isAjaxing) { - return false; - } else if (tools.apply(setting.callback.beforeAsync, [setting.treeId, node], true) == false) { - tools.apply(callback); - return false; - } - if (node) { - node.isAjaxing = true; - var icoObj = $$(node, consts.id.ICON, setting); - icoObj.attr({"style":"", "class":consts.className.BUTTON + " " + consts.className.ICO_LOADING}); - } - - var tmpParam = {}; - for (i = 0, l = setting.async.autoParam.length; node && i < l; i++) { - var pKey = setting.async.autoParam[i].split("="), spKey = pKey; - if (pKey.length>1) { - spKey = pKey[1]; - pKey = pKey[0]; - } - tmpParam[spKey] = node[pKey]; - } - if (tools.isArray(setting.async.otherParam)) { - for (i = 0, l = setting.async.otherParam.length; i < l; i += 2) { - tmpParam[setting.async.otherParam[i]] = setting.async.otherParam[i + 1]; - } - } else { - for (var p in setting.async.otherParam) { - tmpParam[p] = setting.async.otherParam[p]; - } - } - - var _tmpV = data.getRoot(setting)._ver; - $.ajax({ - contentType: setting.async.contentType, - cache: false, - type: setting.async.type, - url: tools.apply(setting.async.url, [setting.treeId, node], setting.async.url), - data: tmpParam, - dataType: setting.async.dataType, - success: function(msg) { - if (_tmpV != data.getRoot(setting)._ver) { - return; - } - var newNodes = []; - try { - if (!msg || msg.length == 0) { - newNodes = []; - } else if (typeof msg == "string") { - newNodes = eval("(" + msg + ")"); - } else { - newNodes = msg; - } - } catch(err) { - newNodes = msg; - } - - if (node) { - node.isAjaxing = null; - node.zAsync = true; - } - view.setNodeLineIcos(setting, node); - if (newNodes && newNodes !== "") { - newNodes = tools.apply(setting.async.dataFilter, [setting.treeId, node, newNodes], newNodes); - view.addNodes(setting, node, !!newNodes ? tools.clone(newNodes) : [], !!isSilent); - } else { - view.addNodes(setting, node, [], !!isSilent); - } - setting.treeObj.trigger(consts.event.ASYNC_SUCCESS, [setting.treeId, node, msg]); - tools.apply(callback); - }, - error: function(XMLHttpRequest, textStatus, errorThrown) { - if (_tmpV != data.getRoot(setting)._ver) { - return; - } - if (node) node.isAjaxing = null; - view.setNodeLineIcos(setting, node); - setting.treeObj.trigger(consts.event.ASYNC_ERROR, [setting.treeId, node, XMLHttpRequest, textStatus, errorThrown]); - } - }); - return true; - }, - cancelPreSelectedNode: function (setting, node, excludeNode) { - var list = data.getRoot(setting).curSelectedList, - i, n; - for (i=list.length-1; i>=0; i--) { - n = list[i]; - if (node === n || (!node && (!excludeNode || excludeNode !== n))) { - $$(n, consts.id.A, setting).removeClass(consts.node.CURSELECTED); - if (node) { - data.removeSelectedNode(setting, node); - setting.treeObj.trigger(consts.event.UNSELECTED, [event, setting.treeId, n]); - break; - } else { - list.splice(i, 1); - setting.treeObj.trigger(consts.event.UNSELECTED, [event, setting.treeId, n]); - } - } - } - }, - createNodeCallback: function(setting) { - if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) { - var root = data.getRoot(setting); - while (root.createdNodes.length>0) { - var node = root.createdNodes.shift(); - tools.apply(setting.view.addDiyDom, [setting.treeId, node]); - if (!!setting.callback.onNodeCreated) { - setting.treeObj.trigger(consts.event.NODECREATED, [setting.treeId, node]); - } - } - } - }, - createNodes: function(setting, level, nodes, parentNode) { - if (!nodes || nodes.length == 0) return; - var root = data.getRoot(setting), - childKey = setting.data.key.children, - openFlag = !parentNode || parentNode.open || !!$$(parentNode[childKey][0], setting).get(0); - root.createdNodes = []; - var zTreeHtml = view.appendNodes(setting, level, nodes, parentNode, true, openFlag); - if (!parentNode) { - setting.treeObj.append(zTreeHtml.join('')); - } else { - var ulObj = $$(parentNode, consts.id.UL, setting); - if (ulObj.get(0)) { - ulObj.append(zTreeHtml.join('')); - } - } - view.createNodeCallback(setting); - }, - destroy: function(setting) { - if (!setting) return; - data.initCache(setting); - data.initRoot(setting); - event.unbindTree(setting); - event.unbindEvent(setting); - setting.treeObj.empty(); - delete settings[setting.treeId]; - }, - expandCollapseNode: function(setting, node, expandFlag, animateFlag, callback) { - var root = data.getRoot(setting), - childKey = setting.data.key.children; - if (!node) { - tools.apply(callback, []); - return; - } - if (root.expandTriggerFlag) { - var _callback = callback; - callback = function(){ - if (_callback) _callback(); - if (node.open) { - setting.treeObj.trigger(consts.event.EXPAND, [setting.treeId, node]); - } else { - setting.treeObj.trigger(consts.event.COLLAPSE, [setting.treeId, node]); - } - }; - root.expandTriggerFlag = false; - } - if (!node.open && node.isParent && ((!$$(node, consts.id.UL, setting).get(0)) || (node[childKey] && node[childKey].length>0 && !$$(node[childKey][0], setting).get(0)))) { - view.appendParentULDom(setting, node); - view.createNodeCallback(setting); - } - if (node.open == expandFlag) { - tools.apply(callback, []); - return; - } - var ulObj = $$(node, consts.id.UL, setting), - switchObj = $$(node, consts.id.SWITCH, setting), - icoObj = $$(node, consts.id.ICON, setting); - - if (node.isParent) { - node.open = !node.open; - if (node.iconOpen && node.iconClose) { - icoObj.attr("style", view.makeNodeIcoStyle(setting, node)); - } - - if (node.open) { - view.replaceSwitchClass(node, switchObj, consts.folder.OPEN); - view.replaceIcoClass(node, icoObj, consts.folder.OPEN); - if (animateFlag == false || setting.view.expandSpeed == "") { - ulObj.show(); - tools.apply(callback, []); - } else { - if (node[childKey] && node[childKey].length > 0) { - ulObj.slideDown(setting.view.expandSpeed, callback); - } else { - ulObj.show(); - tools.apply(callback, []); - } - } - } else { - view.replaceSwitchClass(node, switchObj, consts.folder.CLOSE); - view.replaceIcoClass(node, icoObj, consts.folder.CLOSE); - if (animateFlag == false || setting.view.expandSpeed == "" || !(node[childKey] && node[childKey].length > 0)) { - ulObj.hide(); - tools.apply(callback, []); - } else { - ulObj.slideUp(setting.view.expandSpeed, callback); - } - } - } else { - tools.apply(callback, []); - } - }, - expandCollapseParentNode: function(setting, node, expandFlag, animateFlag, callback) { - if (!node) return; - if (!node.parentTId) { - view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback); - return; - } else { - view.expandCollapseNode(setting, node, expandFlag, animateFlag); - } - if (node.parentTId) { - view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, animateFlag, callback); - } - }, - expandCollapseSonNode: function(setting, node, expandFlag, animateFlag, callback) { - var root = data.getRoot(setting), - childKey = setting.data.key.children, - treeNodes = (node) ? node[childKey]: root[childKey], - selfAnimateSign = (node) ? false : animateFlag, - expandTriggerFlag = data.getRoot(setting).expandTriggerFlag; - data.getRoot(setting).expandTriggerFlag = false; - if (treeNodes) { - for (var i = 0, l = treeNodes.length; i < l; i++) { - if (treeNodes[i]) view.expandCollapseSonNode(setting, treeNodes[i], expandFlag, selfAnimateSign); - } - } - data.getRoot(setting).expandTriggerFlag = expandTriggerFlag; - view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback ); - }, - isSelectedNode: function (setting, node) { - if (!node) { - return false; - } - var list = data.getRoot(setting).curSelectedList, - i; - for (i=list.length-1; i>=0; i--) { - if (node === list[i]) { - return true; - } - } - return false; - }, - makeDOMNodeIcon: function(html, setting, node) { - var nameStr = data.getNodeName(setting, node), - name = setting.view.nameIsHTML ? nameStr : nameStr.replace(/&/g,'&').replace(//g,'>'); - html.push("",name,""); - }, - makeDOMNodeLine: function(html, setting, node) { - html.push(""); - }, - makeDOMNodeMainAfter: function(html, setting, node) { - html.push(""); - }, - makeDOMNodeMainBefore: function(html, setting, node) { - html.push("
                      • "); - }, - makeDOMNodeNameAfter: function(html, setting, node) { - html.push(""); - }, - makeDOMNodeNameBefore: function(html, setting, node) { - var title = data.getNodeTitle(setting, node), - url = view.makeNodeUrl(setting, node), - fontcss = view.makeNodeFontCss(setting, node), - fontStyle = []; - for (var f in fontcss) { - fontStyle.push(f, ":", fontcss[f], ";"); - } - html.push(" 0) ? "href='" + url + "'" : ""), " target='",view.makeNodeTarget(node),"' style='", fontStyle.join(''), - "'"); - if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && title) {html.push("title='", title.replace(/'/g,"'").replace(//g,'>'),"'");} - html.push(">"); - }, - makeNodeFontCss: function(setting, node) { - var fontCss = tools.apply(setting.view.fontCss, [setting.treeId, node], setting.view.fontCss); - return (fontCss && ((typeof fontCss) != "function")) ? fontCss : {}; - }, - makeNodeIcoClass: function(setting, node) { - var icoCss = ["ico"]; - if (!node.isAjaxing) { - icoCss[0] = (node.iconSkin ? node.iconSkin + "_" : "") + icoCss[0]; - if (node.isParent) { - icoCss.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE); - } else { - icoCss.push(consts.folder.DOCU); - } - } - return consts.className.BUTTON + " " + icoCss.join('_'); - }, - makeNodeIcoStyle: function(setting, node) { - var icoStyle = []; - if (!node.isAjaxing) { - var icon = (node.isParent && node.iconOpen && node.iconClose) ? (node.open ? node.iconOpen : node.iconClose) : node.icon; - if (icon) icoStyle.push("background:url(", icon, ") 0 0 no-repeat;"); - if (setting.view.showIcon == false || !tools.apply(setting.view.showIcon, [setting.treeId, node], true)) { - icoStyle.push("width:0px;height:0px;"); - } - } - return icoStyle.join(''); - }, - makeNodeLineClass: function(setting, node) { - var lineClass = []; - if (setting.view.showLine) { - if (node.level == 0 && node.isFirstNode && node.isLastNode) { - lineClass.push(consts.line.ROOT); - } else if (node.level == 0 && node.isFirstNode) { - lineClass.push(consts.line.ROOTS); - } else if (node.isLastNode) { - lineClass.push(consts.line.BOTTOM); - } else { - lineClass.push(consts.line.CENTER); - } - } else { - lineClass.push(consts.line.NOLINE); - } - if (node.isParent) { - lineClass.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE); - } else { - lineClass.push(consts.folder.DOCU); - } - return view.makeNodeLineClassEx(node) + lineClass.join('_'); - }, - makeNodeLineClassEx: function(node) { - return consts.className.BUTTON + " " + consts.className.LEVEL + node.level + " " + consts.className.SWITCH + " "; - }, - makeNodeTarget: function(node) { - return (node.target || "_blank"); - }, - makeNodeUrl: function(setting, node) { - var urlKey = setting.data.key.url; - return node[urlKey] ? node[urlKey] : null; - }, - makeUlHtml: function(setting, node, html, content) { - html.push("
                          "); - html.push(content); - html.push("
                        "); - }, - makeUlLineClass: function(setting, node) { - return ((setting.view.showLine && !node.isLastNode) ? consts.line.LINE : ""); - }, - removeChildNodes: function(setting, node) { - if (!node) return; - var childKey = setting.data.key.children, - nodes = node[childKey]; - if (!nodes) return; - - for (var i = 0, l = nodes.length; i < l; i++) { - data.removeNodeCache(setting, nodes[i]); - } - data.removeSelectedNode(setting); - delete node[childKey]; - - if (!setting.data.keep.parent) { - node.isParent = false; - node.open = false; - var tmp_switchObj = $$(node, consts.id.SWITCH, setting), - tmp_icoObj = $$(node, consts.id.ICON, setting); - view.replaceSwitchClass(node, tmp_switchObj, consts.folder.DOCU); - view.replaceIcoClass(node, tmp_icoObj, consts.folder.DOCU); - $$(node, consts.id.UL, setting).remove(); - } else { - $$(node, consts.id.UL, setting).empty(); - } - }, - setFirstNode: function(setting, parentNode) { - var childKey = setting.data.key.children, childLength = parentNode[childKey].length; - if ( childLength > 0) { - parentNode[childKey][0].isFirstNode = true; - } - }, - setLastNode: function(setting, parentNode) { - var childKey = setting.data.key.children, childLength = parentNode[childKey].length; - if ( childLength > 0) { - parentNode[childKey][childLength - 1].isLastNode = true; - } - }, - removeNode: function(setting, node) { - var root = data.getRoot(setting), - childKey = setting.data.key.children, - parentNode = (node.parentTId) ? node.getParentNode() : root; - - node.isFirstNode = false; - node.isLastNode = false; - node.getPreNode = function() {return null;}; - node.getNextNode = function() {return null;}; - - if (!data.getNodeCache(setting, node.tId)) { - return; - } - - $$(node, setting).remove(); - data.removeNodeCache(setting, node); - data.removeSelectedNode(setting, node); - - for (var i = 0, l = parentNode[childKey].length; i < l; i++) { - if (parentNode[childKey][i].tId == node.tId) { - parentNode[childKey].splice(i, 1); - break; - } - } - view.setFirstNode(setting, parentNode); - view.setLastNode(setting, parentNode); - - var tmp_ulObj,tmp_switchObj,tmp_icoObj, - childLength = parentNode[childKey].length; - - //repair nodes old parent - if (!setting.data.keep.parent && childLength == 0) { - //old parentNode has no child nodes - parentNode.isParent = false; - parentNode.open = false; - tmp_ulObj = $$(parentNode, consts.id.UL, setting); - tmp_switchObj = $$(parentNode, consts.id.SWITCH, setting); - tmp_icoObj = $$(parentNode, consts.id.ICON, setting); - view.replaceSwitchClass(parentNode, tmp_switchObj, consts.folder.DOCU); - view.replaceIcoClass(parentNode, tmp_icoObj, consts.folder.DOCU); - tmp_ulObj.css("display", "none"); - - } else if (setting.view.showLine && childLength > 0) { - //old parentNode has child nodes - var newLast = parentNode[childKey][childLength - 1]; - tmp_ulObj = $$(newLast, consts.id.UL, setting); - tmp_switchObj = $$(newLast, consts.id.SWITCH, setting); - tmp_icoObj = $$(newLast, consts.id.ICON, setting); - if (parentNode == root) { - if (parentNode[childKey].length == 1) { - //node was root, and ztree has only one root after move node - view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.ROOT); - } else { - var tmp_first_switchObj = $$(parentNode[childKey][0], consts.id.SWITCH, setting); - view.replaceSwitchClass(parentNode[childKey][0], tmp_first_switchObj, consts.line.ROOTS); - view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM); - } - } else { - view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM); - } - tmp_ulObj.removeClass(consts.line.LINE); - } - }, - replaceIcoClass: function(node, obj, newName) { - if (!obj || node.isAjaxing) return; - var tmpName = obj.attr("class"); - if (tmpName == undefined) return; - var tmpList = tmpName.split("_"); - switch (newName) { - case consts.folder.OPEN: - case consts.folder.CLOSE: - case consts.folder.DOCU: - tmpList[tmpList.length-1] = newName; - break; - } - obj.attr("class", tmpList.join("_")); - }, - replaceSwitchClass: function(node, obj, newName) { - if (!obj) return; - var tmpName = obj.attr("class"); - if (tmpName == undefined) return; - var tmpList = tmpName.split("_"); - switch (newName) { - case consts.line.ROOT: - case consts.line.ROOTS: - case consts.line.CENTER: - case consts.line.BOTTOM: - case consts.line.NOLINE: - tmpList[0] = view.makeNodeLineClassEx(node) + newName; - break; - case consts.folder.OPEN: - case consts.folder.CLOSE: - case consts.folder.DOCU: - tmpList[1] = newName; - break; - } - obj.attr("class", tmpList.join("_")); - if (newName !== consts.folder.DOCU) { - obj.removeAttr("disabled"); - } else { - obj.attr("disabled", "disabled"); - } - }, - selectNode: function(setting, node, addFlag) { - if (!addFlag) { - view.cancelPreSelectedNode(setting, null, node); - } - $$(node, consts.id.A, setting).addClass(consts.node.CURSELECTED); - data.addSelectedNode(setting, node); - setting.treeObj.trigger(consts.event.SELECTED, [event, setting.treeId, node]); - }, - setNodeFontCss: function(setting, treeNode) { - var aObj = $$(treeNode, consts.id.A, setting), - fontCss = view.makeNodeFontCss(setting, treeNode); - if (fontCss) { - aObj.css(fontCss); - } - }, - setNodeLineIcos: function(setting, node) { - if (!node) return; - var switchObj = $$(node, consts.id.SWITCH, setting), - ulObj = $$(node, consts.id.UL, setting), - icoObj = $$(node, consts.id.ICON, setting), - ulLine = view.makeUlLineClass(setting, node); - if (ulLine.length==0) { - ulObj.removeClass(consts.line.LINE); - } else { - ulObj.addClass(ulLine); - } - switchObj.attr("class", view.makeNodeLineClass(setting, node)); - if (node.isParent) { - switchObj.removeAttr("disabled"); - } else { - switchObj.attr("disabled", "disabled"); - } - icoObj.removeAttr("style"); - icoObj.attr("style", view.makeNodeIcoStyle(setting, node)); - icoObj.attr("class", view.makeNodeIcoClass(setting, node)); - }, - setNodeName: function(setting, node) { - var title = data.getNodeTitle(setting, node), - nObj = $$(node, consts.id.SPAN, setting); - nObj.empty(); - if (setting.view.nameIsHTML) { - nObj.html(data.getNodeName(setting, node)); - } else { - nObj.text(data.getNodeName(setting, node)); - } - if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle)) { - var aObj = $$(node, consts.id.A, setting); - aObj.attr("title", !title ? "" : title); - } - }, - setNodeTarget: function(setting, node) { - var aObj = $$(node, consts.id.A, setting); - aObj.attr("target", view.makeNodeTarget(node)); - }, - setNodeUrl: function(setting, node) { - var aObj = $$(node, consts.id.A, setting), - url = view.makeNodeUrl(setting, node); - if (url == null || url.length == 0) { - aObj.removeAttr("href"); - } else { - aObj.attr("href", url); - } - }, - switchNode: function(setting, node) { - if (node.open || !tools.canAsync(setting, node)) { - view.expandCollapseNode(setting, node, !node.open); - } else if (setting.async.enable) { - if (!view.asyncNode(setting, node)) { - view.expandCollapseNode(setting, node, !node.open); - return; - } - } else if (node) { - view.expandCollapseNode(setting, node, !node.open); - } - } - }; - // zTree defind - $.fn.zTree = { - consts : _consts, - _z : { - tools: tools, - view: view, - event: event, - data: data - }, - getZTreeObj: function(treeId) { - var o = data.getZTreeTools(treeId); - return o ? o : null; - }, - destroy: function(treeId) { - if (!!treeId && treeId.length > 0) { - view.destroy(data.getSetting(treeId)); - } else { - for(var s in settings) { - view.destroy(settings[s]); - } - } - }, - init: function(obj, zSetting, zNodes) { - var setting = tools.clone(_setting); - $.extend(true, setting, zSetting); - setting.treeId = obj.attr("id"); - setting.treeObj = obj; - setting.treeObj.empty(); - settings[setting.treeId] = setting; - //For some older browser,(e.g., ie6) - if(typeof document.body.style.maxHeight === "undefined") { - setting.view.expandSpeed = ""; - } - data.initRoot(setting); - var root = data.getRoot(setting), - childKey = setting.data.key.children; - zNodes = zNodes ? tools.clone(tools.isArray(zNodes)? zNodes : [zNodes]) : []; - if (setting.data.simpleData.enable) { - root[childKey] = data.transformTozTreeFormat(setting, zNodes); - } else { - root[childKey] = zNodes; - } - - data.initCache(setting); - event.unbindTree(setting); - event.bindTree(setting); - event.unbindEvent(setting); - event.bindEvent(setting); - - var zTreeTools = { - setting : setting, - addNodes : function(parentNode, newNodes, isSilent) { - if (!newNodes) return null; - if (!parentNode) parentNode = null; - if (parentNode && !parentNode.isParent && setting.data.keep.leaf) return null; - var xNewNodes = tools.clone(tools.isArray(newNodes)? newNodes: [newNodes]); - function addCallback() { - view.addNodes(setting, parentNode, xNewNodes, (isSilent==true)); - } - - if (tools.canAsync(setting, parentNode)) { - view.asyncNode(setting, parentNode, isSilent, addCallback); - } else { - addCallback(); - } - return xNewNodes; - }, - cancelSelectedNode : function(node) { - view.cancelPreSelectedNode(setting, node); - }, - destroy : function() { - view.destroy(setting); - }, - expandAll : function(expandFlag) { - expandFlag = !!expandFlag; - view.expandCollapseSonNode(setting, null, expandFlag, true); - return expandFlag; - }, - expandNode : function(node, expandFlag, sonSign, focus, callbackFlag) { - if (!node || !node.isParent) return null; - if (expandFlag !== true && expandFlag !== false) { - expandFlag = !node.open; - } - callbackFlag = !!callbackFlag; - - if (callbackFlag && expandFlag && (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false)) { - return null; - } else if (callbackFlag && !expandFlag && (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false)) { - return null; - } - if (expandFlag && node.parentTId) { - view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, false); - } - if (expandFlag === node.open && !sonSign) { - return null; - } - - data.getRoot(setting).expandTriggerFlag = callbackFlag; - if (!tools.canAsync(setting, node) && sonSign) { - view.expandCollapseSonNode(setting, node, expandFlag, true, function() { - if (focus !== false) {try{$$(node, setting).focus().blur();}catch(e){}} - }); - } else { - node.open = !expandFlag; - view.switchNode(this.setting, node); - if (focus !== false) {try{$$(node, setting).focus().blur();}catch(e){}} - } - return expandFlag; - }, - getNodes : function() { - return data.getNodes(setting); - }, - getNodeByParam : function(key, value, parentNode) { - if (!key) return null; - return data.getNodeByParam(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value); - }, - getNodeByTId : function(tId) { - return data.getNodeCache(setting, tId); - }, - getNodesByParam : function(key, value, parentNode) { - if (!key) return null; - return data.getNodesByParam(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value); - }, - getNodesByParamFuzzy : function(key, value, parentNode) { - if (!key) return null; - return data.getNodesByParamFuzzy(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value); - }, - getNodesByFilter: function(filter, isSingle, parentNode, invokeParam) { - isSingle = !!isSingle; - if (!filter || (typeof filter != "function")) return (isSingle ? null : []); - return data.getNodesByFilter(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), filter, isSingle, invokeParam); - }, - getNodeIndex : function(node) { - if (!node) return null; - var childKey = setting.data.key.children, - parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting); - for (var i=0, l = parentNode[childKey].length; i < l; i++) { - if (parentNode[childKey][i] == node) return i; - } - return -1; - }, - getSelectedNodes : function() { - var r = [], list = data.getRoot(setting).curSelectedList; - for (var i=0, l=list.length; i 0) { - view.createNodes(setting, 0, root[childKey]); - } else if (setting.async.enable && setting.async.url && setting.async.url !== '') { - view.asyncNode(setting); - } - return zTreeTools; - } - }; - - var zt = $.fn.zTree, - $$ = tools.$, - consts = zt.consts; -})(jQuery); \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/js/jquery.ztree.core-3.5.min.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/js/jquery.ztree.core-3.5.min.js deleted file mode 100644 index 4fc4082d..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/js/jquery.ztree.core-3.5.min.js +++ /dev/null @@ -1,70 +0,0 @@ -/* - * JQuery zTree core v3.5.18 - * http://zTree.me/ - * - * Copyright (c) 2010 Hunter.z - * - * Licensed same as jquery - MIT License - * http://www.opensource.org/licenses/mit-license.php - * - * email: hunter.z@263.net - * Date: 2015-05-25 - */ -(function(p){var G,H,I,J,K,L,r={},u={},v={},M={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{children:"children",name:"name",title:"",url:"url"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",url:"",autoParam:[], -otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},w=[function(b){var a=b.treeObj,c=e.event;a.bind(c.NODECREATED,function(a,c,g){j.apply(b.callback.onNodeCreated, -[a,c,g])});a.bind(c.CLICK,function(a,c,g,l,h){j.apply(b.callback.onClick,[c,g,l,h])});a.bind(c.EXPAND,function(a,c,g){j.apply(b.callback.onExpand,[a,c,g])});a.bind(c.COLLAPSE,function(a,c,g){j.apply(b.callback.onCollapse,[a,c,g])});a.bind(c.ASYNC_SUCCESS,function(a,c,g,l){j.apply(b.callback.onAsyncSuccess,[a,c,g,l])});a.bind(c.ASYNC_ERROR,function(a,c,g,l,h,e){j.apply(b.callback.onAsyncError,[a,c,g,l,h,e])});a.bind(c.REMOVE,function(a,c,g){j.apply(b.callback.onRemove,[a,c,g])});a.bind(c.SELECTED, -function(a,c,g,l){j.apply(b.callback.onSelected,[c,g,l])});a.bind(c.UNSELECTED,function(a,c,g,l){j.apply(b.callback.onUnSelected,[c,g,l])})}],x=[function(b){var a=e.event;b.treeObj.unbind(a.NODECREATED).unbind(a.CLICK).unbind(a.EXPAND).unbind(a.COLLAPSE).unbind(a.ASYNC_SUCCESS).unbind(a.ASYNC_ERROR).unbind(a.REMOVE).unbind(a.SELECTED).unbind(a.UNSELECTED)}],y=[function(b){var a=h.getCache(b);a||(a={},h.setCache(b,a));a.nodes=[];a.doms=[]}],z=[function(b,a,c,d,f,g){if(c){var l=h.getRoot(b),e=b.data.key.children; -c.level=a;c.tId=b.treeId+"_"+ ++l.zId;c.parentTId=d?d.tId:null;c.open=typeof c.open=="string"?j.eqs(c.open,"true"):!!c.open;c[e]&&c[e].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent=typeof c.isParent=="string"?j.eqs(c.isParent,"true"):!!c.isParent,c.open=c.isParent&&!b.async.enable?c.open:!1,c.zAsync=!c.isParent);c.isFirstNode=f;c.isLastNode=g;c.getParentNode=function(){return h.getNodeCache(b,c.parentTId)};c.getPreNode=function(){return h.getPreNode(b,c)};c.getNextNode=function(){return h.getNextNode(b, -c)};c.isAjaxing=!1;h.fixPIdKeyValue(b,c)}}],s=[function(b){var a=b.target,c=h.getSetting(b.data.treeId),d="",f=null,g="",l="",i=null,o=null,k=null;if(j.eqs(b.type,"mousedown"))l="mousedown";else if(j.eqs(b.type,"mouseup"))l="mouseup";else if(j.eqs(b.type,"contextmenu"))l="contextmenu";else if(j.eqs(b.type,"click"))if(j.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+e.id.SWITCH)!==null)d=j.getNodeMainDom(a).id,g="switchNode";else{if(k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}]))d=j.getNodeMainDom(k).id, -g="clickNode"}else if(j.eqs(b.type,"dblclick")&&(l="dblclick",k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}])))d=j.getNodeMainDom(k).id,g="switchNode";if(l.length>0&&d.length==0&&(k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}])))d=j.getNodeMainDom(k).id;if(d.length>0)switch(f=h.getNodeCache(c,d),g){case "switchNode":f.isParent?j.eqs(b.type,"click")||j.eqs(b.type,"dblclick")&&j.apply(c.view.dblClickExpand,[c.treeId,f],c.view.dblClickExpand)?i=G:g="":g="";break;case "clickNode":i= -H}switch(l){case "mousedown":o=I;break;case "mouseup":o=J;break;case "dblclick":o=K;break;case "contextmenu":o=L}return{stop:!1,node:f,nodeEventType:g,nodeEventCallback:i,treeEventType:l,treeEventCallback:o}}],A=[function(b){var a=h.getRoot(b);a||(a={},h.setRoot(b,a));a[b.data.key.children]=[];a.expandTriggerFlag=!1;a.curSelectedList=[];a.noSelection=!0;a.createdNodes=[];a.zId=0;a._ver=(new Date).getTime()}],B=[],C=[],D=[],E=[],F=[],h={addNodeCache:function(b,a){h.getCache(b).nodes[h.getNodeCacheId(a.tId)]= -a},getNodeCacheId:function(b){return b.substring(b.lastIndexOf("_")+1)},addAfterA:function(b){C.push(b)},addBeforeA:function(b){B.push(b)},addInnerAfterA:function(b){E.push(b)},addInnerBeforeA:function(b){D.push(b)},addInitBind:function(b){w.push(b)},addInitUnBind:function(b){x.push(b)},addInitCache:function(b){y.push(b)},addInitNode:function(b){z.push(b)},addInitProxy:function(b,a){a?s.splice(0,0,b):s.push(b)},addInitRoot:function(b){A.push(b)},addNodesData:function(b,a,c){var d=b.data.key.children; -a[d]||(a[d]=[]);if(a[d].length>0)a[d][a[d].length-1].isLastNode=!1,i.setNodeLineIcos(b,a[d][a[d].length-1]);a.isParent=!0;a[d]=a[d].concat(c)},addSelectedNode:function(b,a){var c=h.getRoot(b);h.isSelectedNode(b,a)||c.curSelectedList.push(a)},addCreatedNode:function(b,a){(b.callback.onNodeCreated||b.view.addDiyDom)&&h.getRoot(b).createdNodes.push(a)},addZTreeTools:function(b){F.push(b)},exSetting:function(b){p.extend(!0,M,b)},fixPIdKeyValue:function(b,a){b.data.simpleData.enable&&(a[b.data.simpleData.pIdKey]= -a.parentTId?a.getParentNode()[b.data.simpleData.idKey]:b.data.simpleData.rootPId)},getAfterA:function(b,a,c){for(var d=0,f=C.length;d-1&&g.push(a[l]),g=g.concat(h.getNodesByParamFuzzy(b,a[l][f],c,d));return g},getNodesByFilter:function(b,a,c,d,f){if(!a)return d?null:[];for(var g=b.data.key.children,e=d?null:[],i=0,o=a.length;i0)},clone:function(b){if(b===null)return null;var a=j.isArray(b)?[]:{},c;for(c in b)a[c]=b[c]instanceof Date?new Date(b[c].getTime()):typeof b[c]==="object"?arguments.callee(b[c]):b[c];return a},eqs:function(b,a){return b.toLowerCase()===a.toLowerCase()},isArray:function(b){return Object.prototype.toString.apply(b)==="[object Array]"},$:function(b,a,c){a&&typeof a!="string"&&(c=a,a="");return typeof b=="string"?p(b,c?c.treeObj.get(0).ownerDocument: -null):p("#"+b.tId+a,c?c.treeObj:null)},getMDom:function(b,a,c){if(!a)return null;for(;a&&a.id!==b.treeId;){for(var d=0,f=c.length;a.tagName&&d0},uCanDo:function(){return!0}},i={addNodes:function(b,a,c,d){if(!b.data.keep.leaf|| -!a||a.isParent)if(j.isArray(c)||(c=[c]),b.data.simpleData.enable&&(c=h.transformTozTreeFormat(b,c)),a){var f=k(a,e.id.SWITCH,b),g=k(a,e.id.ICON,b),l=k(a,e.id.UL,b);if(!a.open)i.replaceSwitchClass(a,f,e.folder.CLOSE),i.replaceIcoClass(a,g,e.folder.CLOSE),a.open=!1,l.css({display:"none"});h.addNodesData(b,a,c);i.createNodes(b,a.level+1,c,a);d||i.expandCollapseParentNode(b,a,!0)}else h.addNodesData(b,h.getRoot(b),c),i.createNodes(b,0,c,null)},appendNodes:function(b,a,c,d,f,g){if(!c)return[];for(var e= -[],j=b.data.key.children,k=0,m=c.length;k0&&(t=i.appendNodes(b,a+1,n[j],n,f,g&&n.open));g&&(i.makeDOMNodeMainBefore(e,b,n),i.makeDOMNodeLine(e,b,n),h.getBeforeA(b,n,e),i.makeDOMNodeNameBefore(e,b,n),h.getInnerBeforeA(b,n,e),i.makeDOMNodeIcon(e,b,n),h.getInnerAfterA(b,n,e),i.makeDOMNodeNameAfter(e,b,n),h.getAfterA(b,n,e),n.isParent&&n.open&&i.makeUlHtml(b, -n,e,t.join("")),i.makeDOMNodeMainAfter(e,b,n),h.addCreatedNode(b,n))}return e},appendParentULDom:function(b,a){var c=[],d=k(a,b);!d.get(0)&&a.parentTId&&(i.appendParentULDom(b,a.getParentNode()),d=k(a,b));var f=k(a,e.id.UL,b);f.get(0)&&f.remove();f=i.appendNodes(b,a.level+1,a[b.data.key.children],a,!1,!0);i.makeUlHtml(b,a,c,f.join(""));d.append(c.join(""))},asyncNode:function(b,a,c,d){var f,g;if(a&&!a.isParent)return j.apply(d),!1;else if(a&&a.isAjaxing)return!1;else if(j.apply(b.callback.beforeAsync, -[b.treeId,a],!0)==!1)return j.apply(d),!1;if(a)a.isAjaxing=!0,k(a,e.id.ICON,b).attr({style:"","class":e.className.BUTTON+" "+e.className.ICO_LOADING});var l={};for(f=0,g=b.async.autoParam.length;a&&f1&&(o=q[1],q=q[0]);l[o]=a[q]}if(j.isArray(b.async.otherParam))for(f=0,g=b.async.otherParam.length;f=0;f--)if(g=d[f],a===g||!a&&(!c||c!==g))if(k(g,e.id.A,b).removeClass(e.node.CURSELECTED),a){h.removeSelectedNode(b,a);b.treeObj.trigger(e.event.UNSELECTED,[m,b.treeId,g]);break}else d.splice(f,1),b.treeObj.trigger(e.event.UNSELECTED, -[m,b.treeId,g])},createNodeCallback:function(b){if(b.callback.onNodeCreated||b.view.addDiyDom)for(var a=h.getRoot(b);a.createdNodes.length>0;){var c=a.createdNodes.shift();j.apply(b.view.addDiyDom,[b.treeId,c]);b.callback.onNodeCreated&&b.treeObj.trigger(e.event.NODECREATED,[b.treeId,c])}},createNodes:function(b,a,c,d){if(c&&c.length!=0){var f=h.getRoot(b),g=b.data.key.children,g=!d||d.open||!!k(d[g][0],b).get(0);f.createdNodes=[];a=i.appendNodes(b,a,c,d,!0,g);d?(d=k(d,e.id.UL,b),d.get(0)&&d.append(a.join(""))): -b.treeObj.append(a.join(""));i.createNodeCallback(b)}},destroy:function(b){b&&(h.initCache(b),h.initRoot(b),m.unbindTree(b),m.unbindEvent(b),b.treeObj.empty(),delete r[b.treeId])},expandCollapseNode:function(b,a,c,d,f){var g=h.getRoot(b),l=b.data.key.children;if(a){if(g.expandTriggerFlag){var q=f,f=function(){q&&q();a.open?b.treeObj.trigger(e.event.EXPAND,[b.treeId,a]):b.treeObj.trigger(e.event.COLLAPSE,[b.treeId,a])};g.expandTriggerFlag=!1}if(!a.open&&a.isParent&&(!k(a,e.id.UL,b).get(0)||a[l]&&a[l].length> -0&&!k(a[l][0],b).get(0)))i.appendParentULDom(b,a),i.createNodeCallback(b);if(a.open==c)j.apply(f,[]);else{var c=k(a,e.id.UL,b),g=k(a,e.id.SWITCH,b),o=k(a,e.id.ICON,b);a.isParent?(a.open=!a.open,a.iconOpen&&a.iconClose&&o.attr("style",i.makeNodeIcoStyle(b,a)),a.open?(i.replaceSwitchClass(a,g,e.folder.OPEN),i.replaceIcoClass(a,o,e.folder.OPEN),d==!1||b.view.expandSpeed==""?(c.show(),j.apply(f,[])):a[l]&&a[l].length>0?c.slideDown(b.view.expandSpeed,f):(c.show(),j.apply(f,[]))):(i.replaceSwitchClass(a, -g,e.folder.CLOSE),i.replaceIcoClass(a,o,e.folder.CLOSE),d==!1||b.view.expandSpeed==""||!(a[l]&&a[l].length>0)?(c.hide(),j.apply(f,[])):c.slideUp(b.view.expandSpeed,f))):j.apply(f,[])}}else j.apply(f,[])},expandCollapseParentNode:function(b,a,c,d,f){a&&(a.parentTId?(i.expandCollapseNode(b,a,c,d),a.parentTId&&i.expandCollapseParentNode(b,a.getParentNode(),c,d,f)):i.expandCollapseNode(b,a,c,d,f))},expandCollapseSonNode:function(b,a,c,d,f){var g=h.getRoot(b),e=b.data.key.children,g=a?a[e]:g[e],e=a?!1: -d,j=h.getRoot(b).expandTriggerFlag;h.getRoot(b).expandTriggerFlag=!1;if(g)for(var k=0,m=g.length;k=0;d--)if(a===c[d])return!0;return!1},makeDOMNodeIcon:function(b,a,c){var d=h.getNodeName(a,c),d=a.view.nameIsHTML?d:d.replace(/&/g,"&").replace(//g,">");b.push("",d,"")},makeDOMNodeLine:function(b,a,c){b.push("")},makeDOMNodeMainAfter:function(b){b.push("
                      • ")},makeDOMNodeMainBefore:function(b,a,c){b.push("
                      • ")}, -makeDOMNodeNameAfter:function(b){b.push("")},makeDOMNodeNameBefore:function(b,a,c){var d=h.getNodeTitle(a,c),f=i.makeNodeUrl(a,c),g=i.makeNodeFontCss(a,c),l=[],k;for(k in g)l.push(k,":",g[k],";");b.push("0?"href='"+f+"'":""," target='",i.makeNodeTarget(c),"' style='",l.join(""),"'");j.apply(a.view.showTitle,[a.treeId,c],a.view.showTitle)&&d&&b.push("title='",d.replace(/'/g, -"'").replace(//g,">"),"'");b.push(">")},makeNodeFontCss:function(b,a){var c=j.apply(b.view.fontCss,[b.treeId,a],b.view.fontCss);return c&&typeof c!="function"?c:{}},makeNodeIcoClass:function(b,a){var c=["ico"];a.isAjaxing||(c[0]=(a.iconSkin?a.iconSkin+"_":"")+c[0],a.isParent?c.push(a.open?e.folder.OPEN:e.folder.CLOSE):c.push(e.folder.DOCU));return e.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(b,a){var c=[];if(!a.isAjaxing){var d=a.isParent&&a.iconOpen&& -a.iconClose?a.open?a.iconOpen:a.iconClose:a.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;");(b.view.showIcon==!1||!j.apply(b.view.showIcon,[b.treeId,a],!0))&&c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(b,a){var c=[];b.view.showLine?a.level==0&&a.isFirstNode&&a.isLastNode?c.push(e.line.ROOT):a.level==0&&a.isFirstNode?c.push(e.line.ROOTS):a.isLastNode?c.push(e.line.BOTTOM):c.push(e.line.CENTER):c.push(e.line.NOLINE);a.isParent?c.push(a.open?e.folder.OPEN:e.folder.CLOSE): -c.push(e.folder.DOCU);return i.makeNodeLineClassEx(a)+c.join("_")},makeNodeLineClassEx:function(b){return e.className.BUTTON+" "+e.className.LEVEL+b.level+" "+e.className.SWITCH+" "},makeNodeTarget:function(b){return b.target||"_blank"},makeNodeUrl:function(b,a){var c=b.data.key.url;return a[c]?a[c]:null},makeUlHtml:function(b,a,c,d){c.push("
                          ");c.push(d);c.push("
                        ")}, -makeUlLineClass:function(b,a){return b.view.showLine&&!a.isLastNode?e.line.LINE:""},removeChildNodes:function(b,a){if(a){var c=b.data.key.children,d=a[c];if(d){for(var f=0,g=d.length;f0)a[c][0].isFirstNode=!0},setLastNode:function(b,a){var c=b.data.key.children,d=a[c].length;if(d>0)a[c][d-1].isLastNode=!0},removeNode:function(b,a){var c=h.getRoot(b),d=b.data.key.children,f=a.parentTId?a.getParentNode():c;a.isFirstNode=!1;a.isLastNode=!1;a.getPreNode=function(){return null};a.getNextNode=function(){return null};if(h.getNodeCache(b,a.tId)){k(a,b).remove();h.removeNodeCache(b,a);h.removeSelectedNode(b,a);for(var g=0,l=f[d].length;g0){var o=f[d][g-1],g=k(o,e.id.UL,b),l=k(o,e.id.SWITCH,b);j=k(o,e.id.ICON,b);f==c?f[d].length==1?i.replaceSwitchClass(o,l,e.line.ROOT):(c=k(f[d][0],e.id.SWITCH,b),i.replaceSwitchClass(f[d][0],c,e.line.ROOTS), -i.replaceSwitchClass(o,l,e.line.BOTTOM)):i.replaceSwitchClass(o,l,e.line.BOTTOM);g.removeClass(e.line.LINE)}}},replaceIcoClass:function(b,a,c){if(a&&!b.isAjaxing&&(b=a.attr("class"),b!=void 0)){b=b.split("_");switch(c){case e.folder.OPEN:case e.folder.CLOSE:case e.folder.DOCU:b[b.length-1]=c}a.attr("class",b.join("_"))}},replaceSwitchClass:function(b,a,c){if(a){var d=a.attr("class");if(d!=void 0){d=d.split("_");switch(c){case e.line.ROOT:case e.line.ROOTS:case e.line.CENTER:case e.line.BOTTOM:case e.line.NOLINE:d[0]= -i.makeNodeLineClassEx(b)+c;break;case e.folder.OPEN:case e.folder.CLOSE:case e.folder.DOCU:d[1]=c}a.attr("class",d.join("_"));c!==e.folder.DOCU?a.removeAttr("disabled"):a.attr("disabled","disabled")}}},selectNode:function(b,a,c){c||i.cancelPreSelectedNode(b,null,a);k(a,e.id.A,b).addClass(e.node.CURSELECTED);h.addSelectedNode(b,a);b.treeObj.trigger(e.event.SELECTED,[m,b.treeId,a])},setNodeFontCss:function(b,a){var c=k(a,e.id.A,b),d=i.makeNodeFontCss(b,a);d&&c.css(d)},setNodeLineIcos:function(b,a){if(a){var c= -k(a,e.id.SWITCH,b),d=k(a,e.id.UL,b),f=k(a,e.id.ICON,b),g=i.makeUlLineClass(b,a);g.length==0?d.removeClass(e.line.LINE):d.addClass(g);c.attr("class",i.makeNodeLineClass(b,a));a.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled");f.removeAttr("style");f.attr("style",i.makeNodeIcoStyle(b,a));f.attr("class",i.makeNodeIcoClass(b,a))}},setNodeName:function(b,a){var c=h.getNodeTitle(b,a),d=k(a,e.id.SPAN,b);d.empty();b.view.nameIsHTML?d.html(h.getNodeName(b,a)):d.text(h.getNodeName(b,a));j.apply(b.view.showTitle, -[b.treeId,a],b.view.showTitle)&&k(a,e.id.A,b).attr("title",!c?"":c)},setNodeTarget:function(b,a){k(a,e.id.A,b).attr("target",i.makeNodeTarget(a))},setNodeUrl:function(b,a){var c=k(a,e.id.A,b),d=i.makeNodeUrl(b,a);d==null||d.length==0?c.removeAttr("href"):c.attr("href",d)},switchNode:function(b,a){a.open||!j.canAsync(b,a)?i.expandCollapseNode(b,a,!a.open):b.async.enable?i.asyncNode(b,a)||i.expandCollapseNode(b,a,!a.open):a&&i.expandCollapseNode(b,a,!a.open)}};p.fn.zTree={consts:{className:{BUTTON:"button", -LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch"},event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove",SELECTED:"ztree_selected",UNSELECTED:"ztree_unselected"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close", -DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_z:{tools:j,view:i,event:m,data:h},getZTreeObj:function(b){return(b=h.getZTreeTools(b))?b:null},destroy:function(b){if(b&&b.length>0)i.destroy(h.getSetting(b));else for(var a in r)i.destroy(r[a])},init:function(b,a,c){var d=j.clone(M);p.extend(!0,d,a);d.treeId=b.attr("id");d.treeObj=b;d.treeObj.empty();r[d.treeId]=d;if(typeof document.body.style.maxHeight==="undefined")d.view.expandSpeed="";h.initRoot(d);b=h.getRoot(d);a=d.data.key.children;c=c?j.clone(j.isArray(c)? -c:[c]):[];b[a]=d.data.simpleData.enable?h.transformTozTreeFormat(d,c):c;h.initCache(d);m.unbindTree(d);m.bindTree(d);m.unbindEvent(d);m.bindEvent(d);c={setting:d,addNodes:function(a,b,c){function e(){i.addNodes(d,a,h,c==!0)}if(!b)return null;a||(a=null);if(a&&!a.isParent&&d.data.keep.leaf)return null;var h=j.clone(j.isArray(b)?b:[b]);j.canAsync(d,a)?i.asyncNode(d,a,c,e):e();return h},cancelSelectedNode:function(a){i.cancelPreSelectedNode(d,a)},destroy:function(){i.destroy(d)},expandAll:function(a){a= -!!a;i.expandCollapseSonNode(d,null,a,!0);return a},expandNode:function(a,b,c,e,m){if(!a||!a.isParent)return null;b!==!0&&b!==!1&&(b=!a.open);if((m=!!m)&&b&&j.apply(d.callback.beforeExpand,[d.treeId,a],!0)==!1)return null;else if(m&&!b&&j.apply(d.callback.beforeCollapse,[d.treeId,a],!0)==!1)return null;b&&a.parentTId&&i.expandCollapseParentNode(d,a.getParentNode(),b,!1);if(b===a.open&&!c)return null;h.getRoot(d).expandTriggerFlag=m;if(!j.canAsync(d,a)&&c)i.expandCollapseSonNode(d,a,b,!0,function(){if(e!== -!1)try{k(a,d).focus().blur()}catch(b){}});else if(a.open=!b,i.switchNode(this.setting,a),e!==!1)try{k(a,d).focus().blur()}catch(p){}return b},getNodes:function(){return h.getNodes(d)},getNodeByParam:function(a,b,c){return!a?null:h.getNodeByParam(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodeByTId:function(a){return h.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return!a?null:h.getNodesByParam(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodesByParamFuzzy:function(a,b,c){return!a? -null:h.getNodesByParamFuzzy(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodesByFilter:function(a,b,c,e){b=!!b;return!a||typeof a!="function"?b?null:[]:h.getNodesByFilter(d,c?c[d.data.key.children]:h.getNodes(d),a,b,e)},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():h.getRoot(d),e=0,i=c[b].length;e0?i.createNodes(d,0,b[a]):d.async.enable&& -d.async.url&&d.async.url!==""&&i.asyncNode(d);return c}};var N=p.fn.zTree,k=j.$,e=N.consts})(jQuery); diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/js/jquery.ztree.excheck-3.5.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/js/jquery.ztree.excheck-3.5.js deleted file mode 100644 index ff6c31a1..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/js/jquery.ztree.excheck-3.5.js +++ /dev/null @@ -1,628 +0,0 @@ -/* - * JQuery zTree excheck v3.5.18 - * http://zTree.me/ - * - * Copyright (c) 2010 Hunter.z - * - * Licensed same as jquery - MIT License - * http://www.opensource.org/licenses/mit-license.php - * - * email: hunter.z@263.net - * Date: 2015-05-25 - */ -(function($){ - //default consts of excheck - var _consts = { - event: { - CHECK: "ztree_check" - }, - id: { - CHECK: "_check" - }, - checkbox: { - STYLE: "checkbox", - DEFAULT: "chk", - DISABLED: "disable", - FALSE: "false", - TRUE: "true", - FULL: "full", - PART: "part", - FOCUS: "focus" - }, - radio: { - STYLE: "radio", - TYPE_ALL: "all", - TYPE_LEVEL: "level" - } - }, - //default setting of excheck - _setting = { - check: { - enable: false, - autoCheckTrigger: false, - chkStyle: _consts.checkbox.STYLE, - nocheckInherit: false, - chkDisabledInherit: false, - radioType: _consts.radio.TYPE_LEVEL, - chkboxType: { - "Y": "ps", - "N": "ps" - } - }, - data: { - key: { - checked: "checked" - } - }, - callback: { - beforeCheck:null, - onCheck:null - } - }, - //default root of excheck - _initRoot = function (setting) { - var r = data.getRoot(setting); - r.radioCheckedList = []; - }, - //default cache of excheck - _initCache = function(treeId) {}, - //default bind event of excheck - _bindEvent = function(setting) { - var o = setting.treeObj, - c = consts.event; - o.bind(c.CHECK, function (event, srcEvent, treeId, node) { - event.srcEvent = srcEvent; - tools.apply(setting.callback.onCheck, [event, treeId, node]); - }); - }, - _unbindEvent = function(setting) { - var o = setting.treeObj, - c = consts.event; - o.unbind(c.CHECK); - }, - //default event proxy of excheck - _eventProxy = function(e) { - var target = e.target, - setting = data.getSetting(e.data.treeId), - tId = "", node = null, - nodeEventType = "", treeEventType = "", - nodeEventCallback = null, treeEventCallback = null; - - if (tools.eqs(e.type, "mouseover")) { - if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { - tId = tools.getNodeMainDom(target).id; - nodeEventType = "mouseoverCheck"; - } - } else if (tools.eqs(e.type, "mouseout")) { - if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { - tId = tools.getNodeMainDom(target).id; - nodeEventType = "mouseoutCheck"; - } - } else if (tools.eqs(e.type, "click")) { - if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { - tId = tools.getNodeMainDom(target).id; - nodeEventType = "checkNode"; - } - } - if (tId.length>0) { - node = data.getNodeCache(setting, tId); - switch (nodeEventType) { - case "checkNode" : - nodeEventCallback = _handler.onCheckNode; - break; - case "mouseoverCheck" : - nodeEventCallback = _handler.onMouseoverCheck; - break; - case "mouseoutCheck" : - nodeEventCallback = _handler.onMouseoutCheck; - break; - } - } - var proxyResult = { - stop: nodeEventType === "checkNode", - node: node, - nodeEventType: nodeEventType, - nodeEventCallback: nodeEventCallback, - treeEventType: treeEventType, - treeEventCallback: treeEventCallback - }; - return proxyResult - }, - //default init node of excheck - _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { - if (!n) return; - var checkedKey = setting.data.key.checked; - if (typeof n[checkedKey] == "string") n[checkedKey] = tools.eqs(n[checkedKey], "true"); - n[checkedKey] = !!n[checkedKey]; - n.checkedOld = n[checkedKey]; - if (typeof n.nocheck == "string") n.nocheck = tools.eqs(n.nocheck, "true"); - n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck); - if (typeof n.chkDisabled == "string") n.chkDisabled = tools.eqs(n.chkDisabled, "true"); - n.chkDisabled = !!n.chkDisabled || (setting.check.chkDisabledInherit && parentNode && !!parentNode.chkDisabled); - if (typeof n.halfCheck == "string") n.halfCheck = tools.eqs(n.halfCheck, "true"); - n.halfCheck = !!n.halfCheck; - n.check_Child_State = -1; - n.check_Focus = false; - n.getCheckStatus = function() {return data.getCheckStatus(setting, n);}; - - if (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && n[checkedKey] ) { - var r = data.getRoot(setting); - r.radioCheckedList.push(n); - } - }, - //add dom for check - _beforeA = function(setting, node, html) { - var checkedKey = setting.data.key.checked; - if (setting.check.enable) { - data.makeChkFlag(setting, node); - html.push(""); - } - }, - //update zTreeObj, add method of check - _zTreeTools = function(setting, zTreeTools) { - zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) { - var checkedKey = this.setting.data.key.checked; - if (node.chkDisabled === true) return; - if (checked !== true && checked !== false) { - checked = !node[checkedKey]; - } - callbackFlag = !!callbackFlag; - - if (node[checkedKey] === checked && !checkTypeFlag) { - return; - } else if (callbackFlag && tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) { - return; - } - if (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) { - node[checkedKey] = checked; - var checkObj = $$(node, consts.id.CHECK, this.setting); - if (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node); - view.setChkClass(this.setting, checkObj, node); - view.repairParentChkClassWithSelf(this.setting, node); - if (callbackFlag) { - this.setting.treeObj.trigger(consts.event.CHECK, [null, this.setting.treeId, node]); - } - } - } - - zTreeTools.checkAllNodes = function(checked) { - view.repairAllChk(this.setting, !!checked); - } - - zTreeTools.getCheckedNodes = function(checked) { - var childKey = this.setting.data.key.children; - checked = (checked !== false); - return data.getTreeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey], checked); - } - - zTreeTools.getChangeCheckedNodes = function() { - var childKey = this.setting.data.key.children; - return data.getTreeChangeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey]); - } - - zTreeTools.setChkDisabled = function(node, disabled, inheritParent, inheritChildren) { - disabled = !!disabled; - inheritParent = !!inheritParent; - inheritChildren = !!inheritChildren; - view.repairSonChkDisabled(this.setting, node, disabled, inheritChildren); - view.repairParentChkDisabled(this.setting, node.getParentNode(), disabled, inheritParent); - } - - var _updateNode = zTreeTools.updateNode; - zTreeTools.updateNode = function(node, checkTypeFlag) { - if (_updateNode) _updateNode.apply(zTreeTools, arguments); - if (!node || !this.setting.check.enable) return; - var nObj = $$(node, this.setting); - if (nObj.get(0) && tools.uCanDo(this.setting)) { - var checkObj = $$(node, consts.id.CHECK, this.setting); - if (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node); - view.setChkClass(this.setting, checkObj, node); - view.repairParentChkClassWithSelf(this.setting, node); - } - } - }, - //method of operate data - _data = { - getRadioCheckedList: function(setting) { - var checkedList = data.getRoot(setting).radioCheckedList; - for (var i=0, j=checkedList.length; i -1 && node.check_Child_State < 2) : (node.check_Child_State > 0))) - }; - return r; - }, - getTreeCheckedNodes: function(setting, nodes, checked, results) { - if (!nodes) return []; - var childKey = setting.data.key.children, - checkedKey = setting.data.key.checked, - onlyOne = (checked && setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL); - results = !results ? [] : results; - for (var i = 0, l = nodes.length; i < l; i++) { - if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] == checked) { - results.push(nodes[i]); - if(onlyOne) { - break; - } - } - data.getTreeCheckedNodes(setting, nodes[i][childKey], checked, results); - if(onlyOne && results.length > 0) { - break; - } - } - return results; - }, - getTreeChangeCheckedNodes: function(setting, nodes, results) { - if (!nodes) return []; - var childKey = setting.data.key.children, - checkedKey = setting.data.key.checked; - results = !results ? [] : results; - for (var i = 0, l = nodes.length; i < l; i++) { - if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] != nodes[i].checkedOld) { - results.push(nodes[i]); - } - data.getTreeChangeCheckedNodes(setting, nodes[i][childKey], results); - } - return results; - }, - makeChkFlag: function(setting, node) { - if (!node) return; - var childKey = setting.data.key.children, - checkedKey = setting.data.key.checked, - chkFlag = -1; - if (node[childKey]) { - for (var i = 0, l = node[childKey].length; i < l; i++) { - var cNode = node[childKey][i]; - var tmp = -1; - if (setting.check.chkStyle == consts.radio.STYLE) { - if (cNode.nocheck === true || cNode.chkDisabled === true) { - tmp = cNode.check_Child_State; - } else if (cNode.halfCheck === true) { - tmp = 2; - } else if (cNode[checkedKey]) { - tmp = 2; - } else { - tmp = cNode.check_Child_State > 0 ? 2:0; - } - if (tmp == 2) { - chkFlag = 2; break; - } else if (tmp == 0){ - chkFlag = 0; - } - } else if (setting.check.chkStyle == consts.checkbox.STYLE) { - if (cNode.nocheck === true || cNode.chkDisabled === true) { - tmp = cNode.check_Child_State; - } else if (cNode.halfCheck === true) { - tmp = 1; - } else if (cNode[checkedKey] ) { - tmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1; - } else { - tmp = (cNode.check_Child_State > 0) ? 1 : 0; - } - if (tmp === 1) { - chkFlag = 1; break; - } else if (tmp === 2 && chkFlag > -1 && i > 0 && tmp !== chkFlag) { - chkFlag = 1; break; - } else if (chkFlag === 2 && tmp > -1 && tmp < 2) { - chkFlag = 1; break; - } else if (tmp > -1) { - chkFlag = tmp; - } - } - } - } - node.check_Child_State = chkFlag; - } - }, - //method of event proxy - _event = { - - }, - //method of event handler - _handler = { - onCheckNode: function (event, node) { - if (node.chkDisabled === true) return false; - var setting = data.getSetting(event.data.treeId), - checkedKey = setting.data.key.checked; - if (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true; - node[checkedKey] = !node[checkedKey]; - view.checkNodeRelation(setting, node); - var checkObj = $$(node, consts.id.CHECK, setting); - view.setChkClass(setting, checkObj, node); - view.repairParentChkClassWithSelf(setting, node); - setting.treeObj.trigger(consts.event.CHECK, [event, setting.treeId, node]); - return true; - }, - onMouseoverCheck: function(event, node) { - if (node.chkDisabled === true) return false; - var setting = data.getSetting(event.data.treeId), - checkObj = $$(node, consts.id.CHECK, setting); - node.check_Focus = true; - view.setChkClass(setting, checkObj, node); - return true; - }, - onMouseoutCheck: function(event, node) { - if (node.chkDisabled === true) return false; - var setting = data.getSetting(event.data.treeId), - checkObj = $$(node, consts.id.CHECK, setting); - node.check_Focus = false; - view.setChkClass(setting, checkObj, node); - return true; - } - }, - //method of tools for zTree - _tools = { - - }, - //method of operate ztree dom - _view = { - checkNodeRelation: function(setting, node) { - var pNode, i, l, - childKey = setting.data.key.children, - checkedKey = setting.data.key.checked, - r = consts.radio; - if (setting.check.chkStyle == r.STYLE) { - var checkedList = data.getRadioCheckedList(setting); - if (node[checkedKey]) { - if (setting.check.radioType == r.TYPE_ALL) { - for (i = checkedList.length-1; i >= 0; i--) { - pNode = checkedList[i]; - if (pNode[checkedKey] && pNode != node) { - pNode[checkedKey] = false; - checkedList.splice(i, 1); - - view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode); - if (pNode.parentTId != node.parentTId) { - view.repairParentChkClassWithSelf(setting, pNode); - } - } - } - checkedList.push(node); - } else { - var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting); - for (i = 0, l = parentNode[childKey].length; i < l; i++) { - pNode = parentNode[childKey][i]; - if (pNode[checkedKey] && pNode != node) { - pNode[checkedKey] = false; - view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode); - } - } - } - } else if (setting.check.radioType == r.TYPE_ALL) { - for (i = 0, l = checkedList.length; i < l; i++) { - if (node == checkedList[i]) { - checkedList.splice(i, 1); - break; - } - } - } - - } else { - if (node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.Y.indexOf("s") > -1)) { - view.setSonNodeCheckBox(setting, node, true); - } - if (!node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.N.indexOf("s") > -1)) { - view.setSonNodeCheckBox(setting, node, false); - } - if (node[checkedKey] && setting.check.chkboxType.Y.indexOf("p") > -1) { - view.setParentNodeCheckBox(setting, node, true); - } - if (!node[checkedKey] && setting.check.chkboxType.N.indexOf("p") > -1) { - view.setParentNodeCheckBox(setting, node, false); - } - } - }, - makeChkClass: function(setting, node) { - var checkedKey = setting.data.key.checked, - c = consts.checkbox, r = consts.radio, - fullStyle = ""; - if (node.chkDisabled === true) { - fullStyle = c.DISABLED; - } else if (node.halfCheck) { - fullStyle = c.PART; - } else if (setting.check.chkStyle == r.STYLE) { - fullStyle = (node.check_Child_State < 1)? c.FULL:c.PART; - } else { - fullStyle = node[checkedKey] ? ((node.check_Child_State === 2 || node.check_Child_State === -1) ? c.FULL:c.PART) : ((node.check_Child_State < 1)? c.FULL:c.PART); - } - var chkName = setting.check.chkStyle + "_" + (node[checkedKey] ? c.TRUE : c.FALSE) + "_" + fullStyle; - chkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + "_" + c.FOCUS : chkName; - return consts.className.BUTTON + " " + c.DEFAULT + " " + chkName; - }, - repairAllChk: function(setting, checked) { - if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) { - var checkedKey = setting.data.key.checked, - childKey = setting.data.key.children, - root = data.getRoot(setting); - for (var i = 0, l = root[childKey].length; i 0) { - view.repairParentChkClass(setting, node[childKey][0]); - } else { - view.repairParentChkClass(setting, node); - } - }, - repairSonChkDisabled: function(setting, node, chkDisabled, inherit) { - if (!node) return; - var childKey = setting.data.key.children; - if (node.chkDisabled != chkDisabled) { - node.chkDisabled = chkDisabled; - } - view.repairChkClass(setting, node); - if (node[childKey] && inherit) { - for (var i = 0, l = node[childKey].length; i < l; i++) { - var sNode = node[childKey][i]; - view.repairSonChkDisabled(setting, sNode, chkDisabled, inherit); - } - } - }, - repairParentChkDisabled: function(setting, node, chkDisabled, inherit) { - if (!node) return; - if (node.chkDisabled != chkDisabled && inherit) { - node.chkDisabled = chkDisabled; - } - view.repairChkClass(setting, node); - view.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled, inherit); - }, - setChkClass: function(setting, obj, node) { - if (!obj) return; - if (node.nocheck === true) { - obj.hide(); - } else { - obj.show(); - } - obj.attr('class', view.makeChkClass(setting, node)); - }, - setParentNodeCheckBox: function(setting, node, value, srcNode) { - var childKey = setting.data.key.children, - checkedKey = setting.data.key.checked, - checkObj = $$(node, consts.id.CHECK, setting); - if (!srcNode) srcNode = node; - data.makeChkFlag(setting, node); - if (node.nocheck !== true && node.chkDisabled !== true) { - node[checkedKey] = value; - view.setChkClass(setting, checkObj, node); - if (setting.check.autoCheckTrigger && node != srcNode) { - setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]); - } - } - if (node.parentTId) { - var pSign = true; - if (!value) { - var pNodes = node.getParentNode()[childKey]; - for (var i = 0, l = pNodes.length; i < l; i++) { - if ((pNodes[i].nocheck !== true && pNodes[i].chkDisabled !== true && pNodes[i][checkedKey]) - || ((pNodes[i].nocheck === true || pNodes[i].chkDisabled === true) && pNodes[i].check_Child_State > 0)) { - pSign = false; - break; - } - } - } - if (pSign) { - view.setParentNodeCheckBox(setting, node.getParentNode(), value, srcNode); - } - } - }, - setSonNodeCheckBox: function(setting, node, value, srcNode) { - if (!node) return; - var childKey = setting.data.key.children, - checkedKey = setting.data.key.checked, - checkObj = $$(node, consts.id.CHECK, setting); - if (!srcNode) srcNode = node; - - var hasDisable = false; - if (node[childKey]) { - for (var i = 0, l = node[childKey].length; i < l && node.chkDisabled !== true; i++) { - var sNode = node[childKey][i]; - view.setSonNodeCheckBox(setting, sNode, value, srcNode); - if (sNode.chkDisabled === true) hasDisable = true; - } - } - - if (node != data.getRoot(setting) && node.chkDisabled !== true) { - if (hasDisable && node.nocheck !== true) { - data.makeChkFlag(setting, node); - } - if (node.nocheck !== true && node.chkDisabled !== true) { - node[checkedKey] = value; - if (!hasDisable) node.check_Child_State = (node[childKey] && node[childKey].length > 0) ? (value ? 2 : 0) : -1; - } else { - node.check_Child_State = -1; - } - view.setChkClass(setting, checkObj, node); - if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true && node.chkDisabled !== true) { - setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]); - } - } - - } - }, - - _z = { - tools: _tools, - view: _view, - event: _event, - data: _data - }; - $.extend(true, $.fn.zTree.consts, _consts); - $.extend(true, $.fn.zTree._z, _z); - - var zt = $.fn.zTree, - tools = zt._z.tools, - consts = zt.consts, - view = zt._z.view, - data = zt._z.data, - event = zt._z.event, - $$ = tools.$; - - data.exSetting(_setting); - data.addInitBind(_bindEvent); - data.addInitUnBind(_unbindEvent); - data.addInitCache(_initCache); - data.addInitNode(_initNode); - data.addInitProxy(_eventProxy, true); - data.addInitRoot(_initRoot); - data.addBeforeA(_beforeA); - data.addZTreeTools(_zTreeTools); - - var _createNodes = view.createNodes; - view.createNodes = function(setting, level, nodes, parentNode) { - if (_createNodes) _createNodes.apply(view, arguments); - if (!nodes) return; - view.repairParentChkClassWithSelf(setting, parentNode); - } - var _removeNode = view.removeNode; - view.removeNode = function(setting, node) { - var parentNode = node.getParentNode(); - if (_removeNode) _removeNode.apply(view, arguments); - if (!node || !parentNode) return; - view.repairChkClass(setting, parentNode); - view.repairParentChkClass(setting, parentNode); - } - - var _appendNodes = view.appendNodes; - view.appendNodes = function(setting, level, nodes, parentNode, initFlag, openFlag) { - var html = ""; - if (_appendNodes) { - html = _appendNodes.apply(view, arguments); - } - if (parentNode) { - data.makeChkFlag(setting, parentNode); - } - return html; - } -})(jQuery); \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/js/jquery.ztree.excheck-3.5.min.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/js/jquery.ztree.excheck-3.5.min.js deleted file mode 100644 index 9140a5b3..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/js/jquery.ztree.excheck-3.5.min.js +++ /dev/null @@ -1,34 +0,0 @@ -/* - * JQuery zTree excheck v3.5.18 - * http://zTree.me/ - * - * Copyright (c) 2010 Hunter.z - * - * Licensed same as jquery - MIT License - * http://www.opensource.org/licenses/mit-license.php - * - * email: hunter.z@263.net - * Date: 2015-05-25 - */ -(function(m){var p,q,r,o={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{STYLE:"checkbox",DEFAULT:"chk",DISABLED:"disable",FALSE:"false",TRUE:"true",FULL:"full",PART:"part",FOCUS:"focus"},radio:{STYLE:"radio",TYPE_ALL:"all",TYPE_LEVEL:"level"}},v={check:{enable:!1,autoCheckTrigger:!1,chkStyle:o.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:o.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}};p=function(c, -a){if(a.chkDisabled===!0)return!1;var b=f.getSetting(c.data.treeId),d=b.data.key.checked;if(k.apply(b.callback.beforeCheck,[b.treeId,a],!0)==!1)return!0;a[d]=!a[d];e.checkNodeRelation(b,a);d=n(a,j.id.CHECK,b);e.setChkClass(b,d,a);e.repairParentChkClassWithSelf(b,a);b.treeObj.trigger(j.event.CHECK,[c,b.treeId,a]);return!0};q=function(c,a){if(a.chkDisabled===!0)return!1;var b=f.getSetting(c.data.treeId),d=n(a,j.id.CHECK,b);a.check_Focus=!0;e.setChkClass(b,d,a);return!0};r=function(c,a){if(a.chkDisabled=== -!0)return!1;var b=f.getSetting(c.data.treeId),d=n(a,j.id.CHECK,b);a.check_Focus=!1;e.setChkClass(b,d,a);return!0};m.extend(!0,m.fn.zTree.consts,o);m.extend(!0,m.fn.zTree._z,{tools:{},view:{checkNodeRelation:function(c,a){var b,d,h,i=c.data.key.children,l=c.data.key.checked;b=j.radio;if(c.check.chkStyle==b.STYLE){var g=f.getRadioCheckedList(c);if(a[l])if(c.check.radioType==b.TYPE_ALL){for(d=g.length-1;d>=0;d--)b=g[d],b[l]&&b!=a&&(b[l]=!1,g.splice(d,1),e.setChkClass(c,n(b,j.id.CHECK,c),b),b.parentTId!= -a.parentTId&&e.repairParentChkClassWithSelf(c,b));g.push(a)}else{g=a.parentTId?a.getParentNode():f.getRoot(c);for(d=0,h=g[i].length;d-1)&&e.setSonNodeCheckBox(c,a,!0),!a[l]&&(!a[i]||a[i].length==0||c.check.chkboxType.N.indexOf("s")>-1)&&e.setSonNodeCheckBox(c, -a,!1),a[l]&&c.check.chkboxType.Y.indexOf("p")>-1&&e.setParentNodeCheckBox(c,a,!0),!a[l]&&c.check.chkboxType.N.indexOf("p")>-1&&e.setParentNodeCheckBox(c,a,!1)},makeChkClass:function(c,a){var b=c.data.key.checked,d=j.checkbox,h=j.radio,i="",i=a.chkDisabled===!0?d.DISABLED:a.halfCheck?d.PART:c.check.chkStyle==h.STYLE?a.check_Child_State<1?d.FULL:d.PART:a[b]?a.check_Child_State===2||a.check_Child_State===-1?d.FULL:d.PART:a.check_Child_State<1?d.FULL:d.PART,b=c.check.chkStyle+"_"+(a[b]?d.TRUE:d.FALSE)+ -"_"+i,b=a.check_Focus&&a.chkDisabled!==!0?b+"_"+d.FOCUS:b;return j.className.BUTTON+" "+d.DEFAULT+" "+b},repairAllChk:function(c,a){if(c.check.enable&&c.check.chkStyle===j.checkbox.STYLE)for(var b=c.data.key.checked,d=c.data.key.children,h=f.getRoot(c),i=0,l=h[d].length;i0?e.repairParentChkClass(c,a[b][0]):e.repairParentChkClass(c,a)}},repairSonChkDisabled:function(c,a,b,d){if(a){var h=c.data.key.children;if(a.chkDisabled!=b)a.chkDisabled=b;e.repairChkClass(c,a);if(a[h]&&d)for(var i=0,l=a[h].length;i0){l=!1;break}l&&e.setParentNodeCheckBox(c,a.getParentNode(),b,d)}},setSonNodeCheckBox:function(c,a,b,d){if(a){var h=c.data.key.children,i=c.data.key.checked,l=n(a,j.id.CHECK,c);d||(d=a);var g=!1;if(a[h])for(var k=0,m=a[h].length;k0?b?2:0:-1}else a.check_Child_State=-1;e.setChkClass(c,l,a);c.check.autoCheckTrigger&&a!=d&&a.nocheck!==!0&&a.chkDisabled!==!0&&c.treeObj.trigger(j.event.CHECK,[null,c.treeId,a])}}}},event:{},data:{getRadioCheckedList:function(c){for(var a=f.getRoot(c).radioCheckedList,b=0,d=a.length;b-1&&a.check_Child_State<2:a.check_Child_State>0}},getTreeCheckedNodes:function(c,a,b,d){if(!a)return[];for(var h=c.data.key.children,i=c.data.key.checked,e=b&&c.check.chkStyle==j.radio.STYLE&&c.check.radioType==j.radio.TYPE_ALL, -d=!d?[]:d,g=0,k=a.length;g0)break}return d},getTreeChangeCheckedNodes:function(c,a,b){if(!a)return[];for(var d=c.data.key.children,h=c.data.key.checked,b=!b?[]:b,i=0,e=a.length;i0?2:0,f==2){h=2;break}else f==0&&(h=0);else if(c.check.chkStyle==j.checkbox.STYLE)if(f=g.nocheck===!0||g.chkDisabled===!0?g.check_Child_State:g.halfCheck===!0?1:g[d]?g.check_Child_State===-1||g.check_Child_State===2?2:1:g.check_Child_State>0?1:0,f===1){h=1;break}else if(f=== -2&&h>-1&&i>0&&f!==h){h=1;break}else if(h===2&&f>-1&&f<2){h=1;break}else f>-1&&(h=f)}a.check_Child_State=h}}}});var m=m.fn.zTree,k=m._z.tools,j=m.consts,e=m._z.view,f=m._z.data,n=k.$;f.exSetting(v);f.addInitBind(function(c){c.treeObj.bind(j.event.CHECK,function(a,b,d,h){a.srcEvent=b;k.apply(c.callback.onCheck,[a,d,h])})});f.addInitUnBind(function(c){c.treeObj.unbind(j.event.CHECK)});f.addInitCache(function(){});f.addInitNode(function(c,a,b,d){if(b){a=c.data.key.checked;typeof b[a]=="string"&&(b[a]= -k.eqs(b[a],"true"));b[a]=!!b[a];b.checkedOld=b[a];if(typeof b.nocheck=="string")b.nocheck=k.eqs(b.nocheck,"true");b.nocheck=!!b.nocheck||c.check.nocheckInherit&&d&&!!d.nocheck;if(typeof b.chkDisabled=="string")b.chkDisabled=k.eqs(b.chkDisabled,"true");b.chkDisabled=!!b.chkDisabled||c.check.chkDisabledInherit&&d&&!!d.chkDisabled;if(typeof b.halfCheck=="string")b.halfCheck=k.eqs(b.halfCheck,"true");b.halfCheck=!!b.halfCheck;b.check_Child_State=-1;b.check_Focus=!1;b.getCheckStatus=function(){return f.getCheckStatus(c, -b)};c.check.chkStyle==j.radio.STYLE&&c.check.radioType==j.radio.TYPE_ALL&&b[a]&&f.getRoot(c).radioCheckedList.push(b)}});f.addInitProxy(function(c){var a=c.target,b=f.getSetting(c.data.treeId),d="",h=null,e="",l=null;if(k.eqs(c.type,"mouseover")){if(b.check.enable&&k.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+j.id.CHECK)!==null)d=k.getNodeMainDom(a).id,e="mouseoverCheck"}else if(k.eqs(c.type,"mouseout")){if(b.check.enable&&k.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+j.id.CHECK)!==null)d= -k.getNodeMainDom(a).id,e="mouseoutCheck"}else if(k.eqs(c.type,"click")&&b.check.enable&&k.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+j.id.CHECK)!==null)d=k.getNodeMainDom(a).id,e="checkNode";if(d.length>0)switch(h=f.getNodeCache(b,d),e){case "checkNode":l=p;break;case "mouseoverCheck":l=q;break;case "mouseoutCheck":l=r}return{stop:e==="checkNode",node:h,nodeEventType:e,nodeEventCallback:l,treeEventType:"",treeEventCallback:null}},!0);f.addInitRoot(function(c){f.getRoot(c).radioCheckedList=[]}); -f.addBeforeA(function(c,a,b){c.check.enable&&(f.makeChkFlag(c,a),b.push(""))});f.addZTreeTools(function(c,a){a.checkNode=function(a,b,c,f){var g=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[g]),f=!!f,(a[g]!==b||c)&&!(f&&k.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0)==!1)&&k.uCanDo(this.setting)&&this.setting.check.enable&& -a.nocheck!==!0))a[g]=b,b=n(a,j.id.CHECK,this.setting),(c||this.setting.check.chkStyle===j.radio.STYLE)&&e.checkNodeRelation(this.setting,a),e.setChkClass(this.setting,b,a),e.repairParentChkClassWithSelf(this.setting,a),f&&this.setting.treeObj.trigger(j.event.CHECK,[null,this.setting.treeId,a])};a.checkAllNodes=function(a){e.repairAllChk(this.setting,!!a)};a.getCheckedNodes=function(a){var b=this.setting.data.key.children;return f.getTreeCheckedNodes(this.setting,f.getRoot(this.setting)[b],a!==!1)}; -a.getChangeCheckedNodes=function(){var a=this.setting.data.key.children;return f.getTreeChangeCheckedNodes(this.setting,f.getRoot(this.setting)[a])};a.setChkDisabled=function(a,b,c,f){b=!!b;c=!!c;e.repairSonChkDisabled(this.setting,a,b,!!f);e.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var b=a.updateNode;a.updateNode=function(c,f){b&&b.apply(a,arguments);if(c&&this.setting.check.enable&&n(c,this.setting).get(0)&&k.uCanDo(this.setting)){var i=n(c,j.id.CHECK,this.setting);(f==!0||this.setting.check.chkStyle=== -j.radio.STYLE)&&e.checkNodeRelation(this.setting,c);e.setChkClass(this.setting,i,c);e.repairParentChkClassWithSelf(this.setting,c)}}});var s=e.createNodes;e.createNodes=function(c,a,b,d){s&&s.apply(e,arguments);b&&e.repairParentChkClassWithSelf(c,d)};var t=e.removeNode;e.removeNode=function(c,a){var b=a.getParentNode();t&&t.apply(e,arguments);a&&b&&(e.repairChkClass(c,b),e.repairParentChkClass(c,b))};var u=e.appendNodes;e.appendNodes=function(c,a,b,d,h,i){var j="";u&&(j=u.apply(e,arguments));d&&f.makeChkFlag(c, -d);return j}})(jQuery); diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/js/jquery.ztree.exedit-3.5.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/js/jquery.ztree.exedit-3.5.js deleted file mode 100644 index d99367f0..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/js/jquery.ztree.exedit-3.5.js +++ /dev/null @@ -1,1190 +0,0 @@ -/* - * JQuery zTree exedit v3.5.18 - * http://zTree.me/ - * - * Copyright (c) 2010 Hunter.z - * - * Licensed same as jquery - MIT License - * http://www.opensource.org/licenses/mit-license.php - * - * email: hunter.z@263.net - * Date: 2015-05-25 - */ -(function($){ - //default consts of exedit - var _consts = { - event: { - DRAG: "ztree_drag", - DROP: "ztree_drop", - RENAME: "ztree_rename", - DRAGMOVE:"ztree_dragmove" - }, - id: { - EDIT: "_edit", - INPUT: "_input", - REMOVE: "_remove" - }, - move: { - TYPE_INNER: "inner", - TYPE_PREV: "prev", - TYPE_NEXT: "next" - }, - node: { - CURSELECTED_EDIT: "curSelectedNode_Edit", - TMPTARGET_TREE: "tmpTargetzTree", - TMPTARGET_NODE: "tmpTargetNode" - } - }, - //default setting of exedit - _setting = { - edit: { - enable: false, - editNameSelectAll: false, - showRemoveBtn: true, - showRenameBtn: true, - removeTitle: "remove", - renameTitle: "rename", - drag: { - autoExpandTrigger: false, - isCopy: true, - isMove: true, - prev: true, - next: true, - inner: true, - minMoveSize: 5, - borderMax: 10, - borderMin: -5, - maxShowNodeNum: 5, - autoOpenTime: 500 - } - }, - view: { - addHoverDom: null, - removeHoverDom: null - }, - callback: { - beforeDrag:null, - beforeDragOpen:null, - beforeDrop:null, - beforeEditName:null, - beforeRename:null, - onDrag:null, - onDragMove:null, - onDrop:null, - onRename:null - } - }, - //default root of exedit - _initRoot = function (setting) { - var r = data.getRoot(setting), rs = data.getRoots(); - r.curEditNode = null; - r.curEditInput = null; - r.curHoverNode = null; - r.dragFlag = 0; - r.dragNodeShowBefore = []; - r.dragMaskList = new Array(); - rs.showHoverDom = true; - }, - //default cache of exedit - _initCache = function(treeId) {}, - //default bind event of exedit - _bindEvent = function(setting) { - var o = setting.treeObj; - var c = consts.event; - o.bind(c.RENAME, function (event, treeId, treeNode, isCancel) { - tools.apply(setting.callback.onRename, [event, treeId, treeNode, isCancel]); - }); - - o.bind(c.DRAG, function (event, srcEvent, treeId, treeNodes) { - tools.apply(setting.callback.onDrag, [srcEvent, treeId, treeNodes]); - }); - - o.bind(c.DRAGMOVE,function(event, srcEvent, treeId, treeNodes){ - tools.apply(setting.callback.onDragMove,[srcEvent, treeId, treeNodes]); - }); - - o.bind(c.DROP, function (event, srcEvent, treeId, treeNodes, targetNode, moveType, isCopy) { - tools.apply(setting.callback.onDrop, [srcEvent, treeId, treeNodes, targetNode, moveType, isCopy]); - }); - }, - _unbindEvent = function(setting) { - var o = setting.treeObj; - var c = consts.event; - o.unbind(c.RENAME); - o.unbind(c.DRAG); - o.unbind(c.DRAGMOVE); - o.unbind(c.DROP); - }, - //default event proxy of exedit - _eventProxy = function(e) { - var target = e.target, - setting = data.getSetting(e.data.treeId), - relatedTarget = e.relatedTarget, - tId = "", node = null, - nodeEventType = "", treeEventType = "", - nodeEventCallback = null, treeEventCallback = null, - tmp = null; - - if (tools.eqs(e.type, "mouseover")) { - tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]); - if (tmp) { - tId = tools.getNodeMainDom(tmp).id; - nodeEventType = "hoverOverNode"; - } - } else if (tools.eqs(e.type, "mouseout")) { - tmp = tools.getMDom(setting, relatedTarget, [{tagName:"a", attrName:"treeNode"+consts.id.A}]); - if (!tmp) { - tId = "remove"; - nodeEventType = "hoverOutNode"; - } - } else if (tools.eqs(e.type, "mousedown")) { - tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]); - if (tmp) { - tId = tools.getNodeMainDom(tmp).id; - nodeEventType = "mousedownNode"; - } - } - if (tId.length>0) { - node = data.getNodeCache(setting, tId); - switch (nodeEventType) { - case "mousedownNode" : - nodeEventCallback = _handler.onMousedownNode; - break; - case "hoverOverNode" : - nodeEventCallback = _handler.onHoverOverNode; - break; - case "hoverOutNode" : - nodeEventCallback = _handler.onHoverOutNode; - break; - } - } - var proxyResult = { - stop: false, - node: node, - nodeEventType: nodeEventType, - nodeEventCallback: nodeEventCallback, - treeEventType: treeEventType, - treeEventCallback: treeEventCallback - }; - return proxyResult - }, - //default init node of exedit - _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { - if (!n) return; - n.isHover = false; - n.editNameFlag = false; - }, - //update zTreeObj, add method of edit - _zTreeTools = function(setting, zTreeTools) { - zTreeTools.cancelEditName = function(newName) { - var root = data.getRoot(this.setting); - if (!root.curEditNode) return; - view.cancelCurEditNode(this.setting, newName?newName:null, true); - } - zTreeTools.copyNode = function(targetNode, node, moveType, isSilent) { - if (!node) return null; - if (targetNode && !targetNode.isParent && this.setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) return null; - var _this = this, - newNode = tools.clone(node); - if (!targetNode) { - targetNode = null; - moveType = consts.move.TYPE_INNER; - } - if (moveType == consts.move.TYPE_INNER) { - function copyCallback() { - view.addNodes(_this.setting, targetNode, [newNode], isSilent); - } - - if (tools.canAsync(this.setting, targetNode)) { - view.asyncNode(this.setting, targetNode, isSilent, copyCallback); - } else { - copyCallback(); - } - } else { - view.addNodes(this.setting, targetNode.parentNode, [newNode], isSilent); - view.moveNode(this.setting, targetNode, newNode, moveType, false, isSilent); - } - return newNode; - } - zTreeTools.editName = function(node) { - if (!node || !node.tId || node !== data.getNodeCache(this.setting, node.tId)) return; - if (node.parentTId) view.expandCollapseParentNode(this.setting, node.getParentNode(), true); - view.editNode(this.setting, node) - } - zTreeTools.moveNode = function(targetNode, node, moveType, isSilent) { - if (!node) return node; - if (targetNode && !targetNode.isParent && this.setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) { - return null; - } else if (targetNode && ((node.parentTId == targetNode.tId && moveType == consts.move.TYPE_INNER) || $$(node, this.setting).find("#" + targetNode.tId).length > 0)) { - return null; - } else if (!targetNode) { - targetNode = null; - } - var _this = this; - function moveCallback() { - view.moveNode(_this.setting, targetNode, node, moveType, false, isSilent); - } - if (tools.canAsync(this.setting, targetNode) && moveType === consts.move.TYPE_INNER) { - view.asyncNode(this.setting, targetNode, isSilent, moveCallback); - } else { - moveCallback(); - } - return node; - } - zTreeTools.setEditable = function(editable) { - this.setting.edit.enable = editable; - return this.refresh(); - } - }, - //method of operate data - _data = { - setSonNodeLevel: function(setting, parentNode, node) { - if (!node) return; - var childKey = setting.data.key.children; - node.level = (parentNode)? parentNode.level + 1 : 0; - if (!node[childKey]) return; - for (var i = 0, l = node[childKey].length; i < l; i++) { - if (node[childKey][i]) data.setSonNodeLevel(setting, node, node[childKey][i]); - } - } - }, - //method of event proxy - _event = { - - }, - //method of event handler - _handler = { - onHoverOverNode: function(event, node) { - var setting = data.getSetting(event.data.treeId), - root = data.getRoot(setting); - if (root.curHoverNode != node) { - _handler.onHoverOutNode(event); - } - root.curHoverNode = node; - view.addHoverDom(setting, node); - }, - onHoverOutNode: function(event, node) { - var setting = data.getSetting(event.data.treeId), - root = data.getRoot(setting); - if (root.curHoverNode && !data.isSelectedNode(setting, root.curHoverNode)) { - view.removeTreeDom(setting, root.curHoverNode); - root.curHoverNode = null; - } - }, - onMousedownNode: function(eventMouseDown, _node) { - var i,l, - setting = data.getSetting(eventMouseDown.data.treeId), - root = data.getRoot(setting), roots = data.getRoots(); - //right click can't drag & drop - if (eventMouseDown.button == 2 || !setting.edit.enable || (!setting.edit.drag.isCopy && !setting.edit.drag.isMove)) return true; - - //input of edit node name can't drag & drop - var target = eventMouseDown.target, - _nodes = data.getRoot(setting).curSelectedList, - nodes = []; - if (!data.isSelectedNode(setting, _node)) { - nodes = [_node]; - } else { - for (i=0, l=_nodes.length; i1) { - var pNodes = nodes[0].parentTId ? nodes[0].getParentNode()[childKey] : data.getNodes(setting); - tmpNodes = []; - for (i=0, l=pNodes.length; i -1 && (lastIndex+1) !== i) { - isOrder = false; - } - tmpNodes.push(pNodes[i]); - lastIndex = i; - } - if (nodes.length === tmpNodes.length) { - nodes = tmpNodes; - break; - } - } - } - if (isOrder) { - preNode = nodes[0].getPreNode(); - nextNode = nodes[nodes.length-1].getNextNode(); - } - - //set node in selected - curNode = $$("
                          ", setting); - for (i=0, l=nodes.length; i0); - view.removeTreeDom(setting, tmpNode); - - if (i > setting.edit.drag.maxShowNodeNum-1) { - continue; - } - - tmpDom = $$("
                        • ", setting); - tmpDom.append($$(tmpNode, consts.id.A, setting).clone()); - tmpDom.css("padding", "0"); - tmpDom.children("#" + tmpNode.tId + consts.id.A).removeClass(consts.node.CURSELECTED); - curNode.append(tmpDom); - if (i == setting.edit.drag.maxShowNodeNum-1) { - tmpDom = $$("
                        • ...
                        • ", setting); - curNode.append(tmpDom); - } - } - curNode.attr("id", nodes[0].tId + consts.id.UL + "_tmp"); - curNode.addClass(setting.treeObj.attr("class")); - curNode.appendTo(body); - - tmpArrow = $$("", setting); - tmpArrow.attr("id", "zTreeMove_arrow_tmp"); - tmpArrow.appendTo(body); - - setting.treeObj.trigger(consts.event.DRAG, [event, setting.treeId, nodes]); - } - - if (root.dragFlag == 1) { - if (tmpTarget && tmpArrow.attr("id") == event.target.id && tmpTargetNodeId && (event.clientX + doc.scrollLeft()+2) > ($("#" + tmpTargetNodeId + consts.id.A, tmpTarget).offset().left)) { - var xT = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget); - event.target = (xT.length > 0) ? xT.get(0) : event.target; - } else if (tmpTarget) { - tmpTarget.removeClass(consts.node.TMPTARGET_TREE); - if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV) - .removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER); - } - tmpTarget = null; - tmpTargetNodeId = null; - - //judge drag & drop in multi ztree - isOtherTree = false; - targetSetting = setting; - var settings = data.getSettings(); - for (var s in settings) { - if (settings[s].treeId && settings[s].edit.enable && settings[s].treeId != setting.treeId - && (event.target.id == settings[s].treeId || $(event.target).parents("#" + settings[s].treeId).length>0)) { - isOtherTree = true; - targetSetting = settings[s]; - } - } - - var docScrollTop = doc.scrollTop(), - docScrollLeft = doc.scrollLeft(), - treeOffset = targetSetting.treeObj.offset(), - scrollHeight = targetSetting.treeObj.get(0).scrollHeight, - scrollWidth = targetSetting.treeObj.get(0).scrollWidth, - dTop = (event.clientY + docScrollTop - treeOffset.top), - dBottom = (targetSetting.treeObj.height() + treeOffset.top - event.clientY - docScrollTop), - dLeft = (event.clientX + docScrollLeft - treeOffset.left), - dRight = (targetSetting.treeObj.width() + treeOffset.left - event.clientX - docScrollLeft), - isTop = (dTop < setting.edit.drag.borderMax && dTop > setting.edit.drag.borderMin), - isBottom = (dBottom < setting.edit.drag.borderMax && dBottom > setting.edit.drag.borderMin), - isLeft = (dLeft < setting.edit.drag.borderMax && dLeft > setting.edit.drag.borderMin), - isRight = (dRight < setting.edit.drag.borderMax && dRight > setting.edit.drag.borderMin), - isTreeInner = dTop > setting.edit.drag.borderMin && dBottom > setting.edit.drag.borderMin && dLeft > setting.edit.drag.borderMin && dRight > setting.edit.drag.borderMin, - isTreeTop = (isTop && targetSetting.treeObj.scrollTop() <= 0), - isTreeBottom = (isBottom && (targetSetting.treeObj.scrollTop() + targetSetting.treeObj.height()+10) >= scrollHeight), - isTreeLeft = (isLeft && targetSetting.treeObj.scrollLeft() <= 0), - isTreeRight = (isRight && (targetSetting.treeObj.scrollLeft() + targetSetting.treeObj.width()+10) >= scrollWidth); - - if (event.target && tools.isChildOrSelf(event.target, targetSetting.treeId)) { - //get node
                        • dom - var targetObj = event.target; - while (targetObj && targetObj.tagName && !tools.eqs(targetObj.tagName, "li") && targetObj.id != targetSetting.treeId) { - targetObj = targetObj.parentNode; - } - - var canMove = true; - //don't move to self or children of self - for (i=0, l=nodes.length; i 0) { - canMove = false; - break; - } - } - if (canMove && event.target && tools.isChildOrSelf(event.target, targetObj.id + consts.id.A)) { - tmpTarget = $(targetObj); - tmpTargetNodeId = targetObj.id; - } - } - - //the mouse must be in zTree - tmpNode = nodes[0]; - if (isTreeInner && tools.isChildOrSelf(event.target, targetSetting.treeId)) { - //judge mouse move in root of ztree - if (!tmpTarget && (event.target.id == targetSetting.treeId || isTreeTop || isTreeBottom || isTreeLeft || isTreeRight) && (isOtherTree || (!isOtherTree && tmpNode.parentTId))) { - tmpTarget = targetSetting.treeObj; - } - //auto scroll top - if (isTop) { - targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop()-10); - } else if (isBottom) { - targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop()+10); - } - if (isLeft) { - targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()-10); - } else if (isRight) { - targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()+10); - } - //auto scroll left - if (tmpTarget && tmpTarget != targetSetting.treeObj && tmpTarget.offset().left < targetSetting.treeObj.offset().left) { - targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()+ tmpTarget.offset().left - targetSetting.treeObj.offset().left); - } - } - - curNode.css({ - "top": (event.clientY + docScrollTop + 3) + "px", - "left": (event.clientX + docScrollLeft + 3) + "px" - }); - - var dX = 0; - var dY = 0; - if (tmpTarget && tmpTarget.attr("id")!=targetSetting.treeId) { - var tmpTargetNode = tmpTargetNodeId == null ? null: data.getNodeCache(targetSetting, tmpTargetNodeId), - isCopy = ((event.ctrlKey || event.metaKey) && setting.edit.drag.isMove && setting.edit.drag.isCopy) || (!setting.edit.drag.isMove && setting.edit.drag.isCopy), - isPrev = !!(preNode && tmpTargetNodeId === preNode.tId), - isNext = !!(nextNode && tmpTargetNodeId === nextNode.tId), - isInner = (tmpNode.parentTId && tmpNode.parentTId == tmpTargetNodeId), - canPrev = (isCopy || !isNext) && tools.apply(targetSetting.edit.drag.prev, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.prev), - canNext = (isCopy || !isPrev) && tools.apply(targetSetting.edit.drag.next, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.next), - canInner = (isCopy || !isInner) && !(targetSetting.data.keep.leaf && !tmpTargetNode.isParent) && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.inner); - if (!canPrev && !canNext && !canInner) { - tmpTarget = null; - tmpTargetNodeId = ""; - moveType = consts.move.TYPE_INNER; - tmpArrow.css({ - "display":"none" - }); - if (window.zTreeMoveTimer) { - clearTimeout(window.zTreeMoveTimer); - window.zTreeMoveTargetNodeTId = null - } - } else { - var tmpTargetA = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget), - tmpNextA = tmpTargetNode.isLastNode ? null : $("#" + tmpTargetNode.getNextNode().tId + consts.id.A, tmpTarget.next()), - tmpTop = tmpTargetA.offset().top, - tmpLeft = tmpTargetA.offset().left, - prevPercent = canPrev ? (canInner ? 0.25 : (canNext ? 0.5 : 1) ) : -1, - nextPercent = canNext ? (canInner ? 0.75 : (canPrev ? 0.5 : 0) ) : -1, - dY_percent = (event.clientY + docScrollTop - tmpTop)/tmpTargetA.height(); - if ((prevPercent==1 ||dY_percent<=prevPercent && dY_percent>=-.2) && canPrev) { - dX = 1 - tmpArrow.width(); - dY = tmpTop - tmpArrow.height()/2; - moveType = consts.move.TYPE_PREV; - } else if ((nextPercent==0 || dY_percent>=nextPercent && dY_percent<=1.2) && canNext) { - dX = 1 - tmpArrow.width(); - dY = (tmpNextA == null || (tmpTargetNode.isParent && tmpTargetNode.open)) ? (tmpTop + tmpTargetA.height() - tmpArrow.height()/2) : (tmpNextA.offset().top - tmpArrow.height()/2); - moveType = consts.move.TYPE_NEXT; - }else { - dX = 5 - tmpArrow.width(); - dY = tmpTop; - moveType = consts.move.TYPE_INNER; - } - tmpArrow.css({ - "display":"block", - "top": dY + "px", - "left": (tmpLeft + dX) + "px" - }); - tmpTargetA.addClass(consts.node.TMPTARGET_NODE + "_" + moveType); - - if (preTmpTargetNodeId != tmpTargetNodeId || preTmpMoveType != moveType) { - startTime = (new Date()).getTime(); - } - if (tmpTargetNode && tmpTargetNode.isParent && moveType == consts.move.TYPE_INNER) { - var startTimer = true; - if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId !== tmpTargetNode.tId) { - clearTimeout(window.zTreeMoveTimer); - window.zTreeMoveTargetNodeTId = null; - }else if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId === tmpTargetNode.tId) { - startTimer = false; - } - if (startTimer) { - window.zTreeMoveTimer = setTimeout(function() { - if (moveType != consts.move.TYPE_INNER) return; - if (tmpTargetNode && tmpTargetNode.isParent && !tmpTargetNode.open && (new Date()).getTime() - startTime > targetSetting.edit.drag.autoOpenTime - && tools.apply(targetSetting.callback.beforeDragOpen, [targetSetting.treeId, tmpTargetNode], true)) { - view.switchNode(targetSetting, tmpTargetNode); - if (targetSetting.edit.drag.autoExpandTrigger) { - targetSetting.treeObj.trigger(consts.event.EXPAND, [targetSetting.treeId, tmpTargetNode]); - } - } - }, targetSetting.edit.drag.autoOpenTime+50); - window.zTreeMoveTargetNodeTId = tmpTargetNode.tId; - } - } - } - } else { - moveType = consts.move.TYPE_INNER; - if (tmpTarget && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, null], !!targetSetting.edit.drag.inner)) { - tmpTarget.addClass(consts.node.TMPTARGET_TREE); - } else { - tmpTarget = null; - } - tmpArrow.css({ - "display":"none" - }); - if (window.zTreeMoveTimer) { - clearTimeout(window.zTreeMoveTimer); - window.zTreeMoveTargetNodeTId = null; - } - } - preTmpTargetNodeId = tmpTargetNodeId; - preTmpMoveType = moveType; - - setting.treeObj.trigger(consts.event.DRAGMOVE, [event, setting.treeId, nodes]); - } - return false; - } - - doc.bind("mouseup", _docMouseUp); - function _docMouseUp(event) { - if (window.zTreeMoveTimer) { - clearTimeout(window.zTreeMoveTimer); - window.zTreeMoveTargetNodeTId = null; - } - preTmpTargetNodeId = null; - preTmpMoveType = null; - doc.unbind("mousemove", _docMouseMove); - doc.unbind("mouseup", _docMouseUp); - doc.unbind("selectstart", _docSelect); - body.css("cursor", "auto"); - if (tmpTarget) { - tmpTarget.removeClass(consts.node.TMPTARGET_TREE); - if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV) - .removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER); - } - tools.showIfameMask(setting, false); - - roots.showHoverDom = true; - if (root.dragFlag == 0) return; - root.dragFlag = 0; - - var i, l, tmpNode; - for (i=0, l=nodes.length; i 0) { - root.dragMaskList[0].remove(); - root.dragMaskList.shift(); - } - if (showSign) { - //show mask - var iframeList = $$("iframe", setting); - for (var i = 0, l = iframeList.length; i < l; i++) { - var obj = iframeList.get(i), - r = tools.getAbs(obj), - dragMask = $$("
                          ", setting); - dragMask.appendTo($$("body", setting)); - root.dragMaskList.push(dragMask); - } - } - } - }, - //method of operate ztree dom - _view = { - addEditBtn: function(setting, node) { - if (node.editNameFlag || $$(node, consts.id.EDIT, setting).length > 0) { - return; - } - if (!tools.apply(setting.edit.showRenameBtn, [setting.treeId, node], setting.edit.showRenameBtn)) { - return; - } - var aObj = $$(node, consts.id.A, setting), - editStr = ""; - aObj.append(editStr); - - $$(node, consts.id.EDIT, setting).bind('click', - function() { - if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeEditName, [setting.treeId, node], true) == false) return false; - view.editNode(setting, node); - return false; - } - ).show(); - }, - addRemoveBtn: function(setting, node) { - if (node.editNameFlag || $$(node, consts.id.REMOVE, setting).length > 0) { - return; - } - if (!tools.apply(setting.edit.showRemoveBtn, [setting.treeId, node], setting.edit.showRemoveBtn)) { - return; - } - var aObj = $$(node, consts.id.A, setting), - removeStr = ""; - aObj.append(removeStr); - - $$(node, consts.id.REMOVE, setting).bind('click', - function() { - if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return false; - view.removeNode(setting, node); - setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]); - return false; - } - ).bind('mousedown', - function(eventMouseDown) { - return true; - } - ).show(); - }, - addHoverDom: function(setting, node) { - if (data.getRoots().showHoverDom) { - node.isHover = true; - if (setting.edit.enable) { - view.addEditBtn(setting, node); - view.addRemoveBtn(setting, node); - } - tools.apply(setting.view.addHoverDom, [setting.treeId, node]); - } - }, - cancelCurEditNode: function (setting, forceName, isCancel) { - var root = data.getRoot(setting), - nameKey = setting.data.key.name, - node = root.curEditNode; - - if (node) { - var inputObj = root.curEditInput, - newName = forceName ? forceName:(isCancel ? node[nameKey]: inputObj.val()); - if (tools.apply(setting.callback.beforeRename, [setting.treeId, node, newName, isCancel], true) === false) { - return false; - } - node[nameKey] = newName; - var aObj = $$(node, consts.id.A, setting); - aObj.removeClass(consts.node.CURSELECTED_EDIT); - inputObj.unbind(); - view.setNodeName(setting, node); - node.editNameFlag = false; - root.curEditNode = null; - root.curEditInput = null; - view.selectNode(setting, node, false); - setting.treeObj.trigger(consts.event.RENAME, [setting.treeId, node, isCancel]); - } - root.noSelection = true; - return true; - }, - editNode: function(setting, node) { - var root = data.getRoot(setting); - view.editNodeBlur = false; - if (data.isSelectedNode(setting, node) && root.curEditNode == node && node.editNameFlag) { - setTimeout(function() {tools.inputFocus(root.curEditInput);}, 0); - return; - } - var nameKey = setting.data.key.name; - node.editNameFlag = true; - view.removeTreeDom(setting, node); - view.cancelCurEditNode(setting); - view.selectNode(setting, node, false); - $$(node, consts.id.SPAN, setting).html(""); - var inputObj = $$(node, consts.id.INPUT, setting); - inputObj.attr("value", node[nameKey]); - if (setting.edit.editNameSelectAll) { - tools.inputSelect(inputObj); - } else { - tools.inputFocus(inputObj); - } - - inputObj.bind('blur', function(event) { - if (!view.editNodeBlur) { - view.cancelCurEditNode(setting); - } - }).bind('keydown', function(event) { - if (event.keyCode=="13") { - view.editNodeBlur = true; - view.cancelCurEditNode(setting); - } else if (event.keyCode=="27") { - view.cancelCurEditNode(setting, null, true); - } - }).bind('click', function(event) { - return false; - }).bind('dblclick', function(event) { - return false; - }); - - $$(node, consts.id.A, setting).addClass(consts.node.CURSELECTED_EDIT); - root.curEditInput = inputObj; - root.noSelection = false; - root.curEditNode = node; - }, - moveNode: function(setting, targetNode, node, moveType, animateFlag, isSilent) { - var root = data.getRoot(setting), - childKey = setting.data.key.children; - if (targetNode == node) return; - if (setting.data.keep.leaf && targetNode && !targetNode.isParent && moveType == consts.move.TYPE_INNER) return; - var oldParentNode = (node.parentTId ? node.getParentNode(): root), - targetNodeIsRoot = (targetNode === null || targetNode == root); - if (targetNodeIsRoot && targetNode === null) targetNode = root; - if (targetNodeIsRoot) moveType = consts.move.TYPE_INNER; - var targetParentNode = (targetNode.parentTId ? targetNode.getParentNode() : root); - - if (moveType != consts.move.TYPE_PREV && moveType != consts.move.TYPE_NEXT) { - moveType = consts.move.TYPE_INNER; - } - - if (moveType == consts.move.TYPE_INNER) { - if (targetNodeIsRoot) { - //parentTId of root node is null - node.parentTId = null; - } else { - if (!targetNode.isParent) { - targetNode.isParent = true; - targetNode.open = !!targetNode.open; - view.setNodeLineIcos(setting, targetNode); - } - node.parentTId = targetNode.tId; - } - } - - //move node Dom - var targetObj, target_ulObj; - if (targetNodeIsRoot) { - targetObj = setting.treeObj; - target_ulObj = targetObj; - } else { - if (!isSilent && moveType == consts.move.TYPE_INNER) { - view.expandCollapseNode(setting, targetNode, true, false); - } else if (!isSilent) { - view.expandCollapseNode(setting, targetNode.getParentNode(), true, false); - } - targetObj = $$(targetNode, setting); - target_ulObj = $$(targetNode, consts.id.UL, setting); - if (!!targetObj.get(0) && !target_ulObj.get(0)) { - var ulstr = []; - view.makeUlHtml(setting, targetNode, ulstr, ''); - targetObj.append(ulstr.join('')); - } - target_ulObj = $$(targetNode, consts.id.UL, setting); - } - var nodeDom = $$(node, setting); - if (!nodeDom.get(0)) { - nodeDom = view.appendNodes(setting, node.level, [node], null, false, true).join(''); - } else if (!targetObj.get(0)) { - nodeDom.remove(); - } - if (target_ulObj.get(0) && moveType == consts.move.TYPE_INNER) { - target_ulObj.append(nodeDom); - } else if (targetObj.get(0) && moveType == consts.move.TYPE_PREV) { - targetObj.before(nodeDom); - } else if (targetObj.get(0) && moveType == consts.move.TYPE_NEXT) { - targetObj.after(nodeDom); - } - - //repair the data after move - var i,l, - tmpSrcIndex = -1, - tmpTargetIndex = 0, - oldNeighbor = null, - newNeighbor = null, - oldLevel = node.level; - if (node.isFirstNode) { - tmpSrcIndex = 0; - if (oldParentNode[childKey].length > 1 ) { - oldNeighbor = oldParentNode[childKey][1]; - oldNeighbor.isFirstNode = true; - } - } else if (node.isLastNode) { - tmpSrcIndex = oldParentNode[childKey].length -1; - oldNeighbor = oldParentNode[childKey][tmpSrcIndex - 1]; - oldNeighbor.isLastNode = true; - } else { - for (i = 0, l = oldParentNode[childKey].length; i < l; i++) { - if (oldParentNode[childKey][i].tId == node.tId) { - tmpSrcIndex = i; - break; - } - } - } - if (tmpSrcIndex >= 0) { - oldParentNode[childKey].splice(tmpSrcIndex, 1); - } - if (moveType != consts.move.TYPE_INNER) { - for (i = 0, l = targetParentNode[childKey].length; i < l; i++) { - if (targetParentNode[childKey][i].tId == targetNode.tId) tmpTargetIndex = i; - } - } - if (moveType == consts.move.TYPE_INNER) { - if (!targetNode[childKey]) targetNode[childKey] = new Array(); - if (targetNode[childKey].length > 0) { - newNeighbor = targetNode[childKey][targetNode[childKey].length - 1]; - newNeighbor.isLastNode = false; - } - targetNode[childKey].splice(targetNode[childKey].length, 0, node); - node.isLastNode = true; - node.isFirstNode = (targetNode[childKey].length == 1); - } else if (targetNode.isFirstNode && moveType == consts.move.TYPE_PREV) { - targetParentNode[childKey].splice(tmpTargetIndex, 0, node); - newNeighbor = targetNode; - newNeighbor.isFirstNode = false; - node.parentTId = targetNode.parentTId; - node.isFirstNode = true; - node.isLastNode = false; - - } else if (targetNode.isLastNode && moveType == consts.move.TYPE_NEXT) { - targetParentNode[childKey].splice(tmpTargetIndex + 1, 0, node); - newNeighbor = targetNode; - newNeighbor.isLastNode = false; - node.parentTId = targetNode.parentTId; - node.isFirstNode = false; - node.isLastNode = true; - - } else { - if (moveType == consts.move.TYPE_PREV) { - targetParentNode[childKey].splice(tmpTargetIndex, 0, node); - } else { - targetParentNode[childKey].splice(tmpTargetIndex + 1, 0, node); - } - node.parentTId = targetNode.parentTId; - node.isFirstNode = false; - node.isLastNode = false; - } - data.fixPIdKeyValue(setting, node); - data.setSonNodeLevel(setting, node.getParentNode(), node); - - //repair node what been moved - view.setNodeLineIcos(setting, node); - view.repairNodeLevelClass(setting, node, oldLevel) - - //repair node's old parentNode dom - if (!setting.data.keep.parent && oldParentNode[childKey].length < 1) { - //old parentNode has no child nodes - oldParentNode.isParent = false; - oldParentNode.open = false; - var tmp_ulObj = $$(oldParentNode, consts.id.UL, setting), - tmp_switchObj = $$(oldParentNode, consts.id.SWITCH, setting), - tmp_icoObj = $$(oldParentNode, consts.id.ICON, setting); - view.replaceSwitchClass(oldParentNode, tmp_switchObj, consts.folder.DOCU); - view.replaceIcoClass(oldParentNode, tmp_icoObj, consts.folder.DOCU); - tmp_ulObj.css("display", "none"); - - } else if (oldNeighbor) { - //old neigbor node - view.setNodeLineIcos(setting, oldNeighbor); - } - - //new neigbor node - if (newNeighbor) { - view.setNodeLineIcos(setting, newNeighbor); - } - - //repair checkbox / radio - if (!!setting.check && setting.check.enable && view.repairChkClass) { - view.repairChkClass(setting, oldParentNode); - view.repairParentChkClassWithSelf(setting, oldParentNode); - if (oldParentNode != node.parent) - view.repairParentChkClassWithSelf(setting, node); - } - - //expand parents after move - if (!isSilent) { - view.expandCollapseParentNode(setting, node.getParentNode(), true, animateFlag); - } - }, - removeEditBtn: function(setting, node) { - $$(node, consts.id.EDIT, setting).unbind().remove(); - }, - removeRemoveBtn: function(setting, node) { - $$(node, consts.id.REMOVE, setting).unbind().remove(); - }, - removeTreeDom: function(setting, node) { - node.isHover = false; - view.removeEditBtn(setting, node); - view.removeRemoveBtn(setting, node); - tools.apply(setting.view.removeHoverDom, [setting.treeId, node]); - }, - repairNodeLevelClass: function(setting, node, oldLevel) { - if (oldLevel === node.level) return; - var liObj = $$(node, setting), - aObj = $$(node, consts.id.A, setting), - ulObj = $$(node, consts.id.UL, setting), - oldClass = consts.className.LEVEL + oldLevel, - newClass = consts.className.LEVEL + node.level; - liObj.removeClass(oldClass); - liObj.addClass(newClass); - aObj.removeClass(oldClass); - aObj.addClass(newClass); - ulObj.removeClass(oldClass); - ulObj.addClass(newClass); - }, - selectNodes : function(setting, nodes) { - for (var i=0, l=nodes.length; i0); - } - } - }, - - _z = { - tools: _tools, - view: _view, - event: _event, - data: _data - }; - $.extend(true, $.fn.zTree.consts, _consts); - $.extend(true, $.fn.zTree._z, _z); - - var zt = $.fn.zTree, - tools = zt._z.tools, - consts = zt.consts, - view = zt._z.view, - data = zt._z.data, - event = zt._z.event, - $$ = tools.$; - - data.exSetting(_setting); - data.addInitBind(_bindEvent); - data.addInitUnBind(_unbindEvent); - data.addInitCache(_initCache); - data.addInitNode(_initNode); - data.addInitProxy(_eventProxy); - data.addInitRoot(_initRoot); - data.addZTreeTools(_zTreeTools); - - var _cancelPreSelectedNode = view.cancelPreSelectedNode; - view.cancelPreSelectedNode = function (setting, node) { - var list = data.getRoot(setting).curSelectedList; - for (var i=0, j=list.length; i1){var j=l[0].parentTId?l[0].getParentNode()[i]:m.getNodes(e);i=[];for(a=0,c=j.length;a-1&&k+1!==a&&(n=!1),i.push(j[a]),k=a),l.length===i.length){l=i;break}}n&&(H=l[0].getPreNode(),R=l[l.length-1].getNextNode());D=o("
                            ", -e);for(a=0,c=l.length;a0),f.removeTreeDom(e,n),a>e.edit.drag.maxShowNodeNum-1||(k=o("
                          • ",e),k.append(o(n,d.id.A,e).clone()),k.css("padding","0"),k.children("#"+n.tId+d.id.A).removeClass(d.node.CURSELECTED),D.append(k),a==e.edit.drag.maxShowNodeNum-1&&(k=o("
                          • ...
                          • ",e),D.append(k)));D.attr("id",l[0].tId+d.id.UL+"_tmp");D.addClass(e.treeObj.attr("class"));D.appendTo(M);B=o("", -e);B.attr("id","zTreeMove_arrow_tmp");B.appendTo(M);e.treeObj.trigger(d.event.DRAG,[b,e.treeId,l])}if(C.dragFlag==1){s&&B.attr("id")==b.target.id&&u&&b.clientX+F.scrollLeft()+2>w("#"+u+d.id.A,s).offset().left?(n=w("#"+u+d.id.A,s),b.target=n.length>0?n.get(0):b.target):s&&(s.removeClass(d.node.TMPTARGET_TREE),u&&w("#"+u+d.id.A,s).removeClass(d.node.TMPTARGET_NODE+"_"+d.move.TYPE_PREV).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_NEXT).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_INNER)); -u=s=null;J=!1;h=e;n=m.getSettings();for(var y in n)if(n[y].treeId&&n[y].edit.enable&&n[y].treeId!=e.treeId&&(b.target.id==n[y].treeId||w(b.target).parents("#"+n[y].treeId).length>0))J=!0,h=n[y];y=F.scrollTop();k=F.scrollLeft();i=h.treeObj.offset();a=h.treeObj.get(0).scrollHeight;n=h.treeObj.get(0).scrollWidth;c=b.clientY+y-i.top;var p=h.treeObj.height()+i.top-b.clientY-y,q=b.clientX+k-i.left,x=h.treeObj.width()+i.left-b.clientX-k;i=ce.edit.drag.borderMin;var j=pe.edit.drag.borderMin,K=qe.edit.drag.borderMin,G=xe.edit.drag.borderMin,p=c>e.edit.drag.borderMin&&p>e.edit.drag.borderMin&&q>e.edit.drag.borderMin&&x>e.edit.drag.borderMin,q=i&&h.treeObj.scrollTop()<=0,x=j&&h.treeObj.scrollTop()+h.treeObj.height()+10>=a,P=K&&h.treeObj.scrollLeft()<=0,Q=G&&h.treeObj.scrollLeft()+h.treeObj.width()+10>=n;if(b.target&&g.isChildOrSelf(b.target,h.treeId)){for(var E=b.target;E&&E.tagName&&!g.eqs(E.tagName,"li")&&E.id!= -h.treeId;)E=E.parentNode;var S=!0;for(a=0,c=l.length;a0){S=!1;break}if(S&&b.target&&g.isChildOrSelf(b.target,E.id+d.id.A))s=w(E),u=E.id}n=l[0];if(p&&g.isChildOrSelf(b.target,h.treeId)){if(!s&&(b.target.id==h.treeId||q||x||P||Q)&&(J||!J&&n.parentTId))s=h.treeObj;i?h.treeObj.scrollTop(h.treeObj.scrollTop()-10):j&&h.treeObj.scrollTop(h.treeObj.scrollTop()+10);K?h.treeObj.scrollLeft(h.treeObj.scrollLeft()-10):G&&h.treeObj.scrollLeft(h.treeObj.scrollLeft()+ -10);s&&s!=h.treeObj&&s.offset().left=-0.2)&&n?(a=1-B.width(),i=j-B.height()/2,v=d.move.TYPE_PREV):(G==0||y>=G&&y<=1.2)&&a?(a=1-B.width(),i=i==null||z.isParent&&z.open?j+c.height()-B.height()/2:i.offset().top-B.height()/2,v=d.move.TYPE_NEXT):(a=5-B.width(),i=j,v=d.move.TYPE_INNER);B.css({display:"block",top:i+"px",left:k+a+"px"});c.addClass(d.node.TMPTARGET_NODE+"_"+v);if(T!=u||U!=v)L=(new Date).getTime();if(z&&z.isParent&&v==d.move.TYPE_INNER&&(y=!0,window.zTreeMoveTimer&& -window.zTreeMoveTargetNodeTId!==z.tId?(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null):window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId===z.tId&&(y=!1),y))window.zTreeMoveTimer=setTimeout(function(){v==d.move.TYPE_INNER&&z&&z.isParent&&!z.open&&(new Date).getTime()-L>h.edit.drag.autoOpenTime&&g.apply(h.callback.beforeDragOpen,[h.treeId,z],!0)&&(f.switchNode(h,z),h.edit.drag.autoExpandTrigger&&h.treeObj.trigger(d.event.EXPAND,[h.treeId,z]))},h.edit.drag.autoOpenTime+50), -window.zTreeMoveTargetNodeTId=z.tId}}else if(v=d.move.TYPE_INNER,s&&g.apply(h.edit.drag.inner,[h.treeId,l,null],!!h.edit.drag.inner)?s.addClass(d.node.TMPTARGET_TREE):s=null,B.css({display:"none"}),window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null;T=u;U=v;e.treeObj.trigger(d.event.DRAGMOVE,[b,e.treeId,l])}return!1}function r(b){if(window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null;U=T=null;F.unbind("mousemove",c); -F.unbind("mouseup",r);F.unbind("selectstart",k);M.css("cursor","auto");s&&(s.removeClass(d.node.TMPTARGET_TREE),u&&w("#"+u+d.id.A,s).removeClass(d.node.TMPTARGET_NODE+"_"+d.move.TYPE_PREV).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_NEXT).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_INNER));g.showIfameMask(e,!1);t.showHoverDom=!0;if(C.dragFlag!=0){C.dragFlag=0;var a,i,j;for(a=0,i=l.length;a0;)c.dragMaskList[0].remove(),c.dragMaskList.shift();if(a)for(var d=o("iframe",b),f=0,i=d.length;f
                            ",b);j.appendTo(o("body",b));c.dragMaskList.push(j)}}},view:{addEditBtn:function(b, -a){if(!(a.editNameFlag||o(a,d.id.EDIT,b).length>0)&&g.apply(b.edit.showRenameBtn,[b.treeId,a],b.edit.showRenameBtn)){var c=o(a,d.id.A,b),r="";c.append(r);o(a,d.id.EDIT,b).bind("click",function(){if(!g.uCanDo(b)||g.apply(b.callback.beforeEditName,[b.treeId,a],!0)==!1)return!1;f.editNode(b,a);return!1}).show()}}, -addRemoveBtn:function(b,a){if(!(a.editNameFlag||o(a,d.id.REMOVE,b).length>0)&&g.apply(b.edit.showRemoveBtn,[b.treeId,a],b.edit.showRemoveBtn)){var c=o(a,d.id.A,b),r="";c.append(r);o(a,d.id.REMOVE,b).bind("click",function(){if(!g.uCanDo(b)||g.apply(b.callback.beforeRemove,[b.treeId,a],!0)==!1)return!1;f.removeNode(b, -a);b.treeObj.trigger(d.event.REMOVE,[b.treeId,a]);return!1}).bind("mousedown",function(){return!0}).show()}},addHoverDom:function(b,a){if(m.getRoots().showHoverDom)a.isHover=!0,b.edit.enable&&(f.addEditBtn(b,a),f.addRemoveBtn(b,a)),g.apply(b.view.addHoverDom,[b.treeId,a])},cancelCurEditNode:function(b,a,c){var r=m.getRoot(b),k=b.data.key.name,i=r.curEditNode;if(i){var j=r.curEditInput,a=a?a:c?i[k]:j.val();if(g.apply(b.callback.beforeRename,[b.treeId,i,a,c],!0)===!1)return!1;i[k]=a;o(i,d.id.A,b).removeClass(d.node.CURSELECTED_EDIT); -j.unbind();f.setNodeName(b,i);i.editNameFlag=!1;r.curEditNode=null;r.curEditInput=null;f.selectNode(b,i,!1);b.treeObj.trigger(d.event.RENAME,[b.treeId,i,c])}return r.noSelection=!0},editNode:function(b,a){var c=m.getRoot(b);f.editNodeBlur=!1;if(m.isSelectedNode(b,a)&&c.curEditNode==a&&a.editNameFlag)setTimeout(function(){g.inputFocus(c.curEditInput)},0);else{var r=b.data.key.name;a.editNameFlag=!0;f.removeTreeDom(b,a);f.cancelCurEditNode(b);f.selectNode(b,a,!1);o(a,d.id.SPAN,b).html("");var k=o(a,d.id.INPUT,b);k.attr("value",a[r]);b.edit.editNameSelectAll?g.inputSelect(k):g.inputFocus(k);k.bind("blur",function(){f.editNodeBlur||f.cancelCurEditNode(b)}).bind("keydown",function(a){a.keyCode=="13"?(f.editNodeBlur=!0,f.cancelCurEditNode(b)):a.keyCode=="27"&&f.cancelCurEditNode(b,null,!0)}).bind("click",function(){return!1}).bind("dblclick",function(){return!1});o(a,d.id.A,b).addClass(d.node.CURSELECTED_EDIT);c.curEditInput=k;c.noSelection= -!1;c.curEditNode=a}},moveNode:function(b,a,c,r,k,i){var j=m.getRoot(b),e=b.data.key.children;if(a!=c&&(!b.data.keep.leaf||!a||a.isParent||r!=d.move.TYPE_INNER)){var g=c.parentTId?c.getParentNode():j,t=a===null||a==j;t&&a===null&&(a=j);if(t)r=d.move.TYPE_INNER;j=a.parentTId?a.getParentNode():j;if(r!=d.move.TYPE_PREV&&r!=d.move.TYPE_NEXT)r=d.move.TYPE_INNER;if(r==d.move.TYPE_INNER)if(t)c.parentTId=null;else{if(!a.isParent)a.isParent=!0,a.open=!!a.open,f.setNodeLineIcos(b,a);c.parentTId=a.tId}var p; -t?p=t=b.treeObj:(!i&&r==d.move.TYPE_INNER?f.expandCollapseNode(b,a,!0,!1):i||f.expandCollapseNode(b,a.getParentNode(),!0,!1),t=o(a,b),p=o(a,d.id.UL,b),t.get(0)&&!p.get(0)&&(p=[],f.makeUlHtml(b,a,p,""),t.append(p.join(""))),p=o(a,d.id.UL,b));var q=o(c,b);q.get(0)?t.get(0)||q.remove():q=f.appendNodes(b,c.level,[c],null,!1,!0).join("");p.get(0)&&r==d.move.TYPE_INNER?p.append(q):t.get(0)&&r==d.move.TYPE_PREV?t.before(q):t.get(0)&&r==d.move.TYPE_NEXT&&t.after(q);var l=-1,w=0,x=null,t=null,D=c.level;if(c.isFirstNode){if(l= -0,g[e].length>1)x=g[e][1],x.isFirstNode=!0}else if(c.isLastNode)l=g[e].length-1,x=g[e][l-1],x.isLastNode=!0;else for(p=0,q=g[e].length;p=0&&g[e].splice(l,1);if(r!=d.move.TYPE_INNER)for(p=0,q=j[e].length;p0)t=a[e][a[e].length-1],t.isLastNode=!1;a[e].splice(a[e].length,0,c);c.isLastNode=!0;c.isFirstNode=a[e].length==1}else a.isFirstNode&&r==d.move.TYPE_PREV?(j[e].splice(w, -0,c),t=a,t.isFirstNode=!1,c.parentTId=a.parentTId,c.isFirstNode=!0,c.isLastNode=!1):a.isLastNode&&r==d.move.TYPE_NEXT?(j[e].splice(w+1,0,c),t=a,t.isLastNode=!1,c.parentTId=a.parentTId,c.isFirstNode=!1,c.isLastNode=!0):(r==d.move.TYPE_PREV?j[e].splice(w,0,c):j[e].splice(w+1,0,c),c.parentTId=a.parentTId,c.isFirstNode=!1,c.isLastNode=!1);m.fixPIdKeyValue(b,c);m.setSonNodeLevel(b,c.getParentNode(),c);f.setNodeLineIcos(b,c);f.repairNodeLevelClass(b,c,D);!b.data.keep.parent&&g[e].length<1?(g.isParent=!1, -g.open=!1,a=o(g,d.id.UL,b),r=o(g,d.id.SWITCH,b),e=o(g,d.id.ICON,b),f.replaceSwitchClass(g,r,d.folder.DOCU),f.replaceIcoClass(g,e,d.folder.DOCU),a.css("display","none")):x&&f.setNodeLineIcos(b,x);t&&f.setNodeLineIcos(b,t);b.check&&b.check.enable&&f.repairChkClass&&(f.repairChkClass(b,g),f.repairParentChkClassWithSelf(b,g),g!=c.parent&&f.repairParentChkClassWithSelf(b,c));i||f.expandCollapseParentNode(b,c.getParentNode(),!0,k)}},removeEditBtn:function(b,a){o(a,d.id.EDIT,b).unbind().remove()},removeRemoveBtn:function(b, -a){o(a,d.id.REMOVE,b).unbind().remove()},removeTreeDom:function(b,a){a.isHover=!1;f.removeEditBtn(b,a);f.removeRemoveBtn(b,a);g.apply(b.view.removeHoverDom,[b.treeId,a])},repairNodeLevelClass:function(b,a,c){if(c!==a.level){var f=o(a,b),g=o(a,d.id.A,b),b=o(a,d.id.UL,b),c=d.className.LEVEL+c,a=d.className.LEVEL+a.level;f.removeClass(c);f.addClass(a);g.removeClass(c);g.addClass(a);b.removeClass(c);b.addClass(a)}},selectNodes:function(b,a){for(var c=0,d=a.length;c0)}},event:{}, -data:{setSonNodeLevel:function(b,a,c){if(c){var d=b.data.key.children;c.level=a?a.level+1:0;if(c[d])for(var a=0,f=c[d].length;a0)switch(i=m.getNodeCache(c,k),j){case "mousedownNode":e=x.onMousedownNode;break;case "hoverOverNode":e=x.onHoverOverNode;break;case "hoverOutNode":e=x.onHoverOutNode}return{stop:!1, -node:i,nodeEventType:j,nodeEventCallback:e,treeEventType:"",treeEventCallback:null}});m.addInitRoot(function(b){var b=m.getRoot(b),a=m.getRoots();b.curEditNode=null;b.curEditInput=null;b.curHoverNode=null;b.dragFlag=0;b.dragNodeShowBefore=[];b.dragMaskList=[];a.showHoverDom=!0});m.addZTreeTools(function(b,a){a.cancelEditName=function(a){m.getRoot(this.setting).curEditNode&&f.cancelCurEditNode(this.setting,a?a:null,!0)};a.copyNode=function(a,b,k,i){if(!b)return null;if(a&&!a.isParent&&this.setting.data.keep.leaf&& -k===d.move.TYPE_INNER)return null;var j=this,e=g.clone(b);if(!a)a=null,k=d.move.TYPE_INNER;k==d.move.TYPE_INNER?(b=function(){f.addNodes(j.setting,a,[e],i)},g.canAsync(this.setting,a)?f.asyncNode(this.setting,a,i,b):b()):(f.addNodes(this.setting,a.parentNode,[e],i),f.moveNode(this.setting,a,e,k,!1,i));return e};a.editName=function(a){a&&a.tId&&a===m.getNodeCache(this.setting,a.tId)&&(a.parentTId&&f.expandCollapseParentNode(this.setting,a.getParentNode(),!0),f.editNode(this.setting,a))};a.moveNode= -function(a,b,k,i){function j(){f.moveNode(e.setting,a,b,k,!1,i)}if(!b)return b;if(a&&!a.isParent&&this.setting.data.keep.leaf&&k===d.move.TYPE_INNER)return null;else if(a&&(b.parentTId==a.tId&&k==d.move.TYPE_INNER||o(b,this.setting).find("#"+a.tId).length>0))return null;else a||(a=null);var e=this;g.canAsync(this.setting,a)&&k===d.move.TYPE_INNER?f.asyncNode(this.setting,a,i,j):j();return b};a.setEditable=function(a){this.setting.edit.enable=a;return this.refresh()}});var N=f.cancelPreSelectedNode; -f.cancelPreSelectedNode=function(b,a){for(var c=m.getRoot(b).curSelectedList,d=0,g=c.length;d0) { - node = data.getNodeCache(setting, tId); - switch (nodeEventType) { - case "mousedownNode" : - nodeEventCallback = _handler.onMousedownNode; - break; - case "hoverOverNode" : - nodeEventCallback = _handler.onHoverOverNode; - break; - case "hoverOutNode" : - nodeEventCallback = _handler.onHoverOutNode; - break; - } - } - var proxyResult = { - stop: false, - node: node, - nodeEventType: nodeEventType, - nodeEventCallback: nodeEventCallback, - treeEventType: treeEventType, - treeEventCallback: treeEventCallback - }; - return proxyResult - }, - //default init node of exedit - _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { - if (!n) return; - n.isHover = false; - n.editNameFlag = false; - }, - //update zTreeObj, add method of edit - _zTreeTools = function(setting, zTreeTools) { - zTreeTools.cancelEditName = function(newName) { - var root = data.getRoot(setting), - nameKey = setting.data.key.name, - node = root.curEditNode; - if (!root.curEditNode) return; - view.cancelCurEditNode(setting, newName?newName:node[nameKey]); - } - zTreeTools.copyNode = function(targetNode, node, moveType, isSilent) { - if (!node) return null; - if (targetNode && !targetNode.isParent && setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) return null; - var newNode = tools.clone(node); - if (!targetNode) { - targetNode = null; - moveType = consts.move.TYPE_INNER; - } - if (moveType == consts.move.TYPE_INNER) { - function copyCallback() { - view.addNodes(setting, targetNode, [newNode], isSilent); - } - - if (tools.canAsync(setting, targetNode)) { - view.asyncNode(setting, targetNode, isSilent, copyCallback); - } else { - copyCallback(); - } - } else { - view.addNodes(setting, targetNode.parentNode, [newNode], isSilent); - view.moveNode(setting, targetNode, newNode, moveType, false, isSilent); - } - return newNode; - } - zTreeTools.editName = function(node) { - if (!node || !node.tId || node !== data.getNodeCache(setting, node.tId)) return; - if (node.parentTId) view.expandCollapseParentNode(setting, node.getParentNode(), true); - view.editNode(setting, node) - } - zTreeTools.moveNode = function(targetNode, node, moveType, isSilent) { - if (!node) return node; - if (targetNode && !targetNode.isParent && setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) { - return null; - } else if (targetNode && ((node.parentTId == targetNode.tId && moveType == consts.move.TYPE_INNER) || $("#" + node.tId).find("#" + targetNode.tId).length > 0)) { - return null; - } else if (!targetNode) { - targetNode = null; - } - function moveCallback() { - view.moveNode(setting, targetNode, node, moveType, false, isSilent); - } - if (tools.canAsync(setting, targetNode) && moveType === consts.move.TYPE_INNER) { - view.asyncNode(setting, targetNode, isSilent, moveCallback); - } else { - moveCallback(); - } - return node; - } - zTreeTools.setEditable = function(editable) { - setting.edit.enable = editable; - return this.refresh(); - } - }, - //method of operate data - _data = { - setSonNodeLevel: function(setting, parentNode, node) { - if (!node) return; - var childKey = setting.data.key.children; - node.level = (parentNode)? parentNode.level + 1 : 0; - if (!node[childKey]) return; - for (var i = 0, l = node[childKey].length; i < l; i++) { - if (node[childKey][i]) data.setSonNodeLevel(setting, node, node[childKey][i]); - } - } - }, - //method of event proxy - _event = { - - }, - //method of event handler - _handler = { - onHoverOverNode: function(event, node) { - var setting = data.getSetting(event.data.treeId), - root = data.getRoot(setting); - if (root.curHoverNode != node) { - _handler.onHoverOutNode(event); - } - root.curHoverNode = node; - view.addHoverDom(setting, node); - }, - onHoverOutNode: function(event, node) { - var setting = data.getSetting(event.data.treeId), - root = data.getRoot(setting); - if (root.curHoverNode && !data.isSelectedNode(setting, root.curHoverNode)) { - view.removeTreeDom(setting, root.curHoverNode); - root.curHoverNode = null; - } - }, - onMousedownNode: function(eventMouseDown, _node) { - var i,l, - setting = data.getSetting(eventMouseDown.data.treeId), - root = data.getRoot(setting); - //right click can't drag & drop - if (eventMouseDown.button == 2 || !setting.edit.enable || (!setting.edit.drag.isCopy && !setting.edit.drag.isMove)) return true; - - //input of edit node name can't drag & drop - var target = eventMouseDown.target, - _nodes = data.getRoot(setting).curSelectedList, - nodes = []; - if (!data.isSelectedNode(setting, _node)) { - nodes = [_node]; - } else { - for (i=0, l=_nodes.length; i1) { - var pNodes = nodes[0].parentTId ? nodes[0].getParentNode()[childKey] : data.getNodes(setting); - tmpNodes = []; - for (i=0, l=pNodes.length; i -1 && (lastIndex+1) !== i) { - isOrder = false; - } - tmpNodes.push(pNodes[i]); - lastIndex = i; - } - if (nodes.length === tmpNodes.length) { - nodes = tmpNodes; - break; - } - } - } - if (isOrder) { - preNode = nodes[0].getPreNode(); - nextNode = nodes[nodes.length-1].getNextNode(); - } - - //set node in selected - curNode = $("
                              "); - for (i=0, l=nodes.length; i0); - view.removeTreeDom(setting, tmpNode); - - tmpDom = $("
                            • "); - tmpDom.append($("#" + tmpNode.tId + consts.id.A).clone()); - tmpDom.css("padding", "0"); - tmpDom.children("#" + tmpNode.tId + consts.id.A).removeClass(consts.node.CURSELECTED); - curNode.append(tmpDom); - if (i == setting.edit.drag.maxShowNodeNum-1) { - tmpDom = $("
                            • ...
                            • "); - curNode.append(tmpDom); - break; - } - } - curNode.attr("id", nodes[0].tId + consts.id.UL + "_tmp"); - curNode.addClass(setting.treeObj.attr("class")); - curNode.appendTo("body"); - - tmpArrow = $(""); - tmpArrow.attr("id", "zTreeMove_arrow_tmp"); - tmpArrow.appendTo("body"); - - setting.treeObj.trigger(consts.event.DRAG, [event, setting.treeId, nodes]); - } - - if (root.dragFlag == 1) { - if (tmpTarget && tmpArrow.attr("id") == event.target.id && tmpTargetNodeId && (event.clientX + doc.scrollLeft()+2) > ($("#" + tmpTargetNodeId + consts.id.A, tmpTarget).offset().left)) { - var xT = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget); - event.target = (xT.length > 0) ? xT.get(0) : event.target; - } else if (tmpTarget) { - tmpTarget.removeClass(consts.node.TMPTARGET_TREE); - if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV) - .removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER); - } - tmpTarget = null; - tmpTargetNodeId = null; - - //judge drag & drop in multi ztree - isOtherTree = false; - targetSetting = setting; - var settings = data.getSettings(); - for (var s in settings) { - if (settings[s].treeId && settings[s].edit.enable && settings[s].treeId != setting.treeId - && (event.target.id == settings[s].treeId || $(event.target).parents("#" + settings[s].treeId).length>0)) { - isOtherTree = true; - targetSetting = settings[s]; - } - } - - var docScrollTop = doc.scrollTop(), - docScrollLeft = doc.scrollLeft(), - treeOffset = targetSetting.treeObj.offset(), - scrollHeight = targetSetting.treeObj.get(0).scrollHeight, - scrollWidth = targetSetting.treeObj.get(0).scrollWidth, - dTop = (event.clientY + docScrollTop - treeOffset.top), - dBottom = (targetSetting.treeObj.height() + treeOffset.top - event.clientY - docScrollTop), - dLeft = (event.clientX + docScrollLeft - treeOffset.left), - dRight = (targetSetting.treeObj.width() + treeOffset.left - event.clientX - docScrollLeft), - isTop = (dTop < setting.edit.drag.borderMax && dTop > setting.edit.drag.borderMin), - isBottom = (dBottom < setting.edit.drag.borderMax && dBottom > setting.edit.drag.borderMin), - isLeft = (dLeft < setting.edit.drag.borderMax && dLeft > setting.edit.drag.borderMin), - isRight = (dRight < setting.edit.drag.borderMax && dRight > setting.edit.drag.borderMin), - isTreeInner = dTop > setting.edit.drag.borderMin && dBottom > setting.edit.drag.borderMin && dLeft > setting.edit.drag.borderMin && dRight > setting.edit.drag.borderMin, - isTreeTop = (isTop && targetSetting.treeObj.scrollTop() <= 0), - isTreeBottom = (isBottom && (targetSetting.treeObj.scrollTop() + targetSetting.treeObj.height()+10) >= scrollHeight), - isTreeLeft = (isLeft && targetSetting.treeObj.scrollLeft() <= 0), - isTreeRight = (isRight && (targetSetting.treeObj.scrollLeft() + targetSetting.treeObj.width()+10) >= scrollWidth); - - if (event.target.id && targetSetting.treeObj.find("#" + event.target.id).length > 0) { - //get node
                            • dom - var targetObj = event.target; - while (targetObj && targetObj.tagName && !tools.eqs(targetObj.tagName, "li") && targetObj.id != targetSetting.treeId) { - targetObj = targetObj.parentNode; - } - - var canMove = true; - //don't move to self or children of self - for (i=0, l=nodes.length; i 0) { - canMove = false; - break; - } - } - if (canMove) { - if (event.target.id && - (event.target.id == (targetObj.id + consts.id.A) || $(event.target).parents("#" + targetObj.id + consts.id.A).length > 0)) { - tmpTarget = $(targetObj); - tmpTargetNodeId = targetObj.id; - } - } - } - - //the mouse must be in zTree - tmpNode = nodes[0]; - if (isTreeInner && (event.target.id == targetSetting.treeId || $(event.target).parents("#" + targetSetting.treeId).length>0)) { - //judge mouse move in root of ztree - if (!tmpTarget && (event.target.id == targetSetting.treeId || isTreeTop || isTreeBottom || isTreeLeft || isTreeRight) && (isOtherTree || (!isOtherTree && tmpNode.parentTId))) { - tmpTarget = targetSetting.treeObj; - } - //auto scroll top - if (isTop) { - targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop()-10); - } else if (isBottom) { - targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop()+10); - } - if (isLeft) { - targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()-10); - } else if (isRight) { - targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()+10); - } - //auto scroll left - if (tmpTarget && tmpTarget != targetSetting.treeObj && tmpTarget.offset().left < targetSetting.treeObj.offset().left) { - targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()+ tmpTarget.offset().left - targetSetting.treeObj.offset().left); - } - } - - curNode.css({ - "top": (event.clientY + docScrollTop + 3) + "px", - "left": (event.clientX + docScrollLeft + 3) + "px" - }); - - var dX = 0; - var dY = 0; - if (tmpTarget && tmpTarget.attr("id")!=targetSetting.treeId) { - var tmpTargetNode = tmpTargetNodeId == null ? null: data.getNodeCache(targetSetting, tmpTargetNodeId), - isCopy = (event.ctrlKey && setting.edit.drag.isMove && setting.edit.drag.isCopy) || (!setting.edit.drag.isMove && setting.edit.drag.isCopy), - isPrev = !!(preNode && tmpTargetNodeId === preNode.tId), - isNext = !!(nextNode && tmpTargetNodeId === nextNode.tId), - isInner = (tmpNode.parentTId && tmpNode.parentTId == tmpTargetNodeId), - canPrev = (isCopy || !isNext) && tools.apply(targetSetting.edit.drag.prev, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.prev), - canNext = (isCopy || !isPrev) && tools.apply(targetSetting.edit.drag.next, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.next), - canInner = (isCopy || !isInner) && !(targetSetting.data.keep.leaf && !tmpTargetNode.isParent) && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.inner); - if (!canPrev && !canNext && !canInner) { - tmpTarget = null; - tmpTargetNodeId = ""; - moveType = consts.move.TYPE_INNER; - tmpArrow.css({ - "display":"none" - }); - if (window.zTreeMoveTimer) { - clearTimeout(window.zTreeMoveTimer); - window.zTreeMoveTargetNodeTId = null - } - } else { - var tmpTargetA = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget), - tmpNextA = tmpTargetNode.isLastNode ? null : $("#" + tmpTargetNode.getNextNode().tId + consts.id.A, tmpTarget.next()), - tmpTop = tmpTargetA.offset().top, - tmpLeft = tmpTargetA.offset().left, - prevPercent = canPrev ? (canInner ? 0.25 : (canNext ? 0.5 : 1) ) : -1, - nextPercent = canNext ? (canInner ? 0.75 : (canPrev ? 0.5 : 0) ) : -1, - dY_percent = (event.clientY + docScrollTop - tmpTop)/tmpTargetA.height(); - if ((prevPercent==1 ||dY_percent<=prevPercent && dY_percent>=-.2) && canPrev) { - dX = 1 - tmpArrow.width(); - dY = tmpTop - tmpArrow.height()/2; - moveType = consts.move.TYPE_PREV; - } else if ((nextPercent==0 || dY_percent>=nextPercent && dY_percent<=1.2) && canNext) { - dX = 1 - tmpArrow.width(); - dY = (tmpNextA == null || (tmpTargetNode.isParent && tmpTargetNode.open)) ? (tmpTop + tmpTargetA.height() - tmpArrow.height()/2) : (tmpNextA.offset().top - tmpArrow.height()/2); - moveType = consts.move.TYPE_NEXT; - }else { - dX = 5 - tmpArrow.width(); - dY = tmpTop; - moveType = consts.move.TYPE_INNER; - } - tmpArrow.css({ - "display":"block", - "top": dY + "px", - "left": (tmpLeft + dX) + "px" - }); - tmpTargetA.addClass(consts.node.TMPTARGET_NODE + "_" + moveType); - - if (preTmpTargetNodeId != tmpTargetNodeId || preTmpMoveType != moveType) { - startTime = (new Date()).getTime(); - } - if (tmpTargetNode && tmpTargetNode.isParent && moveType == consts.move.TYPE_INNER) { - var startTimer = true; - if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId !== tmpTargetNode.tId) { - clearTimeout(window.zTreeMoveTimer); - window.zTreeMoveTargetNodeTId = null; - } else if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId === tmpTargetNode.tId) { - startTimer = false; - } - if (startTimer) { - window.zTreeMoveTimer = setTimeout(function() { - if (moveType != consts.move.TYPE_INNER) return; - if (tmpTargetNode && tmpTargetNode.isParent && !tmpTargetNode.open && (new Date()).getTime() - startTime > targetSetting.edit.drag.autoOpenTime - && tools.apply(targetSetting.callback.beforeDragOpen, [targetSetting.treeId, tmpTargetNode], true)) { - view.switchNode(targetSetting, tmpTargetNode); - if (targetSetting.edit.drag.autoExpandTrigger) { - targetSetting.treeObj.trigger(consts.event.EXPAND, [targetSetting.treeId, tmpTargetNode]); - } - } - }, targetSetting.edit.drag.autoOpenTime+50); - window.zTreeMoveTargetNodeTId = tmpTargetNode.tId; - } - } - } - } else { - moveType = consts.move.TYPE_INNER; - if (tmpTarget && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, null], !!targetSetting.edit.drag.inner)) { - tmpTarget.addClass(consts.node.TMPTARGET_TREE); - } else { - tmpTarget = null; - } - tmpArrow.css({ - "display":"none" - }); - if (window.zTreeMoveTimer) { - clearTimeout(window.zTreeMoveTimer); - window.zTreeMoveTargetNodeTId = null; - } - } - preTmpTargetNodeId = tmpTargetNodeId; - preTmpMoveType = moveType; - } - return false; - } - - doc.bind("mouseup", _docMouseUp); - function _docMouseUp(event) { - if (window.zTreeMoveTimer) { - clearTimeout(window.zTreeMoveTimer); - window.zTreeMoveTargetNodeTId = null; - } - preTmpTargetNodeId = null; - preTmpMoveType = null; - doc.unbind("mousemove", _docMouseMove); - doc.unbind("mouseup", _docMouseUp); - doc.unbind("selectstart", _docSelect); - $("body").css("cursor", "auto"); - if (tmpTarget) { - tmpTarget.removeClass(consts.node.TMPTARGET_TREE); - if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV) - .removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER); - } - tools.showIfameMask(setting, false); - - root.showHoverDom = true; - if (root.dragFlag == 0) return; - root.dragFlag = 0; - - var i, l, tmpNode; - for (i=0, l=nodes.length; i0); - } - $("#" + newNodes[0].tId).focus().blur(); - - setting.treeObj.trigger(consts.event.DROP, [event, targetSetting.treeId, newNodes, dragTargetNode, moveType, isCopy]); - } - - if (moveType == consts.move.TYPE_INNER && tools.canAsync(targetSetting, dragTargetNode)) { - view.asyncNode(targetSetting, dragTargetNode, false, dropCallback); - } else { - dropCallback(); - } - - } else { - for (i=0, l=nodes.length; i0); - } - setting.treeObj.trigger(consts.event.DROP, [event, setting.treeId, nodes, null, null, null]); - } - } - - doc.bind("selectstart", _docSelect); - function _docSelect() { - return false; - } - - //Avoid FireFox's Bug - //If zTree Div CSS set 'overflow', so drag node outside of zTree, and event.target is error. - if(eventMouseDown.preventDefault) { - eventMouseDown.preventDefault(); - } - return true; - } - }, - //method of tools for zTree - _tools = { - getAbs: function (obj) { - var oRect = obj.getBoundingClientRect(); - return [oRect.left,oRect.top] - }, - inputFocus: function(inputObj) { - if (inputObj.get(0)) { - inputObj.focus(); - tools.setCursorPosition(inputObj.get(0), inputObj.val().length); - } - }, - inputSelect: function(inputObj) { - if (inputObj.get(0)) { - inputObj.focus(); - inputObj.select(); - } - }, - setCursorPosition: function(obj, pos){ - if(obj.setSelectionRange) { - obj.focus(); - obj.setSelectionRange(pos,pos); - } else if (obj.createTextRange) { - var range = obj.createTextRange(); - range.collapse(true); - range.moveEnd('character', pos); - range.moveStart('character', pos); - range.select(); - } - }, - showIfameMask: function(setting, showSign) { - var root = data.getRoot(setting); - //clear full mask - while (root.dragMaskList.length > 0) { - root.dragMaskList[0].remove(); - root.dragMaskList.shift(); - } - if (showSign) { - //show mask - var iframeList = $("iframe"); - for (var i = 0, l = iframeList.length; i < l; i++) { - var obj = iframeList.get(i), - r = tools.getAbs(obj), - dragMask = $("
                              "); - dragMask.appendTo("body"); - root.dragMaskList.push(dragMask); - } - } - } - }, - //method of operate ztree dom - _view = { - addEditBtn: function(setting, node) { - if (node.editNameFlag || $("#" + node.tId + consts.id.EDIT).length > 0) { - return; - } - if (!tools.apply(setting.edit.showRenameBtn, [setting.treeId, node], setting.edit.showRenameBtn)) { - return; - } - var aObj = $("#" + node.tId + consts.id.A), - editStr = ""; - aObj.append(editStr); - - $("#" + node.tId + consts.id.EDIT).bind('click', - function() { - if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeEditName, [setting.treeId, node], true) == false) return false; - view.editNode(setting, node); - return false; - } - ).show(); - }, - addRemoveBtn: function(setting, node) { - if (node.editNameFlag || $("#" + node.tId + consts.id.REMOVE).length > 0) { - return; - } - if (!tools.apply(setting.edit.showRemoveBtn, [setting.treeId, node], setting.edit.showRemoveBtn)) { - return; - } - var aObj = $("#" + node.tId + consts.id.A), - removeStr = ""; - aObj.append(removeStr); - - $("#" + node.tId + consts.id.REMOVE).bind('click', - function() { - if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return false; - view.removeNode(setting, node); - setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]); - return false; - } - ).bind('mousedown', - function(eventMouseDown) { - return true; - } - ).show(); - }, - addHoverDom: function(setting, node) { - if (data.getRoot(setting).showHoverDom) { - node.isHover = true; - if (setting.edit.enable) { - view.addEditBtn(setting, node); - view.addRemoveBtn(setting, node); - } - tools.apply(setting.view.addHoverDom, [setting.treeId, node]); - } - }, - cancelCurEditNode: function (setting, forceName) { - var root = data.getRoot(setting), - nameKey = setting.data.key.name, - node = root.curEditNode; - - if (node) { - var inputObj = root.curEditInput; - var newName = forceName ? forceName:inputObj.val(); - if (!forceName && tools.apply(setting.callback.beforeRename, [setting.treeId, node, newName], true) === false) { - return false; - } else { - node[nameKey] = newName ? newName:inputObj.val(); - if (!forceName) { - setting.treeObj.trigger(consts.event.RENAME, [setting.treeId, node]); - } - } - var aObj = $("#" + node.tId + consts.id.A); - aObj.removeClass(consts.node.CURSELECTED_EDIT); - inputObj.unbind(); - view.setNodeName(setting, node); - node.editNameFlag = false; - root.curEditNode = null; - root.curEditInput = null; - view.selectNode(setting, node, false); - } - root.noSelection = true; - return true; - }, - editNode: function(setting, node) { - var root = data.getRoot(setting); - view.editNodeBlur = false; - if (data.isSelectedNode(setting, node) && root.curEditNode == node && node.editNameFlag) { - setTimeout(function() {tools.inputFocus(root.curEditInput);}, 0); - return; - } - var nameKey = setting.data.key.name; - node.editNameFlag = true; - view.removeTreeDom(setting, node); - view.cancelCurEditNode(setting); - view.selectNode(setting, node, false); - $("#" + node.tId + consts.id.SPAN).html(""); - var inputObj = $("#" + node.tId + consts.id.INPUT); - inputObj.attr("value", node[nameKey]); - if (setting.edit.editNameSelectAll) { - tools.inputSelect(inputObj); - } else { - tools.inputFocus(inputObj); - } - - inputObj.bind('blur', function(event) { - if (!view.editNodeBlur) { - view.cancelCurEditNode(setting); - } - }).bind('keydown', function(event) { - if (event.keyCode=="13") { - view.editNodeBlur = true; - view.cancelCurEditNode(setting, null, true); - } else if (event.keyCode=="27") { - view.cancelCurEditNode(setting, node[nameKey]); - } - }).bind('click', function(event) { - return false; - }).bind('dblclick', function(event) { - return false; - }); - - $("#" + node.tId + consts.id.A).addClass(consts.node.CURSELECTED_EDIT); - root.curEditInput = inputObj; - root.noSelection = false; - root.curEditNode = node; - }, - moveNode: function(setting, targetNode, node, moveType, animateFlag, isSilent) { - var root = data.getRoot(setting), - childKey = setting.data.key.children; - if (targetNode == node) return; - if (setting.data.keep.leaf && targetNode && !targetNode.isParent && moveType == consts.move.TYPE_INNER) return; - var oldParentNode = (node.parentTId ? node.getParentNode(): root), - targetNodeIsRoot = (targetNode === null || targetNode == root); - if (targetNodeIsRoot && targetNode === null) targetNode = root; - if (targetNodeIsRoot) moveType = consts.move.TYPE_INNER; - var targetParentNode = (targetNode.parentTId ? targetNode.getParentNode() : root); - - if (moveType != consts.move.TYPE_PREV && moveType != consts.move.TYPE_NEXT) { - moveType = consts.move.TYPE_INNER; - } - - if (moveType == consts.move.TYPE_INNER) { - if (targetNodeIsRoot) { - //parentTId of root node is null - node.parentTId = null; - } else { - if (!targetNode.isParent) { - targetNode.isParent = true; - targetNode.open = !!targetNode.open; - view.setNodeLineIcos(setting, targetNode); - } - node.parentTId = targetNode.tId; - } - } - - //move node Dom - var targetObj, target_ulObj; - if (targetNodeIsRoot) { - targetObj = setting.treeObj; - target_ulObj = targetObj; - } else { - if (!isSilent && moveType == consts.move.TYPE_INNER) { - view.expandCollapseNode(setting, targetNode, true, false); - } else if (!isSilent) { - view.expandCollapseNode(setting, targetNode.getParentNode(), true, false); - } - targetObj = $("#" + targetNode.tId); - target_ulObj = $("#" + targetNode.tId + consts.id.UL); - if (!!targetObj.get(0) && !target_ulObj.get(0)) { - var ulstr = []; - view.makeUlHtml(setting, targetNode, ulstr, ''); - targetObj.append(ulstr.join('')); - } - target_ulObj = $("#" + targetNode.tId + consts.id.UL); - } - var nodeDom = $("#" + node.tId); - if (!nodeDom.get(0)) { - nodeDom = view.appendNodes(setting, node.level, [node], null, false, true).join(''); - } else if (!targetObj.get(0)) { - nodeDom.remove(); - } - if (target_ulObj.get(0) && moveType == consts.move.TYPE_INNER) { - target_ulObj.append(nodeDom); - } else if (targetObj.get(0) && moveType == consts.move.TYPE_PREV) { - targetObj.before(nodeDom); - } else if (targetObj.get(0) && moveType == consts.move.TYPE_NEXT) { - targetObj.after(nodeDom); - } - - //repair the data after move - var i,l, - tmpSrcIndex = -1, - tmpTargetIndex = 0, - oldNeighbor = null, - newNeighbor = null, - oldLevel = node.level; - if (node.isFirstNode) { - tmpSrcIndex = 0; - if (oldParentNode[childKey].length > 1 ) { - oldNeighbor = oldParentNode[childKey][1]; - oldNeighbor.isFirstNode = true; - } - } else if (node.isLastNode) { - tmpSrcIndex = oldParentNode[childKey].length -1; - oldNeighbor = oldParentNode[childKey][tmpSrcIndex - 1]; - oldNeighbor.isLastNode = true; - } else { - for (i = 0, l = oldParentNode[childKey].length; i < l; i++) { - if (oldParentNode[childKey][i].tId == node.tId) { - tmpSrcIndex = i; - break; - } - } - } - if (tmpSrcIndex >= 0) { - oldParentNode[childKey].splice(tmpSrcIndex, 1); - } - if (moveType != consts.move.TYPE_INNER) { - for (i = 0, l = targetParentNode[childKey].length; i < l; i++) { - if (targetParentNode[childKey][i].tId == targetNode.tId) tmpTargetIndex = i; - } - } - if (moveType == consts.move.TYPE_INNER) { - if (!targetNode[childKey]) targetNode[childKey] = new Array(); - if (targetNode[childKey].length > 0) { - newNeighbor = targetNode[childKey][targetNode[childKey].length - 1]; - newNeighbor.isLastNode = false; - } - targetNode[childKey].splice(targetNode[childKey].length, 0, node); - node.isLastNode = true; - node.isFirstNode = (targetNode[childKey].length == 1); - } else if (targetNode.isFirstNode && moveType == consts.move.TYPE_PREV) { - targetParentNode[childKey].splice(tmpTargetIndex, 0, node); - newNeighbor = targetNode; - newNeighbor.isFirstNode = false; - node.parentTId = targetNode.parentTId; - node.isFirstNode = true; - node.isLastNode = false; - - } else if (targetNode.isLastNode && moveType == consts.move.TYPE_NEXT) { - targetParentNode[childKey].splice(tmpTargetIndex + 1, 0, node); - newNeighbor = targetNode; - newNeighbor.isLastNode = false; - node.parentTId = targetNode.parentTId; - node.isFirstNode = false; - node.isLastNode = true; - - } else { - if (moveType == consts.move.TYPE_PREV) { - targetParentNode[childKey].splice(tmpTargetIndex, 0, node); - } else { - targetParentNode[childKey].splice(tmpTargetIndex + 1, 0, node); - } - node.parentTId = targetNode.parentTId; - node.isFirstNode = false; - node.isLastNode = false; - } - data.fixPIdKeyValue(setting, node); - data.setSonNodeLevel(setting, node.getParentNode(), node); - - //repair node what been moved - view.setNodeLineIcos(setting, node); - view.repairNodeLevelClass(setting, node, oldLevel) - - //repair node's old parentNode dom - if (!setting.data.keep.parent && oldParentNode[childKey].length < 1) { - //old parentNode has no child nodes - oldParentNode.isParent = false; - oldParentNode.open = false; - var tmp_ulObj = $("#" + oldParentNode.tId + consts.id.UL), - tmp_switchObj = $("#" + oldParentNode.tId + consts.id.SWITCH), - tmp_icoObj = $("#" + oldParentNode.tId + consts.id.ICON); - view.replaceSwitchClass(oldParentNode, tmp_switchObj, consts.folder.DOCU); - view.replaceIcoClass(oldParentNode, tmp_icoObj, consts.folder.DOCU); - tmp_ulObj.css("display", "none"); - - } else if (oldNeighbor) { - //old neigbor node - view.setNodeLineIcos(setting, oldNeighbor); - } - - //new neigbor node - if (newNeighbor) { - view.setNodeLineIcos(setting, newNeighbor); - } - - //repair checkbox / radio - if (!!setting.check && setting.check.enable && view.repairChkClass) { - view.repairChkClass(setting, oldParentNode); - view.repairParentChkClassWithSelf(setting, oldParentNode); - if (oldParentNode != node.parent) - view.repairParentChkClassWithSelf(setting, node); - } - - //expand parents after move - if (!isSilent) { - view.expandCollapseParentNode(setting, node.getParentNode(), true, animateFlag); - } - }, - removeEditBtn: function(node) { - $("#" + node.tId + consts.id.EDIT).unbind().remove(); - }, - removeRemoveBtn: function(node) { - $("#" + node.tId + consts.id.REMOVE).unbind().remove(); - }, - removeTreeDom: function(setting, node) { - node.isHover = false; - view.removeEditBtn(node); - view.removeRemoveBtn(node); - tools.apply(setting.view.removeHoverDom, [setting.treeId, node]); - }, - repairNodeLevelClass: function(setting, node, oldLevel) { - if (oldLevel === node.level) return; - var liObj = $("#" + node.tId), - aObj = $("#" + node.tId + consts.id.A), - ulObj = $("#" + node.tId + consts.id.UL), - oldClass = "level" + oldLevel, - newClass = "level" + node.level; - liObj.removeClass(oldClass); - liObj.addClass(newClass); - aObj.removeClass(oldClass); - aObj.addClass(newClass); - ulObj.removeClass(oldClass); - ulObj.addClass(newClass); - } - }, - - _z = { - tools: _tools, - view: _view, - event: _event, - data: _data - }; - $.extend(true, $.fn.zTree.consts, _consts); - $.extend(true, $.fn.zTree._z, _z); - - var zt = $.fn.zTree, - tools = zt._z.tools, - consts = zt.consts, - view = zt._z.view, - data = zt._z.data, - event = zt._z.event; - - data.exSetting(_setting); - data.addInitBind(_bindEvent); - data.addInitUnBind(_unbindEvent); - data.addInitCache(_initCache); - data.addInitNode(_initNode); - data.addInitProxy(_eventProxy); - data.addInitRoot(_initRoot); - data.addZTreeTools(_zTreeTools); - - var _cancelPreSelectedNode = view.cancelPreSelectedNode; - view.cancelPreSelectedNode = function (setting, node) { - var list = data.getRoot(setting).curSelectedList; - for (var i=0, j=list.length; i"); - }, - showNode: function(setting, node, options) { - node.isHidden = false; - data.initShowForExCheck(setting, node); - $$(node, setting).show(); - }, - showNodes: function(setting, nodes, options) { - if (!nodes || nodes.length == 0) { - return; - } - var pList = {}, i, j; - for (i=0, j=nodes.length; i 0 && !parentNode[childKey][0].isHidden) { - parentNode[childKey][0].isFirstNode = true; - } else if (childLength > 0) { - view.setFirstNodeForHide(setting, parentNode[childKey]); - } - }, - setLastNode: function(setting, parentNode) { - var childKey = setting.data.key.children, childLength = parentNode[childKey].length; - if (childLength > 0 && !parentNode[childKey][0].isHidden) { - parentNode[childKey][childLength - 1].isLastNode = true; - } else if (childLength > 0) { - view.setLastNodeForHide(setting, parentNode[childKey]); - } - }, - setFirstNodeForHide: function(setting, nodes) { - var n,i,j; - for (i=0, j=nodes.length; i=0; i--) { - n = nodes[i]; - if (n.isLastNode) { - break; - } - if (!n.isHidden && !n.isLastNode) { - n.isLastNode = true; - view.setNodeLineIcos(setting, n); - break; - } else { - n = null; - } - } - return n; - }, - setLastNodeForShow: function(setting, nodes) { - var n,i,j, last, old; - for (i=nodes.length-1; i>=0; i--) { - n = nodes[i]; - if (!last && !n.isHidden && n.isLastNode) { - last = n; - break; - } else if (!last && !n.isHidden && !n.isLastNode) { - n.isLastNode = true; - last = n; - view.setNodeLineIcos(setting, n); - } else if (last && n.isLastNode) { - n.isLastNode = false; - old = n; - view.setNodeLineIcos(setting, n); - break; - } else { - n = null; - } - } - return {"new":last, "old":old}; - } - }, - - _z = { - view: _view, - data: _data - }; - $.extend(true, $.fn.zTree._z, _z); - - var zt = $.fn.zTree, - tools = zt._z.tools, - consts = zt.consts, - view = zt._z.view, - data = zt._z.data, - event = zt._z.event, - $$ = tools.$; - - data.addInitNode(_initNode); - data.addBeforeA(_beforeA); - data.addZTreeTools(_zTreeTools); - -// Override method in core - var _dInitNode = data.initNode; - data.initNode = function(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag) { - var tmpPNode = (parentNode) ? parentNode: data.getRoot(setting), - children = tmpPNode[setting.data.key.children]; - data.tmpHideFirstNode = view.setFirstNodeForHide(setting, children); - data.tmpHideLastNode = view.setLastNodeForHide(setting, children); - if (openFlag) { - view.setNodeLineIcos(setting, data.tmpHideFirstNode); - view.setNodeLineIcos(setting, data.tmpHideLastNode); - } - isFirstNode = (data.tmpHideFirstNode === node); - isLastNode = (data.tmpHideLastNode === node); - if (_dInitNode) _dInitNode.apply(data, arguments); - if (openFlag && isLastNode) { - view.clearOldLastNode(setting, node, openFlag); - } - }; - - var _makeChkFlag = data.makeChkFlag; - if (!!_makeChkFlag) { - data.makeChkFlag = function(setting, node) { - if (!!node && !!node.isHidden) { - return; - } - _makeChkFlag.apply(data, arguments); - } - } - - var _getTreeCheckedNodes = data.getTreeCheckedNodes; - if (!!_getTreeCheckedNodes) { - data.getTreeCheckedNodes = function(setting, nodes, checked, results) { - if (!!nodes && nodes.length > 0) { - var p = nodes[0].getParentNode(); - if (!!p && !!p.isHidden) { - return []; - } - } - return _getTreeCheckedNodes.apply(data, arguments); - } - } - - var _getTreeChangeCheckedNodes = data.getTreeChangeCheckedNodes; - if (!!_getTreeChangeCheckedNodes) { - data.getTreeChangeCheckedNodes = function(setting, nodes, results) { - if (!!nodes && nodes.length > 0) { - var p = nodes[0].getParentNode(); - if (!!p && !!p.isHidden) { - return []; - } - } - return _getTreeChangeCheckedNodes.apply(data, arguments); - } - } - - var _expandCollapseSonNode = view.expandCollapseSonNode; - if (!!_expandCollapseSonNode) { - view.expandCollapseSonNode = function(setting, node, expandFlag, animateFlag, callback) { - if (!!node && !!node.isHidden) { - return; - } - _expandCollapseSonNode.apply(view, arguments); - } - } - - var _setSonNodeCheckBox = view.setSonNodeCheckBox; - if (!!_setSonNodeCheckBox) { - view.setSonNodeCheckBox = function(setting, node, value, srcNode) { - if (!!node && !!node.isHidden) { - return; - } - _setSonNodeCheckBox.apply(view, arguments); - } - } - - var _repairParentChkClassWithSelf = view.repairParentChkClassWithSelf; - if (!!_repairParentChkClassWithSelf) { - view.repairParentChkClassWithSelf = function(setting, node) { - if (!!node && !!node.isHidden) { - return; - } - _repairParentChkClassWithSelf.apply(view, arguments); - } - } -})(jQuery); \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/js/jquery.ztree.exhide-3.5.min.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/js/jquery.ztree.exhide-3.5.min.js deleted file mode 100644 index 800cd9e8..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/zTree/v3/js/jquery.ztree.exhide-3.5.min.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * JQuery zTree exHideNodes v3.5.18 - * http://zTree.me/ - * - * Copyright (c) 2010 Hunter.z - * - * Licensed same as jquery - MIT License - * http://www.opensource.org/licenses/mit-license.php - * - * email: hunter.z@263.net - * Date: 2015-05-25 - */ -(function(i){i.extend(!0,i.fn.zTree._z,{view:{clearOldFirstNode:function(c,a){for(var b=a.getNextNode();b;){if(b.isFirstNode){b.isFirstNode=!1;d.setNodeLineIcos(c,b);break}if(b.isLastNode)break;b=b.getNextNode()}},clearOldLastNode:function(c,a,b){for(a=a.getPreNode();a;){if(a.isLastNode){a.isLastNode=!1;b&&d.setNodeLineIcos(c,a);break}if(a.isFirstNode)break;a=a.getPreNode()}},makeDOMNodeMainBefore:function(c,a,b){c.push("
                            • ")},showNode:function(c,a){a.isHidden=!1;f.initShowForExCheck(c,a);j(a,c).show()},showNodes:function(c,a,b){if(a&&a.length!=0){var e={},g,k;for(g=0,k=a.length;g0&&!a[b][0].isHidden? -a[b][0].isFirstNode=!0:e>0&&d.setFirstNodeForHide(c,a[b])},setLastNode:function(c,a){var b=c.data.key.children,e=a[b].length;e>0&&!a[b][0].isHidden?a[b][e-1].isLastNode=!0:e>0&&d.setLastNodeForHide(c,a[b])},setFirstNodeForHide:function(c,a){var b,e,g;for(e=0,g=a.length;e=0;e--){b=a[e];if(b.isLastNode)break;if(!b.isHidden&&!b.isLastNode){b.isLastNode=!0;d.setNodeLineIcos(c,b);break}else b=null}return b},setLastNodeForShow:function(c,a){var b,e,g,f;for(e=a.length-1;e>=0;e--)if(b=a[e],!g&&!b.isHidden&& -b.isLastNode){g=b;break}else if(!g&&!b.isHidden&&!b.isLastNode)b.isLastNode=!0,g=b,d.setNodeLineIcos(c,b);else if(g&&b.isLastNode){b.isLastNode=!1;f=b;d.setNodeLineIcos(c,b);break}return{"new":g,old:f}}},data:{initHideForExCheck:function(c,a){if(a.isHidden&&c.check&&c.check.enable){if(typeof a._nocheck=="undefined")a._nocheck=!!a.nocheck,a.nocheck=!0;a.check_Child_State=-1;d.repairParentChkClassWithSelf&&d.repairParentChkClassWithSelf(c,a)}},initShowForExCheck:function(c,a){if(!a.isHidden&&c.check&& -c.check.enable){if(typeof a._nocheck!="undefined")a.nocheck=a._nocheck,delete a._nocheck;if(d.setChkClass){var b=j(a,l.id.CHECK,c);d.setChkClass(c,b,a)}d.repairParentChkClassWithSelf&&d.repairParentChkClassWithSelf(c,a)}}}});var i=i.fn.zTree,m=i._z.tools,l=i.consts,d=i._z.view,f=i._z.data,j=m.$;f.addInitNode(function(c,a,b){if(typeof b.isHidden=="string")b.isHidden=m.eqs(b.isHidden,"true");b.isHidden=!!b.isHidden;f.initHideForExCheck(c,b)});f.addBeforeA(function(){});f.addZTreeTools(function(c,a){a.showNodes= -function(a,b){d.showNodes(c,a,b)};a.showNode=function(a,b){a&&d.showNodes(c,[a],b)};a.hideNodes=function(a,b){d.hideNodes(c,a,b)};a.hideNode=function(a,b){a&&d.hideNodes(c,[a],b)};var b=a.checkNode;if(b)a.checkNode=function(c,d,f,h){(!c||!c.isHidden)&&b.apply(a,arguments)}});var n=f.initNode;f.initNode=function(c,a,b,e,g,i,h){var j=(e?e:f.getRoot(c))[c.data.key.children];f.tmpHideFirstNode=d.setFirstNodeForHide(c,j);f.tmpHideLastNode=d.setLastNodeForHide(c,j);h&&(d.setNodeLineIcos(c,f.tmpHideFirstNode), -d.setNodeLineIcos(c,f.tmpHideLastNode));g=f.tmpHideFirstNode===b;i=f.tmpHideLastNode===b;n&&n.apply(f,arguments);h&&i&&d.clearOldLastNode(c,b,h)};var o=f.makeChkFlag;if(o)f.makeChkFlag=function(c,a){(!a||!a.isHidden)&&o.apply(f,arguments)};var p=f.getTreeCheckedNodes;if(p)f.getTreeCheckedNodes=function(c,a,b,e){if(a&&a.length>0){var d=a[0].getParentNode();if(d&&d.isHidden)return[]}return p.apply(f,arguments)};var q=f.getTreeChangeCheckedNodes;if(q)f.getTreeChangeCheckedNodes=function(c,a,b){if(a&& -a.length>0){var d=a[0].getParentNode();if(d&&d.isHidden)return[]}return q.apply(f,arguments)};var r=d.expandCollapseSonNode;if(r)d.expandCollapseSonNode=function(c,a,b,e,f){(!a||!a.isHidden)&&r.apply(d,arguments)};var s=d.setSonNodeCheckBox;if(s)d.setSonNodeCheckBox=function(c,a,b,e){(!a||!a.isHidden)&&s.apply(d,arguments)};var t=d.repairParentChkClassWithSelf;if(t)d.repairParentChkClassWithSelf=function(c,a){(!a||!a.isHidden)&&t.apply(d,arguments)}})(jQuery); diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/login.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/login.html deleted file mode 100644 index 5261679c..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/login.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - -后台登录 - H-ui.admin v3.1 - - - - - -
                              -
                              -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              - -
                              -
                              - -
                              -
                              - -
                              -
                              -
                              -
                              - - -
                              -
                              -
                              -
                              -
                              - - - - - - - - - - - - - - - - - - - - - - - - - -添加用户 - H-ui.admin v3.1 - - - - -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              -
                              - - -
                              -
                              - - -
                              -
                              - - -
                              -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - - -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              - -

                              0/100

                              -
                              -
                              -
                              -
                              - -
                              -
                              -
                              -
                              - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/member-del.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/member-del.html deleted file mode 100644 index 33853f83..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/member-del.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - - - - - - - -删除的用户 - - - -
                              -
                              日期范围: - - - - - - -
                              -
                              批量删除 共有数据:88 条
                              -
                              - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                              ID用户名性别手机邮箱地址加入时间状态操作
                              1张三男13000000000admin@mail.com北京市 海淀区2014-6-11 11:11:42已删除
                              -
                              -
                              - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/member-list.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/member-list.html deleted file mode 100644 index 29c5638c..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/member-list.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - - - - - - - - -用户管理 - - - -
                              -
                              日期范围: - - - - - - -
                              -
                              批量删除 添加用户 共有数据:88 条
                              -
                              - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                              ID用户名性别手机邮箱地址加入时间状态操作
                              1张三男13000000000admin@mail.com北京市 海淀区2014-6-11 11:11:42已启用
                              -
                              -
                              - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/member-record-browse.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/member-record-browse.html deleted file mode 100644 index 046964b7..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/member-record-browse.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - -浏览记录 - - - -
                              -
                              日期范围: - - - - - - -
                              -
                              批量删除 共有数据:88 条
                              -
                              - - - - - - - - - - - - - - - - - - - - - - - -
                              ID用户名IP访问时间URL操作
                              1张三192.168.0.22015.01.16 22:12:24http://www.h-ui,net/
                              -
                              -
                              - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/member-record-download.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/member-record-download.html deleted file mode 100644 index bddbeeff..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/member-record-download.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - -下载记录 - - - -
                              -
                              日期范围: - - - - - - -
                              -
                              批量删除 共有数据:88 条
                              -
                              - - - - - - - - - - - - - - - - - - - - - - - -
                              ID用户名IP访问时间URL操作
                              1张三192.168.0.22015.01.16 22:12:24http://www.h-ui,net/
                              -
                              -
                              - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/member-record-share.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/member-record-share.html deleted file mode 100644 index 9ccd5e35..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/member-record-share.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - -分享记录 - - - -
                              -
                              日期范围: - - - - - - -
                              -
                              批量删除 共有数据:88 条
                              -
                              - - - - - - - - - - - - - - - - - - - - - - - -
                              ID用户名IP访问时间URL操作
                              1张三192.168.0.22015.01.16 22:12:24http://www.h-ui,net/
                              -
                              -
                              - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/member-show.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/member-show.html deleted file mode 100644 index a4a5806e..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/member-show.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - -用户查看 - - -
                              - -
                              -
                              - 张三 - 余额:40 -
                              -
                              这家伙很懒,什么也没有留下
                              -
                              -
                              -
                              - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                              性别:男
                              手机:13000000000
                              邮箱:admin@mail.com
                              地址:北京市 海淀区
                              注册时间:2014.12.20
                              积分:330
                              -
                              - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/picture-add.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/picture-add.html deleted file mode 100644 index 33d26b76..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/picture-add.html +++ /dev/null @@ -1,833 +0,0 @@ - - - - - - - - - - - - - - - -新增图片 - - - -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              - - - -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              -
                              - - -
                              -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              - -

                              0/200

                              -
                              -
                              -
                              - -
                              -
                              -
                              -
                              选择图片
                              - -
                              -
                              -
                              -
                              - -
                              -
                              -
                              -
                              -
                              -

                              或将照片拖到这里,单次最多可选300张

                              -
                              -
                              - -
                              -
                              -
                              -
                              -
                              - - - -
                              -
                              -
                              -
                              - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/picture-list.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/picture-list.html deleted file mode 100644 index 04d8646a..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/picture-list.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - - - - - - - - - -图片列表 - - - -
                              -
                              日期范围: - - - - - - -
                              -
                              批量删除 添加图片 共有数据:54 条
                              -
                              - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                              ID分类封面图片名称Tags更新时间发布状态操作
                              001分类名称现代简约 白色 餐厅标签2014-6-11 11:11:42已发布
                              -
                              -
                              - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/picture-show.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/picture-show.html deleted file mode 100644 index ec5f7887..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/picture-show.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - -图片展示 - - - - -
                              -
                              编辑 批量删除 共有数据:54 条
                              -
                              -
                                -
                              • -
                                - -
                                -
                                客厅
                                -
                                -
                              • -
                              • -
                                - -
                                -
                                客厅
                                -
                                -
                              • -
                              • -
                                - -
                                -
                                客厅
                                -
                                -
                              • -
                              • -
                                - -
                                -
                                客厅
                                -
                                -
                              • -
                              • -
                                - -
                                -
                                厨房
                                -
                                -
                              • -
                              • -
                                - -
                                -
                                书房
                                -
                                -
                              • -
                              • -
                                - -
                                -
                                卧室
                                -
                                -
                              • -
                              • -
                                - -
                                -
                                卫生间1
                                -
                                -
                              • -
                              • -
                                - -
                                -
                                卫生间2
                                -
                                -
                              • -
                              -
                              -
                              - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/product-add.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/product-add.html deleted file mode 100644 index 281c7a2c..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/product-add.html +++ /dev/null @@ -1,919 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              -
                              - - -
                              -
                              -
                              -
                              - -
                              - - MM - - MM - - MM
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              - - kg
                              -
                              -
                              - -
                              - - 元
                              -
                              -
                              - -
                              - - 元
                              -
                              -
                              - -
                              - - 元
                              -
                              -
                              - -
                              - - 元
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              - -

                              0/200

                              -
                              -
                              -
                              - -
                              -
                              -
                              -
                              选择图片
                              - -
                              -
                              -
                              -
                              - -
                              -
                              -
                              -
                              -
                              -

                              或将照片拖到这里,单次最多可选300张

                              -
                              -
                              - -
                              -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              -
                              - - - -
                              -
                              -
                              -
                              - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/product-brand.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/product-brand.html deleted file mode 100644 index ad2ff023..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/product-brand.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - -品牌管理 - - - -
                              -
                              -
                              - - - - 上传logo - - - - -
                              -
                              -
                              批量删除 共有数据:54 条
                              -
                              - - - - - - - - - - - - - - - - - - - - - - - -
                              ID排序LOGO品牌名称具体描述操作
                              1 东鹏东鹏陶瓷被评为“中国名牌”、“国家免检产品”、“中国驰名商标”、http://www.dongpeng.net/
                              -
                              -
                              - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/product-category-add.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/product-category-add.html deleted file mode 100644 index d3690ba6..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/product-category-add.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - -添加产品分类 - - -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              - -

                              0/100

                              -
                              -
                              -
                              -
                              - -
                              -
                              -
                              -
                              - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/product-category.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/product-category.html deleted file mode 100644 index 80934c36..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/product-category.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - -产品分类 - - - - - - - - -
                                - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/product-list.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/product-list.html deleted file mode 100644 index c5aba95c..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/product-list.html +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - - - - - - - - - -建材列表 - - - -
                                -
                                  -
                                  -
                                  - -
                                  -
                                  日期范围: - - - - - - -
                                  -
                                  批量删除 添加产品 共有数据:54 条
                                  -
                                  - - - - - - - - - - - - - - - - - - - - - - - - - -
                                  ID缩略图产品名称描述单价发布状态操作
                                  001 圣象 哥本哈根橡木地板KS8373原木的外在,实木条形结构,色泽花纹自然,写意;款式设计吸取实木地板的天然去雕饰之美,在视觉上给人带来深邃联想.多款产品适合搭配不同的风格的室内装饰;功能流露出尊贵典雅的大气韵味。356.0 元/平米已发布
                                  -
                                  -
                                  -
                                  - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/record-browse.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/record-browse.html deleted file mode 100644 index 741a718d..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/record-browse.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - -浏览记录 - - - -
                                  -
                                  日期范围: - - - - - - -
                                  -
                                  - 批量删除 - 共有数据:88 条 -
                                  - - - - - - - - - - - - - - - - - - - - - - - -
                                  ID用户名IP访问时间URL操作
                                  1张三192.168.0.22015.01.16 22:12:24http://www.h-ui,net/
                                  - -
                                  - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/record-download.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/record-download.html deleted file mode 100644 index 01348ebf..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/record-download.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - -下载记录 - - - -
                                  -
                                  日期范围: - - - - - - -
                                  -
                                  - 批量删除 - 共有数据:88 条 -
                                  - - - - - - - - - - - - - - - - - - - - - - - -
                                  ID用户名IP访问时间URL操作
                                  1张三192.168.0.22015.01.16 22:12:24http://www.h-ui,net/
                                  - -
                                  - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/record-share.html b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/record-share.html deleted file mode 100644 index 714cf8de..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/record-share.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - -分享记录 - - - -
                                  -
                                  日期范围: - - - - - - -
                                  -
                                  - 批量删除 - 共有数据:88 条 -
                                  - - - - - - - - - - - - - - - - - - - - - - - -
                                  ID用户名IP访问时间URL操作
                                  1张三192.168.0.22015.01.16 22:12:24http://www.h-ui,net/
                                  - -
                                  - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/robots.txt b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/robots.txt deleted file mode 100644 index acc3c779..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/robots.txt +++ /dev/null @@ -1,2 +0,0 @@ -Disallow: * - diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/css/H-ui.admin.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/css/H-ui.admin.css deleted file mode 100644 index 64645c87..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/css/H-ui.admin.css +++ /dev/null @@ -1,127 +0,0 @@ -@charset "utf-8"; -/* -----------H-ui前端框架------------- -* H-ui.admin.css v2.5 -* http://www.h-ui.net/ -* Created & Modified by guojunhui -* Date modified 2016.05.31 -* -* Copyright 2013-2016 北京颖杰联创科技有限公司 All rights reserved. -* Licensed under MIT license. -* http://opensource.org/licenses/MIT -* -*/ -html{height:100%} -body{min-height: 100%;position: relative;font-size:14px;color:#333; background-color:#fff} -a{color:#333}a:hover,a:focus,.maincolor,.maincolor a{color:#06c} -.bg-1{ background-color:#f5fafe} -h4{line-height:30px} - -/*页面框架*/ -.Hui-header{position:absolute;top:0; right:0; left:0;height:44px;z-index:999; padding:0 15px} -.Hui-aside{position: absolute;top:44px;bottom:0;left:0;padding-top:10px;width:199px;z-index:99;overflow:auto; background-color:rgba(238,238,238,0.98);_background-color:rgb(238,238,238);border-right: 1px solid #e5e5e5} -.Hui-article-box{position: absolute;top:44px;right:0;bottom: 0;left:199px; overflow:hidden; z-index:1; background-color:#fff} - .Hui-article{position: absolute;top:34px;bottom:0;left:0; right:0;overflow:auto;z-index:1} -.Hui-container{ padding:45px 0 0} -.Hui-aside,.Hui-article-box,.dislpayArrow{-moz-transition: all 0.2s ease 0s;-webkit-transition: all 0.2s ease 0s;-ms-transition: all 0.2s ease 0s;-o-transition: all 0.2s ease 0s;transition: all 0.2s ease 0s} -.big-page .Hui-article-box,.big-page .dislpayArrow,.big-page .breadcrumb{left:0px} -.big-page .Hui-aside{ left:-200px} -.page-container{ padding:20px} -@media (max-width: 767px) { - .page-container{ padding:15px} -} -/*组件*/ -/*logo*/ - -/*导航*/ -#Hui-nav > ul > li{ font-weight:normal} -@media (max-width: 767px) { - #Hui-nav{display: block; top: 0; left: 65px; right: 65px} - #Hui-nav > ul { width: 100%} - #Hui-nav > ul > li{ width: 24%;text-align:center;} - #Hui-nav > ul > li a{ text-align: center; padding: 0} -} -#Hui-userbar{right:20px; position:absolute; top:0;} -#Hui-userbar > ul > li > a{padding:0 10px} - -#Hui-msg .badge{ position:absolute; left:19px; top:4px; font-size:12px; font-weight:normal; padding:1px 5px} -/*左侧菜单*/ -.Hui-aside .menu_dropdown dl{ margin-bottom:0} -.Hui-aside .menu_dropdown dt{display:block;line-height:35px;padding-left:15px;cursor:pointer;position:relative;border-bottom: 1px solid #e5e5e5;font-weight:normal} -.Hui-aside .menu_dropdown dt .menu_dropdown-arrow{ position:absolute;overflow: hidden; top:0; right:15px;transition-duration:0.3s ;transition-property:all} -.Hui-aside .menu_dropdown dd{ display:none} -.Hui-aside .menu_dropdown dt.selected .menu_dropdown-arrow{transform: rotate(180deg)} -.Hui-aside .menu_dropdown dd.selected{display:block; margin-left:0px} -.Hui-aside .menu_dropdown ul{padding:0px} -.Hui-aside .menu_dropdown li{line-height:35px;overflow:hidden;zoom:1} -.Hui-aside .menu_dropdown li a{padding-left:15px; display:block;font-weight: bold; margin:0} -.Hui-aside .menu_dropdown li a i{ font-weight: normal} -.Hui-aside .menu_dropdown dd ul{padding:3px 8px} -.Hui-aside .menu_dropdown dd li{line-height:32px} -.Hui-aside .menu_dropdown dd li a{line-height:32px;padding-left:26px; border-bottom:none; font-weight:normal} -.Hui-aside .menu_dropdown li a:hover{text-decoration:none} -.Hui-aside .menu_dropdown li.current a,.menu_dropdown li.current a:hover{background-color:rgba(255,255,255,0.2)} -/*菜单收缩切换*/ -.dislpayArrow{position: absolute;top: 0;bottom: 0;left:200px;width:0px; height:100%;z-index:10} -.dislpayArrow a{ position:absolute; display:block; width:17px; height:61px;top:50%; margin-top:-30px;outline:none} -.dislpayArrow a.open{ background-position:0 -61px} -.dislpayArrow a:hover{ text-decoration:none; background-position:right 0} -.dislpayArrow a.open:hover{background-position:right -61px} - -/*选项卡导航*/ -.Hui-tabNav-wp{position:relative; height:35px;overflow:hidden} -.Hui-tabNav, -.Hui-tabNav .acrossTab li -,.Hui-tabNav .acrossTab li em{background-image:url(../images/acrossTab/acrossTab-2.png)} -.Hui-tabNav{height:35px; padding-right:75px;overflow:hidden; position:relative;background-color:#efeef0; background-repeat: repeat-x; background-position: 0 -175px;} -.Hui-tabNav .acrossTab{ position:absolute; height:26px; line-height:26px; background:none; top:8px; left:0;padding-top:0} -.Hui-tabNav .acrossTab li{height:26px;line-height:26px;} -.Hui-tabNav .acrossTab li em{ right:-16px; height: 26px; width: 16px} -.loading {background:url(../images/loading.gif) no-repeat center; height:100px} -.show_iframe{ position:absolute; top:0; right:0; left:0; bottom:0;} -.show_iframe iframe {position: absolute;bottom: 0;height: 100%;width: 100%} -.Hui-tabNav-more {position: absolute;right:0px;width:70px;top:4px;display: none} - -/*面包屑导航*/ -.breadcrumb{background-color:#f5f5f5; padding:0 20px; position:relative; z-index:99} -@media (max-width: 767px) { - .breadcrumb{ padding:0 15px;} - .show_iframe{-webkit-overflow-scrolling: touch;overflow-y: scroll;} -} - -/*横向手机 竖向平板*/ -@media (max-width: 767px) { - .Hui-aside{ display:none;float:none; width:100%; height:auto; margin-top:0;padding-top:0;bottom:auto} - .big-page .Hui-aside{ left:0!important} - .menu_dropdown dt{line-height:44px} - .menu_dropdown li,.menu_dropdown dd li,.menu_dropdown dd li a{ line-height:44px} - .Hui-tabNav{ position:fixed; z-index:998} - .Hui-article{ top:44px} - .Hui-article-box{ position:static; left:0} - .Hui-article-box .pd-20{padding:15px} - .Hui-article{left:0} - .Hui-container .bk-gray{ border:none} - .Hui-container .pd-10{ padding:0} -} - -/*==============以下是业务相关的样式====================*/ -/*权限*/ -.permission-list{ border:solid 1px #eee;} -.permission-list > dt{ background-color:#efefef;padding:5px 10px} -.permission-list > dd{ padding:10px; padding-left:30px} -.permission-list > dd > dl{ border-bottom:solid 1px #eee; padding:5px 0} -.permission-list > dd > dl > dt{ display:inline-block;float:left;white-space:nowrap;width:100px} -.permission-list > dd > dl > dd{ margin-left:100px;} -.permission-list > dd > dl > dd > label{ padding-right:10px} - -/*图片预览*/ -.portfolio-area{ margin-right: -20px;} -.portfolio-area li{position: relative; float: left; margin-right: 20px; width:162px; height:162px;margin-top: 20px;} -.portfolio-area li.hover{ z-index:9} -.portfolio-area li .portfoliobox{ position: absolute; top: 0; left: 0; width: 152px; height: 152px;padding:5px;border: solid 1px #eee; background-color: #fff;} -.portfolio-area li .checkbox{position: absolute; top: 10px; right: 5px; cursor:pointer} -.portfolio-area li.hover .portfoliobox{ height:auto;padding-bottom:10px;box-shadow:0 1px 3px rgba(68, 68, 68,0.3);-moz-box-shadow:0 1px 3px rgba(68, 68, 68,0.3);-webkit-box-shadow:0 1px 3px rgba(68, 68, 68,0.3)} -.portfolio-area li .picbox{width: 150px; height: 150px;overflow: hidden;text-align: center;vertical-align:middle;display:table-cell; line-height:150px;} -.portfolio-area li .picbox img{max-width:150px; max-height:150px;vertical-align:middle;} -.portfolio-area li .textbox{ display: none; margin-top: 5px;} -.portfolio-area li.hover .textbox{ display: block;} -.portfolio-area li label{ display:block; cursor:pointer} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/css/H-ui.login.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/css/H-ui.login.css deleted file mode 100644 index 06f689c7..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/css/H-ui.login.css +++ /dev/null @@ -1,41 +0,0 @@ -@charset "utf-8"; -/* -----------H-ui前端框架------------- -* H-ui.login.css v2.2.1 后台登录页样式 -* http://www.h-ui.net/ -* Created & Modified by guojunhui -* Date modified 2015.6.5 -* -* Copyright 2013-2017 北京颖杰联创科技有限公司 All rights reserved. -* Licensed under MIT license. -* http://opensource.org/licenses/MIT -* -*/ -html, body{ height:100%} -body{font-size:14px} - -.header,.footer{ position:absolute; left:0; right:0; width:100%; z-index:99} -.header{top:0; height:60px; background:#426374 url(../images/logo.png) no-repeat 0 center} - -.loginWraper{ position:absolute;width:100%; left:0; top:0; bottom:0; right:0; z-index:1; background:#3283AC url(../images/admin-login-bg.jpg) no-repeat center} -.loginBox{ position:absolute; width:617px; height:330px; background:url(../images/admin-loginform-bg.png) no-repeat; left:50%; top:50%; margin-left:-309px; margin-top:-184px; padding-top:38px} -@media (max-width:617px) { - .loginbox{ width:100%; position:static; margin-top:0; margin-left:0;} -} -.loginBox .row{margin-top:20px;} -.loginBox .row .form-label .Hui-iconfont{ font-size:24px} -.loginBox .input-text{ width:360px} -@media (max-width:617px) { - .loginBox .input-text{ width:80%} -} - .yzm a{ color:#426374; font-size:12px} - -#span_msg{ font-size:14px; color:Red; line-height:40px; height:40px; margin-left:10px; width:160px;; float:left} - -.hd_msg{font-size:12px; color:#fff; height:30px; z-index:100;position: absolute; padding-left:50px; padding-top:5px} -.hd_msg a{ color:#fff} -.hd_msg a:hover{ color:#fff; text-decoration:underline} - -.footer{ height:46px; line-height:46px; bottom:0; text-align:center; color:#fff; font-size:12px; background-color:#426374} - -#ie6-warning{background:#fff url(/jscss/demoimg/201006/warning.gif) no-repeat 3px center;position:absolute;top:0;left:0;font-size:12px;color:#333;width:97%;padding: 2px 15px 2px 23px;text-align:left} -#ie6-warning a {text-decoration:none} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/css/style.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/css/style.css deleted file mode 100644 index 184234ed..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/css/style.css +++ /dev/null @@ -1,3 +0,0 @@ -@charset "utf-8"; -/* 你自己的样式 */ - diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/images/acrossTab/acrossTab-2.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/images/acrossTab/acrossTab-2.png deleted file mode 100644 index 17e5f921..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/images/acrossTab/acrossTab-2.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/images/admin-login-bg.jpg b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/images/admin-login-bg.jpg deleted file mode 100644 index 62c5d909..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/images/admin-login-bg.jpg and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/images/admin-loginform-bg.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/images/admin-loginform-bg.png deleted file mode 100644 index 1bc5dbb5..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/images/admin-loginform-bg.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/images/cn.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/images/cn.gif deleted file mode 100644 index b0525309..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/images/cn.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/images/loading.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/images/loading.gif deleted file mode 100644 index 5087c2a6..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/images/loading.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/images/logo.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/images/logo.png deleted file mode 100644 index 1862e523..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/images/logo.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/images/um.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/images/um.gif deleted file mode 100644 index 3b4c8483..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/images/um.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/js/H-ui.admin.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/js/H-ui.admin.js deleted file mode 100644 index db116e20..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/js/H-ui.admin.js +++ /dev/null @@ -1,317 +0,0 @@ -/* -----------H-ui前端框架------------- -* H-ui.admin.js v3.1 -* http://www.h-ui.net/ -* Created & Modified by guojunhui -* Date modified 2017.02.03 -* Copyright 2013-2017 北京颖杰联创科技有限公司 All rights reserved. -* Licensed under MIT license. -* http://opensource.org/licenses/MIT -*/ -var num=0,oUl=$("#min_title_list"),hide_nav=$("#Hui-tabNav"); - -/*获取顶部选项卡总长度*/ -function tabNavallwidth(){ - var taballwidth=0, - $tabNav = hide_nav.find(".acrossTab"), - $tabNavWp = hide_nav.find(".Hui-tabNav-wp"), - $tabNavitem = hide_nav.find(".acrossTab li"), - $tabNavmore =hide_nav.find(".Hui-tabNav-more"); - if (!$tabNav[0]){return} - $tabNavitem.each(function(index, element) { - taballwidth += Number(parseFloat($(this).width()+60)) - }); - $tabNav.width(taballwidth+25); - var w = $tabNavWp.width(); - if(taballwidth+25>w){ - $tabNavmore.show()} - else{ - $tabNavmore.hide(); - $tabNav.css({left:0}); - } -} - -/*左侧菜单响应式*/ -function Huiasidedisplay(){ - if($(window).width()>=768){ - $(".Hui-aside").show(); - } -} -/*获取皮肤cookie*/ -function getskincookie(){ - var v = $.cookie("Huiskin"); - var hrefStr=$("#skin").attr("href"); - if(v==null||v==""){ - v="default"; - } - if(hrefStr!=undefined){ - var hrefRes=hrefStr.substring(0,hrefStr.lastIndexOf('skin/'))+'skin/'+v+'/skin.css'; - $("#skin").attr("href",hrefRes); - } -} -/*菜单导航*/ -function Hui_admin_tab(obj){ - var bStop = false, - bStopIndex = 0, - href = $(obj).attr('data-href'), - title = $(obj).attr("data-title"), - topWindow = $(window.parent.document), - show_navLi = topWindow.find("#min_title_list li"), - iframe_box = topWindow.find("#iframe_box"); - //console.log(topWindow); - if(!href||href==""){ - alert("data-href不存在,v2.5版本之前用_href属性,升级后请改为data-href属性"); - return false; - }if(!title){ - alert("v2.5版本之后使用data-title属性"); - return false; - } - if(title==""){ - alert("data-title属性不能为空"); - return false; - } - show_navLi.each(function() { - if($(this).find('span').attr("data-href")==href){ - bStop=true; - bStopIndex=show_navLi.index($(this)); - return false; - } - }); - if(!bStop){ - creatIframe(href,title); - min_titleList(); - } - else{ - show_navLi.removeClass("active").eq(bStopIndex).addClass("active"); - iframe_box.find(".show_iframe").hide().eq(bStopIndex).show().find("iframe").attr("src",href); - } -} - -/*最新tab标题栏列表*/ -function min_titleList(){ - var topWindow = $(window.parent.document), - show_nav = topWindow.find("#min_title_list"), - aLi = show_nav.find("li"); -} - -/*创建iframe*/ -function creatIframe(href,titleName){ - var topWindow=$(window.parent.document), - show_nav=topWindow.find('#min_title_list'), - iframe_box=topWindow.find('#iframe_box'), - iframeBox=iframe_box.find('.show_iframe'), - $tabNav = topWindow.find(".acrossTab"), - $tabNavWp = topWindow.find(".Hui-tabNav-wp"), - $tabNavmore =topWindow.find(".Hui-tabNav-more"); - var taballwidth=0; - - show_nav.find('li').removeClass("active"); - show_nav.append('
                                • '+titleName+'
                                • '); - if('function'==typeof $('#min_title_list li').contextMenu){ - $("#min_title_list li").contextMenu('Huiadminmenu', { - bindings: { - 'closethis': function(t) { - var $t = $(t); - if($t.find("i")){ - $t.find("i").trigger("click"); - } - }, - 'closeall': function(t) { - $("#min_title_list li i").trigger("click"); - }, - } - }); - }else { - - } - var $tabNavitem = topWindow.find(".acrossTab li"); - if (!$tabNav[0]){return} - $tabNavitem.each(function(index, element) { - taballwidth+=Number(parseFloat($(this).width()+60)) - }); - $tabNav.width(taballwidth+25); - var w = $tabNavWp.width(); - if(taballwidth+25>w){ - $tabNavmore.show()} - else{ - $tabNavmore.hide(); - $tabNav.css({left:0}) - } - iframeBox.hide(); - iframe_box.append('
                                  '); - var showBox=iframe_box.find('.show_iframe:visible'); - showBox.find('iframe').load(function(){ - showBox.find('.loading').hide(); - }); -} - - - -/*关闭iframe*/ -function removeIframe(){ - var topWindow = $(window.parent.document), - iframe = topWindow.find('#iframe_box .show_iframe'), - tab = topWindow.find(".acrossTab li"), - showTab = topWindow.find(".acrossTab li.active"), - showBox=topWindow.find('.show_iframe:visible'), - i = showTab.index(); - tab.eq(i-1).addClass("active"); - tab.eq(i).remove(); - iframe.eq(i-1).show(); - iframe.eq(i).remove(); -} - -/*关闭所有iframe*/ -function removeIframeAll(){ - var topWindow = $(window.parent.document), - iframe = topWindow.find('#iframe_box .show_iframe'), - tab = topWindow.find(".acrossTab li"); - for(var i=0;i0){ - tab.eq(i).remove(); - iframe.eq(i).remove(); - } - } -} - -/*弹出层*/ -/* - 参数解释: - title 标题 - url 请求的url - id 需要操作的数据id - w 弹出层宽度(缺省调默认值) - h 弹出层高度(缺省调默认值) -*/ -function layer_show(title,url,w,h){ - if (title == null || title == '') { - title=false; - }; - if (url == null || url == '') { - url="404.html"; - }; - if (w == null || w == '') { - w=800; - }; - if (h == null || h == '') { - h=($(window).height() - 50); - }; - layer.open({ - type: 2, - area: [w+'px', h +'px'], - fix: false, //不固定 - maxmin: true, - shade:0.4, - title: title, - content: url - }); -} -/*关闭弹出框口*/ -function layer_close(){ - var index = parent.layer.getFrameIndex(window.name); - parent.layer.close(index); -} - -/*时间*/ -function getHTMLDate(obj) { - var d = new Date(); - var weekday = new Array(7); - var _mm = ""; - var _dd = ""; - var _ww = ""; - weekday[0] = "星期日"; - weekday[1] = "星期一"; - weekday[2] = "星期二"; - weekday[3] = "星期三"; - weekday[4] = "星期四"; - weekday[5] = "星期五"; - weekday[6] = "星期六"; - _yy = d.getFullYear(); - _mm = d.getMonth() + 1; - _dd = d.getDate(); - _ww = weekday[d.getDay()]; - obj.html(_yy + "年" + _mm + "月" + _dd + "日 " + _ww); -}; - -$(function(){ - getHTMLDate($("#top_time")); - getskincookie(); - //layer.config({extend: 'extend/layer.ext.js'}); - Huiasidedisplay(); - var resizeID; - $(window).resize(function(){ - clearTimeout(resizeID); - resizeID = setTimeout(function(){ - Huiasidedisplay(); - },500); - }); - - $(".nav-toggle").click(function(){ - $(".Hui-aside").slideToggle(); - }); - $(".Hui-aside").on("click",".menu_dropdown dd li a",function(){ - if($(window).width()<768){ - $(".Hui-aside").slideToggle(); - } - }); - /*左侧菜单*/ - $(".Hui-aside").Huifold({ - titCell:'.menu_dropdown dl dt', - mainCell:'.menu_dropdown dl dd', - }); - - /*选项卡导航*/ - $(".Hui-aside").on("click",".menu_dropdown a",function(){ - Hui_admin_tab(this); - }); - - $(document).on("click","#min_title_list li",function(){ - var bStopIndex=$(this).index(); - var iframe_box=$("#iframe_box"); - $("#min_title_list li").removeClass("active").eq(bStopIndex).addClass("active"); - iframe_box.find(".show_iframe").hide().eq(bStopIndex).show(); - }); - $(document).on("click","#min_title_list li i",function(){ - var aCloseIndex=$(this).parents("li").index(); - $(this).parent().remove(); - $('#iframe_box').find('.show_iframe').eq(aCloseIndex).remove(); - num==0?num=0:num--; - tabNavallwidth(); - }); - $(document).on("dblclick","#min_title_list li",function(){ - var aCloseIndex=$(this).index(); - var iframe_box=$("#iframe_box"); - if(aCloseIndex>0){ - $(this).remove(); - $('#iframe_box').find('.show_iframe').eq(aCloseIndex).remove(); - num==0?num=0:num--; - $("#min_title_list li").removeClass("active").eq(aCloseIndex-1).addClass("active"); - iframe_box.find(".show_iframe").hide().eq(aCloseIndex-1).show(); - tabNavallwidth(); - }else{ - return false; - } - }); - tabNavallwidth(); - - $('#js-tabNav-next').click(function(){ - num==oUl.find('li').length-1?num=oUl.find('li').length-1:num++; - toNavPos(); - }); - $('#js-tabNav-prev').click(function(){ - num==0?num=0:num--; - toNavPos(); - }); - - function toNavPos(){ - oUl.stop().animate({'left':-num*100},100); - } - - /*换肤*/ - $("#Hui-skin .dropDown-menu a").click(function(){ - var v = $(this).attr("data-val"); - $.cookie("Huiskin", v); - var hrefStr=$("#skin").attr("href"); - var hrefRes=hrefStr.substring(0,hrefStr.lastIndexOf('skin/'))+'skin/'+v+'/skin.css'; - $(window.frames.document).contents().find("#skin").attr("href",hrefRes); - }); -}); diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/js/de_DE.txt b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/js/de_DE.txt deleted file mode 100644 index 61da8db4..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/js/de_DE.txt +++ /dev/null @@ -1,18 +0,0 @@ -{ - "processing": "处理中...", - "lengthMenu": "每页显示 _MENU_ 条", - "zeroRecords": "没有找到匹配的记录", - "sProcessing": "<img src=’./loading.gif’ />", - "info": "显示 _START_ 到 _END_ ,共 _TOTAL_ 条", - "infoEmpty": "0条", - "infoFiltered": "(从 _MAX_ 条中过滤)", - "infoPostFix": "", - "search": "当前检索", - "url": "", - "paginate": { - "first": "第一页", - "previous": "上一页", - "next": "下一页", - "last": "最后一页" - } -} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/blue/acrossTab-bg.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/blue/acrossTab-bg.png deleted file mode 100644 index 69d3eeac..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/blue/acrossTab-bg.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/blue/acrossTab.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/blue/acrossTab.png deleted file mode 100644 index f948893e..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/blue/acrossTab.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/blue/icon_arrow.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/blue/icon_arrow.png deleted file mode 100644 index 85cebab5..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/blue/icon_arrow.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/blue/skin.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/blue/skin.css deleted file mode 100644 index c428e3dc..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/blue/skin.css +++ /dev/null @@ -1,23 +0,0 @@ -@charset "utf-8"; -/* 蓝色 */ -/*全站默认字体颜色*/ -a{color:#333}a:hover,a:focus,.maincolor,.maincolor a{color:#06c} -.navbar{ background:#2d6dcc}/*顶部导航*/ - .navbar-logo,.navbar-logo-m,.navbar-slogan,.navbar-userbar{color:#fff}/*logo 及 用户信息文字颜色*/ - .navbar-logo:hover,.navbar-logo-m:hover{color:#fff;text-decoration: none} - -.navbar-nav > ul > li, .navbar-nav > ul > li > a{ color:#fff}/*顶部导航文字颜色*/ -.navbar-userbar > ul> > li,.navbar-userbar > ul> > li > a{ color:#fff} - -.Hui-aside{}/*侧边栏*/ - .Hui-aside .menu_dropdown dt{color:#333}/*左侧二级导航菜单*/ - .Hui-aside .menu_dropdown dt:hover{color:#148cf1} - .Hui-aside .menu_dropdown dt:hover [class^="icon-"]{ color:#7e8795} - .Hui-aside .menu_dropdown li a{color:#666;border-bottom: 1px solid #e5e5e5} - .Hui-aside .menu_dropdown li a:hover{color:#148cf1;background-color:#fafafa} - .Hui-aside .menu_dropdown li.current a,.menu_dropdown li.current a:hover{color:#148cf1} - .Hui-aside .menu_dropdown dt .Hui-iconfont{ color:#a0a7b1} - .Hui-aside .menu_dropdown dt .menu_dropdown-arrow{ color:#b6b7b8} - .dislpayArrow a{background:url(icon_arrow.png) no-repeat 0 0} -.tabBar {border-bottom: 2px solid #2d6dcc} -.tabBar span.current{background-color:#2d6dcc} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/default/acrossTab-bg.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/default/acrossTab-bg.png deleted file mode 100644 index 69d3eeac..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/default/acrossTab-bg.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/default/acrossTab.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/default/acrossTab.png deleted file mode 100644 index f948893e..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/default/acrossTab.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/default/icon_arrow.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/default/icon_arrow.png deleted file mode 100644 index 777d0ec1..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/default/icon_arrow.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/default/skin.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/default/skin.css deleted file mode 100644 index 19bc1919..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/default/skin.css +++ /dev/null @@ -1,21 +0,0 @@ -@charset "utf-8"; -/* 默认 黑色 */ -/*全站默认字体颜色*/ -a{color:#333}a:hover,a:focus,.maincolor,.maincolor a{color:#06c} -.navbar{ background:#222}/*顶部导航*/ - .navbar-logo,.navbar-logo-m,.navbar-slogan,.navbar-userbar{color:#fff}/*logo 及 用户信息文字颜色*/ - .navbar-logo:hover,.navbar-logo-m:hover{color:#fff;text-decoration: none} - -.navbar-nav > ul > li, .navbar-nav > ul > li > a{ color:#fff}/*顶部导航文字颜色*/ -.navbar-userbar > ul> > li,.navbar-userbar > ul> > li > a{ color:#fff} - -.Hui-aside{}/*侧边栏*/ - .Hui-aside .menu_dropdown dt{color:#333}/*左侧二级导航菜单*/ - .Hui-aside .menu_dropdown dt:hover{color:#148cf1} - .Hui-aside .menu_dropdown dt:hover [class^="icon-"]{ color:#7e8795} - .Hui-aside .menu_dropdown li a{color:#666;border-bottom: 1px solid #e5e5e5} - .Hui-aside .menu_dropdown li a:hover{color:#148cf1;background-color:#fafafa} - .Hui-aside .menu_dropdown li.current a,.menu_dropdown li.current a:hover{color:#148cf1} - .Hui-aside .menu_dropdown dt .Hui-iconfont{ color:#a0a7b1} - .Hui-aside .menu_dropdown dt .menu_dropdown-arrow{ color:#b6b7b8} - .dislpayArrow a{background:url(icon_arrow.png) no-repeat 0 0} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/green/acrossTab-bg.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/green/acrossTab-bg.png deleted file mode 100644 index 69d3eeac..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/green/acrossTab-bg.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/green/acrossTab.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/green/acrossTab.png deleted file mode 100644 index f948893e..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/green/acrossTab.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/green/icon_arrow.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/green/icon_arrow.png deleted file mode 100644 index 4a0a5498..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/green/icon_arrow.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/green/skin.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/green/skin.css deleted file mode 100644 index 07c44b4b..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/green/skin.css +++ /dev/null @@ -1,23 +0,0 @@ -@charset "utf-8"; -/* 绿色 */ -/*全站默认字体颜色*/ -a{color:#333}a:hover,a:focus,.maincolor,.maincolor a{color:#06c} -.navbar{ background:#19a97b}/*顶部导航*/ - .navbar-logo,.navbar-logo-m,.navbar-slogan,.navbar-userbar{color:#fff}/*logo 及 用户信息文字颜色*/ - .navbar-logo:hover,.navbar-logo-m:hover{color:#fff;text-decoration: none} - -.navbar-nav > ul > li, .navbar-nav > ul > li > a{ color:#fff}/*顶部导航文字颜色*/ -.navbar-userbar > ul> > li,.navbar-userbar > ul> > li > a{ color:#fff} - -.Hui-aside{}/*侧边栏*/ - .Hui-aside .menu_dropdown dt{color:#333}/*左侧二级导航菜单*/ - .Hui-aside .menu_dropdown dt:hover{color:#148cf1} - .Hui-aside .menu_dropdown dt:hover [class^="icon-"]{ color:#7e8795} - .Hui-aside .menu_dropdown li a{color:#666;border-bottom: 1px solid #e5e5e5} - .Hui-aside .menu_dropdown li a:hover{color:#148cf1;background-color:#fafafa} - .Hui-aside .menu_dropdown li.current a,.menu_dropdown li.current a:hover{color:#148cf1} - .Hui-aside .menu_dropdown dt .Hui-iconfont{ color:#a0a7b1} - .Hui-aside .menu_dropdown dt .menu_dropdown-arrow{ color:#b6b7b8} - .dislpayArrow a{background:url(icon_arrow.png) no-repeat 0 0} -.tabBar {border-bottom: 2px solid #19a97b} -.tabBar span.current{background-color:#19a97b} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/orange/acrossTab-bg.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/orange/acrossTab-bg.png deleted file mode 100644 index 69d3eeac..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/orange/acrossTab-bg.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/orange/acrossTab.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/orange/acrossTab.png deleted file mode 100644 index f948893e..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/orange/acrossTab.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/orange/icon_arrow.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/orange/icon_arrow.png deleted file mode 100644 index 86a87fce..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/orange/icon_arrow.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/orange/skin.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/orange/skin.css deleted file mode 100644 index 3b4f803d..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/orange/skin.css +++ /dev/null @@ -1,23 +0,0 @@ -@charset "utf-8"; -/* 橙色 */ -/*全站默认字体颜色*/ -a{color:#333}a:hover,a:focus,.maincolor,.maincolor a{color:#06c} -.navbar{ background:#ff4a00}/*顶部导航*/ - .navbar-logo,.navbar-logo-m,.navbar-slogan,.navbar-userbar{color:#fff}/*logo 及 用户信息文字颜色*/ - .navbar-logo:hover,.navbar-logo-m:hover{color:#fff;text-decoration: none} - -.navbar-nav > ul > li, .navbar-nav > ul > li > a{ color:#fff}/*顶部导航文字颜色*/ -.navbar-userbar > ul> > li,.navbar-userbar > ul> > li > a{ color:#fff} - -.Hui-aside{}/*侧边栏*/ - .Hui-aside .menu_dropdown dt{color:#333}/*左侧二级导航菜单*/ - .Hui-aside .menu_dropdown dt:hover{color:#148cf1} - .Hui-aside .menu_dropdown dt:hover [class^="icon-"]{ color:#7e8795} - .Hui-aside .menu_dropdown li a{color:#666;border-bottom: 1px solid #e5e5e5} - .Hui-aside .menu_dropdown li a:hover{color:#148cf1;background-color:#fafafa} - .Hui-aside .menu_dropdown li.current a,.menu_dropdown li.current a:hover{color:#148cf1} - .Hui-aside .menu_dropdown dt .Hui-iconfont{ color:#a0a7b1} - .Hui-aside .menu_dropdown dt .menu_dropdown-arrow{ color:#b6b7b8} - .dislpayArrow a{background:url(icon_arrow.png) no-repeat 0 0} -.tabBar {border-bottom: 2px solid #ff4a00} -.tabBar span.current{background-color:#ff4a00} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/red/acrossTab-bg.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/red/acrossTab-bg.png deleted file mode 100644 index 69d3eeac..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/red/acrossTab-bg.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/red/acrossTab.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/red/acrossTab.png deleted file mode 100644 index f948893e..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/red/acrossTab.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/red/icon_arrow.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/red/icon_arrow.png deleted file mode 100644 index 08b3c578..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/red/icon_arrow.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/red/skin.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/red/skin.css deleted file mode 100644 index cf04bd09..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/red/skin.css +++ /dev/null @@ -1,23 +0,0 @@ -@charset "utf-8"; -/* 红色 */ -/*全站默认字体颜色*/ -a{color:#333}a:hover,a:focus,.maincolor,.maincolor a{color:#06c} -.navbar{ background:#c81623}/*顶部导航*/ - .navbar-logo,.navbar-logo-m,.navbar-slogan,.navbar-userbar{color:#fff}/*logo 及 用户信息文字颜色*/ - .navbar-logo:hover,.navbar-logo-m:hover{color:#fff;text-decoration: none} - -.navbar-nav > ul > li, .navbar-nav > ul > li > a{ color:#fff}/*顶部导航文字颜色*/ -.navbar-userbar > ul> > li,.navbar-userbar > ul> > li > a{ color:#fff} - -.Hui-aside{}/*侧边栏*/ - .Hui-aside .menu_dropdown dt{color:#333}/*左侧二级导航菜单*/ - .Hui-aside .menu_dropdown dt:hover{color:#148cf1} - .Hui-aside .menu_dropdown dt:hover [class^="icon-"]{ color:#7e8795} - .Hui-aside .menu_dropdown li a{color:#666;border-bottom: 1px solid #e5e5e5} - .Hui-aside .menu_dropdown li a:hover{color:#148cf1;background-color:#fafafa} - .Hui-aside .menu_dropdown li.current a,.menu_dropdown li.current a:hover{color:#148cf1} - .Hui-aside .menu_dropdown dt .Hui-iconfont{ color:#a0a7b1} - .Hui-aside .menu_dropdown dt .menu_dropdown-arrow{ color:#b6b7b8} - .dislpayArrow a{background:url(icon_arrow.png) no-repeat 0 0} -.tabBar {border-bottom: 2px solid #c81623} -.tabBar span.current{background-color:#c81623} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/yellow/acrossTab-bg.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/yellow/acrossTab-bg.png deleted file mode 100644 index 69d3eeac..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/yellow/acrossTab-bg.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/yellow/acrossTab.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/yellow/acrossTab.png deleted file mode 100644 index f948893e..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/yellow/acrossTab.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/yellow/icon_arrow.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/yellow/icon_arrow.png deleted file mode 100644 index 2ca00cdc..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/yellow/icon_arrow.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/yellow/skin.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/yellow/skin.css deleted file mode 100644 index 25b20c5d..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/yellow/skin.css +++ /dev/null @@ -1,23 +0,0 @@ -@charset "utf-8"; -/* 黄色 */ -/*全站默认字体颜色*/ -a{color:#333}a:hover,a:focus,.maincolor,.maincolor a{color:#06c} -.navbar{ background:#ffd200}/*顶部导航*/ - .navbar-logo,.navbar-logo-m,.navbar-slogan,.navbar-userbar{color:#282828}/*logo 及 用户信息文字颜色*/ - .navbar-logo:hover,.navbar-logo-m:hover{color:#282828;text-decoration: none} - -.navbar-nav > ul > li, .navbar-nav > ul > li > a{ color:#282828}/*顶部导航文字颜色*/ -.navbar-userbar > ul> > li,.navbar-userbar > ul> > li > a{ color:#282828} - -.Hui-aside{}/*侧边栏*/ - .Hui-aside .menu_dropdown dt{color:#333}/*左侧二级导航菜单*/ - .Hui-aside .menu_dropdown dt:hover{color:#148cf1} - .Hui-aside .menu_dropdown dt:hover [class^="icon-"]{ color:#7e8795} - .Hui-aside .menu_dropdown li a{color:#666;border-bottom: 1px solid #e5e5e5} - .Hui-aside .menu_dropdown li a:hover{color:#148cf1;background-color:#fafafa} - .Hui-aside .menu_dropdown li.current a,.menu_dropdown li.current a:hover{color:#148cf1} - .Hui-aside .menu_dropdown dt .Hui-iconfont{ color:#a0a7b1} - .Hui-aside .menu_dropdown dt .menu_dropdown-arrow{ color:#b6b7b8} - .dislpayArrow a{background:url(icon_arrow.png) no-repeat 0 0} -.tabBar {border-bottom: 2px solid #ffd200} -.tabBar span.current{background-color:#ffd200;color:#282828} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/css/H-ui.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/css/H-ui.css deleted file mode 100644 index b086345a..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/css/H-ui.css +++ /dev/null @@ -1,4387 +0,0 @@ -@charset "utf-8"; -/* -----------H-ui前端框架------------- -* H-ui.css v3.1.5 -* http://www.h-ui.net/ -* Created & Modified by guojunhui -* Date modified 2017.07.19 -* -* Copyright 2013-2017 北京颖杰联创科技有限公司 All rights reserved. -* Licensed under MIT license. -* http://opensource.org/licenses/MIT -* -*/ -/*------------------------------------ -结构目录: - 1. css reset重定义浏览器默认样式 - 2. 框架 - 2.1 响应式栅格系统 - 2.2 响应式隐藏显示 - 3. 基础CSS - 3.1 排版 - 3.1.1 标题 - 3.1.2 强调 - 3.1.3 对齐 - 3.1.4 定位 - 3.1.5 浮动 - 3.1.6 文字单行溢出省略号 - 3.1.7 线条 - 3.1.8 外边距 - 3.1.9 内填充 - 3.1.10 边框,css3圆角 - 3.1.11 css3阴影 - 3.1.12 行内分割竖线 - 3.1.13 文字尺寸 - 3.1.14 文字行距 - 3.1.15 文字颜色 - 3.1.16 文字颜色强调 - 3.1.17 缩略语 - 3.1.18 地址 - 3.1.19 引用 - 3.1.20 上标 下标 - 3.1.21 内容样式 - 3.1.22 列表 - 3.1.23 描述 - 3.1.24 隐藏 显示 - 3.1.25 尺寸 - 3.2 代码 - 3.3 表格 - 3.4 表单 - 3.4.1 input,textarea 文本域 文本区域 - 3.4.2 radio,checkbox 单选 多选 - 3.4.2.1 jQuery.icheck.css - 3.4.2.2 Bootsrtap.Switch.css - 3.4.3 select 下拉框 - 3.4.4 input-file 文件上传 - 3.4.5 spinner 控件 - 3.4.6 邮箱提示 - 3.4.7 表单布局 - 3.4.8 表单验证 - 3.5 按钮 - 3.6 图片 - 3.7 图标 - 3.8 动画 - 4. 组件 - 4.1 按钮组 - 4.2 导航 - 4.2.1 导航条 - 4.2.2 面包屑导航 - 4.2.3 翻页导航 - 4.2.4 顶部导航 - 4.2.5 向导 - 4.2.6 竖向导向tab导航 - 4.2.7 横向tab - 4.3 菜单 - 4.3.1 下拉菜单 - 4.3.2 多级菜单 - 4.3.3 树状菜单(暂无) - 4.4 幻灯片 - 4.4.1 焦点图效果(自动播放,圆点控制) - 4.4.2 带缩略图效果 - 4.5 选项卡 - 4.6 便签与标号 - 4.7 缩略图 - 4.8 警告 - 4.9 进度条 loading - 4.10 对话框 弹出层 - 4.11 客服 - 4.12 右侧悬浮工具 - 4.12.1 返回顶部 - 4.12.2 意见反馈 - 4.13 分享 - 4.14 面板 - 4.15 案例 - 4.16 滚动 - 4.17 搜索 - 4.18 广告 - 4.19 标签 - 4.19.1 标签输入效果 - 4.19.2 标签混排效果 - 4.19.3 tag云标签 - 4.20 折叠 - 4.21 遮罩条 - 4.22 评论列表 - 4.23 页脚 - 4.24 星星评价 - 4.25 tooltip效果 - 4.26 popover效果 - 4.27 datetimepicker日期插件 - 4.28 sortable拖动 - 4.29 ColorPicker 颜色控件 - 5. 页面 - 5.1 404页面 - 5.2 博客列表页(暂无) - 5.3 博客详情页(暂无) - 5.4 关于我们页(暂无) - 5.5 帮助列表页(暂无) - 5.6 帮助详情页(暂无) - ----------------------------------- -CSS写作注意事项: - 1. 页面编码规范 - 1.1. 统一使用 UTF-8 编码,用@charset "utf-8"指定页面编码。 - 1.2. 全局字体设置: - windows 7系统:微软雅黑 Arial; - windows XP及以下:新宋体,宋体,Arial - MAC默认字体:Helvetica Neue和Helvetica Hiragino Sans GB。 - 1.3. 中文字体使用编码转换,请参阅下节“中文字体css编码转换” - 1.4. 推荐使用216web安全色 - 2. 属性写在一行内,属性之间、属性名和值之间以及属性与“{}”之间应减少空格,去掉最后一个“;”,例如:.class{width:200px;height:100px} - 3. 属性的书写顺序: - 3.1. 按照元素模型由外及内,由整体到细节书写,大致分为五组: - 位置:position,left,right,float - 盒模型属性:display,margin,padding,width,height - 边框与背景:border,background - 段落与文本:line-height,text-indent,font,color,text-decoration,... - 其他属性:overflow,cursor,visibility,... - 3.2. 针对特殊浏览器的属性,应写在标准属性之前,例如:-webkit-box-shadow:;-moz-box-shadow:;box-shaow:; - 4. 带有前缀的属性,单独一行,通过缩进,让每个属性的值垂直对齐,方便编辑维护。 - 5. 谨慎添加新的选择符规则,尤其不可滥用 id,尽可能继承和复用已有样式 - 6. 选择符、属性、值均用小写(格式的颜色值除外),缩写的选择符名称须说明缩写前的全称,例如 .cl -> Clearfix - 7. 避免使用各种 CSS Hack,如需对 IE 进行特殊定义,请参阅下节“关于 CSS Hack 的说明” - 8. 勿使用冗余低效的 CSS 写法,例如:ul li a span{... } - 9. 慎用 !important - 10. 建议使用具有语义化的classname或id,请参阅下节“css 命名规范及对应的缩写” - 11.避免使用兼容性不好的使用滤镜 - 12.开发过程中的未定事项,须用 [!] 标出,以便于后续讨论整理。 - 13.注释格式,统一使用双斜杠加*。 - 14.上下模块之间的间距统一使用下一个模块的margin-top来实现,好处是:如果没有下一个模块也不会多出一段空隙。 - 15.hover,selected,disabled,current等具有特定意义的请勿直接占用。 - 16.:link :visited :hover :active书写顺序 L-V-H-A,速记:LoVe(喜欢)HAte(讨厌)。 - 17.不要使用 @import ----------------------------------- -中文字体css编码转换 - 微软雅黑 \5FAE\8F6F\96C5\9ED1 或 Microsoft YaHei - 黑体 \9ED1\4F53 - 新宋体 \65b0\5b8b\4f53 - 宋体 \5b8b\4f53 ----------------------------------- -关于 CSS Hack 的说明: - 1. _ IE6 - 2. * IE6/7 - 3. !important IE7/Firefox - 4. *+ IE7 - 5. \9 IE6/7/8 - 6. \0 IE8 - 7. 条件hack - IE7以下版本 - IE7 - IE8 - IE8以上 ----------------------------------- -css 命名规范 - 1. 内容优先,表现为辅 - 2. css命名中英文对照 - current 当前 hover 悬停 selected 挑选 disabled 禁用 focus 得到焦点 blur 失去焦点 checked 勾选 success 成功 error 出错 - - header(hd) 头部 content(cnt) 内容 title(tit) 标题 item 项目(条) cell 单元 image/pic(img) 图片 text(txt) 文字 top 顶部 scrubber 时序菜单 - - nav 导航 mainNav 主导航 subNav 子导航 topNav 顶部导航 breadcrumb 面包屑导航 - - flink 友情链接 footer 尾 copyright 版权 - - menu 菜单 submenu 子菜单 dropdown 下拉菜单 - - searchBar 搜索条 search 搜索条 searchTxt 搜索框 searchBtn 搜索按钮 search_key 搜索词 - - member 会员 ucenter 用户中心 loginBar 登陆条 login 登录 loginBtn 登录按钮 regsiter 注册按钮 btn-regsiter注册按钮 name 用户名 password 密码 nickname 昵称 mobilephone/mobile 手机 telephone/tel 电话 defaultavatar 默认头像 - - hot 热点 news 新闻 banner/AD 广告 download 下载 - - content 内容 title 标题 summary 摘要 time 时间 - - share 分享 digg 顶 like 喜欢 - - list/-list 列表 pList 图片列表 tList 文字列表 tpList 图文列表 - - table 表格 row 行 column 列 gutter 间隔 viewport 视口 - - tab 标签 tags 标签 scroll 滚动 - - sidebar 侧边栏 column 栏目 section 区块 msg 提示信息 status 状态 vote 投票 tips 小技巧 guild 指南 note 注释 - - icon- 图标 btn- 按钮 - - goods 商品 goods-list 商品列表 goods-detail 商品详情 goods-info 商品信息 - - tuan 团购 tuan-list 团购列表 tuan-detail 团购详情 tuan-info 团购信息 - - transition 动画 shadow 阴影 fade 淡入淡出 flip 翻页效 slide 滑动 slideup 上滑动 slidedown 下滑动 turn 翻页 horizontal 水平 vertical 垂直 collapsible 折叠 corners 拐角 flow 流 reverse 反向 pop 弹窗 - - count 总数/计数 plus 加号/正 minus 减号/负 controlgroup 控制组 ----------------------------------- -html命名规范: - default/index.html 首页 - 404.html 404错误页 - print.html 打印页 - header.html 页头 - footer.html 页脚 - sitemap.html 网站地图 - passport.html 通行证 - rank.html 排行榜 - roll.html 滚动新闻 - - solution.html 解决方案 - joinus.html 加入我们 - partner.html 合作伙伴 - service.html 服务 - aboutus.html 关于我们 - contact.html 联系我们 - company.html 公司介绍 - organization.html 组织结构 - culture.html 企业文化 - strategy.html 发展策略 - honor.html 公司荣誉 - aptitudes.html 企业资质 - events.html 大事记 - business.html 商务合作 - contract.html 服务条款 - privacy.html 隐私声明 - CSR.html 企业社会责任 - - news-开头.html 新闻相关 - article-开头.html 资讯相关 - picture-开头.html 图片相关 - photo-开头.html 相册相关 - product-开头.html 产品相关 - goods-开头.html 商品相关 - system-开头.html 系统相关 - tag-开头.html tag相关 - brand-开头.html 品牌相关 - help-开头.html 帮助相关 - member-开头.html 会员相关 - search-开头.html 搜索相关 ----------------------------------- */ -/*1 重定义浏览器默认样式 - Name: style_reset - Explain: 重定义浏览器默认样式 -*/ -*{word-wrap:break-word} -html,body,h1,h2,h3,h4,h5,h6,hr,p,iframe,dl,dt,dd,ul,ol,li,pre,form,button,input,textarea,th,td,fieldset{margin:0;padding:0} -ul,ol,dl{list-style-type:none} -html,body{*position:static} -html{font-family: sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)} -address,caption,cite,code,dfn,em,th,var{font-style:normal;font-weight:400} -input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit} -input,button{overflow: visible;vertical-align:middle;outline:none} -input[type="submit"],input[type="reset"],input[type="button"],input[type="text"],input[type="password"]{-webkit-appearance:none;outline:none} -body,th,td,button,input,select,textarea{font-family:"Microsoft Yahei","Hiragino Sans GB","Helvetica Neue",Helvetica,tahoma,arial,"WenQuanYi Micro Hei",Verdana,sans-serif,"\5B8B\4F53";font-size:12px;color: #333;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing:grayscale} -@media ( max-width : 767px) { - html{ overflow-y:auto} - body,th,td,button,input,select,textarea{ font-size:14px} -} -body{line-height:1.6; position:relative} -h1,h2,h3,h4,h5,h6{font-size:100%} -a,area{outline:none;blr:expression(this.onFocus=this.blur())} -a{text-decoration:none;cursor: pointer} -a:hover{text-decoration:underline;outline:none} -a.ie6:hover{zoom:1} -a:focus{outline:none} -a:hover,a:active{outline:none}:focus{outline:none} -sub,sup{vertical-align:baseline} -button,input[type="button"], input[type="submit"] {line-height:normal !important} -/*img*/ -img{border:0;vertical-align:middle} -a img,img{-ms-interpolation-mode:bicubic} - -/*IE下a:hover 背景闪烁*/ -*html{overflow:-moz-scrollbars-vertical;zoom:expression(function(ele){ele.style.zoom = "1";document.execCommand("BackgroundImageCache",false,true)}(this))} - -/*HTML5 reset*/ -header,footer,section,aside,details,menu,article,section,nav,address,hgroup,figure,figcaption,legend{display:block;margin:0;padding:0}time{display:inline} -audio,canvas,video{display:inline-block;*display:inline;*zoom:1} -audio:not([controls]){display:none} -legend{width:100%;margin-bottom:20px;font-size:21px;line-height:40px;border:0;border-bottom:1px solid #e5e5e5} -legend small{font-size:15px;color:#999} -svg:not(:root) {overflow: hidden} -fieldset {border-width:0;padding: 0.35em 0.625em 0.75em;margin: 0 2px;border: 1px solid #c0c0c0} -input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button {height: auto} -input[type="search"] {-webkit-appearance: textfield; /* 1 */} -input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration {-webkit-appearance: none} -/*清除浮动 - Name: style_clearfix - Example: class="clearfix|cl" - Explain: clearfix(简写cl)避免因子元素浮动而导致的父元素高度缺失能问题 -*/ -.cl:after,.clearfix:after{content:"\20";display:block;height:0;clear:both;visibility:hidden}.cl,.clearfix{zoom:1} - -/*2.1 栅格系统 - Name: style_container - Example: -
                                  -
                                  -
                                  ……
                                  - …… -
                                  -
                                  - Explain: 栅格系统 -*/ -/*2.1 响应式栅格系统*/ -.container {padding-right: 15px;padding-left: 15px;margin-right: auto;margin-left: auto} -.container-fluid {padding-right: 15px;padding-left: 15px;margin-right: auto;margin-left: auto} - -@media ( min-width : 992px) { - .container{width: 960px} -} -@media ( min-width : 1200px) { - .container {width: 1170px} -} -@media ( min-width : 1300px) { - .container {width: 1270px} -} - -@media print{ - .container{width:auto} -} -.row.cl{} -.row{box-sizing:border-box; margin-left:-15px; margin-right:-15px} -.col-1,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12,.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {min-height: 1px;position: relative; padding-left:15px; padding-right:15px; box-sizing:border-box;-webkit-transition:all 0.3s ease-in; - -moz-transition:all 0.3s ease-in; - -o-transition:all 0.3s ease-in; - transition:all 0.3s ease-in} - -.col-1{width:8.33333%} -.col-2{width:16.66667%} -.col-3{width:25%} -.col-4{width:33.33333%} -.col-5{width:41.66667%} -.col-6{width:50%} -.col-7{width:58.33333%} -.col-8{width:66.66667%} -.col-9{width:75%} -.col-10{width:83.33333%} -.col-11{width:91.66667%} -.col-12{width:100%} - -.col-offset-0{margin-left:0} -.col-offset-1{margin-left:8.33333%} -.col-offset-2{margin-left:16.66667%} -.col-offset-3{margin-left:25%} -.col-offset-4{margin-left:33.33333%} -.col-offset-5{margin-left:41.66667%} -.col-offset-6{margin-left:50%} -.col-offset-7{margin-left:58.33333%} -.col-offset-8{margin-left:66.66667%} -.col-offset-9{margin-left:75%} -.col-offset-10{margin-left:83.33333%} -.col-offset-11{margin-left:91.66667%} - -.col-push-0{position:relative;left:0;right:auto} -.col-pull-0{right:0;left:auto} -.col-push-1{left:8.33333%;right:auto} -.col-pull-1{right:8.33333%;left:auto} -.col-push-2{left:16.66667%;right:auto} -.col-pull-2{right:16.66667%;left:auto} -.col-push-3{left:25%;right:auto} -.col-pull-3{right:25%;left:auto} -.col-push-4{left:33.33333%;right:auto} -.col-pull-4{right:33.33333%;left:auto} -.col-push-5{left:41.66667%;right:auto} -.col-pull-5{right:41.66667%;left:auto} -.col-push-6{left:50%;right:auto} -.col-pull-6{right:50%;left:auto} -.col-push-7{left:58.33333%;right:auto} -.col-pull-7{right:58.33333%;left:auto} -.col-push-8{left:66.66667%;right:auto} -.col-pull-8{right:66.66667%;left:auto} -.col-push-9{left:75%;right:auto} -.col-pull-9{right:75%;left:auto} -.col-push-10{left:83.33333%;right:auto} -.col-pull-10{right:83.33333%;left:auto} -.col-push-11{left:91.66667%;right:auto} -.col-pull-11{right:91.66667%;left:auto} -/*局部模块平分*/ -.col-1-1{ width:100%} -.col-2-1{ width:50%} -.col-3-1{ width:33.333333%} -.col-3-2{ width:66.666667%} -.col-4-1{ width:25%} -.col-4-3{ width:75%} -.col-5-1{ width:20%} -.col-5-2{ width:40%} -.col-5-3{ width:60%} -.col-5-4{ width:80%} -.col-6-1{ width:16.666667%} -.col-6-5{ width:83.333333%} - -.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {float: left} -.col-xs-12 {width: 100%} -.col-xs-11 {width: 91.66666667%} -.col-xs-10 {width: 83.33333333%} -.col-xs-9 {width: 75%} -.col-xs-8 {width: 66.66666667%} -.col-xs-7 {width: 58.33333333%} -.col-xs-6 {width: 50%} -.col-xs-5 {width: 41.66666667%} -.col-xs-4 {width: 33.33333333%} -.col-xs-3 {width: 25%} -.col-xs-2 {width: 16.66666667%} -.col-xs-1 {width: 8.33333333%} -.col-xs-pull-12 {right: 100%} -.col-xs-pull-11 {right: 91.66666667%} -.col-xs-pull-10 {right: 83.33333333%} -.col-xs-pull-9 {right: 75%} -.col-xs-pull-8 {right: 66.66666667%} -.col-xs-pull-7 {right: 58.33333333%} -.col-xs-pull-6 {right: 50%} -.col-xs-pull-5 {right: 41.66666667%} -.col-xs-pull-4 {right: 33.33333333%} -.col-xs-pull-3 {right: 25%} -.col-xs-pull-2 {right: 16.66666667%} -.col-xs-pull-1 {right: 8.33333333%} -.col-xs-pull-0 {right: auto} -.col-xs-push-12 {left: 100%} -.col-xs-push-11 {left: 91.66666667%} -.col-xs-push-10 {left: 83.33333333%} -.col-xs-push-9 {left: 75%} -.col-xs-push-8 {left: 66.66666667%} -.col-xs-push-7 {left: 58.33333333%} -.col-xs-push-6 {left: 50%} -.col-xs-push-5 {left: 41.66666667%} -.col-xs-push-4 {left: 33.33333333%} -.col-xs-push-3 {left: 25%} -.col-xs-push-2 {left: 16.66666667%} -.col-xs-push-1 {left: 8.33333333%} -.col-xs-push-0 {left: auto} -.col-xs-offset-12 {margin-left: 100%} -.col-xs-offset-11 {margin-left: 91.66666667%} -.col-xs-offset-10 {margin-left: 83.33333333%} -.col-xs-offset-9 {margin-left: 75%} -.col-xs-offset-8 {margin-left: 66.66666667%} -.col-xs-offset-7 {margin-left: 58.33333333%} -.col-xs-offset-6 {margin-left: 50%} -.col-xs-offset-5 {margin-left: 41.66666667%} -.col-xs-offset-4 {margin-left: 33.33333333%} -.col-xs-offset-3 {margin-left: 25%} -.col-xs-offset-2 {margin-left: 16.66666667%} -.col-xs-offset-1 {margin-left: 8.33333333%} -.col-xs-offset-0 {margin-left: 0} -@media (max-width:767px){ - .responsive [class^="col-"],.responsive [class*=" col-"]{float:none!important;width:auto!important} - .responsive [class^="col-offset-"],.responsive [class*=" col-offset-"]{ margin-left:0!important} -} -@media(min-width:768px){ - .col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left} - .col-sm-12{width:100%} - .col-sm-11{width:91.66666666666666%} - .col-sm-10{width:83.33333333333334%} - .col-sm-9{width:75%} - .col-sm-8{width:66.66666666666666%} - .col-sm-7{width:58.333333333333336%} - .col-sm-6{width:50%} - .col-sm-5{width:41.66666666666667%} - .col-sm-4{width:33.33333333333333%} - .col-sm-3{width:25%} - .col-sm-2{width:16.666666666666664%} - .col-sm-1{width:8.333333333333332%} - .col-sm-pull-12{right:100%} - .col-sm-pull-11{right:91.66666666666666%} - .col-sm-pull-10{right:83.33333333333334%} - .col-sm-pull-9{right:75%} - .col-sm-pull-8{right:66.66666666666666%} - .col-sm-pull-7{right:58.333333333333336%} - .col-sm-pull-6{right:50%} - .col-sm-pull-5{right:41.66666666666667%} - .col-sm-pull-4{right:33.33333333333333%} - .col-sm-pull-3{right:25%} - .col-sm-pull-2{right:16.666666666666664%} - .col-sm-pull-1{right:8.333333333333332%} - .col-sm-pull-0{right:0} - .col-sm-push-12{left:100%} - .col-sm-push-11{left:91.66666666666666%} - .col-sm-push-10{left:83.33333333333334%} - .col-sm-push-9{left:75%} - .col-sm-push-8{left:66.66666666666666%} - .col-sm-push-7{left:58.333333333333336%} - .col-sm-push-6{left:50%} - .col-sm-push-5{left:41.66666666666667%} - .col-sm-push-4{left:33.33333333333333%} - .col-sm-push-3{left:25%} - .col-sm-push-2{left:16.666666666666664%} - .col-sm-push-1{left:8.333333333333332%} - .col-sm-push-0{left:0} - .col-sm-offset-12{margin-left:100%} - .col-sm-offset-11{margin-left:91.66666666666666%} - .col-sm-offset-10{margin-left:83.33333333333334%} - .col-sm-offset-9{margin-left:75%} - .col-sm-offset-8{margin-left:66.66666666666666%} - .col-sm-offset-7{margin-left:58.333333333333336%} - .col-sm-offset-6{margin-left:50%} - .col-sm-offset-5{margin-left:41.66666666666667%} - .col-sm-offset-4{margin-left:33.33333333333333%} - .col-sm-offset-3{margin-left:25%} - .col-sm-offset-2{margin-left:16.666666666666664%} - .col-sm-offset-1{margin-left:8.333333333333332%} - .col-sm-offset-0{margin-left:0} -} -@media(min-width:992px){ - .col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left} - .col-md-12{width:100%} - .col-md-11{width:91.66666666666666%} - .col-md-10{width:83.33333333333334%} - .col-md-9{width:75%} - .col-md-8{width:66.66666666666666%} - .col-md-7{width:58.333333333333336%} - .col-md-6{width:50%} - .col-md-5{width:41.66666666666667%} - .col-md-4{width:33.33333333333333%} - .col-md-3{width:25%} - .col-md-2{width:16.666666666666664%} - .col-md-1{width:8.333333333333332%} - .col-md-pull-12{right:100%} - .col-md-pull-11{right:91.66666666666666%} - .col-md-pull-10{right:83.33333333333334%} - .col-md-pull-9{right:75%} - .col-md-pull-8{right:66.66666666666666%} - .col-md-pull-7{right:58.333333333333336%} - .col-md-pull-6{right:50%} - .col-md-pull-5{right:41.66666666666667%} - .col-md-pull-4{right:33.33333333333333%} - .col-md-pull-3{right:25%} - .col-md-pull-2{right:16.666666666666664%} - .col-md-pull-1{right:8.333333333333332%} - .col-md-pull-0{right:0} - .col-md-push-12{left:100%} - .col-md-push-11{left:91.66666666666666%} - .col-md-push-10{left:83.33333333333334%} - .col-md-push-9{left:75%} - .col-md-push-8{left:66.66666666666666%} - .col-md-push-7{left:58.333333333333336%} - .col-md-push-6{left:50%} - .col-md-push-5{left:41.66666666666667%} - .col-md-push-4{left:33.33333333333333%} - .col-md-push-3{left:25%} - .col-md-push-2{left:16.666666666666664%} - .col-md-push-1{left:8.333333333333332%} - .col-md-push-0{left:0} - .col-md-offset-12{margin-left:100%} - .col-md-offset-11{margin-left:91.66666666666666%} - .col-md-offset-10{margin-left:83.33333333333334%} - .col-md-offset-9{margin-left:75%} - .col-md-offset-8{margin-left:66.66666666666666%} - .col-md-offset-7{margin-left:58.333333333333336%} - .col-md-offset-6{margin-left:50%} - .col-md-offset-5{margin-left:41.66666666666667%} - .col-md-offset-4{margin-left:33.33333333333333%} - .col-md-offset-3{margin-left:25%} - .col-md-offset-2{margin-left:16.666666666666664%} - .col-md-offset-1{margin-left:8.333333333333332%} - .col-md-offset-0{margin-left:0} -} -@media(min-width:1200px){ - .col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left} - .col-lg-12{width:100%} - .col-lg-11{width:91.66666666666666%} - .col-lg-10{width:83.33333333333334%} - .col-lg-9{width:75%} - .col-lg-8{width:66.66666666666666%} - .col-lg-7{width:58.333333333333336%} - .col-lg-6{width:50%} - .col-lg-5{width:41.66666666666667%} - .col-lg-4{width:33.33333333333333%} - .col-lg-3{width:25%} - .col-lg-2{width:16.666666666666664%} - .col-lg-1{width:8.333333333333332%} - .col-lg-pull-12{right:100%} - .col-lg-pull-11{right:91.66666666666666%} - .col-lg-pull-10{right:83.33333333333334%} - .col-lg-pull-9{right:75%} - .col-lg-pull-8{right:66.66666666666666%} - .col-lg-pull-7{right:58.333333333333336%} - .col-lg-pull-6{right:50%} - .col-lg-pull-5{right:41.66666666666667%} - .col-lg-pull-4{right:33.33333333333333%} - .col-lg-pull-3{right:25%} - .col-lg-pull-2{right:16.666666666666664%} - .col-lg-pull-1{right:8.333333333333332%} - .col-lg-pull-0{right:0} - .col-lg-push-12{left:100%} - .col-lg-push-11{left:91.66666666666666%} - .col-lg-push-10{left:83.33333333333334%} - .col-lg-push-9{left:75%} - .col-lg-push-8{left:66.66666666666666%} - .col-lg-push-7{left:58.333333333333336%} - .col-lg-push-6{left:50%} - .col-lg-push-5{left:41.66666666666667%} - .col-lg-push-4{left:33.33333333333333%} - .col-lg-push-3{left:25%} - .col-lg-push-2{left:16.666666666666664%} - .col-lg-push-1{left:8.333333333333332%} - .col-lg-push-0{left:0} - .col-lg-offset-12{margin-left:100%} - .col-lg-offset-11{margin-left:91.66666666666666%} - .col-lg-offset-10{margin-left:83.33333333333334%} - .col-lg-offset-9{margin-left:75%} - .col-lg-offset-8{margin-left:66.66666666666666%} - .col-lg-offset-7{margin-left:58.333333333333336%} - .col-lg-offset-6{margin-left:50%} - .col-lg-offset-5{margin-left:41.66666666666667%} - .col-lg-offset-4{margin-left:33.33333333333333%} - .col-lg-offset-3{margin-left:25%} - .col-lg-offset-2{margin-left:16.666666666666664%} - .col-lg-offset-1{margin-left:8.333333333333332%} - .col-lg-offset-0{margin-left:0} -} -/*2.2 响应式隐藏显示 - Name: style_Layout - Explain: 左右两栏|左中右三栏|上中下 - Last Modify: guojunhui -*/ -.visible-xs, -.visible-sm, -.visible-md, -.visible-lg, -.visible-xs-block, -.visible-xs-inline, -.visible-xs-inline-block, -.visible-sm-block, -.visible-sm-inline, -.visible-sm-inline-block, -.visible-md-block, -.visible-md-inline, -.visible-md-inline-block, -.visible-lg-block, -.visible-lg-inline, -.visible-lg-inline-block { - display: none !important} -@media ( max-width : 767px) { - .visible-xs {display: block !important} - table.visible-xs {display: table} - tr.visible-xs {display: table-row !important} - th.visible-xs,td.visible-xs {display: table-cell !important} - .hidden-xs {display: none !important} - .visible-xs-block {display: block !important} - .visible-xs-inline {display: inline !important} - .visible-xs-inline-block {display: inline-block !important} -} -@media ( min-width : 768px) and (max-width: 991px) { - .visible-sm {display: block !important} - table.visible-sm {display: table} - tr.visible-sm {display: table-row !important} - th.visible-sm,td.visible-sm {display: table-cell !important} - .hidden-sm {display: none !important} - .visible-sm-block {display: block !important} - .visible-sm-inline {display: inline !important} - .visible-sm-inline-block {display: inline-block !important} -} -@media ( min-width : 992px) and (max-width: 1199px) { - .visible-md {display: block !important} - table.visible-md {display: table} - tr.visible-md {display: table-row !important} - th.visible-md,td.visible-md {display: table-cell !important} - .hidden-md {display: none !important} - .visible-md-block {display: block !important} - .visible-md-inline {display: inline !important} - .visible-md-inline-block {display: inline-block !important} -} -@media ( min-width : 1200px) { - .visible-lg {display: block !important} - table.visible-lg {display: table} - tr.visible-lg {display: table-row !important} - th.visible-lg,td.visible-lg {display: table-cell !important} - .hidden-lg {display: none !important} - .visible-lg-block {display: block !important} - .visible-lg-inline {display: inline !important} - .visible-lg-inline-block {display: inline-block !important} -} - -.visible-print {display: none !important} -.visible-print-block {display: none !important} -.visible-print-inline {display: none !important} -.visible-print-inline-block {display: none !important} -@media print { - .visible-print {display: block !important} - table.visible-print {display: table} - tr.visible-print {display: table-row !important} - th.visible-print,td.visible-print {display: table-cell !important} - .visible-print-block {display: block !important} - .visible-print-inline {display: inline !important} - .visible-print-inline-block {display: inline-block !important} - .hidden-print {display: none !important} -} -/*最外层*/ -.containBox {background-color:#fff;position:relative;z-index:100;zoom:1;-moz-transition:-moz-transform .2s ease-out;-webkit-transition:-webkit-transform .2s ease-out;-o-transition:-o-transform .2s ease-out;transition:transform .2s ease-out;top:0px;} -.sideBox {display:none} - .containBox-bg{ display: none} -@media (max-width:767px) { - body,.content {font-size:16px;line-height:1.6} - html,body{height: 100%} - .containBox{ position:fixed; top: 0; left: 0; right: 0; bottom: 0; overflow: hidden; - } - .containBox-bg{position:fixed;width:100%;top:0;left:0; display: block;z-index:2000} - /*隐藏的菜单*/ - .sideBox {position:absolute;display:block;z-index:99;right:0;top:0;bottom:0;width:250px;background-color:#303135} - .sideBox .navbar-nav {display:block} - .sideBox .navbar-nav li {border-bottom:1px solid #222;display:block} - .sideBox .navbar-nav a {color:#fff;display:block;padding-left:20px;padding:10px 30px;} - .sideBox .navbar-nav a:hover {text-decoration:none;} - .Hui-wraper {width:auto;padding:0 10px} - .AD-img img {width:100%;height:auto} - body.sideBox-open .containBox{ - -moz-transform: translate3d(-250px,0,0); - -webkit-transform: translate3d(-250px,0,0); - transform: translate3d(-250px,0,0); - backface-visibility: hidden; - -webkit-backface-visibility: hidden; - -moz-backface-visibility: hidden; - -ms-backface-visibility: hidden; - } - .wap-container{ height: 100%;width: 100%;min-width: 320px;overflow: auto;} - body.sideBox-open .containBox-bg{bottom:0;right:0;} -} -/*2.3 常用布局 - Name: style_Layout - Explain: 左右两栏|左中右三栏|上中下 - Last Modify: guojunhui -*/ -.Hui-wraper,.wp{margin-left:auto;margin-right:auto;text-align:left} -.sd{float:right} -.ct2 .mn{float:left} -.ct2 .sd{float:right} -.ct2_r .leftmenu{float:left} -.ct2_r .mn{float:right} -.ct3 .app{float:left;margin-right:20px} -.ct3 .mn{float:left;border-left:solid 1px #ddd} -.ct3 .sd{float:right} -.w-1000{width:1000px} -.w-980{width:980px} -.w-300{width:300px} -.w-200{width:200px} -@media (max-width: 1000px) { - .Hui-wraper,.wp,{ width:auto!important;padding:0 15px!important} -} -@media print{ - .Hui-wraper{width:auto} -} -/*3.0 基础样式*/ -/*3.1 排版*/ -/*3.1.1 标题 - Example: -

                                  h1. 大标题小标题

                                  -

                                  h2. 大标题小标题

                                  -

                                  h3. 大标题小标题

                                  -

                                  h4. 大标题小标题

                                  -
                                  h5. 大标题小标题
                                  -
                                  h6. 大标题小标题
                                  -*/ -h1,h2,h3,h4,h5,h6{font-weight:500;line-height:1.1;color:inherit} -h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small{font-weight:400;line-height:1;color:#999} -h1,h2,h3{padding-top:20px;padding-bottom:10px} -h1 small,h2 small,h3 small,h1 .small,h2 .small,h3 .small{font-size:65%} -h4,h5,h6{margin-top:10px;margin-bottom:10px} -h4 small,h5 small,h6 small,h4 .small,h5 .small,h6 .small{font-size:75%} -h1{font-size:36px} -h2{font-size:30px} -h3{font-size:24px} -h4{font-size:18px} -h5{font-size:14px} -h6{font-size:12px} - -/*3.1.2 强调 - Example: -

                                  这是段落,向下10像素间距

                                  - 小型文本,是父容器字体大小的85% - 重要文本,加粗显示 - 被强调的文本,斜体显示 - 带下划线的文本 - 引用 - 突出显示文本 - 带删除线的文本 -
                                  预格式化的文本
                                  -*/ -p{margin-bottom:10px} /*段落*/ -small{font-size:85%} /*小型文本*/ -b,strong {font-weight: bold} /*重要的文本,加粗*/ -em{font-style:italic} /*被强调的文本*/ -i{} /*斜体*/ -u{} /*加下划线*/ -cite{font-style:normal} /*引用*/ -mark{color:#000;background:#ff0}/*突出显示文本*/ -var{} /*变量*/ -kbd{} /*键盘文本*/ -code{} /*计算机代码文本*/ -dfn{font-style: italic} /*一个定义项目*/ -del{} /*删除线*/ -code,kbd,pre,samp {font-family: monospace, serif;font-size: 1em} -pre{white-space: pre-wrap} /*预格式化的文本*/ -.uppercase{text-transform:uppercase} /*文字大写*/ -.lowercase{text-transform:lowercase} /*文字小写*/ -.capitalize{text-transform:capitalize} /*首字母大写*/ -.en{font-family:Arial!important} -/*3.1.3 对齐 - Name: style_text-align - Example: class="text-l|text-r|text-c|va-t|va-m|va-b" - Explain: .text-水平对齐 (.text-l左对齐|.text-r右对齐|.text-c居中对齐) - .va-上下对齐 (.va-t 居上对齐|.va-m 居中对齐|.va-b 居下对齐) -*/ -.text-l{text-align:left}.text-r{text-align:right}.text-c{text-align:center} -.va *{vertical-align:sub!important;*vertical-align:middle!important;_vertical-align:middle!important} -.va-t{vertical-align:top!important}.va-m{vertical-align:middle!important}.va-b{vertical-align:bottom!important} -/*3.1.4 定位 - Name: style_position - Example: class="pos-r|pos-a|pos-f" - Explain: .pos-r 相对定位|.pos-a 绝对定位|.pos-f 固定 -*/ -.pos-r{position:relative}.pos-a{position:absolute}.pos-f{position:fixed} -/*3.1.5 浮动 - Name: style_float - Example: class="l|r" - Explain: .l 左浮动|.r 右浮动 -*/ -.l,.f-l{float:left!important;_display:inline} -.r,.f-r{float:right!important;_display:inline} - -[class*="span"].r, -[class*="span"].f-r{float:right} - -/*控制元素对定位的位置:居左|居右|j居上|居下*/ -.pos-left{left:0; right:auto} -.pos-right{right:0; left:auto} -.pos-top{top:0; bottom:auto} -.pos-bottom{top:auto; bottom:0} - -/*3.1.6 文字单行溢出省略号 - Name: style_text-overflow - Example: class="text-overflow" -*/ -.text-overflow{overflow:hidden;text-overflow:ellipsis;white-space:nowrap} -/*3.1.7 线条 - Name: style_line - Example: class="line" -*/ -.line{font-size:0; line-height:0; border-top: solid 1px #eee; float: none} -/*3.1.8 外边距 - Name: style_margin - Example: class="mt-5|mt-10..." - Explain: .mt表示上边距|.mb表示下边距|.ml表示左边距|.mr表示右边距 -*/ -.mt-5{margin-top:5px}.mt-10{margin-top:10px}.mt-15{margin-top:15px}.mt-20{margin-top:20px}.mt-25{margin-top:25px}.mt-30{margin-top:30px}.mt-35{margin-top:35px}.mt-40{margin-top:40px}.mt-50{margin-top:50px} -.mb-5{margin-bottom:5px}.mb-10{margin-bottom:10px}.mb-15{margin-bottom:15px}.mb-20{margin-bottom:20px}.mb-30{margin-bottom:30px}.mb-40{margin-bottom:40px}.mb-50{margin-bottom:50px} -.ml-5{margin-left:5px}.ml-10{margin-left:10px}.ml-15{margin-left:15px}.ml-20{margin-left:20px}.ml-30{margin-left:30px}.ml-40{margin-left:40px}.ml-50{margin-left:50px} -.mr-5{margin-right:5px}.mr-10{margin-right:10px}.mr-15{margin-right:15px}.mr-20{margin-right:20px}.mr-30{margin-right:30px}.mr-40{margin-right:40px}.mr-50{margin-right:50px} -/*3.1.9 内填充 - Name: style_padding - Example: class="pt-5|pt-10|……" - Explain: .pt表示上填充|.pb表示下填充|.pl表示左填充|.pr表示右填充 -*/ -.pt-5{padding-top:5px}.pt-10{padding-top:10px}.pt-15{padding-top:15px}.pt-20{padding-top:20px}.pt-25{padding-top:25px}.pt-30{padding-top:30px} -.pb-5{padding-bottom:5px}.pb-10{padding-bottom:10px}.pb-15{padding-bottom:15px}.pb-20{padding-bottom:20px}.pb-25{padding-bottom:25px}.pb-30{padding-bottom:30px} -.pl-5{padding-left:5px}.pl-10{padding-left:10px}.pl-15{padding-left:15px}.pl-20{padding-left:20px}.pl-25{padding-left:25px}.pl-30{padding-left:30px} -.pr-5{padding-right:5px}.pr-10{padding-right:10px}.pr-15{padding-right:15px}.pr-20{padding-right:20px}.pr-25{padding-right:25px}.pr-30{padding-right:30px} -.pd-5{padding:5px}.pd-10{padding:10px}.pd-15{padding:15px}.pd-20{padding:20px}.pd-25{padding:25px}.pd-30{padding:30px}.pd-40{padding:40px} -/*3.1.10 边框,css3圆角 - Name: style-border - Example: class="bk_gray radius" - Explain: .bk_gray 边框|radius 圆角|round 椭圆 | circle 圆形 -*/ -.bk-gray{border:solid 1px #eee} -.radius{border-radius:4px} -.size-MINI.radius{ border-radius:3px} -.size-L.radius{ border-radius:5px} -.size-XL.radius{ border-radius:6px} -.round{border-radius:50%; overflow:hidden} - -/*3.1.11 css3阴影 - Name: style_shadow - Example: class="box_shadow|text-shadow" - Explain: box_shadow 块级元素阴影,全局样式,可用在表格,文本框,文本域,div等块级元素上。 - text-shadow 文字阴影 -*/ -.box-shadow{-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.1);box-shadow:0 1px 2px rgba(0,0,0,0.1)} -.text-shadow{-webkit-text-shadow:0 0 2px rgba(0,0,0,0.2);text-shadow:0 0 2px rgba(0,0,0,0.2)} -/*3.1.12 行内分割竖线 - Name: style_pipe - Example: | -*/ -.pipe{margin:0 5px;color:#CCC;font-size:10px!important} -/*3.1.13 文字尺寸 - Name: style_font-size - Example: class="f-12|f-14|f-16|f-18|f-20|f-24|f-26|f-28|f-30" - Explain: 12px字体|14px字体|16px字体|18px字体|20px字体|24px字体|26px字体|28px字体|30px字体 -*/ -.f-12{font-size:12px}.f-14{font-size:14px}.f-16{font-size:16px}.f-18{font-size:18px}.f-20{font-size:20px}.f-22 { font-size: 22px }.f-24{font-size:24px}.f-26{font-size:26px}.f-28{font-size:28px}.f-30{font-size:30px} -/*3.1.14 文字行距 - Name: mod_line-height - Example: class="lh-16|lh-18|lh-20|lh-22|lh-24|lh-26|lh-28|lh-30" - Explain: 16px行高|18px行高|20px行高|22px行高|24px行高|26px行高|30px行高 -*/ -.lh-16{line-height:16px}.lh-18{line-height:18px}.lh-20{line-height:20px}.lh-22{line-height:22px}.lh-24{line-height:24px}.lh-26{line-height:26px}.lh-28{line-height:28px}.lh-30{line-height:30px} -/*2.0以前的兼容版本*/ -.l16{line-height:16px}.l18{line-height:18px}.l20{line-height:20px}.l22{line-height:22px}.l-24{line-height:24px}.l-26{line-height:26px}.l-28{line-height:28px}.l-30{line-height:30px} - -/*3.1.15 文字颜色 - Name: style_color - Example: class="c-primary|c-sub|c-success|c-danger|c-warning|c-333|c-666|c-999|c-red|c-green|c-blue|c-white|c-black|c-orange" - Explain: 主要颜色|次主色|强调色—成功|强调色—危险|强调色—警告色|强调色—错误色|次主色—浅黑|辅助色—灰色|标准色—红色|标准色—绿色|标准色—蓝色|标准色—白色|标准色—黑色|标准色—橙色 -*/ -/*全局默认链接颜色*/ -body{ background-color:#fff; color:#333} -.bg-fff{ background-color:#fff} -a{color:#333} -a:hover,.active a{color:#06c} - -/*主要颜色*/ -.c-primary,.c-primary a,a.c-primary{color:#5a98de} -.c-primary a:hover,a.c-primary:hover{ color:#5a98de} -/*次主色*/ -.c-secondary,.c-secondary a,a.c-secondary{color:#555} -.c-secondary a:hover,a.c-secondary:hover{ color:#555} - -/*强调色—成功*/ -.c-success,.c-success a,a.c-success{color:#5eb95e} -.c-success a:hover,a.c-success:hover{ color:#5eb95e} - -/*强调色—危险*/ -.c-danger,.c-danger a,a.c-danger{color:#dd514c} -.c-danger a:hover,a.c-danger:hover{ color:#dd514c} - -/*强调色—警告*/ -.c-warning,.c-warning a,a.c-warning{color:#f37b1d} -.c-warning a:hover,a.c-warning:hover{ color:#f37b1d} - -/*强调色—错误*/ -.c-error,.c-error a,a.c-error{color:#c00} -.c-error a:hover,a.c-error:hover{ color:#c00} - -/*辅助色—浅黑*/ -.c-333,.c-333 a,a.c-333{color:#333} -.c-333 a:hover,a.c-333:hover{ color:#333} - -/*辅助色—灰色*/ -.c-666,.c-666 a,a.c-666{color:#666} -.c-666 a:hover,a.c-666:hover{ color:#666} -.c-999,.c-999 a,a.c-999{color:#999} -.c-999 a:hover,a.c-999:hover{color:#999} - -/*标准色—红色*/ -.c-red,.c-red a,a.c-red{color:red} -.c-red a:hover,a.c-red:hover{ color:red} -/*标准色—绿色*/ -.c-green,.c-green a,a.c-green{color:green} -.c-red a:hover,a.c-red:hover{color:green} -/*标准色—蓝色*/ -.c-blue,.c-blue a,a.c-blue{color:blue} -.c-blue a:hover,a.c-blue:hover{color:blue} -/*标准色—白色*/ -.c-white,.c-white a,a.c-white{color:white} -.c-white a:hover,a.c-white:hover{color:white} -/*标准色—黑色*/ -.c-black,.c-black a{color:black} -.c-black a:hover,a.c-black:hover{color:black} -/*标准色—橙色*/ -.c-orange,.c-orange a,a.c-orange{color:orange} -.c-orange a:hover,a.c-orange:hover{color:orange} - -/*3.1.16 文字颜色强调 从2.0起废弃3.1.16 文字强调,字体颜色全部放入到3.1.15 - Example: class="text-muted|text-primary|text-warning|text-error|text-danger|text-success|text-info" - Explain: 柔和|重要|警告|错误|危险|成功|信息 -*/ - - -/*3.1.17 缩略语 - Example: UI - Explain: -*/ -abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999} -abbr.initialism{font-size:90%;text-transform:uppercase} -/*3.1.18 地址 - Example:
                                  北京市海淀区上地……
                                  - Explain: -*/ -address{display:block;margin-bottom:20px;font-style:normal;line-height:20px} -/*3.1.19 引用 - Example:
                                  这是引用的内容
                                  - Explain: -*/ -blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee} -blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25} -blockquote small{display:block;line-height:20px;color:#999} -blockquote small:before{content:'\2014 \00A0'} -blockquote.text-r{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0} -blockquote.text-r p,blockquote.text-r small{text-align:right} -blockquote.text-r small:before{content:''} -blockquote.text-r small:after{content:'\00A0 \2014'} -q:before,q:after,blockquote:before,blockquote:after{content:""} -q {/*短的引用*/quotes: "\201C" "\201D" "\2018" "\2019"} -/*3.1.20 上标,下标 - Example: 2 2 - Explain: 上标|下标 -*/ -sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline} -sup{top:-0.5em}sub{bottom:-0.25em} -/*3.1.21 内容样式 - Name: style_content - Example:

                                  ……

                                  - Explain: 内容样式 -*/ -.content{position:relative;font-size:17px;line-height:1.8;overflow:hidden;text-align:left;word-break: break-all;word-wrap: break-word} -.content h3{font-size:18px} -.content h4{font-size:16px} -.content p{margin-bottom: 1.5rem;text-align: justify;word-break:break-all} -.content p.text-c{ text-align:center} - .indent{ text-indent:2em} -.content img{max-width:100%} -.content ul{text-indent:2em} -@media (max-width: 767px) { - .content{ font-size:16px} -} -@media (max-width: 480px) { - .content img{max-width:100%!important; height:auto!important;width:expression(this.width > 320 ? "320px" : this.width)!important} - *html .content img{width:expression(this.width>320&&this.width>this.height?320:auto)} -} -/*3.1.22 列表 - Name: style_ulolli - Example: -
                                    -
                                  • 无序列表
                                  • -
                                  • 无序列表
                                  • -
                                  • 无序列表
                                  • -
                                  -
                                    -
                                  1. 无序列表
                                  2. -
                                  3. 无序列表
                                  4. -
                                  5. 无序列表
                                  6. -
                                  - Explain: -*/ -ul.unstyled,ol.unstyled{margin-left:0;list-style:none} -ul.inline,ol.inline{margin-left:0;list-style:none} -ul.inline > li,ol.inline > li{display:inline-block;*display:inline;padding-right:5px;padding-left:5px;*zoom:1} -.list-view > .item{ padding:10px; position:relative; overflow:hidden}/*禁止换行*/ -.list-view > .item .date{font-size:12px; font-family:Arial; color:#999} -/*横向手机 竖向平板*/ -@media (max-width: 767px) { - .list-view > .item{ font-size:18px; padding:11px 15px;border-bottom: 1px solid #eee} - .list-view > .item > a{display:block; margin:-11px -15px} - .night .list-view > .item{border-bottom: 1px solid #1F1F1F} - .list-view > .item .date{display:none} - .list-view > .item .Hui-iconfont {background-size:9px auto;margin-top:-7px;position: absolute;right:15px;top: 50%} -} - -/*排行榜*/ -/*
                                  1. 1排行榜列表12
                                  */ -.list-top > .item{padding-left: 30px} -.list-top > .item .num{ position:absolute; top:11px; display:block; width:20px; height:20px; color:#fff; background-color:#5a98de; text-align:center} - -/*3.1.23 描述 - Name: style_dldtdd - Example:
                                  H-ui
                                  基于Bootstrap框架的改进扩展的前端框架
                                  - Explain: .dl-horizontal 水平描述,默认不加为垂直模式。 -*/ -.dl-horizontal.cl{} -.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap} -.dl-horizontal dd{margin-left:180px} -/*3.1.24 隐藏 显示 - Name: style_display - Example:
                                  隐藏的内容
                                  显示的内容
                                  - Explain: .hide 隐藏 / .show 显示 -*/ -.hide{display:none}[hidden]{display: none} -.hidden{display:none!important;visibility:hidden!important} -.f-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0} -[class*="span"].hide,.row-fluid [class*="span"].hide{display:none} -.show{display:block} -.invisible{visibility:hidden} - -/*3.1.25 尺寸 新增尺寸全局类名,用于表单、按钮、表格、头像、标签等元素上,要与元素一起配合使用,方能看到效果*/ -.size-MINI{}/*迷你*/ -.size-S{}/*小*/ -.size-M{}/*中 缺省默认尺寸,可以不写,可以理解为:均码*/ -.size-L{}/*L*/ -.size-XL{}/*大*/ -.size-XXL{}/*加大*/ -.size-XXXL{}/*超大*/ - -.input-text,.btn,.input-text.size-M,.btn.size-M{ font-size:14px; height:31px;*height:auto;line-height:1.42857;padding:4px}/*默认为M,可以不写,可以理解为:均码*/ -a.btn,a.btn.size-M,span.btn,span.btn.size-M{ line-height:21px} -.btn,.btn.size-M{ padding:4px 12px} - -.input-text.size-MINI,.btn.size-MINI{font-size:12px; height:23px;padding:1px 2px;line-height:1.42857}/*迷你*/ -a.btn.size-MINI,span.btn.size-MINI{ line-height:21px} -.btn.size-MINI{ padding:1px 4px} - -.input-text.size-S,.btn.size-S{font-size:12px; height:27px;padding:3px;line-height:1.42857}/*小*/ -a.btn.size-S,span.btn.size-S{ line-height:19px} -.btn.size-S{ padding:3px 8px} - -.input-text.size-L,.btn.size-L{font-size:16px; height:41px; padding:8px}/*大*/ -a.btn.size-L,span.btn.size-L{ line-height:23px} -.btn.size-L{ padding:8px 16px} - -.input-text.size-XL,.btn.size-XL{font-size:18px; height:48px; padding:10px}/*特大*/ -a.btn.size-XL,span.btn.size-XL{ line-height:26px} -.btn.size-XL{ padding:10px 24px} - -@media (max-width: 767px) { - .responsive .input-text.size-MINI,.responsive .btn.size-MINI{height:24px} - .responsive .input-text.size-S,.responsive .btn.size-S{ font-size:14px; height:30px} - .responsive .input-text,.btn,.responsive .input-text.size-M,.responsive .btn.size-M{ font-size:16px; height:36px} - .responsive .input-text.size-L,.responsive .btn.size-L{ font-size:18px; height:42px} - .responsive .input-text.size-XL,.responsive .btn.size-XL{ font-size:20px; height:48px} -} - -/*3.2 代码 - Name: style_pre - - Example: ,
                                  转义过的代码
                                  - Explain: code:行内代码,pre:基本代码块;包装代码片段,.prettyprint颜色增强/.linenums显示行号 -*/ -code{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace} -pre .title,pre .keyword,pre .body,pre .des{color:#333}/*关键词*/ - -pre{display:block;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;padding:9.5px;margin-bottom:10px;font-size:12px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px;color:#333} -.prettyprint{margin-bottom:20px;padding:8px;background-color:#f7f7f9;border:1px solid #e1e1e8} -.prettyprint .com { color: #998;font-style:italic }/*注释*/ -.prettyprint .tag{color:#007}/*标签*/ -.prettyprint .lit { color: #195f91} -.prettyprint .pun,.prettyprint .opn,.prettyprint .clo { color: #93a1a1}/*等于*/ -.prettyprint .fun { color: #dc322f} -.prettyprint .str,.prettyprint .atv { color: #D14}/*值*/ -.prettyprint .kwd,.prettyprint .prettyprint .tag { color: #1e347b} -.prettyprint .typ,.prettyprint .atn,.prettyprint .dec,.prettyprint .var { color: teal}/*文档声明,属性*/ -.prettyprint .pln { color: #48484c} - -.prettyprint.linenums{box-shadow:inset 40px 0 0 #fbfbfc,inset 41px 0 0 #ececf0} -.pre-scrollable{max-height:340px;overflow-y:scroll} -ol.linenums{list-style:decimal outside none; margin-left:20px} -ol.linenums li{ line-height:28px; padding-left:10px} -pre ol.linenums{margin:0 0 0 33px} -pre ol.linenums li{padding-left:12px;color:#bbb;line-height:18px;text-shadow:0 1px 0 #fff} - -@media (max-width: 767px) { - pre ol.linenums{ margin-left:0; list-style:none} - ol.linenums li{ padding-left:0} - .prettyprint.linenums{box-shadow:inset 0px 0 0 #fbfbfc,inset 0px 0 0 #ececf0} -} - -/*3.3 表格 - Name: style_table - Example:
                                  …
                                  …
                                  - Explain: 表格,None无样式,仅仅有列和行|.table行与行之间以水平线相隔|.table-bordered表格外围均有外边框|.table-striped奇数行背景设为浅灰色|.table-condensed竖直方向padding缩减一半,从8px变为4px,所有的 td 和 th 元素都受影响 -*/ -/*默认table*/ -table{width:100%;empty-cells:show;background-color:transparent;border-collapse:collapse;border-spacing:0} -table th{text-align:left; font-weight:400} -/*带水平线*/ -.table th{font-weight:bold} -.table th,.table td{padding:8px;line-height:20px;word-break:break-all} -.table td{text-align:left} -.table tbody tr.success > td{background-color:#dff0d8} -.table tbody tr.error > td{background-color:#f2dede} -.table tbody tr.warning > td{background-color:#fcf8e3} -.table tbody tr.info > td{background-color:#d9edf7} -.table tbody + tbody{border-top:2px solid #ddd} -.table .table{background-color:#fff} - -/*带横向分割线*/ -.table-border{border-top:1px solid #ddd} -.table-border th,.table-border td{border-bottom:1px solid #ddd} - -/*th带背景*/ -.table-bg thead th{background-color:#F5FAFE} -/*带外边框*/ -.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0} -.table-bordered th,.table-bordered td{border-left:1px solid #ddd} -.table-border.table-bordered{border-bottom:0} - -/*奇数行背景设为浅灰色*/ -.table-striped tbody > tr:nth-child(odd) > td, -.table-striped tbody > tr:nth-child(odd) > th{background-color:#f9f9f9} -/*竖直方向padding缩减一半*/ -.table-condensed th, -.table-condensed td{padding:4px 5px} -/*鼠标悬停样式*/ -.table-hover tbody tr:hover td, -.table-hover tbody tr:hover th{background-color: #f5f5f5} -/*鼠标选择整行样式*/ -.table tbody tr.selected td{background-color:#F3F3F3} -/*定义颜色*/ -/*悬停在行*/ -.table tbody tr.active, -.table tbody tr.active > td, -.table tbody tr.active > th, -.table tbody tr .active{ background-color:#F5F5F5!important} -/*成功或积极*/ -.table tbody tr.success, -.table tbody tr.success > td, -.table tbody tr.success > th, -.table tbody tr .success{background-color:#DFF0D8!important} - -/*警告或出错*/ -.table tbody tr.warning, -.table tbody tr.warning > td, -.table tbody tr.warning > th, -.table tbody tr .warning{background-color:#FCF8E3!important} -/*危险*/ -.table tbody tr.danger, -.table tbody tr.danger > td, -.table tbody tr.danger > th, -.table tbody tr .danger{background-color:#F2DEDE!important} - -/*表格文字对齐方式,默认是居左对齐*/ -.table .text-c th,.table .text-c td{text-align:center}/*整行居中*/ -.table .text-r th,.table .text-r td{text-align:right}/*整行居右*/ -.table th.text-l,.table td.text-l{text-align:left!important}/*单独列居左*/ -.table th.text-c,.table td.text-c{text-align:center!important}/*单独列居中*/ -.table th.text-r,.table td.text-r{text-align:right!important}/*单独列居右*/ - -/*datatable*/ -table.dataTable {border-collapse: separate;border-spacing: 0;clear: both} -table.dataTable thead .sorting_asc, table.dataTable thead .sorting_desc, table.dataTable thead .sorting {cursor: pointer; background-repeat:no-repeat;background-position:right center} -table.dataTable thead .sorting{background-image:url(../images/dataTable/sort_both.png)} -table.dataTable thead .sorting_asc {background-image:url(../images/dataTable/sort_asc.png)} -table.dataTable thead .sorting_desc {background-image:url(../images/dataTable/sort_desc.png)} -.dataTable td.sorting_1 {background-color: #f5fafe} -.dataTables_wrapper .dataTables_length {float: left;padding-bottom:20px} -.dataTables_wrapper .dataTables_length .select{ width:50px} -.dataTables_wrapper .dataTables_filter {float: right;text-align: right} -.dataTables_wrapper .dataTables_filter .input-text { width:auto} -.dataTables_wrapper .dataTables_info {clear: both;float: left;padding-top:10px;font-size:14px; color:#666} -.dataTables_wrapper .dataTables_paginate {float: right;padding-top:10px;text-align: right} -.dataTables_wrapper .dataTables_paginate .paginate_button {border: 1px solid #ccc;cursor: pointer;display: inline-block;margin-left: 2px;text-align: center;text-decoration: none;color: #666;height: 26px;line-height: 26px;text-decoration: none;margin: 0 0px 6px 6px;padding: 0 10px;font-size:14px} -.dataTables_wrapper .dataTables_paginate .paginate_button:hover, -.dataTables_wrapper .dataTables_paginate .paginate_button.current, -.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {background:#5a98de;color:#fff} - -/*表格尺寸*/ -.table.size-MINI{}/*迷你*/ -.table.size-S{}/*小*/ -.table.size-M{}/*中*/ -.table.size-L{}/*默认为L,可以不写,可以理解为:均码*/ -.table.size-XL{}/*大*/ -.table.size-XXL{}/*加大*/ -.table.size-XXXL{}/*超大*/ - -/*让表格支持响应式*/ -/* -
                                  - - ... -
                                  -
                                  -*/ -@media (max-width: 767px) { - /*.table-responsive {width: 100%;margin-bottom: 15px;overflow-x: scroll;overflow-y: hidden;border: 1px solid #ddd;-ms-overflow-style: -ms-autohiding-scrollbar;-webkit-overflow-scrolling: touch} - .table-responsive > .table {margin-bottom: 0} - .table-responsive > .table > thead > tr > th, - .table-responsive > .table > tbody > tr > th, - .table-responsive > .table > tfoot > tr > th, - .table-responsive > .table > thead > tr > td, - .table-responsive > .table > tbody > tr > td, - .table-responsive > .table > tfoot > tr > td {white-space: nowrap} - .table-responsive > .table-bordered {border: 0} - .table-responsive > .table-bordered > thead > tr > th:first-child, - .table-responsive > .table-bordered > tbody > tr > th:first-child, - .table-responsive > .table-bordered > tfoot > tr > th:first-child, - .table-responsive > .table-bordered > thead > tr > td:first-child, - .table-responsive > .table-bordered > tbody > tr > td:first-child, - .table-responsive > .table-bordered > tfoot > tr > td:first-child {border-left: 0} - .table-responsive > .table-bordered > thead > tr > th:last-child, - .table-responsive > .table-bordered > tbody > tr > th:last-child, - .table-responsive > .table-bordered > tfoot > tr > th:last-child, - .table-responsive > .table-bordered > thead > tr > td:last-child, - .table-responsive > .table-bordered > tbody > tr > td:last-child, - .table-responsive > .table-bordered > tfoot > tr > td:last-child {border-right: 0} - .table-responsive > .table-bordered > tbody > tr:last-child > th, - .table-responsive > .table-bordered > tfoot > tr:last-child > th, - .table-responsive > .table-bordered > tbody > tr:last-child > td, - .table-responsive > .table-bordered > tfoot > tr:last-child > td {border-bottom: 0} - */ - .table-responsive th,.table-responsive td{ display: block;width: 100%!important;box-sizing: border-box;} - -} - -/*3.4 表单 - Name: style_form - Example: - Explain: - -*/ -/*3.4.1 input,textarea 文本域 文本区域*/ -/*默认状态*/ -.input-text,.textarea{box-sizing:border-box;border:solid 1px #ddd;width:100%; - -webkit-transition:all 0.2s linear 0s; - -moz-transition:all 0.2s linear 0s; - -o-transition:all 0.2s linear 0s; - transition:all 0.2s linear 0s} -.textarea{ height:100px; resize:none; font-size:14px; padding:4px} - .textarea-numberbar{ position:absolute; right:20px; bottom:5px; z-index:1; margin-bottom:0} - .textarea-length{ font-style:normal} -.input-text:hover, -.textarea:hover{border: solid 1px #3bb4f2} -/*得到焦点后*/ -.input-text.focus, -.textarea.focus{border:solid 1px #0f9ae0 \9;border-color:rgba(82,168,236,0.8);box-shadow:0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(102, 175, 233, 0.6)} -/*不可点击*/ -.input-text.disabled -,.textarea.disabled, -.input-text.disabled.focus, -.textarea.disabled.focus{background-color:#ededed; cursor:default;border-color: #ddd; - -webkit-box-shadow:inset 0 2px 2px #e8e7e7; - -moz-box-shadow:inset 0 2px 2px #e8e7e7; - box-shadow:inset 0 2px 2px #e8e7e7} -/*只读状态*/ -.input-text.disabled, -.textarea.disabled{background-color:#e6e6e6; cursor:default} -/*阴影*/ -.input-text.box-shadow, -.textarea.box-shadow{-ms-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)} -/*行内元素*/ -.input-text.inline{ display:inline-block; width:auto} - -/*3.4.2 checkbox radio 单选 多选 - Example: -
                                  -
                                  - - -
                                  -
                                  - -
                                  -
                                  - - -
                                  -
                                  - Explain: -*/ - -input[type="radio"],input[type="checkbox"] {line-height: normal; margin-top:-4px} -.check-box,.radio-box{ display:inline-block; box-sizing:border-box; cursor:pointer; position:relative; padding-left:30px; padding-right:20px} -.icheckbox, -.icheckbox-red, -.icheckbox-green, -.icheckbox-blue, -.icheckbox-aero, -.icheckbox-grey, -.icheckbox-orange, -.icheckbox-yellow, -.icheckbox-pink, -.icheckbox-purple, -.iradio, -.iradio-red, -.iradio-green, -.iradio-blue, -.iradio-aero, -.iradio-grey, -.iradio-orange, -.iradio-yellow, -.iradio-pink, -.iradio-purple {position: absolute;top:4px;left: 0} -@media (max-width: 767px) { - .responsive .check-box, - .responsive .radio-box{ display:block} -} -/*3.4.2.1 jQuery.icheck.css*/ -/* iCheck.js Minimal skin ------------------------------------ */ -.icheckbox,.iradio{display: block;margin: 0;padding: 0;width: 18px;height: 18px;background: url(../images/iCheck/minimal.png) no-repeat;border: none;cursor: pointer} -.icheckbox,.icheckbox.static:hover{background-position: 0 0} -.icheckbox.hover,.icheckbox:hover{background-position: -20px 0} -.icheckbox.checked{background-position: -40px 0} -.icheckbox.disabled{background-position: -60px 0;cursor: default} -.icheckbox.checked.disabled{background-position: -80px 0} -.iradio,.iradio.static:hover{background-position: -100px 0} -.iradio.hover,.iradio:hover{background-position: -120px 0} -.iradio.checked{background-position: -140px 0} -.iradio.disabled{background-position: -160px 0;cursor: default} -.iradio.checked.disabled{background-position: -180px 0} - -/* Retina support */ -@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5){.icheckbox,.iradio{background-image: url(../images/iCheck/minimal@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px} -} -/* red */ -.icheckbox-red,.iradio-red{display: block;margin: 0;padding: 0;width: 18px;height: 18px;background: url(../images/iCheck/red.png) no-repeat;border: none;cursor: pointer} -.icheckbox-red,.icheckbox-red.static:hover{background-position: 0 0} -.icheckbox-red.hover,.icheckbox-red:hover{background-position: -20px 0} -.icheckbox-red.checked{background-position: -40px 0} -.icheckbox-red.disabled{background-position: -60px 0;cursor: default} -.icheckbox-red.checked.disabled{background-position: -80px 0} -.iradio-red,.iradio-red.static:hover{background-position: -100px 0} -.iradio-red.hover,.iradio-red:hover{background-position: -120px 0} -.iradio-red.checked{background-position: -140px 0} -.iradio-red.disabled{background-position: -160px 0;cursor: default} -.iradio-red.checked.disabled{background-position: -180px 0} - -/* Retina support */ -@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5){.icheckbox-red,.iradio-red{background-image: url(../images/iCheck/red@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px} -} -/* green */ -.icheckbox-green,.iradio-green{display: block;margin: 0;padding: 0;width: 18px;height: 18px;background: url(../images/iCheck/green.png) no-repeat;border: none;cursor: pointer} -.icheckbox-green,.icheckbox-green.static:hover{background-position: 0 0} -.icheckbox-green.hover,.icheckbox-green:hover{background-position: -20px 0} -.icheckbox-green.checked{background-position: -40px 0} -.icheckbox-green.disabled{background-position: -60px 0;cursor: default} -.icheckbox-green.checked.disabled{background-position: -80px 0} -.iradio-green,.iradio-green.static:hover{background-position: -100px 0} -.iradio-green.hover,.iradio-green:hover{background-position: -120px 0} -.iradio-green.checked{background-position: -140px 0} -.iradio-green.disabled{background-position: -160px 0;cursor: default} -.iradio-green.checked.disabled{background-position: -180px 0} - -/* Retina support */ -@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5){.icheckbox-green,.iradio-green{background-image: url(../images/iCheck/green@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px} -} -/* blue */ -.icheckbox-blue,.iradio-blue{display: block;margin: 0;padding: 0;width: 18px;height: 18px;background: url(../images/iCheck/blue.png) no-repeat;border: none;cursor: pointer} -.icheckbox-blue,.icheckbox-blue.static:hover{background-position: 0 0} -.icheckbox-blue.hover,.icheckbox-blue:hover{background-position: -20px 0} -.icheckbox-blue.checked{background-position: -40px 0} -.icheckbox-blue.disabled{background-position: -60px 0;cursor: default} -.icheckbox-blue.checked.disabled{background-position: -80px 0} -.iradio-blue,.iradio-blue.static:hover{background-position: -100px 0} -.iradio-blue.hover,.iradio-blue:hover{background-position: -120px 0} -.iradio-blue.checked{background-position: -140px 0} -.iradio-blue.disabled{background-position: -160px 0;cursor: default} -.iradio-blue.checked.disabled{background-position: -180px 0} - -/* Retina support */ -@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5){.icheckbox-blue,.iradio-blue{background-image: url(../images/iCheck/blue@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px} -} -/* aero */ -.icheckbox-aero,.iradio-aero{display: block;margin: 0;padding: 0;width: 18px;height: 18px;background: url(../images/iCheck/aero.png) no-repeat;border: none;cursor: pointer} -.icheckbox-aero,.icheckbox-aero.static:hover{background-position: 0 0} -.icheckbox-aero.hover,.icheckbox-aero:hover{background-position: -20px 0} -.icheckbox-aero.checked{background-position: -40px 0} -.icheckbox-aero.disabled{background-position: -60px 0;cursor: default} -.icheckbox-aero.checked.disabled{background-position: -80px 0} -.iradio-aero,.iradio-aero.static:hover{background-position: -100px 0} -.iradio-aero.hover,.iradio-aero:hover{background-position: -120px 0} -.iradio-aero.checked{background-position: -140px 0} -.iradio-aero.disabled{background-position: -160px 0;cursor: default} -.iradio-aero.checked.disabled{background-position: -180px 0} - -/* Retina support */ -@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5){.icheckbox-aero,.iradio-aero{background-image: url(../images/iCheck/aero@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px} -} -/* grey */ -.icheckbox-grey,.iradio-grey{display: block;margin: 0;padding: 0;width: 18px;height: 18px;background: url(../images/iCheck/grey.png) no-repeat;border: none;cursor: pointer} -.icheckbox-grey,.icheckbox-grey.static:hover{background-position: 0 0} -.icheckbox-grey.hover,.icheckbox-grey:hover{background-position: -20px 0} -.icheckbox-grey.checked{background-position: -40px 0} -.icheckbox-grey.disabled{background-position: -60px 0;cursor: default} -.icheckbox-grey.checked.disabled{background-position: -80px 0} -.iradio-grey,.iradio-grey.static:hover{background-position: -100px 0} -.iradio-grey.hover,.iradio-grey:hover{background-position: -120px 0} -.iradio-grey.checked{background-position: -140px 0} -.iradio-grey.disabled{background-position: -160px 0;cursor: default} -.iradio-grey.checked.disabled{background-position: -180px 0} - -/* Retina support */ -@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5){.icheckbox-grey,.iradio-grey{background-image: url(../images/iCheck/grey@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px} -} -/* orange */ -.icheckbox-orange,.iradio-orange{display: block;margin: 0;padding: 0;width: 18px;height: 18px;background: url(../images/iCheck/orange.png) no-repeat;border: none;cursor: pointer} -.icheckbox-orange,.icheckbox-orange.static:hover{background-position: 0 0} -.icheckbox-orange.hover,.icheckbox-orange:hover{background-position: -20px 0} -.icheckbox-orange.checked{background-position: -40px 0} -.icheckbox-orange.disabled{background-position: -60px 0;cursor: default} -.icheckbox-orange.checked.disabled{background-position: -80px 0} -.iradio-orange,.iradio-orange.static:hover{background-position: -100px 0} -.iradio-orange.hover,.iradio-orange:hover{background-position: -120px 0} -.iradio-orange.checked{background-position: -140px 0} -.iradio-orange.disabled{background-position: -160px 0;cursor: default} -.iradio-orange.checked.disabled{background-position: -180px 0} - -/* Retina support */ -@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5){.icheckbox-orange,.iradio-orange{background-image: url(../images/iCheck/orange@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px} -} -/* yellow */ -.icheckbox-yellow,.iradio-yellow{display: block;margin: 0;padding: 0;width: 18px;height: 18px;background: url(../images/iCheck/yellow.png) no-repeat;border: none;cursor: pointer} -.icheckbox-yellow,.icheckbox-yellow.static:hover{background-position: 0 0} -.icheckbox-yellow.hover,.icheckbox-yellow:hover{background-position: -20px 0} -.icheckbox-yellow.checked{background-position: -40px 0} -.icheckbox-yellow.disabled{background-position: -60px 0;cursor: default} -.icheckbox-yellow.checked.disabled{background-position: -80px 0} -.iradio-yellow,.iradio-yellow.static:hover{background-position: -100px 0} -.iradio-yellow.hover,.iradio-yellow:hover{background-position: -120px 0} -.iradio-yellow.checked{background-position: -140px 0} -.iradio-yellow.disabled{background-position: -160px 0;cursor: default} -.iradio-yellow.checked.disabled{background-position: -180px 0} - -/* Retina support */ -@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5){.icheckbox-yellow,.iradio-yellow{background-image: url(../images/iCheck/yellow@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px} -} -/* pink */ -.icheckbox-pink,.iradio-pink{display: block;margin: 0;padding: 0;width: 18px;height: 18px;background: url(../images/iCheck/pink.png) no-repeat;border: none;cursor: pointer} -.icheckbox-pink,.icheckbox-pink.static:hover{background-position: 0 0} -.icheckbox-pink.hover,.icheckbox-pink:hover{background-position: -20px 0} -.icheckbox-pink.checked{background-position: -40px 0} -.icheckbox-pink.disabled{background-position: -60px 0;cursor: default} -.icheckbox-pink.checked.disabled{background-position: -80px 0} -.iradio-pink,.iradio-pink.static:hover{background-position: -100px 0} -.iradio-pink.hover,.iradio-pink:hover{background-position: -120px 0} -.iradio-pink.checked{background-position: -140px 0} -.iradio-pink.disabled{background-position: -160px 0;cursor: default} -.iradio-pink.checked.disabled{background-position: -180px 0} - -/* Retina support */ -@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5){.icheckbox-pink,.iradio-pink{background-image: url(../images/iCheck/pink@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px} -} -/* purple */ -.icheckbox-purple,.iradio-purple{display: block;margin: 0;padding: 0;width: 18px;height: 18px;background: url(../images/iCheck/purple.png) no-repeat;border: none;cursor: pointer} -.icheckbox-purple,.icheckbox-purple.static:hover{background-position: 0 0} -.icheckbox-purple.hover,.icheckbox-purple:hover{background-position: -20px 0} -.icheckbox-purple.checked{background-position: -40px 0} -.icheckbox-purple.disabled{background-position: -60px 0;cursor: default} -.icheckbox-purple.checked.disabled{background-position: -80px 0} -.iradio-purple,.iradio-purple.static:hover{background-position: -100px 0} -.iradio-purple.hover,.iradio-purple:hover{background-position: -120px 0} -.iradio-purple.checked{background-position: -140px 0} -.iradio-purple.disabled{background-position: -160px 0;cursor: default} -.iradio-purple.checked.disabled{background-position: -180px 0} - -/* Retina support */ -@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5){.icheckbox-purple,.iradio-purple{background-image: url(../images/iCheck/purple@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px} -} - -/*3.4.2.2 Bootsrtap.Switch.css*/ -.has-switch{display:inline-block;cursor:pointer;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:1px solid;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);position:relative;text-align:left;overflow:hidden;line-height:8px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;min-width:100px} -.has-switch.size-MINI{min-width:72px} -.has-switch.size-S{min-width:80px} -.has-switch.size-L{min-width:120px} -.has-switch.deactivate{opacity:.5;filter:alpha(opacity=50);cursor:default!important} -.has-switch.deactivate label, -.has-switch.deactivate span{cursor:default!important} -.has-switch>div{display:inline-block;width:150%;position:relative;top:0} -.has-switch>div.switch-animate{-webkit-transition:left .5s;-moz-transition:left .5s;-o-transition:left .5s;transition:left .5s} -.has-switch>div.switch-off{left:-50%} -.has-switch>div.switch-on{left:0} -.has-switch input[type=checkbox]{display:none} -.has-switch span,.has-switch label{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;position:relative;display:inline-block;padding-bottom:4px;padding-top:4px;font-size:14px;line-height:20px} -.has-switch span.size-MINI,.has-switch label.size-MINI{padding-bottom:4px;padding-top:4px;font-size:10px;line-height:9px} -.has-switch span.size-S, -.has-switch label.size-S{padding-bottom:3px;padding-top:3px;font-size:12px;line-height:18px} -.has-switch span.size-L,.has-switch label.size-L{padding-bottom:9px;padding-top:9px;font-size:16px;line-height:normal} -.has-switch label{text-align:center;margin-top:-1px;margin-bottom:-1px;z-index:100;width:34%;border-left:1px solid #ccc;border-right:1px solid #ccc;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#f5f5f5; - background-image:-moz-linear-gradient(top,#fff,#e6e6e6); - background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6)); - background-image:-webkit-linear-gradient(top,#fff,#e6e6e6); - background-image:-o-linear-gradient(top,#fff,#e6e6e6); - background-image:linear-gradient(to bottom,#fff,#e6e6e6); - background-repeat:repeat-x; - filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0); - border-color:#e6e6e6 #e6e6e6 #bfbfbf; - border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25); - *background-color:#e6e6e6; - filter:progid:DXImageTransform.Microsoft.gradient(enabled = false) -} -.has-switch label:hover, -.has-switch label:focus, -.has-switch label:active, -.has-switch label.active, -.has-switch label.disabled, -.has-switch label[disabled]{color:#fff;background-color:#e6e6e6;*background-color:#d9d9d9} -.has-switch label:active, -.has-switch label.active{background-color:#ccc \9} -.has-switch label i{color:#000;text-shadow:0 1px 0 #fff;line-height:18px;pointer-events:none} -.has-switch span{text-align:center;z-index:1;width:33%} -.has-switch span.switch-left{ - -webkit-border-top-left-radius:4px; - -moz-border-radius-topleft:4px; - border-top-left-radius:4px; - -webkit-border-bottom-left-radius:4px; - -moz-border-radius-bottomleft:4px; - border-bottom-left-radius:4px -} -.has-switch span.switch-right{color:#333;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#f0f0f0; - background-image:-moz-linear-gradient(top,#e6e6e6,#fff); - background-image:-webkit-gradient(linear,0 0,0 100%,from(#e6e6e6),to(#fff)); - background-image:-webkit-linear-gradient(top,#e6e6e6,#fff); - background-image:-o-linear-gradient(top,#e6e6e6,#fff); - background-image:linear-gradient(to bottom,#e6e6e6,#fff); - background-repeat:repeat-x; - filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6',endColorstr='#ffffffff',GradientType=0); - border-color:#fff #fff #d9d9d9;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25); - *background-color:#fff;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false) -} -.has-switch span.switch-right:hover, -.has-switch span.switch-right:focus, -.has-switch span.switch-right:active, -.has-switch span.switch-right.active, -.has-switch span.switch-right.disabled, -.has-switch span.switch-right[disabled]{color:#333;background-color:#fff;*background-color:#f2f2f2} -.has-switch span.switch-right:active, -.has-switch span.switch-right.active{background-color:#e6e6e6 \9} -.has-switch span.switch-primary, -.has-switch span.switch-left{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#005fcc; - background-image:-moz-linear-gradient(top,#04c,#08c); - background-image:-webkit-gradient(linear,0 0,0 100%,from(#04c),to(#08c)); - background-image:-webkit-linear-gradient(top,#04c,#08c); - background-image:-o-linear-gradient(top,#04c,#08c); - background-image:linear-gradient(to bottom,#04c,#08c); - background-repeat:repeat-x; - filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0044cc',endColorstr='#ff0088cc',GradientType=0); - border-color:#08c #08c #005580; - border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25); - *background-color:#08c; - filter:progid:DXImageTransform.Microsoft.gradient(enabled = false) -} -.has-switch span.switch-primary:hover, -.has-switch span.switch-left:hover, -.has-switch span.switch-primary:focus, -.has-switch span.switch-left:focus, -.has-switch span.switch-primary:active, -.has-switch span.switch-left:active, -.has-switch span.switch-primary.active, -.has-switch span.switch-left.active, -.has-switch span.switch-primary.disabled, -.has-switch span.switch-left.disabled, -.has-switch span.switch-primary[disabled], -.has-switch span.switch-left[disabled]{color:#fff;background-color:#08c;*background-color:#0077b3} -.has-switch span.switch-primary:active, -.has-switch span.switch-left:active, -.has-switch span.switch-primary.active, -.has-switch span.switch-left.active{background-color:#069 \9} -.has-switch span.switch-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#41a7c5; - background-image:-moz-linear-gradient(top,#2f96b4,#5bc0de); - background-image:-webkit-gradient(linear,0 0,0 100%,from(#2f96b4),to(#5bc0de)); - background-image:-webkit-linear-gradient(top,#2f96b4,#5bc0de); - background-image:-o-linear-gradient(top,#2f96b4,#5bc0de); - background-image:linear-gradient(to bottom,#2f96b4,#5bc0de); - background-repeat:repeat-x; - filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff2f96b4',endColorstr='#ff5bc0de',GradientType=0); - border-color:#5bc0de #5bc0de #28a1c5; - border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25); - *background-color:#5bc0de; - filter:progid:DXImageTransform.Microsoft.gradient(enabled = false) -} -.has-switch span.switch-info:hover, -.has-switch span.switch-info:focus, -.has-switch span.switch-info:active, -.has-switch span.switch-info.active, -.has-switch span.switch-info.disabled, -.has-switch span.switch-info[disabled]{color:#fff;background-color:#5bc0de;*background-color:#46b8da} -.has-switch span.switch-info:active, -.has-switch span.switch-info.active{background-color:#31b0d5 \9} -.has-switch span.switch-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#58b058; - background-image:-moz-linear-gradient(top,#51a351,#62c462); - background-image:-webkit-gradient(linear,0 0,0 100%,from(#51a351),to(#62c462)); - background-image:-webkit-linear-gradient(top,#51a351,#62c462); - background-image:-o-linear-gradient(top,#51a351,#62c462); - background-image:linear-gradient(to bottom,#51a351,#62c462); - background-repeat:repeat-x; - filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff51a351',endColorstr='#ff62c462',GradientType=0); - border-color:#62c462 #62c462 #3b9e3b; - border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25); - *background-color:#62c462; - filter:progid:DXImageTransform.Microsoft.gradient(enabled = false) -} -.has-switch span.switch-success:hover, -.has-switch span.switch-success:focus, -.has-switch span.switch-success:active, -.has-switch span.switch-success.active, -.has-switch span.switch-success.disabled, -.has-switch span.switch-success[disabled]{color:#fff;background-color:#62c462;*background-color:#4fbd4f} -.has-switch span.switch-success:active, -.has-switch span.switch-success.active{background-color:#42b142 \9} -.has-switch span.switch-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#f9a123; - background-image:-moz-linear-gradient(top,#f89406,#fbb450); - background-image:-webkit-gradient(linear,0 0,0 100%,from(#f89406),to(#fbb450)); - background-image:-webkit-linear-gradient(top,#f89406,#fbb450); - background-image:-o-linear-gradient(top,#f89406,#fbb450); - background-image:linear-gradient(to bottom,#f89406,#fbb450); - background-repeat:repeat-x; - filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff89406',endColorstr='#fffbb450',GradientType=0); - border-color:#fbb450 #fbb450 #f89406; - border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25); - *background-color:#fbb450; - filter:progid:DXImageTransform.Microsoft.gradient(enabled = false) -} -.has-switch span.switch-warning:hover, -.has-switch span.switch-warning:focus, -.has-switch span.switch-warning:active, -.has-switch span.switch-warning.active, -.has-switch span.switch-warning.disabled, -.has-switch span.switch-warning[disabled]{color:#fff;background-color:#fbb450;*background-color:#faa937} -.has-switch span.switch-warning:active, -.has-switch span.switch-warning.active{background-color:#fa9f1e \9} -.has-switch span.switch-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#d14641; - background-image:-moz-linear-gradient(top,#bd362f,#ee5f5b); - background-image:-webkit-gradient(linear,0 0,0 100%,from(#bd362f),to(#ee5f5b)); - background-image:-webkit-linear-gradient(top,#bd362f,#ee5f5b); - background-image:-o-linear-gradient(top,#bd362f,#ee5f5b); - background-image:linear-gradient(to bottom,#bd362f,#ee5f5b); - background-repeat:repeat-x; - filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffbd362f',endColorstr='#ffee5f5b',GradientType=0); - border-color:#ee5f5b #ee5f5b #e51d18; - border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25); - *background-color:#ee5f5b; - filter:progid:DXImageTransform.Microsoft.gradient(enabled = false) -} -.has-switch span.switch-danger:hover, -.has-switch span.switch-danger:focus, -.has-switch span.switch-danger:active, -.has-switch span.switch-danger.active, -.has-switch span.switch-danger.disabled, -.has-switch span.switch-danger[disabled]{color:#fff;background-color:#ee5f5b;*background-color:#ec4844} -.has-switch span.switch-danger:active, -.has-switch span.switch-danger.active{background-color:#e9322d \9} - -/*3.4.3 select 下拉框 - - - - Explain: - select 是表单元素中最难美化的一个,有两种美化方式: - 1、修改源生的,修改有限,只能修改个边框,背景,字体。优点:程序方便操作;缺点:丑,浏览器之间存在很大差异。 - 2、将源生的隐藏掉,用其他元素(如div li)通过js模拟下拉交互,然后再传值给源生的select。优点:好看,兼容好;缺点:代码冗余,依赖JS,不方便操作 -*/ -/*方法一、修改源生*/ -.select-box{border:solid 1px #ddd;box-sizing:border-box;vertical-align:middle; width:100%; display:inline-block} - .select{border:solid 1px #ddd;box-sizing:border-box;cursor: pointer;line-height:normal;font-weight: normal;width:100%; white-space:nowrap} -.select-box .select{ border:none} -.select-box.inline, -.select-box.inline .select{ width:auto} - -.select-box, -.select-box.size-M{padding:4px 5px} - .select,.size-M .select{font-size: 14px} - -.select-box.size-MINI{padding:0px 5px} - .size-MINI .select{font-size: 12px} - -.select-box.size-S{padding:3px 5px} - .size-S .select{font-size: 12px} - -.select-box.size-L{padding:8px 5px} - .size-L .select{font-size: 16px} - -.select-box.size-XL{padding:10px 5px} - .size-XL .select{font-size: 18px} - -@media (max-width: 767px) { - .responsive .select-box{ border:none} - .responsive .select-box .select, - .responsive .select{border:solid 1px #ddd; padding:10px;font-size:16px} - .responsive .select-box, - .responsive .select-box.size-M, - .responsive .select-box.size-MINI, - .responsive .select-box.size-S, - .responsive .select-box.size-L, - .responsive .select-box.size-XL{ height:auto; padding:0} -} - -/*方法二、JS模拟 - -需要引用2个js文件 - - -页面调用方法 - -*/ -.select-wrapper {position:relative; display:inline-block;font-size:14px;cursor:default} -.select-default{zoom: 1;display:block; padding-left:10px; padding-right:30px;background-color:#fff;border:solid 1px #d0d0d0;height:34px;line-height:34px} -.jsselect.radius{ overflow:visible} -.jsselect.radius .select-default{ border-radius:4px} -.jsselect.radius .select-list{border-radius:4px;border-top-left-radius:0;border-top-right-radius:0} -.select-icon {position: absolute;height:8px;width:12px;right:10px;top:50%; margin-top:-4px;background: url(../images/jselect/iconpic-arrow-down2.png) no-repeat center} -.unselectable { - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - user-select: none} - .select-list {position:absolute;left:0; right:0;top:100%;z-index:1;line-height:34px;max-height:320px; overflow:auto;background-color:#fff;background-clip: padding-box; - _height:expression(this.scrollHeight > 319 ? "320px" : "auto"); - -moz-box-shadow:0 1px 2px rgba(0, 1, 1, 0.2); - -webkit-box-shadow:0 1px 2px rgba(0, 1, 1, 0.2); - box-shadow:0 1px 2px rgba(0, 1, 1, 0.2); - box-sizing:border-box; - - border:solid 1px #d0d0d0} - .select-item {margin: 0;padding: 0} - .select-option {background:#fff;line-height:34px;text-align:left;white-space:nowrap; cursor:pointer; border-bottom:1px solid #f2f2f2; padding:0 10px} - .select-item .selected {background-color:#148cf1;color:#fff} - -/*3.4.4 input-file 文件上传 - Example: - - 󰀠 浏览文件 - - Explain:把文件选择域设为透明,通过绝对定位覆盖在长的好看的按钮上面。 -*/ -.btn-upload{position: relative; display:inline-block;height:31px; *display:inline;overflow:hidden;vertical-align:middle;cursor:pointer} - .upload-url{cursor: pointer; width:300px} - .input-file{position:absolute; right:0; top:0; cursor: pointer; z-index:1; font-size:30em;opacity:0;filter: alpha(opacity=0)} -.form-group .upload-btn{ margin-left:-1px} -.btn-upload .icon-add,.btn-upload .icon-minus{cursor: pointer;display: inline-block;font-family: Arial;font-size: 30px;height: 31px;line-height: 31px;text-align: center;vertical-align: middle;width: 36px} -@media (max-width: 767px) { - .upload-btn{ display:none} - .upload-url{ display:none} -} - -/*数字表单*/ -.numberControlBox{display:inline-block;overflow:hidden;vertical-align: middle} -.ncb-up,.ncb-down{font-size:0px;display:block;height:10px;background-color:#f4f4f4;background:-moz-linear-gradient(top,rgb(255,255,255) 0%,rgb(230,230,230) 50%,rgb(255,255,255) 100%);width:24px;border:1px solid #d1d1d1;cursor:pointer} -.ncb-up{margin-bottom:1px} -.numberControlBox .ncb_ico{display:block;height:10px;background-image:url(../images/iconpic-arrow.png);background-repeat:no-repeat} -.ncb-up .ncb_ico{background-position: -22px center} -.ncb-down .ncb_ico{background-position: 1px center} -.ncb_btn_hover{border:1px solid #9dc7e7;background-color:#dff2fc;background:-moz-linear-gradient(top,rgb(255,255,255) 0%,rgb(210,237,250) 50%,rgb(255,255,255) 100%)} -.ncb_btn_selected{border:1px solid #6198c2;background-color:#aee1fb;background:-moz-linear-gradient(top,rgb(255,255,255) 0%,rgb(174,225,251) 50%,rgb(255,255,255) 100%)} -.input-text[type="number"]{width:80px} - -/*3.4.5 spinner 控件*/ -.spinner{display:block;overflow:hidden;width:100px; position:relative; padding-left:29px; padding-right:29px;} -.spinner .input-text{height:30px; text-align:center; width:100%} -.spinner a{display:inline-block; position:absolute;top:0; bottom:0; height:28px;line-height:28px;width:28px;cursor:pointer;outline:0; text-decoration:none;text-align:center;font-size:16px;border:1px solid #ddd;background-color:#f7f7f7;} -.spinner a:hover{ text-decoration:none} -.spinner a i{ font-style:normal;} -.spinner a.subtract{ left:0} -.spinner a.add{ right:0} -.spinner a.add.disabled, -.spinner a.subtract.disabled{ color:#999; cursor:not-allowed} - - -/*3.4.6 邮箱提示*/ -.emailSug-wrapper {position: absolute;background: #fff;text-align: left;z-index: 99} -.emailSug-wrapper .emailSug-list .emailSug-item {font-size: 14px;height: 25px;line-height: 25px;padding-left: 10px;color: #333} -.emailSug-wrapper .emailSug-list .emailSug-item.active {background: #5a98de;cursor: pointer;color: #fff} - -/*3.4.7 表单布局*/ -label,.placeholder{font-size:14px} -.form legend{font-size:20px}/*表单名称*/ -.form .row{margin-top:15px}/*表单行*/ - .form-label{display:block; color:#555}/*表单标题*/ - .formControls{position:relative}/*表单控制区*/ - .formControls > *{vertical-align:middle} - .placeholder{position:absolute; left:4px; top:4px;color:#c6c6c6; cursor:text}/*表单默认值*/ -.form-horizontal .form-label{margin-top:3px;cursor:text;text-align:right} -.form-horizontal .Validform_checktip{ margin-top:5px} -/*设置placeholder颜色*/ -::-webkit-input-placeholder {color:#b3b3b3}/* WebKit browsers */ -:-moz-placeholder {color:#b3b3b3}/* Mozilla Firefox 4 to 18 */ -::-moz-placeholder {color:#b3b3b3}/* Mozilla Firefox 19+ */ -:-ms-input-placeholder {color:#b3b3b3}/* Internet Explorer 10+ */ -.placeholder{color:#adb0be; position:absolute; z-index:9}/*不兼容placeholder属性的浏览器,可使用表单默认值*/ -@media (max-width: 767px) { - .form-horizontal .form-label{ text-align:left} -} -/*3.4.8 表单验证*/ -/*文本框的错误状态*/ -.Validform_error,input.error,select.error,textarea.error{background-color:#fbe2e2; border-color:#c66161; color:#c00} -.Validform_wrong,.Validform_right,.Validform_warning{display:inline-block;height:20px;font-size:12px;vertical-align:middle; padding-left:25px} -/*错误*/ -.Validform_wrong{background:url(../images/validform/iconpic-error.png) no-repeat 0 center;color:#ef392b} -/*正确*/ -.Validform_right{background:url(../images/validform/iconpic-right.png) no-repeat 0 center} -/*警告*/ -.Validform_warning{background:url(../images/validform/iconpic-warning.png) no-repeat 0 center;color:#777} -label.error{ position: absolute; right: 18px; top: 5px;color:#ef392b; font-size: 12px} -.check-box label.error, -.radio-box label.error{ right:auto; width:150px; left:210px;top:-2px} -/*密码等级*/ -.passwordStrength b{font-weight:400} -.passwordStrength b,.passwordStrength span{display:inline-block; vertical-align:middle;line-height:16px;line-height:18px\9;height:16px} -.passwordStrength span{width:57px;text-align:center;background-color:#d0d0d0; border-right:1px solid #fff} -.passwordStrength .last{border-right:none} -.passwordStrength .bgStrength{color:#fff;background-color:#fcc900} -/*Validform对话框*/ -#Validform_msg{font-size:14px;width:300px; -webkit-box-shadow:2px 2px 3px #aaa; -moz-box-shadow:2px 2px 3px #aaa; background:#fff; position:absolute; top:0px; right:50px; z-index:99999; display:none;filter: progid:DXImageTransform.Microsoft.Shadow(Strength=3, Direction=135, Color='#999999'); box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1)} -#Validform_msg .iframe{position:absolute; left:0px; top:-1px; z-index:-1} -#Validform_msg .Validform_title{font-size:20px; padding:10px;text-align:left;color:#fff; position:relative; background-color:#fcc900} -#Validform_msg a.Validform_close:link,#Validform_msg a.Validform_close:visited{position:absolute; right:8px; top:6px; color:#fff; text-decoration:none; font-family:Verdana} -#Validform_msg a.Validform_close:hover{color:#fff} -#Validform_msg .Validform_info{padding:10px;border:1px solid #bbb; border-top:none; text-align:left} -@media (max-width: 767px) { - .responsive .Validform_checktip{margin-top:10px} -} - -/*3.5 按钮 - Name: style_button - Example: - Explain: btn-primary:主要|btn-info:信息|btn-success:成功|btn-warning:警告|btn-danger:危险|btn-inverse:反向|btn-link:链接 - -*/ -/*关闭*/ -.close{font-size:20px;color: #000;text-shadow: 0 1px 0 #fff;opacity: 0.2;filter: alpha(opacity=20)} -.close:hover,.close:focus{color: #000;text-decoration: none;cursor: pointer;opacity: 0.4;filter: alpha(opacity=40)} - -button.close{padding:0;cursor:pointer;background:transparent;border: 0;-webkit-appearance: none} -/*按钮*/ -.btn{display:inline-block;box-sizing:border-box;cursor:pointer;text-align:center;font-weight:400;white-space:nowrap;vertical-align: middle;-moz-padding-start:npx; -moz-padding-end:npx;border:solid 1px #ddd; background-color:#fff; width:auto;*zoom:1;*overflow:visible; - -webkit-transition:background-color .1s linear; - -moz-transition:background-color .1s linear; - -o-transition:background-color .1s linear; - transition:background-color .1s linear} -a.btn:hover,a.btn:focus,a.btn:active,a.btn.active,a.btn.disabled,a.btn[disabled]{text-decoration:none} -.btn:active,.btn.active{background-color:#ccc} -.btn:first-child{*margin-left:0} -.btn.active,.btn:active{-moz-box-shadow:0 1px 8px rgba(0, 0, 0, 0.125) inset;-webkit-box-shadow:0 1px 8px rgba(0, 0, 0, 0.125) inset; box-shadow:0 1px 8px rgba(0, 0, 0, 0.125) inset} - -/*默认——灰色 通常用于取消*/ -.btn-default{background-color:#e6e6e6;border-color:#e6e6e6} -.btn-default:hover, -.btn-default:focus, -.btn-default:active, -.btn-default.active{color:#333;background-color:#c7c7c7;border-color:#c7c7c7} - -/*主要——主色 通常用于确定、提交、购买、支付等*/ -.btn-primary{color:#fff;background-color:#5a98de; border-color:#5a98de} -.btn-primary:hover, -.btn-primary:focus, -.btn-primary:active, -.btn-primary.active{color:#fff;background-color:#0a6999;border-color:#0a6999} - -/*次要按钮*/ -.btn-secondary{color:#fff;background-color:#3bb4f2; border-color:#3bb4f2} -.btn-secondary:hover, -.btn-secondary:focus, -.btn-secondary:active, -.btn-secondary.active{color:#fff;background-color:#0f9ae0;border-color:#0f9ae0} - -/*成功*/ -.btn-success{color:#fff;background-color:#5eb95e; border-color:#5eb95e} -.btn-success:hover, -.btn-success:focus, -.btn-success:active, -.btn-success.active{color:#fff;background-color:#429842;border-color:#429842} - -/*警告*/ -.btn-warning{color:#fff;background-color:#f37b1d; border-color:#f37b1d} -.btn-warning:hover, -.btn-warning:focus, -.btn-warning:active, -.btn-warning.active{color:#fff;background-color:#c85e0b;border-color:#c85e0b} - -/*危险*/ -.btn-danger{color:#fff;background-color:#dd514c; border-color:#dd514c} -.btn-danger:hover, -.btn-danger:focus, -.btn-danger:active, -.btn-danger.active{color:#fff;background-color:#c62b26;border-color:#c62b26} - -/*链接*/ -.btn-link{color:#0e90d2;cursor:pointer;border-color:transparent;background-color:transparent} -.btn-link:hover, -.btn-link:focus, -.btn-link:active, -.btn-link.active{color:#095f8a;text-decoration:underline;background-color:transparent} - -/*块级按钮*/ -.btn-block {-moz-box-sizing: border-box;display: block;padding-left: 0;padding-right: 0;width: 100%} -/* Outline buttons */ -.btn-default-outline{background-color:transparent;border-color:#e6e6e6} -.btn-default-outline:hover, -.btn-default-outline:focus, -.btn-default-outline:active, -.btn-default-outline.active{color:#333;background-color:transparent;border-color:#c7c7c7} - -.btn-primary-outline{color:#5a98de;background-color:transparent; border-color:#5a98de} -.btn-primary-outline:hover, -.btn-primary-outline:focus, -.btn-primary-outline:active, -.btn-primary-outline.active{color:#0a6999;background-color:transparent;border-color:#0a6999} - -.btn-secondary-outline{color:#3bb4f2;background-color:transparent;background-image:none;border-color:#3bb4f2} -.btn-secondary-outline.active,.btn-secondary-outline.focus,.btn-secondary-outline:active,.btn-secondary-outline:focus,.open>.btn-secondary-outline.dropdown-toggle{color:#fff;background-color:#3bb4f2;border-color:#3bb4f2} -.btn-secondary-outline:hover{color:#fff;background-color:#3bb4f2;border-color:#3bb4f2} -.btn-secondary-outline.disabled.focus,.btn-secondary-outline.disabled:focus,.btn-secondary-outline:disabled.focus,.btn-secondary-outline:disabled:focus,fieldset[disabled] .btn-secondary-outline.focus,fieldset[disabled] .btn-secondary-outline:focus{border-color:#0f9ae0} - -.btn-success-outline{color:#5eb95e;background-color:transparent;background-image:none;border-color:#5eb95e} -.btn-success-outline.active,.btn-success-outline.focus,.btn-success-outline:active,.btn-success-outline:focus,.open>.btn-success-outline.dropdown-toggle{color:#fff;background-color:#5eb95e;border-color:#5eb95e} -.btn-success-outline:hover{color:#fff;background-color:#5eb95e;border-color:#5eb95e} -.btn-success-outline.disabled.focus,.btn-success-outline.disabled:focus,.btn-success-outline:disabled.focus,.btn-success-outline:disabled:focus,fieldset[disabled] .btn-success-outline.focus,fieldset[disabled] .btn-success-outline:focus{border-color:#429842} - -.btn-warning-outline{color:#f37b1d;background-color:transparent;background-image:none;border-color:#f37b1d} -.btn-warning-outline.active,.btn-warning-outline.focus,.btn-warning-outline:active,.btn-warning-outline:focus,.open>.btn-warning-outline.dropdown-toggle{color:#fff;background-color:#f37b1d;border-color:#f37b1d} -.btn-warning-outline:hover{color:#fff;background-color:#f37b1d;border-color:#f37b1d} -.btn-warning-outline.disabled.focus,.btn-warning-outline.disabled:focus,.btn-success-outline:disabled.focus,.btn-warning-outline:disabled:focus,fieldset[disabled] .btn-warning-outline.focus,fieldset[disabled] .btn-warning-outline:focus{border-color:#c85e0b} - -.btn-danger-outline{color:#dd514c;background-color:transparent;background-image:none;border-color:#dd514c} -.btn-danger-outline.active,.btn-danger-outline.focus,.btn-danger-outline:active,.btn-danger-outline:focus,.open>.btn-danger-outline.dropdown-toggle{color:#fff;background-color:#dd514c;border-color:#dd514c} -.btn-danger-outline:hover{color:#fff;background-color:#dd514c;border-color:#dd514c} -.btn-danger-outline.disabled.focus,.btn-danger-outline.disabled:focus,.btn-success-outline:disabled.focus,.btn-danger-outline:disabled:focus,fieldset[disabled] .btn-danger-outline.focus,fieldset[disabled] .btn-danger-outline:focus{border-color:#c62b26} - -/*禁用状态*/ -.btn.disabled{cursor:not-allowed;background-image:none;opacity:.65;filter:alpha(opacity=65);box-shadow:none; pointer-events:none} - -/*表单组*/ -.form-group{ display:inline-block;vertical-align:middle} -.form-group .input-text{ position:relative; vertical-align:top} -.form-group.radius{ overflow: hidden} -.form-group.radius .input-text{border-radius:4px 0 0 4px} -.form-group.round .input-text{border-radius:1000px 0 0 1000px} -.form-group .btn{position:relative;margin-left:-1px} -.form-group.radius .btn{ border-radius:0 4px 4px 0} -.form-group.round .btn{ border-radius:0 1000px 1000px 0} - -/*3.6 图片*/ -/*3.6.1 图片效果 - -img-responsive 响应式 .radius 圆角图片 .round 圆形图片 .thumbnail 缩略图 -*/ -.img-responsive{display:inline-block;max-width:100%;height:auto} -.thumbnail{display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out} -@media (max-width: 767px) { - .img-responsive{width:100%} -} -.duang-opacity img{-webkit-transition:opacity .1s linear;-moz-transition:opacity .1s linear;-o-transition:opacity .1s linear;transition:opacity .1s linear} -.duang-opacity a:hover img,a:hover .opacity img{opacity:0.85;filter: alpha(opacity=85)} -/*3.6.2 图集效果 - Name: modal_album - Example: -
                                  -
                                  - -
                                  -
                                  《仙剑奇侠传》赵灵儿(20张)
                                  -
                                  -
                                  -
                                  -
                                  -
                                  */ -.album-item{} - .album-img{ border:1px solid #e0e0e0} - .album-img img{ display:block; width: 100%} - .album-title{display:block;text-align:left;padding:7px 5px;line-height:18px;color:#555;text-decoration:none;font-size:12px;border:solid 1px #e0e0e0;border-top:0} - .album-bg-Fir,.album-bg-Sec{border:1px solid #e6e6e6;border-top:1px solid #f5f5f5;height:1px;margin:0 auto;overflow:hidden} - .album-bg-Fir{ margin:0 3px} - .album-bg-Sec{ margin:0 6px} - -/*3.6.3 头像 - Name: mod_avatar - Example: -*/ -.avatar{display:inline-block;position:relative; overflow:hidden} -.avatar img{ display:block} -.avatar.radius,.avatar.radius img{border-radius:50%} -.avatar,.avatar img{width:32px; height:32px} -.avatar.size-MINI{ width:16px;height:16px} -.avatar.size-S,.avatar.size-S img{width:24px; height:24px} -.avatar.size-M,.avatar.size-M img{width:32px; height:32px}/*默认为中,可以不写,可以理解为:均码*/ -.avatar.size-L,.avatar.size-L img{width:48px; height:48px} -.avatar.size-XL,.avatar.size-XL img{width:64px; height:64px} -.avatar.size-XXL,.avatar.size-XXL img{width:100px; height:100px} -.avatar.size-XXXL,.avatar.size-XXXL img{width:128px; height:128px} - -/*3.7 图标 -H-ui采用Font Awesome 3.2.1的整套图标,因为是图标字体,所以可以像控制字体那样随心所欲改变这些图标的颜色、大小、阴影以及任何CSS能控制的属性 -*/ -.iconpic{display:inline-block; vertical-align:sub;*vertical-align:middle;_vertical-align:middle; width:16px; height:16px; background-position:center; background-repeat:no-repeat} -/*3.8 效果 - Name: style_animation - Example: -*/ -/* duang 加特效 */ -.hui-bounce,.hui-flip,.hui-flash,.hui-shake,.hui-swing,.hui-wobble,.hui-ring{-webkit-animation:1s ease;-moz-animation:1s ease;-ms-animation:1s ease;animation:1s ease} -.hui-fadein,.hui-fadeinT,.hui-fadeinR,.hui-fadeinB,.hui-fadeinL,.hui-bouncein,.hui-bounceinT,.hui-bounceinR,.hui-bounceinB,.hui-bounceinL,.hui-rotatein,.hui-rotateinLT,.hui-rotateinLB,.hui-rotateinRT,.hui-rotateinRB,.hui-flipin,.hui-flipinX,.hui-flipinY{-webkit-animation:1s ease-out backwards;-moz-animation:1s ease-out backwards;-ms-animation:1s ease-out backwards;animation:1s ease-out backwards} -.hui-fadeout,.hui-fadeoutT,.hui-fadeoutR,.hui-fadeoutB,.hui-fadeoutL,.hui-bounceout,.hui-bounceoutT,.hui-bounceoutR,.hui-bounceoutB,.hui-bounceoutL,.hui-rotateout,.hui-rotateoutLT,.hui-rotateoutLB,.hui-rotateoutRT,.hui-rotateoutRB,.hui-flipout,.hui-flipoutX,.hui-flipoutY{-webkit-animation:1s ease-in forwards;-moz-animation:1s ease-in forwards;-ms-animation:1s ease-in forwards;animation:1s ease-in forwards} - -/* 淡入 */ -.hui-fadein{-webkit-animation-name:fadein;-moz-animation-name:fadein;-ms-animation-name:fadein;animation-name:fadein} -/* 淡入-从上 */ -.hui-fadeinT{-webkit-animation-name:fadeinT;-moz-animation-name:fadeinT;-ms-animation-name:fadeinT;animation-name:fadeinT} -/* 淡入-从右 */ -.hui-fadeinR{-webkit-animation-name:fadeinR;-moz-animation-name:fadeinR;-ms-animation-name:fadeinR;animation-name:fadeinR} -/* 淡入-从下 */ -.hui-fadeinB{-webkit-animation-name:fadeinB;-moz-animation-name:fadeinB;-ms-animation-name:fadeinB;animation-name:fadeinB} -/* 淡入-从左 */ -.hui-fadeinL{-webkit-animation-name:fadeinL;-moz-animation-name:fadeinL;-ms-animation-name:fadeinL;animation-name:fadeinL} -/* 淡出 */ -.hui-fadeout{-webkit-animation-name:fadeout;-moz-animation-name:fadeout;-ms-animation-name:fadeout;animation-name:fadeout} - -/* 淡出-向上 */ -.hui-fadeoutT{-webkit-animation-name:fadeoutT;-moz-animation-name:fadeoutT;-ms-animation-name:fadeoutT;animation-name:fadeoutT} -/* 淡出-向右 */ -.hui-fadeoutR{-webkit-animation-name:fadeoutR;-moz-animation-name:fadeoutR;-ms-animation-name:fadeoutR;animation-name:fadeoutR} -/* 淡出-向下 */ -.hui-fadeoutB{-webkit-animation-name:fadeoutB;-moz-animation-name:fadeoutB;-ms-animation-name:fadeoutB;animation-name:fadeoutB} -/* 淡出-向左 */ -.hui-fadeoutL{-webkit-animation-name:fadeoutL;-moz-animation-name:fadeoutL;-ms-animation-name:fadeoutL;animation-name:fadeoutL} - -/* 弹跳 */ -.hui-bounce{-webkit-animation-name:bounce;-moz-animation-name:bounce;-ms-animation-name:bounce;animation-name:bounce} - -/* 弹入 */ -.hui-bouncein{-webkit-animation-name:bouncein;-moz-animation-name:bouncein;-ms-animation-name:bouncein;animation-name:bouncein} -/* 弹入-从上 */ -.hui-bounceinT{-webkit-animation-name:bounceinT;-moz-animation-name:bounceinT;-ms-animation-name:bounceinT;animation-name:bounceinT} -/* 弹入-从右 */ -.hui-bounceinR{-webkit-animation-name:bounceinR;-moz-animation-name:bounceinR;-ms-animation-name:bounceinR;animation-name:bounceinR} -/* 弹入-从下 */ -.hui-bounceinB{-webkit-animation-name:bounceinB;-moz-animation-name:bounceinB;-ms-animation-name:bounceinB;animation-name:bounceinB} -/* 弹入-从左 */ -.hui-bounceinL{-webkit-animation-name:bounceinL;-moz-animation-name:bounceinL;-ms-animation-name:bounceinL;animation-name:bounceinL} - -/* 弹出 */ -.hui-bounceout{-webkit-animation-name:bounceout;-moz-animation-name:bounceout;-ms-animation-name:bounceout;animation-name:bounceout} -/* 弹出-向上 */ -.hui-bounceoutT{-webkit-animation-name:bounceoutT;-moz-animation-name:bounceoutT;-ms-animation-name:bounceoutT;animation-name:bounceoutT} -/* 弹出-向右 */ -.hui-bounceoutR{-webkit-animation-name:bounceoutR;-moz-animation-name:bounceoutR;-ms-animation-name:bounceoutR;animation-name:bounceoutR} -/* 弹出-向下 */ -.hui-bounceoutB{-webkit-animation-name:bounceoutB;-moz-animation-name:bounceoutB;-ms-animation-name:bounceoutB;animation-name:bounceoutB} -/* 弹出-向左 */ -.hui-bounceoutL{-webkit-animation-name:bounceoutL;-moz-animation-name:bounceoutL;-ms-animation-name:bounceoutL;animation-name:bounceoutL} - -/* 转入 */ -.hui-rotatein{-webkit-animation-name:rotatein;-moz-animation-name:rotatein;-ms-animation-name:rotatein;animation-name:rotatein} -/* 转入-从左上 */ -.hui-rotateinLT{-webkit-animation-name:rotateinLT;-moz-animation-name:rotateinLT;-ms-animation-name:rotateinLT;animation-name:rotateinLT} -/* 转入-从左下 */ -.hui-rotateinLB{-webkit-animation-name:rotateinLB;-moz-animation-name:rotateinLB;-ms-animation-name:rotateinLB;animation-name:rotateinLB} -/* 转入-从右上 */ -.hui-rotateinRT{-webkit-animation-name:rotateinRT;-moz-animation-name:rotateinRT;-ms-animation-name:rotateinRT;animation-name:rotateinRT} -/* 转入-从右下*/ -.hui-rotateinRB{-webkit-animation-name:rotateinRB;-moz-animation-name:rotateinRB;-ms-animation-name:rotateinRB;animation-name:rotateinRB} - -/* 转出 */ -.hui-rotateout{-webkit-animation-name:rotateout;-moz-animation-name:rotateout;-ms-animation-name:rotateout;animation-name:rotateout} -/* 转出-向左上 */ -.hui-rotateoutLT{-webkit-animation-name:rotateoutLT;-moz-animation-name:rotateoutLT;-ms-animation-name:rotateoutLT;animation-name:rotateoutLT} -/* 转出-向左下 */ -.hui-rotateoutLB{-webkit-animation-name:rotateoutLB;-moz-animation-name:rotateoutLB;-ms-animation-name:rotateoutLB;animation-name:rotateoutLB} -/* 转出-向右上 */ -.hui-rotateoutRT{-webkit-animation-name:rotateoutRT;-moz-animation-name:rotateoutRT;-ms-animation-name:rotateoutRT;animation-name:rotateoutRT} -/* 转出-向右下 */ -.hui-rotateoutRB{-webkit-animation-name:rotateoutRB;-moz-animation-name:rotateoutRB;-ms-animation-name:rotateoutRB;animation-name:rotateoutRB} - -/* 翻转 */ -.hui-flip{-webkit-animation-name:flip;-moz-animation-name:flip;-ms-animation-name:flip;animation-name:flip} -/* 翻入-X轴 */ -.hui-flipinX{-webkit-animation-name:flipinX;-moz-animation-name:flipinX;-ms-animation-name:flipinX;animation-name:flipinX} -/* 翻入-Y轴 */ -.hui-flipin,.hui-flipinY{-webkit-animation-name:flipinY;-moz-animation-name:flipinY;-ms-animation-name:flipinY;animation-name:flipinY} -/* 翻出-X轴 */ -.hui-flipoutX{-webkit-animation-name:flipoutX;-moz-animation-name:flipoutX;-ms-animation-name:flipoutX;animation-name:flipoutX} -/* 翻出-Y轴 */ -.hui-flipout,.hui-flipoutY{-webkit-animation-name:flipoutY;-moz-animation-name:flipoutY;-ms-animation-name:flipoutY;animation-name:flipoutY} - -/* 闪烁 */ -.hui-flash{-webkit-animation-name:flash;-moz-animation-name:flash;-ms-animation-name:flash;animation-name:flash} -/* 震颤 */ -.hui-shake{-webkit-animation-name:shake;-moz-animation-name:shake;-ms-animation-name:shake;animation-name:shake} -/* 摇摆 */ -.hui-swing{-webkit-animation-name:swing;-moz-animation-name:swing;-ms-animation-name:swing;animation-name:swing} -/* 摇晃 */ -.hui-wobble{-webkit-animation-name:wobble;-moz-animation-name:wobble;-ms-animation-name:wobble;animation-name:wobble} -/* 震铃 */ -.hui-ring{-webkit-animation-name:ring;-moz-animation-name:ring;-ms-animation-name:ring;animation-name:ring} -/* define */ -/* 淡入 */ -@-webkit-keyframes fadein{ - 0%{opacity:0} - 100%{opacity:1} -} -@-moz-keyframes fadein{ - 0%{opacity:0} - 100%{opacity:1} -} -@-ms-keyframes fadein{ - 0%{opacity:0} - 100%{opacity:1} -} -@keyframes fadein{ - 0%{opacity:0} - 100%{opacity:1} -} -/* 淡入-从上 */ -@-webkit-keyframes fadeinT{ - 0%{opacity:0;-webkit-transform:translateY(-100px)} - 100%{opacity:1;-webkit-transform:translateY(0)} -} -@-moz-keyframes fadeinT{ - 0%{opacity:0;-moz-transform:translateY(-100px)} - 100%{opacity:1;-moz-transform:translateY(0)} -} -@-ms-keyframes fadeinT{ - 0%{opacity:0;-ms-transform:translateY(-100px)} - 100%{opacity:1;-ms-transform:translateY(0)} -} -@keyframes fadeinT{ - 0%{opacity:0;transform:translateY(-100px)} - 100%{opacity:1;transform:translateY(0)} -} -/* 淡入-从右 */ -@-webkit-keyframes fadeinR{ - 0%{opacity:0;-webkit-transform:translateX(100px)} - 100%{opacity:1;-webkit-transform:translateX(0)} -} -@-moz-keyframes fadeinR{ - 0%{opacity:0;-moz-transform:translateX(100px)} - 100%{opacity:1;-moz-transform:translateX(0)} -} -@-ms-keyframes fadeinR{ - 0%{opacity:0;-ms-transform:translateX(100px)} - 100%{opacity:1;-ms-transform:translateX(0)} -} -@keyframes fadeinR{ - 0%{opacity:0;transform:translateX(100px)} - 100%{opacity:1;transform:translateX(0)} -} -/* 淡入-从下 */ -@-webkit-keyframes fadeinB{ - 0%{opacity:0;-webkit-transform:translateY(100px)} - 100%{opacity:1;-webkit-transform:translateY(0)} -} -@-moz-keyframes fadeinB{ - 0%{opacity:0;-moz-transform:translateY(100px)} - 100%{opacity:1;-moz-transform:translateY(0)} -} -@-ms-keyframes fadeinB{ - 0%{opacity:0;-ms-transform:translateY(100px)} - 100%{opacity:1;-ms-transform:translateY(0)} -} -@keyframes fadeinB{ - 0%{opacity:0;transform:translateY(100px)} - 100%{opacity:1;transform:translateY(0)} -} -/* 淡入-从左 */ -@-webkit-keyframes fadeinL{ - 0%{opacity:0;-webkit-transform:translateX(-100px)} - 100%{opacity:1;-webkit-transform:translateX(0)} -} -@-moz-keyframes fadeinL{ - 0%{opacity:0;-moz-transform:translateX(-100px)} - 100%{opacity:1;-moz-transform:translateX(0)} -} -@-ms-keyframes fadeinL{ - 0%{opacity:0;-ms-transform:translateX(-100px)} - 100%{opacity:1;-ms-transform:translateX(0)} -} -@keyframes fadeinL{ - 0%{opacity:0;transform:translateX(-100px)} - 100%{opacity:1;transform:translateX(0)} -} -/* 淡出 */ -@-webkit-keyframes fadeout{ - 0%{opacity:1} - 100%{opacity:0} -} -@-moz-keyframes fadeout{ - 0%{opacity:1} - 100%{opacity:0} -} -@-ms-keyframes fadeout{ - 0%{opacity:1} - 100%{opacity:0} -} -@keyframes fadeout{ - 0%{opacity:1} - 100%{opacity:0} -} -/* 淡出-向上 */ -@-webkit-keyframes fadeoutT{ - 0%{opacity:1;-webkit-transform:translateY(0)} - 100%{opacity:0;-webkit-transform:translateY(-100px)} -} -@-moz-keyframes fadeoutT{ - 0%{opacity:1;-moz-transform:translateY(0)} - 100%{opacity:0;-moz-transform:translateY(-100px)} -} -@-ms-keyframes fadeoutT{ - 0%{opacity:1;-ms-transform:translateY(0)} - 100%{opacity:0;-ms-transform:translateY(-100px)} -} -@keyframes fadeoutT{ - 0%{opacity:1;transform:translateY(0)} - 100%{opacity:0;transform:translateY(-100px)} -} -/* 淡出-向右 */ -@-webkit-keyframes fadeoutR{ - 0%{opacity:1;-webkit-transform:translateX(0)} - 100%{opacity:0;-webkit-transform:translateX(100px)} -} -@-moz-keyframes fadeoutR{ - 0%{opacity:1;-moz-transform:translateX(0)} - 100%{opacity:0;-moz-transform:translateX(100px)} -} -@-ms-keyframes fadeoutR{ - 0%{opacity:1;-ms-transform:translateX(0)} - 100%{opacity:0;-ms-transform:translateX(100px)} -} -@keyframes fadeoutR{ - 0%{opacity:1;transform:translateX(0)} - 100%{opacity:0;transform:translateX(100px)} -} -/* 淡出-向下 */ -@-webkit-keyframes fadeoutB{ - 0%{opacity:1;-webkit-transform:translateY(0)} - 100%{opacity:0;-webkit-transform:translateY(100px)} -} -@-moz-keyframes fadeoutB{ - 0%{opacity:1;-moz-transform:translateY(0)} - 100%{opacity:0;-moz-transform:translateY(100px)} -} -@-ms-keyframes fadeoutB{ - 0%{opacity:1;-ms-transform:translateY(0)} - 100%{opacity:0;-ms-transform:translateY(100px)} -} -@keyframes fadeoutB{ - 0%{opacity:1;transform:translateY(0)} - 100%{opacity:0;transform:translateY(100px)} -} -/* 淡出-向左 */ -@-webkit-keyframes fadeoutL{ - 0%{opacity:1;-webkit-transform:translateX(0)} - 100%{opacity:0;-webkit-transform:translateX(-100px)} -} -@-moz-keyframes fadeoutL{ - 0%{opacity:1;-moz-transform:translateX(0)} - 100%{opacity:0;-moz-transform:translateX(-100px)} -} -@-ms-keyframes fadeoutL{ - 0%{opacity:1;-ms-transform:translateX(0)} - 100%{opacity:0;-ms-transform:translateX(-100px)} -} -@keyframes fadeoutL{ - 0%{opacity:1;transform:translateX(0)} - 100%{opacity:0;transform:translateX(-100px)} -} -/* 弹跳 */ -@-webkit-keyframes bounce{ - 0%,20%,50%,80%,100%{-webkit-transform:translateY(0)} - 40%{-webkit-transform:translateY(-30px)} - 60%{-webkit-transform:translateY(-15px)} -} -@-moz-keyframes bounce{ - 0%,20%,50%,80%,100%{-moz-transform:translateY(0)} - 40%{-moz-transform:translateY(-30px)} - 60%{-moz-transform:translateY(-15px)} -} -@-ms-keyframes bounce{ - 0%,20%,50%,80%,100%{-ms-transform:translateY(0)} - 40%{-ms-transform:translateY(-30px)} - 60%{-ms-transform:translateY(-15px)} -} -@keyframes bounce{ - 0%,20%,50%,80%,100%{transform:translateY(0)} - 40%{transform:translateY(-30px)} - 60%{transform:translateY(-15px)} -} -/* 弹入 */ -@-webkit-keyframes bouncein{ - 0%{opacity:0;-webkit-transform:scale(0.3)} - 50%{opacity:1;-webkit-transform:scale(1.05)} - 70%{-webkit-transform:scale(0.9)} - 100%{-webkit-transform:scale(1)} -} -@-moz-keyframes bouncein{ - 0%{opacity:0;-moz-transform:scale(0.3)} - 50%{opacity:1;-moz-transform:scale(1.05)} - 70%{-moz-transform:scale(0.9)} - 100%{-moz-transform:scale(1)} -} -@-ms-keyframes bouncein{ - 0%{opacity:0;-ms-transform:scale(0.3)} - 50%{opacity:1;-ms-transform:scale(1.05)} - 70%{-ms-transform:scale(0.9)} - 100%{-ms-transform:scale(1)} -} -@keyframes bouncein{ - 0%{opacity:0;transform:scale(0.3)} - 50%{opacity:1;transform:scale(1.05)} - 70%{transform:scale(0.9)} - 100%{transform:scale(1)} -} -/* 弹入-从上 */ -@-webkit-keyframes bounceinT{ - 0%{opacity:0;-webkit-transform:translateY(-100px)} - 60%{opacity:1;-webkit-transform:translateY(30px)} - 80%{-webkit-transform:translateY(-10px)} - 100%{-webkit-transform:translateY(0)} -} -@-moz-keyframes bounceinT{ - 0%{opacity:0;-moz-transform:translateY(-100px)} - 60%{opacity:1;-moz-transform:translateY(30px)} - 80%{-moz-transform:translateY(-10px)} - 100%{-moz-transform:translateY(0)} -} -@-ms-keyframes bounceinT{ - 0%{opacity:0;-ms-transform:translateY(-100px)} - 60%{opacity:1;-ms-transform:translateY(30px)} - 80%{-ms-transform:translateY(-10px)} - 100%{-ms-transform:translateY(0)} -} -@keyframes bounceinT{ - 0%{opacity:0;transform:translateY(-100px)} - 60%{opacity:1;transform:translateY(30px)} - 80%{transform:translateY(-10px)} - 100%{transform:translateY(0)} -} -/* 弹入-从右 */ -@-webkit-keyframes bounceinR{ - 0%{opacity:0;-webkit-transform:translateX(100px)} - 60%{opacity:1;-webkit-transform:translateX(-30px)} - 80%{-webkit-transform:translateX(10px)} - 100%{-webkit-transform:translateX(0)} -} -@-moz-keyframes bounceinR{ - 0%{opacity:0;-moz-transform:translateX(100px)} - 60%{opacity:1;-moz-transform:translateX(-30px)} - 80%{-moz-transform:translateX(10px)} - 100%{-moz-transform:translateX(0)} -} -@-ms-keyframes bounceinR{ - 0%{opacity:0;-ms-transform:translateX(100px)} - 60%{opacity:1;-ms-transform:translateX(-30px)} - 80%{-ms-transform:translateX(10px)} - 100%{-ms-transform:translateX(0)} -} -@keyframes bounceinR{ - 0%{opacity:0;transform:translateX(100px)} - 60%{opacity:1;transform:translateX(-30px)} - 80%{transform:translateX(10px)} - 100%{transform:translateX(0)} -} -/* 弹入-从下 */ -@-webkit-keyframes bounceinB{ - 0%{opacity:0;-webkit-transform:translateY(100px)} - 60%{opacity:1;-webkit-transform:translateY(-30px)} - 80%{-webkit-transform:translateY(10px)} - 100%{-webkit-transform:translateY(0)} -} -@-moz-keyframes bounceinB{ - 0%{opacity:0;-moz-transform:translateY(100px)} - 60%{opacity:1;-moz-transform:translateY(-30px)} - 80%{-moz-transform:translateY(10px)} - 100%{-moz-transform:translateY(0)} -} -@-ms-keyframes bounceinB{ - 0%{opacity:0;-ms-transform:translateY(100px)} - 60%{opacity:1;-ms-transform:translateY(-30px)} - 80%{-ms-transform:translateY(10px)} - 100%{-ms-transform:translateY(0)} -} -@keyframes bounceinB{ - 0%{opacity:0;transform:translateY(100px)} - 60%{opacity:1;transform:translateY(-30px)} - 80%{transform:translateY(10px)} - 100%{transform:translateY(0)} -} -/* 弹入-从左 */ -@-webkit-keyframes bounceinL{ - 0%{opacity:0;-webkit-transform:translateX(-100px)} - 60%{opacity:1;-webkit-transform:translateX(30px)} - 80%{-webkit-transform:translateX(-10px)} - 100%{-webkit-transform:translateX(0)} -} -@-moz-keyframes bounceinL{ - 0%{opacity:0;-moz-transform:translateX(-100px)} - 60%{opacity:1;-moz-transform:translateX(30px)} - 80%{-moz-transform:translateX(-10px)} - 100%{-moz-transform:translateX(0)} -} -@-ms-keyframes bounceinL{ - 0%{opacity:0;-ms-transform:translateX(-100px)} - 60%{opacity:1;-ms-transform:translateX(30px)} - 80%{-ms-transform:translateX(-10px)} - 100%{-ms-transform:translateX(0)} -} -@keyframes bounceinL{ - 0%{opacity:0;transform:translateX(-100px)} - 60%{opacity:1;transform:translateX(30px)} - 80%{transform:translateX(-10px)} - 100%{transform:translateX(0)} -} -/* 弹出 */ -@-webkit-keyframes bounceout{ - 0%{-webkit-transform:scale(1)} - 25%{-webkit-transform:scale(0.95)} - 50%{opacity:1;-webkit-transform:scale(1.1)} - 100%{opacity:0;-webkit-transform:scale(0.3)} -} -@-moz-keyframes bounceout{ - 0%{-moz-transform:scale(1)} - 25%{-moz-transform:scale(0.95)} - 50%{opacity:1;-moz-transform:scale(1.1)} - 100%{opacity:0;-moz-transform:scale(0.3)} -} -@-ms-keyframes bounceout{ - 0%{-ms-transform:scale(1)} - 25%{-ms-transform:scale(0.95)} - 50%{opacity:1;-ms-transform:scale(1.1)} - 100%{opacity:0;-ms-transform:scale(0.3)} -} -@keyframes bounceout{ - 0%{transform:scale(1)} - 25%{transform:scale(0.95)} - 50%{opacity:1;transform:scale(1.1)} - 100%{opacity:0;transform:scale(0.3)} -} -/* 弹出-向上*/ -@-webkit-keyframes bounceoutT{ - 0%{-webkit-transform:translateY(0)} - 20%{opacity:1;-webkit-transform:translateY(20px)} - 100%{opacity:0;-webkit-transform:translateY(-100px)} -} -@-moz-keyframes bounceoutT{ - 0%{-moz-transform:translateY(0)} - 20%{opacity:1;-moz-transform:translateY(20px)} - 100%{opacity:0;-moz-transform:translateY(-100px)} -} -@-ms-keyframes bounceoutT{ - 0%{-ms-transform:translateY(0)} - 20%{opacity:1;-ms-transform:translateY(20px)} - 100%{opacity:0;-ms-transform:translateY(-100px)} -} -@keyframes bounceoutT{ - 0%{transform:translateY(0)} - 20%{opacity:1;transform:translateY(20px)} - 100%{opacity:0;transform:translateY(-100px)} -} -/* 弹出-向右*/ -@-webkit-keyframes bounceoutR{ - 0%{-webkit-transform:translateX(0)} - 20%{opacity:1;-webkit-transform:translateX(-20px)} - 100%{opacity:0;-webkit-transform:translateX(100px)} -} -@-moz-keyframes bounceoutR{ - 0%{-moz-transform:translateX(0)} - 20%{opacity:1;-moz-transform:translateX(-20px)} - 100%{opacity:0;-moz-transform:translateX(100px)} -} -@-ms-keyframes bounceoutR{ - 0%{-ms-transform:translateX(0)} - 20%{opacity:1;-ms-transform:translateX(-20px)} - 100%{opacity:0;-ms-transform:translateX(100px)} -} -@keyframes bounceoutR{ - 0%{transform:translateX(0)} - 20%{opacity:1;transform:translateX(-20px)} - 100%{opacity:0;transform:translateX(100px)} -} -/* 弹出-向下 */ -@-webkit-keyframes bounceoutB{ - 0%{-webkit-transform:translateY(0)} - 20%{opacity:1;-webkit-transform:translateY(-20px)} - 100%{opacity:0;-webkit-transform:translateY(100px)} -} -@-moz-keyframes bounceoutB{ - 0%{-moz-transform:translateY(0)} - 20%{opacity:1;-moz-transform:translateY(-20px)} - 100%{opacity:0;-moz-transform:translateY(100px)} -} -@-ms-keyframes bounceoutB{ - 0%{-ms-transform:translateY(0)} - 20%{opacity:1;-ms-transform:translateY(-20px)} - 100%{opacity:0;-ms-transform:translateY(100px)} -} -@keyframes bounceoutB{ - 0%{transform:translateY(0)} - 20%{opacity:1;transform:translateY(-20px)} - 100%{opacity:0;transform:translateY(100px)} -} -/* 弹出-向左 */ -@-webkit-keyframes bounceoutL{ - 0%{-webkit-transform:translateX(0)} - 20%{opacity:1;-webkit-transform:translateX(20px)} - 100%{opacity:0;-webkit-transform:translateX(-100px)} -} -@-moz-keyframes bounceoutL{ - 0%{-moz-transform:translateX(0)} - 20%{opacity:1;-moz-transform:translateX(20px)} - 100%{opacity:0;-moz-transform:translateX(-100px)} -} -@-ms-keyframes bounceoutL{ - 0%{-ms-transform:translateX(0)} - 20%{opacity:1;-ms-transform:translateX(20px)} - 100%{opacity:0;-ms-transform:translateX(-100px)} -} -@keyframes bounceoutL{ - 0%{transform:translateX(0)} - 20%{opacity:1;transform:translateX(20px)} - 100%{opacity:0;transform:translateX(-200px)} -} -/* 转入 */ -@-webkit-keyframes rotatein{ - 0%{opacity:0;-webkit-transform:rotate(-200deg)} - 100%{opacity:1;-webkit-transform:rotate(0)} -} -@-moz-keyframes rotatein{ - 0%{opacity:0;-moz-transform:rotate(-200deg)} - 100%{opacity:1;-moz-transform:rotate(0)} -} -@-ms-keyframes rotatein{ - 0%{opacity:0;-ms-transform:rotate(-200deg)} - 100%{opacity:1;-ms-transform:rotate(0)} -} -@keyframes rotatein{ - 0%{opacity:0;transform:rotate(-200deg)} - 100%{opacity:1;transform:rotate(0)} -} -/* 转入-从左上 */ -@-webkit-keyframes rotateinLT{ - 0%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(-90deg);opacity:0} - 100%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(0);opacity:1} -} -@-moz-keyframes rotateinLT{ - 0%{-moz-transform-origin:left bottom;-moz-transform:rotate(-90deg);opacity:0} - 100%{-moz-transform-origin:left bottom;-moz-transform:rotate(0);opacity:1} -} -@-ms-keyframes rotateinLT{ - 0%{-ms-transform-origin:left bottom;-ms-transform:rotate(-90deg);opacity:0} - 100%{-ms-transform-origin:left bottom;-ms-transform:rotate(0);opacity:1} -} -@keyframes rotateinLT{ - 0%{transform-origin:left bottom;transform:rotate(-90deg);opacity:0} - 100%{transform-origin:left bottom;transform:rotate(0);opacity:1} -} -/* 转入-从左下 */ -@-webkit-keyframes rotateineftB{ - 0%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(90deg);opacity:0} - 100%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(0);opacity:1} -} -@-moz-keyframes rotateineftB{ - 0%{-moz-transform-origin:left bottom;-moz-transform:rotate(90deg);opacity:0} - 100%{-moz-transform-origin:left bottom;-moz-transform:rotate(0);opacity:1} -} -@-ms-keyframes rotateineftB{ - 0%{-ms-transform-origin:left bottom;-ms-transform:rotate(90deg);opacity:0} - 100%{-ms-transform-origin:left bottom;-ms-transform:rotate(0);opacity:1} -} -@keyframes rotateineftB{ - 0%{transform-origin:left bottom;transform:rotate(90deg);opacity:0} - 100%{transform-origin:left bottom;transform:rotate(0);opacity:1} -} -/* 转入-从右上 */ -@-webkit-keyframes rotateinRT{ - 0%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(90deg);opacity:0} - 100%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(0);opacity:1} -} -@-moz-keyframes rotateinRT{ - 0%{-moz-transform-origin:right bottom;-moz-transform:rotate(90deg);opacity:0} - 100%{-moz-transform-origin:right bottom;-moz-transform:rotate(0);opacity:1} -} -@-ms-keyframes rotateinRT{ - 0%{-ms-transform-origin:right bottom;-ms-transform:rotate(90deg);opacity:0} - 100%{-ms-transform-origin:right bottom;-ms-transform:rotate(0);opacity:1} -} -@keyframes rotateinRT{ - 0%{transform-origin:right bottom;transform:rotate(90deg);opacity:0} - 100%{transform-origin:right bottom;transform:rotate(0);opacity:1} -} -/* 转入-从右下*/ -@-webkit-keyframes rotateinRB{ - 0%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(-90deg);opacity:0} - 100%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(0);opacity:1} -} -@-moz-keyframes rotateinRB{ - 0%{-moz-transform-origin:right bottom;-moz-transform:rotate(-90deg);opacity:0} - 100%{-moz-transform-origin:right bottom;-moz-transform:rotate(0);opacity:1} -} -@-ms-keyframes rotateinRB{ - 0%{-ms-transform-origin:right bottom;-ms-transform:rotate(-90deg);opacity:0} - 100%{-ms-transform-origin:right bottom;-ms-transform:rotate(0);opacity:1} -} -@keyframes rotateinRB{ - 0%{transform-origin:right bottom;transform:rotate(-90deg);opacity:0} - 100%{transform-origin:right bottom;transform:rotate(0);opacity:1} -} -/* 转出 */ -@-webkit-keyframes rotateout{ - 0%{-webkit-transform-origin:center center;-webkit-transform:rotate(0);opacity:1} - 100%{-webkit-transform-origin:center center;-webkit-transform:rotate(200deg);opacity:0} -} -@-moz-keyframes rotateout{ - 0%{-moz-transform-origin:center center;-moz-transform:rotate(0);opacity:1} - 100%{-moz-transform-origin:center center;-moz-transform:rotate(200deg);opacity:0} -} -@-ms-keyframes rotateout{ - 0%{-ms-transform-origin:center center;-ms-transform:rotate(0);opacity:1} - 100%{-ms-transform-origin:center center;-ms-transform:rotate(200deg);opacity:0} -} -@keyframes rotateout{ - 0%{transform-origin:center center;transform:rotate(0);opacity:1} - 100%{transform-origin:center center;transform:rotate(200deg);opacity:0} -} -/* 转出-向左上 */ -@-webkit-keyframes rotateoutLT{ - 0%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(0);opacity:1} - 100%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(-90deg);opacity:0} -} -@-moz-keyframes rotateoutLT{ - 0%{-moz-transform-origin:left bottom;-moz-transform:rotate(0);opacity:1} - 100%{-moz-transform-origin:left bottom;-moz-transform:rotate(-90deg);opacity:0} -} -@-ms-keyframes rotateoutLT{ - 0%{-ms-transform-origin:left bottom;-ms-transform:rotate(0);opacity:1} - 100%{-ms-transform-origin:left bottom;-ms-transform:rotate(-90deg);opacity:0} -} -@keyframes rotateoutLT{ - 0%{transform-origin:left bottom;transform:rotate(0);opacity:1} - 100%{transform-origin:left bottom;transform:rotate(-90deg);opacity:0} -} -/* 转出-向左下 */ -@-webkit-keyframes rotateoutLB{ - 0%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(0);opacity:1} - 100%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(90deg);opacity:0} -} -@-moz-keyframes rotateoutLB{ - 0%{-moz-transform-origin:left bottom;-moz-transform:rotate(0);opacity:1} - 100%{-moz-transform-origin:left bottom;-moz-transform:rotate(90deg);opacity:0} -} -@-ms-keyframes rotateoutLB{ - 0%{-ms-transform-origin:left bottom;-ms-transform:rotate(0);opacity:1} - 100%{-ms-transform-origin:left bottom;-ms-transform:rotate(90deg);opacity:0} -} -@keyframes rotateoutLB{ - 0%{transform-origin:left bottom;transform:rotate(0);opacity:1} - 100%{transform-origin:left bottom;transform:rotate(90deg);opacity:0} -} -/* 转出-向右上 */ -@-webkit-keyframes rotateoutRT{ - 0%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(0);opacity:1} - 100%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(90deg);opacity:0} -} -@-moz-keyframes rotateoutRT{ - 0%{-moz-transform-origin:right bottom;-moz-transform:rotate(0);opacity:1} - 100%{-moz-transform-origin:right bottom;-moz-transform:rotate(90deg);opacity:0} -} -@-ms-keyframes rotateoutRT{ - 0%{-ms-transform-origin:right bottom;-ms-transform:rotate(0);opacity:1} - 100%{-ms-transform-origin:right bottom;-ms-transform:rotate(90deg);opacity:0} -} -@keyframes rotateoutRT{ - 0%{transform-origin:right bottom;transform:rotate(0);opacity:1} - 100%{transform-origin:right bottom;transform:rotate(90deg);opacity:0} -} -/* 转出-向右下 */ -@-webkit-keyframes rotateoutBR{ - 0%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(0);opacity:1} - 100%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(-90deg);opacity:0} -} -@-moz-keyframes rotateoutBR{ - 0%{-moz-transform-origin:right bottom;-moz-transform:rotate(0);opacity:1} - 100%{-moz-transform-origin:right bottom;-moz-transform:rotate(-90deg);opacity:0} -} -@-ms-keyframes rotateoutBR{ - 0%{-ms-transform-origin:right bottom;-ms-transform:rotate(0);opacity:1} - 100%{-ms-transform-origin:right bottom;-ms-transform:rotate(-90deg);opacity:0} -} -@keyframes rotateoutBR{ - 0%{transform-origin:right bottom;transform:rotate(0);opacity:1} - 100%{transform-origin:right bottom;transform:rotate(-90deg);opacity:0} -} -/* 翻转 */ -@-webkit-keyframes flip{ - 0%{-webkit-transform:perspective(400px) rotateY(0);-webkit-animation-timing-function:ease-out} - 40%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(170deg);-webkit-animation-timing-function:ease-out} - 50%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);-webkit-animation-timing-function:ease-in} - 80%{-webkit-transform:perspective(400px) rotateY(360deg) scale(0.95);-webkit-animation-timing-function:ease-in} - 100%{-webkit-transform:perspective(400px) scale(1);-webkit-animation-timing-function:ease-in} -} -@-moz-keyframes flip{ - 0%{-moz-transform:perspective(400px) rotateY(0);-moz-animation-timing-function:ease-out} - 40%{-moz-transform:perspective(400px) translateZ(150px) rotateY(170deg);-moz-animation-timing-function:ease-out} - 50%{-moz-transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);-moz-animation-timing-function:ease-in} - 80%{-moz-transform:perspective(400px) rotateY(360deg) scale(0.95);-moz-animation-timing-function:ease-in} - 100%{-moz-transform:perspective(400px) scale(1);-moz-animation-timing-function:ease-in} -} -@-ms-keyframes flip{ - 0%{-ms-transform:perspective(400px) rotateY(0);-ms-animation-timing-function:ease-out} - 40%{-ms-transform:perspective(400px) translateZ(150px) rotateY(170deg);-ms-animation-timing-function:ease-out} - 50%{-ms-transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);-ms-animation-timing-function:ease-in} - 80%{-ms-transform:perspective(400px) rotateY(360deg) scale(0.95);-ms-animation-timing-function:ease-in} - 100%{-ms-transform:perspective(400px) scale(1);-ms-animation-timing-function:ease-in} -} -@keyframes flip{ - 0%{transform:perspective(400px) rotateY(0);animation-timing-function:ease-out} - 40%{transform:perspective(400px) translateZ(150px) rotateY(170deg);animation-timing-function:ease-out} - 50%{transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);animation-timing-function:ease-in} - 80%{transform:perspective(400px) rotateY(360deg) scale(0.95);animation-timing-function:ease-in} - 100%{transform:perspective(400px) scale(1);animation-timing-function:ease-in} -} -/* 翻入-X轴 */ -@-webkit-keyframes flipinX{ - 0%{-webkit-transform:perspective(400px) rotateX(90deg);opacity:0} - 40%{-webkit-transform:perspective(400px) rotateX(-10deg)} - 70%{-webkit-transform:perspective(400px) rotateX(10deg)} - 100%{-webkit-transform:perspective(400px) rotateX(0);opacity:1} -} -@-moz-keyframes flipinX{ - 0%{-moz-transform:perspective(400px) rotateX(90deg);opacity:0} - 40%{-moz-transform:perspective(400px) rotateX(-10deg)} - 70%{-moz-transform:perspective(400px) rotateX(10deg)} - 100%{-moz-transform:perspective(400px) rotateX(0);opacity:1} -} -@-ms-keyframes flipinX{ - 0%{-ms-transform:perspective(400px) rotateX(90deg);opacity:0} - 40%{-ms-transform:perspective(400px) rotateX(-10deg)} - 70%{-ms-transform:perspective(400px) rotateX(10deg)} - 100%{-ms-transform:perspective(400px) rotateX(0);opacity:1} -} -@keyframes flipinX{ - 0%{transform:perspective(400px) rotateX(90deg);opacity:0} - 40%{transform:perspective(400px) rotateX(-10deg)} - 70%{transform:perspective(400px) rotateX(10deg)} - 100%{transform:perspective(400px) rotateX(0);opacity:1} -} -/* 翻入-Y轴 */ -@-webkit-keyframes flipinY{ - 0%{-webkit-transform:perspective(400px) rotateY(90deg);opacity:0} - 40%{-webkit-transform:perspective(400px) rotateY(-10deg)} - 70%{-webkit-transform:perspective(400px) rotateY(10deg)} - 100%{-webkit-transform:perspective(400px) rotateY(0);opacity:1} -} -@-moz-keyframes flipinY{ - 0%{-moz-transform:perspective(400px) rotateY(90deg);opacity:0} - 40%{-moz-transform:perspective(400px) rotateY(-10deg)} - 70%{-moz-transform:perspective(400px) rotateY(10deg)} - 100%{-moz-transform:perspective(400px) rotateY(0);opacity:1} -} -@-ms-keyframes flipinY{ - 0%{-ms-transform:perspective(400px) rotateY(90deg);opacity:0} - 40%{-ms-transform:perspective(400px) rotateY(-10deg)} - 70%{-ms-transform:perspective(400px) rotateY(10deg)} - 100%{-ms-transform:perspective(400px) rotateY(0);opacity:1} -} -@keyframes flipinY{ - 0%{transform:perspective(400px) rotateY(90deg);opacity:0} - 40%{transform:perspective(400px) rotateY(-10deg)} - 70%{transform:perspective(400px) rotateY(10deg)} - 100%{transform:perspective(400px) rotateY(0);opacity:1} -} -/* 翻出-X轴 */ -@-webkit-keyframes flipoutX{ - 0%{-webkit-transform:perspective(400px) rotateX(0);opacity:1} - 100%{-webkit-transform:perspective(400px) rotateX(90deg);opacity:0} -} -@-moz-keyframes flipoutX{ - 0%{-moz-transform:perspective(400px) rotateX(0);opacity:1} - 100%{-moz-transform:perspective(400px) rotateX(90deg);opacity:0} -} -@-ms-keyframes flipoutX{ - 0%{-ms-transform:perspective(400px) rotateX(0);opacity:1} - 100%{-ms-transform:perspective(400px) rotateX(90deg);opacity:0} -} -@keyframes flipoutX{ - 0%{transform:perspective(400px) rotateX(0);opacity:1} - 100%{transform:perspective(400px) rotateX(90deg);opacity:0} -} -/* 翻出-Y轴 */ -@-webkit-keyframes flipoutY{ - 0%{-webkit-transform:perspective(400px) rotateY(0);opacity:1} - 100%{-webkit-transform:perspective(400px) rotateY(90deg);opacity:0} -} -@-moz-keyframes flipoutY{ - 0%{-moz-transform:perspective(400px) rotateY(0);opacity:1} - 100%{-moz-transform:perspective(400px) rotateY(90deg);opacity:0} -} -@-ms-keyframes flipoutY{ - 0%{-ms-transform:perspective(400px) rotateY(0);opacity:1} - 100%{-ms-transform:perspective(400px) rotateY(90deg);opacity:0} -} -@keyframes flipoutY{ - 0%{transform:perspective(400px) rotateY(0);opacity:1} - 100%{transform:perspective(400px) rotateY(90deg);opacity:0} -} -/* 闪烁 */ -@-webkit-keyframes flash{ - 0%,50%,100%{opacity:1} - 25%,75%{opacity:0} -} -@-moz-keyframes flash{ - 0%,50%,100%{opacity:1} - 25%,75%{opacity:0} -} -@-ms-keyframes flash{ - 0%,50%,100%{opacity:1} - 25%,75%{opacity:0} -} -@keyframes flash{ - 0%,50%,100%{opacity:1} - 25%,75%{opacity:0} -} -/* 震颤 */ -@-webkit-keyframes shake{ - 0%,100%{-webkit-transform:translateX(0)} - 10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px)} - 20%,40%,60%,80%{-webkit-transform:translateX(10px)} -} -@-moz-keyframes shake{ - 0%,100%{-moz-transform:translateX(0)} - 10%,30%,50%,70%,90%{-moz-transform:translateX(-10px)} - 20%,40%,60%,80%{-moz-transform:translateX(10px)} -} -@-ms-keyframes shake{ - 0%,100%{-ms-transform:translateX(0)} - 10%,30%,50%,70%,90%{-ms-transform:translateX(-10px)} - 20%,40%,60%,80%{-ms-transform:translateX(10px)} -} -@keyframes shake{ - 0%,100%{transform:translateX(0)} - 10%,30%,50%,70%,90%{transform:translateX(-10px)} - 20%,40%,60%,80%{transform:translateX(10px)} -} -/* 摇摆 */ -@-webkit-keyframes swing{ - 20%{-webkit-transform:rotate(15deg)} - 40%{-webkit-transform:rotate(-10deg)} - 60%{-webkit-transform:rotate(5deg)} - 80%{-webkit-transform:rotate(-5deg)} - 100%{-webkit-transform:rotate(0)} -} -@-moz-keyframes swing{ - 20%{-moz-transform:rotate(15deg)} - 40%{-moz-transform:rotate(-10deg)} - 60%{-moz-transform:rotate(5deg)} - 80%{-moz-transform:rotate(-5deg)} - 100%{-moz-transform:rotate(0)} -} -@-ms-keyframes swing{ - 20%{-ms-transform:rotate(15deg)} - 40%{-ms-transform:rotate(-10deg)} - 60%{-ms-transform:rotate(5deg)} - 80%{-ms-transform:rotate(-5deg)} - 100%{-ms-transform:rotate(0)} -} -@keyframes swing{ - 20%{transform:rotate(15deg)} - 40%{transform:rotate(-10deg)} - 60%{transform:rotate(5deg)} - 80%{transform:rotate(-5deg)} - 100%{transform:rotate(0)} -} -/* 摇晃 */ -@-webkit-keyframes wobble{ - 0%{-webkit-transform:translateX(0)} - 15%{-webkit-transform:translateX(-100px) rotate(-5deg)} - 30%{-webkit-transform:translateX(80px) rotate(3deg)} - 45%{-webkit-transform:translateX(-65px) rotate(-3deg)} - 60%{-webkit-transform:translateX(40px) rotate(2deg)} - 75%{-webkit-transform:translateX(-20px) rotate(-1deg)} - 100%{-webkit-transform:translateX(0)} -} -@-moz-keyframes wobble{ - 0%{-moz-transform:translateX(0)} - 15%{-moz-transform:translateX(-100px) rotate(-5deg)} - 30%{-moz-transform:translateX(80px) rotate(3deg)} - 45%{-moz-transform:translateX(-65px) rotate(-3deg)} - 60%{-moz-transform:translateX(40px) rotate(2deg)} - 75%{-moz-transform:translateX(-20px) rotate(-1deg)} - 100%{-moz-transform:translateX(0)} -} -@-ms-keyframes wobble{ - 0%{-ms-transform:translateX(0)} - 15%{-ms-transform:translateX(-100px) rotate(-5deg)} - 30%{-ms-transform:translateX(80px) rotate(3deg)} - 45%{-ms-transform:translateX(-65px) rotate(-3deg)} - 60%{-ms-transform:translateX(40px) rotate(2deg)} - 75%{-ms-transform:translateX(-20px) rotate(-1deg)} - 100%{-ms-transform:translateX(0)} -} -@keyframes wobble{ - 0%{transform:translateX(0)} - 15%{transform:translateX(-100px) rotate(-5deg)} - 30%{transform:translateX(80px) rotate(3deg)} - 45%{transform:translateX(-65px) rotate(-3deg)} - 60%{transform:translateX(40px) rotate(2deg)} - 75%{transform:translateX(-20px) rotate(-1deg)} - 100%{transform:translateX(0)} -} -/* 震铃 */ -@-webkit-keyframes ring{ - 0%{-webkit-transform:scale(1)} - 10%,20%{-webkit-transform:scale(0.9) rotate(-3deg)} - 30%,50%,70%,90%{-webkit-transform:scale(1.1) rotate(3deg)} - 40%,60%,80%{-webkit-transform:scale(1.1) rotate(-3deg)} - 100%{-webkit-transform:scale(1) rotate(0)} -} -@-moz-keyframes ring{ - 0%{-moz-transform:scale(1)} - 10%,20%{-moz-transform:scale(0.9) rotate(-3deg)} - 30%,50%,70%,90%{-moz-transform:scale(1.1) rotate(3deg)} - 40%,60%,80%{-moz-transform:scale(1.1) rotate(-3deg)} - 100%{-moz-transform:scale(1) rotate(0)} -} -@-ms-keyframes ring{ - 0%{-ms-transform:scale(1)} - 10%,20%{-ms-transform:scale(0.9) rotate(-3deg)} - 30%,50%,70%,90%{-ms-transform:scale(1.1) rotate(3deg)} - 40%,60%,80%{-ms-transform:scale(1.1) rotate(-3deg)} - 100%{-ms-transform:scale(1) rotate(0)} -} -@keyframes ring{ - 0%{transform:scale(1)} - 10%,20%{transform:scale(0.9) rotate(-3deg)} - 30%,50%,70%,90%{transform:scale(1.1) rotate(3deg)} - 40%,60%,80%{transform:scale(1.1) rotate(-3deg)} - 100%{transform:scale(1) rotate(0)} -} -/*4.1 按钮组 - Name: mod_btn-group - Example: -
                                  - 左边按钮 - 中间按钮 - 中间按钮 - 右边按钮 -
                                  - Explain: -*/ -.btn-group{ font-size:0} -.btn-group .btn{ margin-left:-1px} -.btn-group .btn:not(:first-child):not(:last-child):not(.dropdown-toggle){ border-radius:0} -.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius: 0;border-top-right-radius: 0} -.btn-group > .btn:last-child:not(:first-child),.btn-group > .dropdown-toggle:not(:first-child) {border-bottom-left-radius: 0;border-top-left-radius: 0} - -/*4.2.1 导航条 - Name: mod_nav - Example: - - Explain: 鼠标经过状态a:hover,当前选中状态li:current。 -*/ -/*导航条*/ -.navbar-wrapper{ height: 45px} -.navbar{ position:relative; z-index:1030; background-color: #fff} -.navbar-black{ background-color: #222} -.navbar-fixed-top{ position:fixed; top:0;left: 0; right: 0; z-index:1030} - - /*logo*/ - .logo{ display:inline-block; text-decoration:none; cursor:pointer; background-repeat: no-repeat; background-position: left center; background-size: auto 100%} - a.logo:hover{ text-decoration:none} - .navbar .logo{height: 44px;line-height: 44px;margin-right: 10px;float: left} - .navbar-logo,.navbar-logo-m{font-size: 16px} - .navbar-slogan{ font-size:12px; cursor: default} - .navbar .container{ position:relative} - .navbar .container .navbar-userbar{ right:0px} - /*导航*/ - .nav{ z-index:1} - .nav > ul{ font-size:0; line-height:0} - .nav > ul > li{ position:relative; float:left} - .nav > ul > li,.nav > ul > li > a{ display:inline-block;text-align:center} - .nav > ul > li > a{ padding:0 20px} - .nav > ul > li > a:hover,.nav > ul > li.current > a{background-color:rgba(255,255,255,0.2); text-decoration:none; - -webkit-transition: background-color 0.3s ease 0s; - -moz-transition: background-color 0.3s ease 0s; - -o-transition: background-color 0.3s ease 0s; - -ms-transition: background-color 0.3s ease 0s; - transition: background-color 0.3s ease 0s - } - .navbar-nav > ul > li,.navbar-nav > ul > li > a{line-height:44px;font-size:14px} - @media (max-width: 767px) { - .navbar-wrapper{ height: 45px!important} - .logo{ margin-right: 0} - .navbar .logo{height: 44px!important;line-height: 44px!important} - .navbar-nav{display: none; float: none!important} - .navbar-nav > ul > li{ width: 100%; text-align: left; border-bottom: solid 1px #eee} - .navbar-nav > ul > li > a{display:block;padding:0 15px; text-align: left} - .navbar-nav > ul > li.dropDown.open > .dropDown-menu{ display: none} - .navbar-nav > ul > li.dropDown > .dropDown_A > .Hui-iconfont{ display: none} - .navbar-nav > ul > li, - .navbar-nav > ul > li > a{height: 44px!important;line-height: 44px!important} - - .nav-collapse > ul,.nav-collapse > ul >li {width: 100%;display: block} - .js .nav-collapse {position: absolute;display: block;float:none; clear:both;max-height: 0;clip: rect(0 0 0 0);margin-left: -15px; margin-right: -15px;overflow: hidden; - -webkt-transition:max-height 284ms ease 0s; - -moz-transition:max-height 284ms ease 0s; - -o-transition:max-height 284ms ease 0s; - -ms-transition:max-height 284ms ease 0s; - transition:max-height 284ms ease 0s} - .js-nav-active .nav-collapse.closed {max-height: none} - .nav-collapse.opened {max-height: 9999px} - - } - -/*导航条风格-黑色*/ -.navbar-black{background-color:#222;border-bottom:#080808 1px solid;-moz-box-shadow: 0 0 4px #333333;-webkit-box-shadow: 0 0 4px #333333;box-shadow: 0 0 4px #333333} -.navbar-black .logo{ color: #fff } -.navbar-black .navbar-logo-m{color: #eee} -.navbar-black .navbar-nav > ul > li, -.navbar-black .navbar-nav > ul > li > a{ color:#fff} -.navbar-black .navbar-nav > ul > li > a:hover, -.navbar-black .navbar-nav > ul > li.current > a{color:#fff} -.navbar-black .navbar-userbar{ color: #fff} -@media (max-width: 767px) { - .navbar-black .navbar-nav > ul > li{border-bottom: solid 1px #222} - .navbar-black .navbar-nav > ul > li > a:hover, - .navbar-black .navbar-nav > ul > li.current > a{ background: #777} -} - - /*面包导航*/ - .nav-toggle,a.nav-toggle{position:absolute; top:0px; right:15px; font-size: 20px; color:#999; padding:6px 11px;background-color:rgba(0,0,0,0.5);color:#fff;-webkit-tap-highlight-color: rgba(0,0,0,0); - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - -o-user-select: none; - user-select: none} - .nav-toggle:hover,a.nav-toggle:hover{ text-decoration: none; color:#fff} - -/*2.1.9 版本之前的导航条代码*/ -.mainnav{z-index:1;background-color:#222}/*导航条背景*/ -.mainnav > ul{ font-size: 0; line-height: 0} -.mainnav > ul > li, -.mainnav > ul > li > a{height:40px;line-height:40px}/*导航条高度*/ -.mainnav > ul > li{display:inline-block;color:#fff;font-size:14px;font-weight:bold}/*设置字体*/ -.mainnav > ul > li > a{display:inline-block;padding:0 20px;color:#fff;text-align:center}/*链接颜色*/ -.mainnav > ul > li > a:hover, -.mainnav > ul > li.current > a{color:#fff;text-decoration:none; background-color:#000;-webkit-transition: background-color 0.3s ease 0s; -moz-transition: background-color 0.3s ease 0s; -o-transition: background-color 0.3s ease 0s; -ms-transition: background-color 0.3s ease 0s;transition: background-color 0.3s ease 0s}/*交互颜色*/ - -.Hui-nav-toggle,a.Hui-nav-toggle{position:absolute; top:0px; right:15px; font-size: 20px; color:#999; padding:6px 11px;background-color:rgba(0,0,0,0.5);color:#fff} -.Hui-nav-toggle:hover,a.Hui-nav-toggle:hover{ text-decoration: none; color:#fff} -@media (max-width: 767px) { - .mainnav > ul > li{font-size:1.125em} -} -@media (max-width: 480px) { - .mainnav > ul > li{text-align:center} - .mainnav > ul > li{width:20%} - .mainnav > ul > li > a{padding:0;padding:0;display:block} -} -/*4.2.2 面包屑导航 - Name: mod_breadcrumb - Example: - -*/ -.breadcrumb{border-bottom: 1px solid #E5E5E5;line-height: 39px; height:39px;overflow:hidden} -.breadcrumb span{padding:0 5px} -@media (max-width: 767px) { - .breadcrumb > .container{padding: 0} -} -/*4.2.3 翻页导航 - Name: mod_pageNav - Example: - Explain: 需要调用pagenav.cn.js - -*/ -.pageNav{float:none;clear:both;font-size:0;font-family:Arial,Helvetica,sans-serif;padding:18px 0;text-align:center} -.pageNav span,.pageNav a,.pageNav b{font-size:14px;margin-right:5px;overflow:hidden;padding:3px 8px} -.pageNav a{border:1px solid #CCDBE4;cursor:pointer} -.pageNav b{color:#000} -.pageNav .mor{padding:3px;font-weight:bold} - -/*4.2.4 顶部导航 - Name: mod_topnav - Sample: -
                                  您好,欢迎来到Hui!
                                  - -*/ -.topnav{height:30px;line-height:30px;background-color;#f7f7f7;border-bottom:1px solid #EBEBEB; font-size:12px} -.topbar{background-color: #ECECEC;border-bottom:1px solid #ddd} -.topbar a{margin-right:5px} -.r_nav{display:inline-block; color:#999} - -/*4.2.5 向导 - Name: mod_steps - Sample: -
                                  - 第一步 - 第二步 - 第三步 - 第四步 -
                                  -*/ -.steps,.step{display:inline-block;position:relative;padding:1em 2em 1em 3em;vertical-align:top;background-color:#FFF;color:#888; - -webkit-box-sizing:border-box; - -moz-box-sizing:border-box; - -ms-box-sizing:border-box; - box-sizing:border-box -} -.step:after,.steps .step:after{position:absolute;z-index:2;content:'';top:0;right:-1.45em;border-bottom:1.5em solid transparent;border-left:1.5em solid #FFF;border-top:1.5em solid transparent;width:0;height:0} -.step,.steps .step,.steps .step:after{ - -webkit-transition:opacity .1s ease,color .1s ease,-webkit-box-shadow .1s ease; - transition:opacity .1s ease,color .1s ease,box-shadow .1s ease -} -.steps{cursor:pointer;display:inline-block;font-size:0;box-shadow:0 0 0 1px rgba(0,0,0,.1);border-radius:.3125rem;line-height:1; - -webkit-box-sizing:border-box; - -moz-box-sizing:border-box; - -ms-box-sizing:border-box; - box-sizing:border-box} -.steps .step:first-child{padding-left:1.35em;border-radius:.3125em 0 0 .3125em} -.steps .step:last-child{border-radius:0 .3125em .3125em 0} -.steps .step:only-child{border-radius:.3125em} -.steps .step:last-child{margin-right:0} -.steps .step:last-child:after{display:none} -.step:hover,.step.hover{background-color:#F7F7F7;color:rgba(0,0,0,.8)} -.steps .step.hover:after, -.steps .step:hover:after, -.step:hover, -.step.hover::after{border-left-color:#F7F7F7} -.steps .step.down, -.steps .step:active, -.step.down, -.step:active{background-color:#F0F0F0} -.steps .step.down:after, -.steps .step:active:after, -.steps.down::after, -.steps:active::after{border-left-color:#F0F0F0} -.steps .step.active, -.active.step{cursor:auto;background-color:#428BCA;color:#FFF;font-weight:700}.steps .step.active:after,.active.steps:after{border-left-color:#428BCA} -.steps .disabled.step, -.disabled.step{cursor:auto;background-color:#FFF;color:#CBCBCB} -.disabled.step:after{border:0;background-color:#FFF;top:.42em;right:-1em;width:2.15em;height:2.15em; - -webkit-transform:rotate(-45deg); - -ms-transform:rotate(-45deg); - transform:rotate(-45deg); - box-shadow:-1px -1px 0 0 rgba(0,0,0,.1) inset -} -.attached.steps{margin:0;border-radius:.3125em .3125em 0 0} -.attached.steps .step:first-child{border-radius:.3125em 0 0} -.attached.steps .step:last-child{border-radius:0 .3125em 0 0} -.bottom.attached.steps{margin-top:-1px;border-radius:0 0 .3125em .3125em} -.bottom.attached.steps .step:first-child{border-radius:0 0 0 .3125em} -.bottom.attached.steps .step:last-child{border-radius:0 0 .3125em} - -/*向导数量*/ -.one.steps,.two.steps,.three.steps,.four.steps,.five.steps,.six.steps,.seven.steps,.eight.steps{display:block} -.one.steps > .step{width:100%} -.two.steps > .step{width:50%} -.three.steps > .step{width:33.333%} -.four.steps > .step{width:25%} -.five.steps > .step{width:20%} -.six.steps > .step{width:16.666%} -.seven.steps > .step{width:14.285%} -.eight.steps > .step{width:12.5%} - -/*向导尺寸*/ -.small.step,.small.steps .step{font-size:.8rem}/*小*/ -.step,.steps .step{font-size:1rem}/*默认*/ -.large.step,.large.steps .step{font-size:1.25rem}/*大*/ - -/*兼容写法 - Sample: - -*/ -.steps-ie,.step-ie,.step-ie .arrow{height:44px; line-height:44px} -.steps-ie{background-color:#eaf4fd; border:solid 1px #afcfcc} -.step-ie{position:relative;display:inline-block; float:left; cursor:pointer; padding:0 20px 0 40px; background:url(../images/steps/step_bg.png) repeat-x 0 center} -.step-ie .arrow{position:absolute;right:-21px; top:0; width:21px; height:44px; display:block; cursor:pointer; background:url(../images/steps/step_arrow.png) no-repeat 0 center;z-index:50} -.step-ie.active{background-image:url(../images/steps/step_bg-active.png); color:#fff; z-index:100} -.step-ie.active .arrow{background-image:url(../images/steps/step_arrow-active.png)} - -/*4.2.6 竖向导向tab导航 - Sample: - -*/ -.verticalTab{background:#fff url(../images/verticalTab/tab_bg.png) repeat-y 0 0; width:38px} -.verticalTab a{position:relative; display:block; width:18px; height:auto; text-align:center; position:relative; padding:26px 10px 6px 10px; background:url(../images/verticalTab/tabNav.png) no-repeat 0 0} -.verticalTab a em{position:absolute; left:0; bottom:-20px; width:38px; height:20px; background:url(../images/tabNav_right.png) no-repeat 0 0; z-index:50} -.verticalTab a.active{background-image:url(../images/verticalTab/tabNav-active.png); color:#fff; z-index:99} -.verticalTab a.active em{background-image:url(../images/verticalTab/tabNav_right-active.png)} - -/*4.2.6 横向导向tab导航 - Sample: -
                                    -
                                  • 导航一
                                  • -
                                  • 导航二
                                  • -
                                  • 导航三
                                  • -
                                  -*/ -.acrossTab,.acrossTab li,.acrossTab li em{ background-image:url(../images/acrossTab/acrossTab-bg.png)} -.acrossTab{height:29px; background-repeat: repeat-x; background-position: 0 0; padding-top:1px} -.acrossTab li,.acrossTab li em{ background-repeat:no-repeat; background-position:0 0} -.acrossTab li{position:relative;float:left; display:inline-block; height:29px; line-height:29px; font-size:12px;cursor:pointer;padding:0 30px; white-space:nowrap;color:#282828; background-position:0 0} -.acrossTab li em{position:absolute; width:23px;height:29px;right:-20px; top:0;z-index:50; background-position:right -30px} -.acrossTab li:hover{background-position:0 -60px} -.acrossTab li:hover em{background-position:right -90px} -.acrossTab li.active{background-position:0 -120px; z-index:99} -.acrossTab li.active em{background-position:right -150px} -.acrossTab li i{position:absolute; display:block; width:13px; height:13px; top:50%; margin-top:-6px; right:5px; font-size:0; line-height:0; cursor:pointer; background-image:url(../images/acrossTab/acrossTab-close.png); background-repeat:no-repeat; background-position:0 0} -.acrossTab li i:hover{background-position:0 bottom} - -/*4.3.1 下拉菜单 - Name: mod_dropDown - Example: - - 下拉菜单 - - - Explain: 如需要在不同的地方显示不同的样式,请在 追加class,采用覆盖的方式重写默认样式。 - -*/ -.dropDown{display:inline-block} -.dropDown_A{display:inline-block} -.dropDown-menu{ display:none;transition: all 0.3s ease 0s} -.dropDown:focus,.dropDown-menu:focus {outline:0} -.dropDown-menu li.arrow{ position:absolute;display:block; width:12px; height:8px; margin-top:-13px; margin-left:20%; line-height:0;background:url(../images/dropDown/icon-jt.png) no-repeat 0 0} -/*鼠标经过*/ -.dropDown.hover .dropDown_A, -.dropDown.open .dropDown_A{text-decoration:none;background-color:rgba(255,255,255,0.2)} -.dropDown.open .dropDown_A .menu_dropdown-arrow{transition-duration:0.3s ;transition-property:all;_background-position:0 0;transform: rotate(180deg)} - -.menu{background-color:#fff;border:solid 1px #f2f2f2; display: inline-block} -.menu.radius{border-top-left-radius:0;border-top-right-radius:0} -.menu.box-shadow{border-top:none} -.menu > li{position:relative; clear:both;* float:left} -.menu > li > a{ display: block;border-bottom:solid 1px #f2f2f2;padding:5px 20px; line-height:1.8;text-align:left;font-weight: normal;white-space:nowrap; vertical-align:top} -.menu > li:last-child > a{ border-bottom:none} -.menu > li > a:hover,.menu > li > a:focus,.menu > li.open > a{ text-decoration:none;background-color:#fafafa} -.menu > li > a .arrow{ position:absolute; top:50%; margin-top:-10px; right:5px;line-height: 20px; height: 20px; color: #999} -.menu > li > .menu{ display: none} -.menu > li.open > .menu{ display: inline-block;position: absolute; left:100%;top:-1px;min-width:100%} - -/*禁用菜单*/ -.menu > li.disabled > a{color:#999;text-decoration:none; cursor:no-drop; background-color:transparent} -/*线条*/ -.menu > li.divider{ display:block;height:0px; line-height:0px;margin:9px 0;overflow:hidden; border-top:solid 1px #eee} - -/*打开菜单*/ -.dropDown > .dropDown-menu{ display: none} -.dropDown.open{position:relative;z-index:990} -/*默认左对齐*/ -.dropDown.open > .dropDown-menu{position:absolute;z-index:1000;display:inline-block;top:100%;left:-1px;min-width:100%;background-color:#fff;border:solid 1px #f2f2f2} -/*右对齐*/ -.dropDown.open.right > .dropDown-menu{right:-1px!important;left:auto!important} - -/*4.4 幻灯片 - Name: module_slider - Sample: -
                                  -
                                  -
                                  -
                                    -
                                  • -
                                  • -
                                  • -
                                  -
                                  -
                                    -
                                  1. 1
                                  2. -
                                  3. 2
                                  4. -
                                  5. 3
                                  6. -
                                  -
                                  -
                                  - - - Explain: 默认dots为圆点,在slider后面追加numSlider样式就变成带数字的方框,boxSlider为不带数字长方条 -*/ -.slider{position:relative;text-align:center; margin:0 auto;z-index:1} -.slider .bd,.slider .bd li,.slider .bd img{width:100%; height:100%}/*请给每个幻灯片套个div并设置id,通过id重置这个地方的宽度,达到自定义效果*/ -.slider .bd{z-index:2;overflow:hidden} -.slider .bd li{float:left;width: 100%;overflow:hidden; background-position:center; background-repeat:no-repeat} -.slider .bd li a{ display:block; width: 100%; height: 100%} -.slider .bd li img{display:block} -.slider .hd{ position: absolute; z-index: 3; left: 0; right: 0; bottom:10px; padding: 0 10px; text-align: center} -.slider .hd li{display:inline-block;text-align:center;margin-right:10px;cursor:pointer;background-color:#C2C2C2} -.slider .hd li.active{background-color:#222} - /*圆点*/ - .dots li{width:10px; height:10px;font-size:0px;line-height:0px;border-radius:50%} - /*数字*/ - .numbox li{width:20px; height:20px; line-height:20px; font-size:13px;font-family:Arial;font-weight:bold; text-indent:inherit} - .numbox li.active{color:#fff} - /*长方条*/ - .rectangle li{width:40px; height:10px;font-size:0px;line-height:0px} - -.slider-arrow{display:block; position:absolute; top:50%; margin-top:-25px;height: 50px;width: 50px; line-height: 50px; text-align: center; z-index:3;opacity: 0.7;filter: alpha(opacity=70)} -.slider-arrow:hover{opacity: 1;filter: alpha(opacity=100)} -.slider-arrow.prev{left:0px} -.slider-arrow.next{right:0px} - -/*4.5 选项卡 - Name: module_slider - Sample: -
                                  -
                                  选项卡一选项卡二自适应宽度
                                  -
                                  内容一
                                  -
                                  内容二
                                  -
                                  内容三
                                  -
                                  -*/ -.tabBar {border-bottom: 2px solid #222} -.tabBar span {background-color: #e8e8e8;cursor: pointer;display: inline-block;float: left; -font-weight: bold;height: 30px;line-height: 30px;padding: 0 15px} -.tabBar span.current{background-color: #222;color: #fff} -.tabCon {display: none} - -/*4.6 标签与标号 - Name: style_label - Example: 默认 - Explain: .label-default 默认|.label-primary 主要|.label-secondary 次要|.label-success 成功|.label-warning 警告|.label-danger 危险 - - Name: style_badge - Example: 默认 - Explain: .badge-default 默认|.badge-primary 主要|.badge-secondary 次要|.badge-success 成功|.badge-warning 警告|.badge-danger 危险 - -*/ -.label, .badge{display: inline-block;padding:2px 4px;font-size: 11.844px;font-weight: bold;line-height:14px;color: #fff;white-space: nowrap;vertical-align:middle;background-color: #999; overflow: hidden} -/*圆角*/ -.label.radius{border-radius: 3px} -.badge{padding-right:9px;padding-left:9px;border-radius:9px} -.label:empty, .badge:empty{display: none} -a.label:hover, a.label:focus, a.badge:hover, a.badge:focus{color: #fff;text-decoration: none;cursor: pointer} - -/*默认*/ -.label-default, .badge-default{background-color: #e6e6e6; color:#333} -.label-default[href], .badge-default[href]{background-color: #e6e6e6;color:#333} - -/*主要*/ -.label-primary, .badge-primary{background-color: #5a98de} -.label-primary[href], .badge-primary[href]{background-color: #5a98de} - -/*主要*/ -.label-secondary, .badge-secondary{background-color: #3bb4f2} -.label-secondary[href], .badge-secondary[href]{background-color: #3bb4f2} - -/*成功*/ -.label-success, .badge-success{background-color:#5eb95e} -.label-success[href], .badge-success[href]{background-color: #5eb95e} - -/*警告*/ -.label-warning, .badge-warning{background-color: #f37b1d} -.label-warning[href], .badge-warning[href]{background-color: #f37b1d} - -/*危险*/ -.label-danger, .badge-danger{background-color: #dd514c} -.label-danger[href], .badge-danger[href]{background-color: #dd514c} - -/*4.7 缩略图 - Name: style_img - Example: - Explain: 缩略图 删除,转移到3.6 图片中 -*/ - -/*4.8 警告 - Name: mod_Hui-alert - Example: -
                                  - - 警告内容 -
                                    -
                                  • ……
                                  • -
                                  -
                                  - Explain: 警告,使用警告框jQuery插件 -*/ -.Huialert{position:relative;padding:8px 35px 8px 14px;margin-bottom: 20px;text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);background-color: #fcf8e3;border: 1px solid #fbeed5} -.Huialert, .Huialert h4{color: #c09853} -.Huialert h4{margin: 0} -.Huialert .Hui-iconfont{position:absolute;top:9px;right:10px;line-height: 20px;cursor:pointer; color:#000; opacity:0.2;_color:#666} -.Huialert .Hui-iconfont.hover{color:#000;opacity:0.8} -.Huialert-success{color: #468847;background-color: #dff0d8;border-color: #d6e9c6} -.Huialert-success h4{color: #468847} -.Huialert-danger{color: #b94a48;background-color: #f2dede;border-color: #eed3d7} -.Huialert-danger h4{color: #b94a48} -.Huialert-error{color: #fff;background-color: #f37b1d;border-color: #e56c0c} -.Huialert-error h4{color: #fff} -.Huialert-info{color: #31708f;background-color: #d9edf7;border-color: #bce8f1} -.Huialert-info h4{color:#31708f} -.Huialert-block{padding-top: 14px;padding-bottom: 14px} -.Huialert-block > p,.Huialert-block > ul{margin-bottom: 0} -.Huialert-block p + p{margin-top: 5px} - -/*4.9 进度条 loading - Name: mod_progress - Example: -
                                  - Explain: 警告,使用警告框jQuery插件 -*/ -.progress,.progress-bar,.sr-only{height:10px; font-size:0;line-height:0} -.progress{overflow:hidden; width:400px} -.progress.radius{}/*自定义圆角*/ -.progress-bar{width:100%;background-color:#efefef;} -.sr-only{ - display:inline-block; background-color:#337ab7; - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); - -webkit-transition: width .6s ease; - -o-transition: width .6s ease; - transition: width .6s ease; -} -.progress-bar-success .sr-only{ background-color:#5cb85c} -.progress-bar-warning .sr-only{background-color: #f0ad4e} -.progress-bar-danger .sr-only{background-color: #d9534f} - -/*4.10 对话框 - Name: mod_modal - Example: - -*/ -.fade {opacity: 0; - -webkit-transition: opacity .15s linear; - -o-transition: opacity .15s linear; - transition: opacity .15s linear} -.fade.in {opacity: 1} -.modal-open {overflow: hidden} -.modal{ position:fixed; left:0; top:0; right:0; bottom:0; z-index:1040; display:none; overflow:hidden;-webkit-overflow-scrolling:touch; outline:0} -.modal.fade .modal-dialog{ - -webkit-transition: -webkit-transform .3s ease-out; - -o-transition: -o-transform .3s ease-out; - transition: transform .3s ease-out; - -webkit-transform: translate(0,-50%); - -ms-transform: translate(0,-50%); - -o-transform: translate(0,-50%); - transform: translate(0,-50%)} -.modal.in .modal-dialog { - -webkit-transform: translate(0, 0); - -ms-transform: translate(0, 0); - -o-transform: translate(0, 0); - transform: translate(0, 0)} -.modal-open .modal {overflow-x: hidden;overflow-y: auto} - .modal-backdrop {position: fixed;top: 0;right: 0;bottom: 0;left: 0;background-color: #000} - .modal-backdrop.fade {filter: alpha(opacity=0);opacity: 0} - .modal-backdrop.in {filter: alpha(opacity=50);opacity: .5} - .modal-dialog {position: relative;margin:10px} - .modal-content{position: relative;background-color: #fff;border: 1px solid #999;border: 1px solid rgba(0,0,0,.2);outline: 0; - -webkit-background-clip: padding-box; - background-clip: padding-box; - -webkit-box-shadow: 0 3px 9px rgba(0,0,0,.5); - box-shadow: 0 3px 9px rgba(0,0,0,.5)} - - .modal-header {min-height: 16.42857143px;padding: 15px;border-bottom: 1px solid #eee; position:relative} - .modal-header .close{position:absolute; right:15px; top:15px} - .modal-close{position:absolute; right:15px; top:15px;font-size:24px; z-index: 9} - a.modal-close:hover{ text-decoration: none} - .modal-header h3,.modal-header .modal-title{margin:0; padding:10px 0; font-size:16px} - - .modal-body {position:relative;padding:15px;overflow-y:visible;word-break:break-all} - .modal-form {margin-bottom: 0} - - .modal-footer {padding:15px;margin-bottom: 0;text-align: right;background-color: #f5f5f5;border-top: 1px solid #eee;*zoom: 1} - - .modal-footer:before,.modal-footer:after {display: table;content: ""} - .modal-footer:after {clear: both} - .modal-footer .btn + .btn {margin-left: 5px;margin-bottom: 0} - .modal-footer .btn-group .btn + .btn {margin-left: -1px} - .modal-footer .btn-block + .btn-block {margin-left: 0} - .modal-scrollbar-measure {position: absolute;top: -9999px;width: 50px;height: 50px;overflow: scroll} - - .radius .modal-content{ border-radius:6px} - .radius .modal-footer{ border-bottom-left-radius:6px; border-bottom-right-radius:6px} -/*上下居中*/ -.modal.middle .modal-dialog{position:absolute;margin:10px;left:0;right:0;top:50%} -.modal.fade.middle .modal-dialog{ - -webkit-transform: translate(0,-100%); - -ms-transform: translate(0,-100%); - -o-transform: translate(0,-100%); - transform: translate(0,-100%)} -.modal.in.middle .modal-dialog{ - -webkit-transform:translate(0,-50%); - -ms-transform:translate(0,-50%); - -o-transform:translate(0,-50%); - transform:translate(0,-50%) -} - - -@media (min-width: 768px) { - .modal-dialog { width:600px;margin: 30px auto} - .modal.middle .modal-dialog{ margin:10px auto} - .modal-content {-webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);box-shadow: 0 5px 15px rgba(0, 0, 0, .5)} - .modal-sm {width: 300px} -} -@media (min-width: 992px) { - .modal-lg {width: 900px} -} - - - -.modal-alert{position:fixed; right:auto; bottom:auto; width:300px; left:50%;margin-left:-150px; top:50%;margin-top:-30px; z-index:9999;background-color: #fff;border: 1px solid #999;border: 1px solid rgba(0,0,0,.2);outline: 0; --webkit-background-clip: padding-box; - background-clip: padding-box; --webkit-box-shadow: 0 3px 9px rgba(0,0,0,.5); - box-shadow: 0 3px 9px rgba(0,0,0,.5)} - - .modal-alert-info{padding:30px; text-align:center; font-size:14px; background-color:#fff} - - -.loading{height: 50px; width: 50px; background:#fff url(../images/loading/loading-b.gif) no-repeat center} -.mask{position:fixed;top:0;left:0;z-index:999;width:100%;height:100%;background-color:rgba(0,0,0,0.7);-moz-transition:all 0.3s ease-in;-webkit-transition:all 0.3s ease-in;-o-transition:all 0.3s ease-in;transition:all 0.3s ease-in} -* html .mask{position:absolute;left:expression(documentElement.scrollLeft + documentElement.clientWidth - this.offsetWidth);top:expression(documentElement.scrollTop + documentElement.clientHeight - this.offsetHeight)} - -.mask_box{background-image:none;display:none;z-index:99} -.hover .mask_box{position:absolute;bottom:0; left:0;display:block;background-color:rgba(0,0,0,0.3);text-align:left} -.modal-open .dropdown-menu {z-index: 2050} -.modal-open .dropdown.open {*z-index: 2050} -.modal-open .popover {z-index: 2060} -.modal-open .tooltip {z-index: 2070} - -/* //old 版本 - - //当弹出层出现时,隐藏body右侧滚动条 - .modal-open{overflow-x: hidden;overflow-y: auto} - //隐藏body滚动条时,页面偏移 - .page-overflow{margin-right:16px} - //弹出层,绝对定位,默认【宽度500px,高度自适应,背景白色,6px圆角,带阴影】,自定义宽度可在data-width中设置参数 - .modal {position:absolute;top:50%;left:50%; width:500px;margin-left:-250px;z-index:1050;overflow: visible;background-color: #fff;background-clip: padding-box; - box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - -webkit-background-clip:padding-box; - -khtml-background-clip:padding-box; - -moz-background-clip:padding-box; - -ms-background-clip:padding-box; - -o-background-clip:padding-box; - background-clip:padding-box; - border-radius:6px; - border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999} - - //弹出层进入动画效果 - .modal.fade {top: -100%} - //弹出层进入后居顶距离,配合margin-top负值,实现上下自动居中 - .modal.fade.in{top:50%} - //如果弹出层高度大于窗口,弹出窗口距顶0像素 - .modal.modal-overflow.fade.in{top:0} - - //隐藏body滚动条时,页面偏移 - .page-overflow{margin-right:16px} - - //弹出层的最外层,全屏,用户响应点击和滚动 - .modal-scrollable{position:fixed;top:0;right:0;bottom:0;left:0;overflow: auto} - - //弹窗超出屏幕高度时,弹出层替代body右侧滚动条,实现弹出层的整体滚动 - .modal-overflow .modal-scrollable{overflow-y:scroll} - - //默认遮罩层,全屏黑色 - .modal-backdrop {position:fixed;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:1040;background-color:#000} - //解决IE下 遮罩层兼容性 - * html .modal-backdrop{position:absolute;left:expression(documentElement.scrollLeft + documentElement.clientWidth - this.offsetWidth);top:expression(documentElement.scrollTop + documentElement.clientHeight - this.offsetHeight)} - - //遮罩层失去时,透明度为0 - .modal-backdrop.fade {opacity:0;filter: alpha(opacity=0)} - - //遮罩层进入 0.7透明度 - .modal-backdrop,.modal-backdrop.fade.in {opacity: 0.7;filter: alpha(opacity=70)} - - //Ajax加载数据时loading - .loading-spinner {position: absolute;top: 50%;left: 50%;margin: -12px 0 0 -12px} - - //弹出层header区 - //弹出层头部 - .modal-header {padding: 9px 15px;border-bottom: 1px solid #eee; position:relative} - //关闭按钮,请调用4.1.1 按钮 .close - .modal-header .close{position:absolute; right:10px; top:10px} - //标题 - .modal-header h3{margin:0; padding:10px 0; font-size:16px} - - //内容不限高度,内填充15px,不满意可自行修改 - .modal-body {overflow-y:visible;padding: 15px; word-break:break-all} - //弹出层表单 - .modal-form {margin-bottom: 0} - //弹出层footer区,放按钮 - .modal-footer {padding: 14px 15px 15px;margin-bottom: 0;text-align: right;background-color: #f5f5f5;border-top: 1px solid #ddd;*zoom: 1;border-radius: 0 0 6px 6px;box-shadow: inset 0 1px 0 #fff} - .modal-footer:before,.modal-footer:after {display: table;content: ""} - .modal-footer:after {clear: both} - .modal-footer .btn + .btn {margin-left: 5px;margin-bottom: 0} - .modal-footer .btn-group .btn + .btn {margin-left: -1px} - .modal-alert{position:fixed; width:300px;margin-left:-150px; margin-top:-30px; z-index:9999} - .modal-alert-info{padding:30px; text-align:center; font-size:14px; background-color:#fff}*/ - -/*.easyDialog_wrapper{width:320px; color:#444; border:3px solid rgba(0,0,0,0);border-radius:5px;box-shadow:0 0 10px rgba(0,0,0,0.4); display:none} -.easyDialog_wrapper .easyDialog_content{border-radius:4px; background:#fff; border:1px solid #e5e5e5} -.easyDialog_wrapper .easyDialog_title{height:30px; line-height:30px; overflow:hidden; color:#666; padding:0 10px; font-size:14px; border-bottom:1px solid #e5e5e5; background:#f7f7f7; border-radius:4px 4px 0 0; margin:0 } -.easyDialog_wrapper .close_btn{font-family:arial; font-size:18px; _font-size:12px; font-weight:700; color:#999; text-decoration:none; float:right} -.easyDialog_wrapper .close_btn:hover{color:#333} -.easyDialog_wrapper .easyDialog_text{padding:25px 10px; font-size:13px; line-height:22px} -.easyDialog_wrapper .easyDialog_footer{padding:10px; text-align:right; *zoom:1} -.easyDialog_wrapper .easyDialog_footer:after{content:''; display:block; height:0; overflow:hidden; visibility:hidden; clear:both} -.easyDialog_wrapper .btn_highlight,.easyDialog_wrapper .btn_normal{border:1px solid; border-radius:2px; cursor:pointer;float:right; font-size:12px; padding:0 12px; height:24px; line-height:24px; margin-bottom:10px} -.easyDialog_wrapper .btn_highlight{background:#4787ed; background:-webkit-gradient(linear,center bottom,center top,from(#4787ed),to(#4d90fe)); background:-moz-linear-gradient(90deg, #4787ed, #4d90fe); border-color:#3079ed; color:#fff} -.easyDialog_wrapper .btn_normal{margin-left:10px; border-color:#c3c3c3; background:#ececec; color:#333; background:-webkit-gradient(linear,center bottom,center top,from(#ececec),to(#f4f4f4)); background:-moz-linear-gradient(90deg,#ececec,#f4f4f4)}*/ - -/*4.12 右侧悬浮工具 - Name: modal_tools-right -*/ -.tools-right{position:fixed;right:15px;z-index:999;cursor: pointer;visibility:visible; background-color:#fff;border: 1px solid #d9d9d9;color: #9c9c9c;font-size: 16px;width: 38px;height: 38px;line-height: 38px;text-align: center; text-decoration:none;_position:absolute;_top:expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight)} -.tools-right:hover{color:#fff; text-decoration:none; background-color:#999; border-color:#999} - /*4.12.1 返回顶部 - Name: mod_totop - Level: Global - Example: - Explain: 返回顶部 - */ - .tools-right.toTop{bottom:60px;display:none} - /*4.12.2 意见反馈 - Name: mod_feedback - Level: Global - Example: - Explain: 意见反馈 - - */ - .tools-right.feedback{ bottom:110px} - -/*4.13 分享到 - Name: mod_share - Example: - Explain: 分享到 -*/ - /*4.13.1 百度分享*/ - .bdsharebuttonbox.Hui-share a.bds_more, - .bdsharebuttonbox.Hui-share a.bds_weixin, - .bdsharebuttonbox.Hui-share a.bds_qzone, - .bdsharebuttonbox.Hui-share a.bds_sqq, - .bdsharebuttonbox.Hui-share a.bds_tsina, - .bdsharebuttonbox.Hui-share a.bds_tqq, - .bdsharebuttonbox.Hui-share a.bds_douban{ display:inline-block; background:none;padding-left:0; text-decoration:none; margin:0; margin-right:6px; height:auto; line-height:auto} - .bdsharebuttonbox.Hui-share a:hover{ text-decoration:none} - .bdsharebuttonbox.Hui-share .share-text{ display:inline-block; margin-right:6px; color:#999; cursor:default;float:left} - - .bdsharebuttonbox.bdshare-button-style0-16.Hui-share a, - .bdsharebuttonbox.bdshare-button-style0-16.Hui-share .share-text, - .bdsharebuttonbox.bdshare-button-style0-16.Hui-share .Hui-iconfont{line-height:16px} - .bdsharebuttonbox.bdshare-button-style0-16.Hui-share .share-text, - .bdsharebuttonbox.bdshare-button-style0-16.Hui-share .Hui-iconfont{font-size:16px} - - .bdsharebuttonbox.bdshare-button-style0-24.Hui-share a, - .bdsharebuttonbox.bdshare-button-style0-24.Hui-share .share-text, - .bdsharebuttonbox.bdshare-button-style0-24.Hui-share .Hui-iconfont{line-height:24px} - .bdsharebuttonbox.bdshare-button-style0-24.Hui-share .share-text, - .bdsharebuttonbox.bdshare-button-style0-24.Hui-share .Hui-iconfont{font-size:24px} - /*4.13.2 jiathis分享*/ - .Hui-share.jiathis_style_24x24 .jtico{ background:none; padding-left:0!important} - .Hui-share.jiathis_style_24x24 .jiathis_separator{ margin-left:0; margin-right:6px} -/*4.14 Panel 面板 - Name: mod_panel - Sample: -
                                  -
                                  默认面板
                                  -
                                  -*/ -.panel{ background-color:#fff; border:solid 1px transparent} - .panel-header{ border-bottom:solid 1px transparent; padding:8px 15px; font-size:14px; font-weight:700; margin-bottom:-1px}/*面板标题*/ - .panel-body{ padding:15px}/*面板内容*/ - .panel-footer{background-color: #f5f5f5;border-top: 1px solid #ddd;padding:5px 20px}/*面板页脚*/ -/*默认面板*/ -.panel-default{border-color:#ddd} -.panel-default > .panel-header{ border-color:#ddd; background-color:#f5f5f5; color:#444} - -/*主要面板*/ -.panel-primary{border-color:#5a98de} -.panel-primary > .panel-header{ border-color:#5a98de; background-color:#5a98de; color:#fff} - -/*次要面板*/ -.panel-secondary{border-color:#3bb4f2} -.panel-secondary > .panel-header{ border-color:#3bb4f2; background-color:#3bb4f2; color:#fff} - -/*成功面板*/ -.panel-success{border-color:#5eb95e} -.panel-success > .panel-header{ border-color:#5eb95e; background-color:#5eb95e; color:#fff} - -/*警告面板*/ -.panel-warning{border-color:#f37b1d} -.panel-warning > .panel-header{ border-color:#f37b1d; background-color:#f37b1d; color:#fff} - -/*危险面板*/ -.panel-danger{border-color:#dd514c} -.panel-danger > .panel-header{ border-color:#dd514c; background-color:#dd514c; color:#fff} - -/*4.15 案例 - Name: mod_docs-example - Example:
                                  ……
                                  -*/ -.docs-example{position:relative;*position:static;*padding-top: 19px;margin: 15px 0;padding: 39px 19px 14px;background-color: #fff;border: 1px solid #ddd;border-radius: 4px} -.docs-example:after{content: "Example";position: absolute;top: -1px;left: -1px;*position:static;padding: 3px 7px;font-size: 12px;font-weight: bold;background-color: #f5f5f5;border: 1px solid #ddd;color: #9da0a4;border-radius: 4px 0 4px 0} - -/*4.16 滚动 - Name: mod_rolling - Example:
                                  • ……
                                  -*/ -.marquee{height:22px;overflow:hidden;line-height:22px} -.rollpic .prev,.rollpic .next{display:block; height:38px; width:38px; cursor:pointer; float:left; background:url(../images/rollpic/unslider-arrow.png) no-repeat 0 0; margin-top:70px} -.rollpic .prev{background-position:0 0; margin-right:5px} -.rollpic .prev:hover{background-position:0 -38px} -.rollpic .next{background-position:0 -76px;margin-left:5px} -.rollpic .next:hover{background-position:0 -114px} -.rollpicshow{float:left; border:solid 1px #ddd} -.rollpicshow li{padding:10px} - -/*4.17 搜索条 - Name: mod_searchBar - Sample: - -*/ - /*搜索下拉提示*/ -.ac_results{position:absolute;border:solid 1px #ddd;background-color:#fff; padding:3px; display:none; margin-top:-1px; z-index:999} -.ac_results ul{width:100%;list-style-position:outside;list-style:none;padding:0;margin:0} -.ac_results li{padding-left:5px;padding-right:5px;display:block;height:24px;line-height:24px;cursor:pointer} -.ac_results li p{ float:left;margin:0;padding:0;overflow:hidden} -.ac_results li p tt{color:#666} -.ac_results li span{margin:0;padding:0;display:inline;float:right;color:#f93;width:90px; text-align:right; overflow:hidden} -.ac_results li.ac_even{} -.ac_results li.ac_odd{} -.ac_results li.ac_over{background-color:#f0f1f2} - .ac_loading{background:#fff url(../images/loading/loading-s.gif) right center no-repeat} - -/*4.18.1 对联广告 - Name: mod_AD_dual - Sample: -
                                  对联的内容
                                  X关闭
                                  -
                                  对联的内容
                                  X关闭
                                  -*/ -.AD{text-align:center} -.dual{top:260px;position:absolute; width:102px; overflow:hidden; display:none; z-index:100} -.dual_l{left:6px} -.dual_r{right:6px} -.dual_con{border:#CCC solid 1px;width:100px; height:300px; overflow:hidden; background-color:#0C9} -.dual_close{width:100%;height:24px; line-height:24px; text-align:center; display:block; font-size:13px; color:#555; text-decoration:none} - -/*4.19 标签*/ - /*4.19.1 标签输入效果 - Name: mod_Hui-tags - Sample: -
                                  -
                                  - Hui前端框架 - CSS3 - HTML5 -
                                  -
                                  -
                                  -
                                  暂无常用标签
                                  -
                                  前端框架 前端开发 H-ui
                                  -
                                  - -
                                  - */ - .Hui-tags, - .Huitags-wraper{border:solid 1px #dedede; padding:0 10px} - .Hui-tags-editor, - .Huitags-editor{position:relative; padding:10px 0 10px 24px;min-height:20px} - - .Hui-tags-editor .Hui-tags-icon, - .Huitags-editor .Huitags-icon{position:absolute; left:0; top:11px; font-size:14px; color:#666} - - .Hui-tags-token, - .Huitags-token{color:#aaa; float:left; font-size:12px; height:20px; line-height:20px; margin-right:8px; padding:0 1px; white-space:nowrap; cursor:pointer} - .Hui-tags-token:before, - .Huitags-token:before{content:"#"} - .Hui-tags-token:hover, - .Huitags-token:hover{text-decoration:line-through} - - .Hui-tags-iptwrap{position:relative; float:left} - .Huitags-input-wraper{} - .Hui-tags-input - {position:relative;height:20px;min-width:60px; border:0 none; vertical-align:top;line-height:20px; color:#333;z-index:2;background: url(../images/Hui-tags/empty.png) repeat scroll 0 0; display:inline-block; width:100%} - .Huitags-input{} - .Hui-tags-label, - .Huitags-label{position:absolute; top:0; left:2px; width:240px; height:20px; line-height:20px; font-size:14px; overflow:hidden; z-index:1; color:#ccc} - - .Hui-tags-list, - .Huitags-list{padding:0 0 10px 0;} - - .Hui-notag, - .Huitags-notag{font-size:12px} - - .Hui-tags-has span, - .Huitags-has span{cursor:pointer; font-size:12px; white-space:nowrap; margin-right:10px} - - /*4.19.2 标签混排效果 - Name: mod_tags - Sample: - - */ - .tags a{height:26px; line-height:26px;padding-right:6px} - .tags0{} - .tags1{color:#C00; font-size:24px} - .tags2{color:#030; font-size:16px} - .tags3{color:#00F} - .tags4{font-size:16px} - .tags5{color:#C00; font-size:20px} - .tags6{color:#F06; font-size:20px} - .tags7{color:#030; font-weight:bold; font-size:18px} - .tags8{color:#F06; font-weight:bold} - .tags9{color:#C00; font-weight:bold;font-size:16px} - .tags a:hover{color:#F00; text-decoration:underline} - - /*4.19.3 tag云标签*/ - #tagyun {position:relative} - #tagyun a {position:absolute;top:0px;left:0px;font-weight:bold;text-decoration:none;padding:3px 6px} - -/*4.20 折叠 - Name: mod_Huifold - Sample: -
                                    -
                                  • 标题+

                                    内容
                                  • - …… -
                                  -*/ -.Huifold .item{position:relative} -.Huifold .item h4{margin:0;font-weight:bold;position:relative;border-top: 1px solid #fff;font-size:15px;line-height:22px;padding:7px 10px;background-color:#eee;cursor:pointer;padding-right:30px} -.Huifold .item h4 b{position:absolute;display: block; cursor:pointer;right:10px;top:7px;width:16px;height:16px; text-align:center; color:#666} -.Huifold .item .info{display:none;padding:10px} - -/*4.21 遮罩条 - Name: mod_maskBar -*/ -.maskBar{position:absolute;height:auto;left:0; bottom:-100%; right:0;padding:10px;background-color:rgba(0,0,0,0.6);z-index:2; color:#fff!important} -.maskWraper{position:relative; overflow:hidden} -.maskWraper.hover .maskBar{bottom:0px; - transition: bottom 200ms; - -moz-transition: bottom 200ms; /* Firefox 4 */ - -webkit-transition: bottom 200ms; /* Safari 和 Chrome */ - -o-transition: bottom 200ms; /* Opera */ -} -.maskBox{position:absolute;width:100%; height:100%;top:0;left:0; bottom:0;right:0;z-index:2;color:#fff!important} -.maskWraper.hover .maskBox{background-color:rgba(0,0,0,0.6); - transition: all 500ms; - -moz-transition: all 500ms; /* Firefox 4 */ - -webkit-transition: all 500ms; /* Safari 和 Chrome */ - -o-transition: all 500ms; /* Opera */ -} - -/*4.22 评论列表 - Name: mod_comment - Sample: -
                                    -
                                  • - -
                                    -
                                    -
                                    辉哥 评论于
                                    -
                                    -

                                    @某人 你是猴子派来的救兵吗?

                                    -
                                  • -
                                  -*/ -.commentList .item{list-style: none outside none;margin: 1.6rem 0 0} -.commentList .avatar{border: 1px solid transparent;float: left} - .comment-main{position:relative;margin-left:64px;border:1px solid #dedede;border-radius:2px} - .comment-main:before, - .comment-main:after{position:absolute;top:11px;left:-16px;right:100%;width:0;height:0;display:block;content:" ";border-color:transparent;border-style:solid solid outset;pointer-events:none} - .comment-main:before{border-right-color:#dedede;border-width:8px} - .comment-main:after{border-width:7px;border-right-color:#f8f8f8;margin-top:1px;margin-left:2px} - .comment-header{padding:10px 15px;background:#f8f8f8;border-bottom:1px solid #eee} - .comment-title{margin:0 0 8px 0;font-size:1.6rem;line-height:1.2} - .comment-meta{font-size:13px;color:#999;line-height:1.2} - .comment-meta a{color:#999} - .comment-author{font-weight:700;color:#999} - .comment-body{padding:15px;overflow:hidden} - .comment-body>:last-child{margin-bottom:0} -.commentList .comment-flip .avatar {float: right} - .comment-flip .comment-main{margin-left: 0; margin-right: 64px} - .comment-flip .comment-main:before {border-left-color: #dedede;border-right-color: transparent} - .comment-flip .comment-main:before, - .comment-flip .comment-main:after {left: 100%;position: absolute;right: -16px} - .comment-flip .comment-main:after {border-left-color: #f8f8f8;border-right-color: transparent;margin-left: auto;margin-right: 2px} - -/*4.23 页脚 - Name: mod_footer - Sample: - -*/ -.footer{border-top:1px solid #E8E8E8; padding:15px 0;font-family:tahoma,Arial;font-size:12px;color:#999;line-height:22px;text-align:center} -.footer a,.footer a:hover{color:#999} - -/*4.24 星星评价 - Name: mod_star - Sample: -显示分数效果 可以是百分比 -
                                  - -
                                  - -打分效果 结构是js生成。 -
                                  -*/ -.star-bar-show{background:url(../images/star/iconpic-star-S-default.png) repeat-x 0 0} -.star-bar-show .star{background:url(../images/star/iconpic-star-S.png) repeat-x 0 0} -.star-1{width:20%} -.star-2{ width:40%} -.star-3{width:60%} -.star-4{ width:80%} -.star-5{ width:100%} -.star-bar-show.size-M{width:120px;height:24px} -.star-bar-show.size-M,.star-bar-show.size-M .star{background-size:24px} -.star-bar-show.size-M .star{ height:24px} -.star-bar-show.size-S{width:80px; height:16px} -.star-bar-show.size-S,.star-bar-show.size-S .star{background-size:16px} -.star-bar-show.size-S .star{ height:16px} - -.star-bar{font-size:0; line-height:0} -.star-bar .star{display:inline-block;text-align:center} -/*中*/ -.size-M img{ width:24px;height:24px} -/*小*/ -.size-S img{width:16px;height:16px} - -/*4.25 tooltip 效果 - Name: mod_tooltip -*/ -.tooltip {position: absolute;z-index: 1070;display: block;font-size: 12px;line-height: 1.4;visibility: visible;filter: alpha(opacity=0);opacity: 0} -.tooltip.in {filter: alpha(opacity=90);opacity: .9} -.tooltip.top {padding: 5px 0;margin-top: -3px} -.tooltip.right {padding: 0 5px;margin-left: 3px} -.tooltip.bottom {padding: 5px 0;margin-top: 3px} -.tooltip.left {padding: 0 5px;margin-left: -3px} - .tooltip-inner {max-width: 200px;padding: 3px 8px;color: #fff;text-align: center;text-decoration: none;background-color: #000;border-radius: 4px} - .tooltip-arrow {position: absolute;width: 0;height: 0;border-color: transparent;border-style: solid} -.tooltip.top .tooltip-arrow {bottom: 0;left: 50%;margin-left: -5px;border-width: 5px 5px 0;border-top-color: #000} -.tooltip.top-left .tooltip-arrow {bottom: 0;left: 5px;border-width: 5px 5px 0;border-top-color: #000} -.tooltip.top-right .tooltip-arrow {right: 5px;bottom: 0;border-width: 5px 5px 0;border-top-color: #000} -.tooltip.right .tooltip-arrow {top: 50%;left: 0;margin-top: -5px;border-width: 5px 5px 5px 0;border-right-color: #000} -.tooltip.left .tooltip-arrow {top: 50%;right: 0;margin-top: -5px;border-width: 5px 0 5px 5px;border-left-color: #000} -.tooltip.bottom .tooltip-arrow {top: 0;left: 50%;margin-left: -5px;border-width: 0 5px 5px;border-bottom-color: #000} -.tooltip.bottom-left .tooltip-arrow {top: 0;left: 5px;border-width: 0 5px 5px;border-bottom-color: #000} -.tooltip.bottom-right .tooltip-arrow {top: 0;right: 5px;border-width: 0 5px 5px;border-bottom-color: #000} - -/*4.26 popover 效果 - Name: mod_popover -*/ -.popover {position: absolute;top: 0;left: 0;z-index: 1060;display: none;max-width: 276px;padding: 1px;font-size: 14px;font-weight: normal;line-height: 1.42857143;text-align: left;white-space: normal;background-color: #fff;-webkit-background-clip: padding-box;background-clip: padding-box;border: 1px solid #ccc;border: 1px solid rgba(0, 0, 0, .2);border-radius: 6px;-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);box-shadow: 0 5px 10px rgba(0, 0, 0, .2)} -.popover.top {margin-top: -10px} -.popover.right {margin-left: 10px} -.popover.bottom {margin-top: 10px} -.popover.left {margin-left: -10px} -.popover-title {padding: 8px 14px;margin: 0;font-size: 14px;background-color: #f7f7f7;border-bottom: 1px solid #ebebeb;border-radius: 5px 5px 0 0} -.popover-content {padding: 9px 14px} -.popover > .arrow,.popover > .arrow:after {position: absolute;display: block;width: 0;height: 0;border-color: transparent;border-style: solid} -.popover > .arrow {border-width: 11px} -.popover > .arrow:after {content: "";border-width: 10px} -.popover.top > .arrow {bottom: -11px;left: 50%;margin-left: -11px;border-top-color: #999;border-top-color: rgba(0, 0, 0, .25);border-bottom-width: 0} -.popover.top > .arrow:after {bottom: 1px;margin-left: -10px;content: " ";border-top-color: #fff;border-bottom-width: 0} -.popover.right > .arrow {top: 50%;left: -11px;margin-top: -11px;border-right-color: #999;border-right-color: rgba(0, 0, 0, .25);border-left-width: 0} -.popover.right > .arrow:after {bottom: -10px;left: 1px;content: " ";border-right-color: #fff;border-left-width: 0} -.popover.bottom > .arrow {top: -11px;left: 50%;margin-left: -11px;border-top-width: 0;border-bottom-color: #999;border-bottom-color: rgba(0, 0, 0, .25)} -.popover.bottom > .arrow:after {top: 1px;margin-left: -10px;content: " ";border-top-width: 0;border-bottom-color: #fff} -.popover.left > .arrow {top: 50%;right: -11px;margin-top: -11px;border-right-width: 0;border-left-color: #999;border-left-color: rgba(0, 0, 0, .25)} -.popover.left > .arrow:after {right: 1px;bottom: -10px;content: " ";border-right-width: 0;border-left-color: #fff} - -/*4.27 datetimepicker日期插件 - Name: mod_datetimepicker - Sample: -*/ -.datetimepicker {padding: 4px;margin-top: 1px;-webkit-border-radius: 4px;-moz-border-radius: 4px;border-radius: 4px;direction: ltr;position: absolute;top: 100%;left: 0;z-index: 1000;display: none;float: left;min-width: 160px;padding: 5px 0;margin: 2px 0 0;font-size: 14px;list-style: none;background-color: #ffffff;border: 1px solid #cccccc;border: 1px solid rgba(0, 0, 0, 0.15);border-radius: 4px;-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);background-clip: padding-box} -.datetimepicker-inline {width: 220px} -.datetimepicker.datetimepicker-rtl {direction: rtl} -.datetimepicker.datetimepicker-rtl table tr td span {float: right} -.datetimepicker-dropdown, .datetimepicker-dropdown-left {top: 0;left: 0} -[class*=" datetimepicker-dropdown"]:before {content: '';display: inline-block;border-left: 7px solid transparent;border-right: 7px solid transparent;border-bottom: 7px solid #cccccc;border-bottom-color: rgba(0, 0, 0, 0.2);position: absolute} -[class*=" datetimepicker-dropdown"]:after {content: '';display: inline-block;border-left: 6px solid transparent;border-right: 6px solid transparent;border-bottom: 6px solid #fff;position: absolute} -[class*=" datetimepicker-dropdown-top"]:before {content: '';display: inline-block;border-left: 7px solid transparent;border-right: 7px solid transparent;border-top: 7px solid #ccc;border-top-color: rgba(0, 0, 0, 0.2);border-bottom: 0} -[class*=" datetimepicker-dropdown-top"]:after {content: '';display: inline-block;border-left: 6px solid transparent;border-right: 6px solid transparent;border-top: 6px solid #fff;border-bottom: 0} -.datetimepicker-dropdown-bottom-left:before {top: -7px;right: 6px} -.datetimepicker-dropdown-bottom-left:after {top: -6px;right: 7px} -.datetimepicker-dropdown-bottom-right:before {top: -7px;left: 6px} -.datetimepicker-dropdown-bottom-right:after {top: -6px;left: 7px} -.datetimepicker-dropdown-top-left:before {bottom: -7px;right: 6px} -.datetimepicker-dropdown-top-left:after {bottom: -6px;right: 7px} -.datetimepicker-dropdown-top-right:before {bottom: -7px;left: 6px} -.datetimepicker-dropdown-top-right:after {bottom: -6px;left: 7px} -.datetimepicker > div {display: none} -.datetimepicker.minutes div.datetimepicker-minutes {display: block} -.datetimepicker.hours div.datetimepicker-hours {display: block} -.datetimepicker.days div.datetimepicker-days {display: block} -.datetimepicker.months div.datetimepicker-months {display: block} -.datetimepicker.years div.datetimepicker-years {display: block} -.datetimepicker table {margin: 0} -.datetimepicker td, -.datetimepicker th {text-align: center;width: 20px;height: 20px;-webkit-border-radius: 4px;-moz-border-radius: 4px;border-radius: 4px;border: none} -.table-striped .datetimepicker table tr td, -.table-striped .datetimepicker table tr th {background-color: transparent} -.datetimepicker table tr td.minute:hover {background: #eee;cursor: pointer} -.datetimepicker table tr td.hour:hover {background: #eee;cursor: pointer} -.datetimepicker table tr td.day:hover {background: #eee;cursor: pointer} -.datetimepicker table tr td.old, -.datetimepicker table tr td.new {color: #999} -.datetimepicker table tr td.disabled, -.datetimepicker table tr td.disabled:hover {background: none;color: #999;cursor: default} - -.datetimepicker table tr td.today, -.datetimepicker table tr td.today:hover, -.datetimepicker table tr td.today.disabled, -.datetimepicker 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)} - -.datetimepicker table tr td.today:hover, -.datetimepicker table tr td.today:hover:hover, -.datetimepicker table tr td.today.disabled:hover, -.datetimepicker table tr td.today.disabled:hover:hover, -.datetimepicker table tr td.today:active, -.datetimepicker table tr td.today:hover:active, -.datetimepicker table tr td.today.disabled:active, -.datetimepicker table tr td.today.disabled:hover:active, -.datetimepicker table tr td.today.active, -.datetimepicker table tr td.today:hover.active, -.datetimepicker table tr td.today.disabled.active, -.datetimepicker table tr td.today.disabled:hover.active, -.datetimepicker table tr td.today.disabled, -.datetimepicker table tr td.today:hover.disabled, -.datetimepicker table tr td.today.disabled.disabled, -.datetimepicker table tr td.today.disabled:hover.disabled, -.datetimepicker table tr td.today[disabled], -.datetimepicker table tr td.today:hover[disabled], -.datetimepicker table tr td.today.disabled[disabled], -.datetimepicker table tr td.today.disabled:hover[disabled] {background-color: #fdf59a} -.datetimepicker table tr td.today:active, -.datetimepicker table tr td.today:hover:active, -.datetimepicker table tr td.today.disabled:active, -.datetimepicker table tr td.today.disabled:hover:active, -.datetimepicker table tr td.today.active, -.datetimepicker table tr td.today:hover.active, -.datetimepicker table tr td.today.disabled.active, -.datetimepicker table tr td.today.disabled:hover.active {background-color: #fbf069} -.datetimepicker table tr td.active, -.datetimepicker table tr td.active:hover, -.datetimepicker table tr td.active.disabled, -.datetimepicker 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)} - -.datetimepicker table tr td.active:hover, -.datetimepicker table tr td.active:hover:hover, -.datetimepicker table tr td.active.disabled:hover, -.datetimepicker table tr td.active.disabled:hover:hover, -.datetimepicker table tr td.active:active, -.datetimepicker table tr td.active:hover:active, -.datetimepicker table tr td.active.disabled:active, -.datetimepicker table tr td.active.disabled:hover:active, -.datetimepicker table tr td.active.active, -.datetimepicker table tr td.active:hover.active, -.datetimepicker table tr td.active.disabled.active, -.datetimepicker table tr td.active.disabled:hover.active, -.datetimepicker table tr td.active.disabled, -.datetimepicker table tr td.active:hover.disabled, -.datetimepicker table tr td.active.disabled.disabled, -.datetimepicker table tr td.active.disabled:hover.disabled, -.datetimepicker table tr td.active[disabled], -.datetimepicker table tr td.active:hover[disabled], -.datetimepicker table tr td.active.disabled[disabled], -.datetimepicker table tr td.active.disabled:hover[disabled] {background-color: #04c} - -.datetimepicker table tr td.active:active, -.datetimepicker table tr td.active:hover:active, -.datetimepicker table tr td.active.disabled:active, -.datetimepicker table tr td.active.disabled:hover:active, -.datetimepicker table tr td.active.active, -.datetimepicker table tr td.active:hover.active, -.datetimepicker table tr td.active.disabled.active, -.datetimepicker table tr td.active.disabled:hover.active {background-color: #039} - -.datetimepicker 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} - -.datetimepicker .datetimepicker-hours span {height: 26px;line-height: 26px} - -.datetimepicker .datetimepicker-hours table tr td span.hour_am, -.datetimepicker .datetimepicker-hours table tr td span.hour_pm {width: 14.6%} - -.datetimepicker .datetimepicker-hours fieldset legend, -.datetimepicker .datetimepicker-minutes fieldset legend {margin-bottom: inherit;line-height: 30px} -.datetimepicker .datetimepicker-minutes span {height: 26px;line-height: 26px} -.datetimepicker table tr td span:hover {background: #eee} - -.datetimepicker table tr td span.disabled, -.datetimepicker table tr td span.disabled:hover {background: none;color: #999;cursor: default} -.datetimepicker table tr td span.active, -.datetimepicker table tr td span.active:hover, -.datetimepicker table tr td span.active.disabled, -.datetimepicker 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)} - -.datetimepicker table tr td span.active:hover, -.datetimepicker table tr td span.active:hover:hover, -.datetimepicker table tr td span.active.disabled:hover, -.datetimepicker table tr td span.active.disabled:hover:hover, -.datetimepicker table tr td span.active:active, -.datetimepicker table tr td span.active:hover:active, -.datetimepicker table tr td span.active.disabled:active, -.datetimepicker table tr td span.active.disabled:hover:active, -.datetimepicker table tr td span.active.active, -.datetimepicker table tr td span.active:hover.active, -.datetimepicker table tr td span.active.disabled.active, -.datetimepicker table tr td span.active.disabled:hover.active, -.datetimepicker table tr td span.active.disabled, -.datetimepicker table tr td span.active:hover.disabled, -.datetimepicker table tr td span.active.disabled.disabled, -.datetimepicker table tr td span.active.disabled:hover.disabled, -.datetimepicker table tr td span.active[disabled], -.datetimepicker table tr td span.active:hover[disabled], -.datetimepicker table tr td span.active.disabled[disabled], -.datetimepicker table tr td span.active.disabled:hover[disabled] {background-color: #0044cc} - -.datetimepicker table tr td span.active:active, -.datetimepicker table tr td span.active:hover:active, -.datetimepicker table tr td span.active.disabled:active, -.datetimepicker table tr td span.active.disabled:hover:active, -.datetimepicker table tr td span.active.active, -.datetimepicker table tr td span.active:hover.active, -.datetimepicker table tr td span.active.disabled.active, -.datetimepicker table tr td span.active.disabled:hover.active {background-color: #039} -.datetimepicker table tr td span.old {color: #999} -.datetimepicker th.switch {width: 145px} -.datetimepicker th span.glyphicon {pointer-events: none} -.datetimepicker thead tr:first-child th, -.datetimepicker tfoot th {cursor: pointer} -.datetimepicker thead tr:first-child th:hover, -.datetimepicker tfoot th:hover {background: #eee} -.input-append.date .add-on i, -.input-prepend.date .add-on i, -.input-group.date .input-group-addon span {cursor: pointer;width: 14px;height: 14px} - -/*4.27 分类检索 - Name: mod_select-category - Sample: -
                                  -
                                  -
                                  -
                                  选择区域:
                                  -
                                  - 北京市 -
                                  -
                                  -
                                  -
                                  -*/ -.select-category{} -.select-category .item{padding:5px; position:relative; border-bottom:solid 1px #ddd} -.select-category .item .dt{ width:90px; float:left;white-space:nowrap} -.select-category .item .dd{ margin-left:100px; text-align:left; font-size:14px; height:auto} -.select-category .item .dd a{ display:inline-block;white-space:nowrap; overflow:hidden;text-overflow:ellipsis; margin-right:10px; padding:0 5px; text-decoration:none} - -/*4.28 sortable拖动*/ -.ui-state-highlight{ height:50px; margin-top:20px;border:1px solid #fcefa1;background:#fbf9ee;color:#363636} -.sortable-control{ cursor:move} - -/*4.29 ColorPicker 颜色控件*/ - - -/*5 页面 - Name: page -*/ - -/*5.1 错误页-404*/ -.page-404{ color:#afb5bf; padding-top:60px; padding-bottom:90px} -.page-404 .error-title{font-size:80px} -.page-404 .error-title .iconfont{font-size:80px} -.page-404 .error-description{font-size:24px} -.page-404 .error-info{font-size:14px} - -/*5.2 博客列表页*/ -.page-blog-list{} -/*5.3 博客详情页*/ -.page-blog-show{} -/*5.4 关于我们页*/ -.page-about-show{} -/*5.5 帮助列表页*/ -.page-help-list{} -/*5.6 帮助详情页*/ -.page-help-show{} -/*5.7 友情链接页*/ -.page-flink{} diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/css/H-ui.ie.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/css/H-ui.ie.css deleted file mode 100644 index 5f4920e7..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/css/H-ui.ie.css +++ /dev/null @@ -1,66 +0,0 @@ -/* -----------H-ui前端框架------------- -* H-ui.ie.css v1.0 -* http://www.h-ui.net/ -* Created & Modified by guojunhui -* Date modified 2016.05.02 -* -* Copyright 2013-2016 北京颖杰联创科技有限公司 All rights reserved. -* Licensed under MIT license. -* http://opensource.org/licenses/MIT -* -*/ -@charset "utf-8"; -.navbar-fixed-top{ border-bottom:solid 1px #eee} -.col-1,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12,.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12{ float:left} -.col-md-12{width:100%} -.col-md-11{width:91.66666666666666%} -.col-md-10{width:83.33333333333334%} -.col-md-9{width:75%} -.col-md-8{width:66.66666666666666%} -.col-md-7{width:58.333333333333336%} -.col-md-6{width:50%} -.col-md-5{width:41.66666666666667%} -.col-md-4{width:33.33333333333333%} -.col-md-3{width:25%} -.col-md-2{width:16.666666666666664%} -.col-md-1{width:8.333333333333332%} -.col-md-pull-12{right:100%} -.col-md-pull-11{right:91.66666666666666%} -.col-md-pull-10{right:83.33333333333334%} -.col-md-pull-9{right:75%} -.col-md-pull-8{right:66.66666666666666%} -.col-md-pull-7{right:58.333333333333336%} -.col-md-pull-6{right:50%} -.col-md-pull-5{right:41.66666666666667%} -.col-md-pull-4{right:33.33333333333333%} -.col-md-pull-3{right:25%} -.col-md-pull-2{right:16.666666666666664%} -.col-md-pull-1{right:8.333333333333332%} -.col-md-pull-0{right:0} -.col-md-push-12{left:100%} -.col-md-push-11{left:91.66666666666666%} -.col-md-push-10{left:83.33333333333334%} -.col-md-push-9{left:75%} -.col-md-push-8{left:66.66666666666666%} -.col-md-push-7{left:58.333333333333336%} -.col-md-push-6{left:50%} -.col-md-push-5{left:41.66666666666667%} -.col-md-push-4{left:33.33333333333333%} -.col-md-push-3{left:25%} -.col-md-push-2{left:16.666666666666664%} -.col-md-push-1{left:8.333333333333332%} -.col-md-push-0{left:0} -.col-md-offset-12{margin-left:100%} -.col-md-offset-11{margin-left:91.66666666666666%} -.col-md-offset-10{margin-left:83.33333333333334%} -.col-md-offset-9{margin-left:75%} -.col-md-offset-8{margin-left:66.66666666666666%} -.col-md-offset-7{margin-left:58.333333333333336%} -.col-md-offset-6{margin-left:50%} -.col-md-offset-5{margin-left:41.66666666666667%} -.col-md-offset-4{margin-left:33.33333333333333%} -.col-md-offset-3{margin-left:25%} -.col-md-offset-2{margin-left:16.666666666666664%} -.col-md-offset-1{margin-left:8.333333333333332%} -.col-md-offset-0{margin-left:0} - diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/css/H-ui.min.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/css/H-ui.min.css deleted file mode 100644 index c21cb16d..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/css/H-ui.min.css +++ /dev/null @@ -1,12 +0,0 @@ -/* -----------H-ui前端框架------------- -* H-ui.css v3.1.4 -* http://www.h-ui.net/ -* Created & Modified by guojunhui -* Date modified 2017.07.19 -* -* Copyright 2013-2017 北京颖杰联创科技有限公司 All rights reserved. -* Licensed under MIT license. -* http://opensource.org/licenses/MIT -* -*/ -@charset "utf-8";*{word-wrap:break-word}html,body,h1,h2,h3,h4,h5,h6,hr,p,iframe,dl,dt,dd,ul,ol,li,pre,form,button,input,textarea,th,td,fieldset{margin:0;padding:0}ul,ol,dl{list-style-type:none}html,body{*position:static}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}address,caption,cite,code,dfn,em,th,var{font-style:normal;font-weight:400}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit}input,button{overflow:visible;vertical-align:middle;outline:0}input[type="submit"],input[type="reset"],input[type="button"],input[type="text"],input[type="password"]{-webkit-appearance:none;outline:0}body,th,td,button,input,select,textarea{font-family:"Microsoft Yahei","Hiragino Sans GB","Helvetica Neue",Helvetica,tahoma,arial,"WenQuanYi Micro Hei",Verdana,sans-serif,"\5B8B\4F53";font-size:12px;color:#333;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(max-width :767px){html{overflow-y:auto}body,th,td,button,input,select,textarea{font-size:14px}}body{line-height:1.6;position:relative}h1,h2,h3,h4,h5,h6{font-size:100%}a,area{outline:0;blr:expression(this.onFocus=this.blur())}a{text-decoration:none;cursor:pointer}a:hover{text-decoration:underline;outline:0}a.ie6:hover{zoom:1}a:focus{outline:0}a:hover,a:active{outline:0}:focus{outline:0}sub,sup{vertical-align:baseline}button,input[type="button"],input[type="submit"]{line-height:normal!important}img{border:0;vertical-align:middle}a img,img{-ms-interpolation-mode:bicubic}*html{overflow:-moz-scrollbars-vertical;zoom:expression(function(ele){ele.style.zoom = "1";document.execCommand("BackgroundImageCache",false,true)}(this))}header,footer,section,aside,details,menu,article,section,nav,address,hgroup,figure,figcaption,legend{display:block;margin:0;padding:0}time{display:inline}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}legend{width:100%;margin-bottom:20px;font-size:21px;line-height:40px;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}svg:not(:root){overflow:hidden}fieldset{border-width:0;padding:.35em .625em .75em;margin:0 2px;border:1px solid #c0c0c0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}.cl:after,.clearfix:after{content:"\20";display:block;height:0;clear:both;visibility:hidden}.cl,.clearfix{zoom:1}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media(min-width :992px){.container{width:960px}}@media(min-width :1200px){.container{width:1170px}}@media(min-width :1300px){.container{width:1270px}}@media print{.container{width:auto}}.row{box-sizing:border-box;margin-left:-15px;margin-right:-15px}.col-1,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12,.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{min-height:1px;position:relative;padding-left:15px;padding-right:15px;box-sizing:border-box;-webkit-transition:all .3s ease-in;-moz-transition:all .3s ease-in;-o-transition:all .3s ease-in;transition:all .3s ease-in}.col-1{width:8.33333%}.col-2{width:16.66667%}.col-3{width:25%}.col-4{width:33.33333%}.col-5{width:41.66667%}.col-6{width:50%}.col-7{width:58.33333%}.col-8{width:66.66667%}.col-9{width:75%}.col-10{width:83.33333%}.col-11{width:91.66667%}.col-12{width:100%}.col-offset-0{margin-left:0}.col-offset-1{margin-left:8.33333%}.col-offset-2{margin-left:16.66667%}.col-offset-3{margin-left:25%}.col-offset-4{margin-left:33.33333%}.col-offset-5{margin-left:41.66667%}.col-offset-6{margin-left:50%}.col-offset-7{margin-left:58.33333%}.col-offset-8{margin-left:66.66667%}.col-offset-9{margin-left:75%}.col-offset-10{margin-left:83.33333%}.col-offset-11{margin-left:91.66667%}.col-push-0{position:relative;left:0;right:auto}.col-pull-0{right:0;left:auto}.col-push-1{left:8.33333%;right:auto}.col-pull-1{right:8.33333%;left:auto}.col-push-2{left:16.66667%;right:auto}.col-pull-2{right:16.66667%;left:auto}.col-push-3{left:25%;right:auto}.col-pull-3{right:25%;left:auto}.col-push-4{left:33.33333%;right:auto}.col-pull-4{right:33.33333%;left:auto}.col-push-5{left:41.66667%;right:auto}.col-pull-5{right:41.66667%;left:auto}.col-push-6{left:50%;right:auto}.col-pull-6{right:50%;left:auto}.col-push-7{left:58.33333%;right:auto}.col-pull-7{right:58.33333%;left:auto}.col-push-8{left:66.66667%;right:auto}.col-pull-8{right:66.66667%;left:auto}.col-push-9{left:75%;right:auto}.col-pull-9{right:75%;left:auto}.col-push-10{left:83.33333%;right:auto}.col-pull-10{right:83.33333%;left:auto}.col-push-11{left:91.66667%;right:auto}.col-pull-11{right:91.66667%;left:auto}.col-1-1{width:100%}.col-2-1{width:50%}.col-3-1{width:33.333333%}.col-3-2{width:66.666667%}.col-4-1{width:25%}.col-4-3{width:75%}.col-5-1{width:20%}.col-5-2{width:40%}.col-5-3{width:60%}.col-5-4{width:80%}.col-6-1{width:16.666667%}.col-6-5{width:83.333333%}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media(max-width:767px){.responsive [class^="col-"],.responsive [class*=" col-"]{float:none!important;width:auto!important}.responsive [class^="col-offset-"],.responsive [class*=" col-offset-"]{margin-left:0!important}}@media(min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666666666666%}.col-sm-10{width:83.33333333333334%}.col-sm-9{width:75%}.col-sm-8{width:66.66666666666666%}.col-sm-7{width:58.333333333333336%}.col-sm-6{width:50%}.col-sm-5{width:41.66666666666667%}.col-sm-4{width:33.33333333333333%}.col-sm-3{width:25%}.col-sm-2{width:16.666666666666664%}.col-sm-1{width:8.333333333333332%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666666666666%}.col-sm-pull-10{right:83.33333333333334%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666666666666%}.col-sm-pull-7{right:58.333333333333336%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666666666667%}.col-sm-pull-4{right:33.33333333333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.666666666666664%}.col-sm-pull-1{right:8.333333333333332%}.col-sm-pull-0{right:0}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666666666666%}.col-sm-push-10{left:83.33333333333334%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666666666666%}.col-sm-push-7{left:58.333333333333336%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666666666667%}.col-sm-push-4{left:33.33333333333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.666666666666664%}.col-sm-push-1{left:8.333333333333332%}.col-sm-push-0{left:0}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666666666666%}.col-sm-offset-10{margin-left:83.33333333333334%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666666666666%}.col-sm-offset-7{margin-left:58.333333333333336%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666666666667%}.col-sm-offset-4{margin-left:33.33333333333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.666666666666664%}.col-sm-offset-1{margin-left:8.333333333333332%}.col-sm-offset-0{margin-left:0}}@media(min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666666666666%}.col-md-10{width:83.33333333333334%}.col-md-9{width:75%}.col-md-8{width:66.66666666666666%}.col-md-7{width:58.333333333333336%}.col-md-6{width:50%}.col-md-5{width:41.66666666666667%}.col-md-4{width:33.33333333333333%}.col-md-3{width:25%}.col-md-2{width:16.666666666666664%}.col-md-1{width:8.333333333333332%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666666666666%}.col-md-pull-10{right:83.33333333333334%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666666666666%}.col-md-pull-7{right:58.333333333333336%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666666666667%}.col-md-pull-4{right:33.33333333333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.666666666666664%}.col-md-pull-1{right:8.333333333333332%}.col-md-pull-0{right:0}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666666666666%}.col-md-push-10{left:83.33333333333334%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666666666666%}.col-md-push-7{left:58.333333333333336%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666666666667%}.col-md-push-4{left:33.33333333333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.666666666666664%}.col-md-push-1{left:8.333333333333332%}.col-md-push-0{left:0}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666666666666%}.col-md-offset-10{margin-left:83.33333333333334%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666666666666%}.col-md-offset-7{margin-left:58.333333333333336%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666666666667%}.col-md-offset-4{margin-left:33.33333333333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.666666666666664%}.col-md-offset-1{margin-left:8.333333333333332%}.col-md-offset-0{margin-left:0}}@media(min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666666666666%}.col-lg-10{width:83.33333333333334%}.col-lg-9{width:75%}.col-lg-8{width:66.66666666666666%}.col-lg-7{width:58.333333333333336%}.col-lg-6{width:50%}.col-lg-5{width:41.66666666666667%}.col-lg-4{width:33.33333333333333%}.col-lg-3{width:25%}.col-lg-2{width:16.666666666666664%}.col-lg-1{width:8.333333333333332%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666666666666%}.col-lg-pull-10{right:83.33333333333334%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666666666666%}.col-lg-pull-7{right:58.333333333333336%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666666666667%}.col-lg-pull-4{right:33.33333333333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.666666666666664%}.col-lg-pull-1{right:8.333333333333332%}.col-lg-pull-0{right:0}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666666666666%}.col-lg-push-10{left:83.33333333333334%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666666666666%}.col-lg-push-7{left:58.333333333333336%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666666666667%}.col-lg-push-4{left:33.33333333333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.666666666666664%}.col-lg-push-1{left:8.333333333333332%}.col-lg-push-0{left:0}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666666666666%}.col-lg-offset-10{margin-left:83.33333333333334%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666666666666%}.col-lg-offset-7{margin-left:58.333333333333336%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666666666667%}.col-lg-offset-4{margin-left:33.33333333333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.666666666666664%}.col-lg-offset-1{margin-left:8.333333333333332%}.col-lg-offset-0{margin-left:0}}.visible-xs,.visible-sm,.visible-md,.visible-lg,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block{display:none!important}@media(max-width :767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}.hidden-xs{display:none!important}.visible-xs-block{display:block!important}.visible-xs-inline{display:inline!important}.visible-xs-inline-block{display:inline-block!important}}@media(min-width :768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}.hidden-sm{display:none!important}.visible-sm-block{display:block!important}.visible-sm-inline{display:inline!important}.visible-sm-inline-block{display:inline-block!important}}@media(min-width :992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}.hidden-md{display:none!important}.visible-md-block{display:block!important}.visible-md-inline{display:inline!important}.visible-md-inline-block{display:inline-block!important}}@media(min-width :1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}.hidden-lg{display:none!important}.visible-lg-block{display:block!important}.visible-lg-inline{display:inline!important}.visible-lg-inline-block{display:inline-block!important}}.visible-print{display:none!important}.visible-print-block{display:none!important}.visible-print-inline{display:none!important}.visible-print-inline-block{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}.visible-print-block{display:block!important}.visible-print-inline{display:inline!important}.visible-print-inline-block{display:inline-block!important}.hidden-print{display:none!important}}.containBox{background-color:#fff;position:relative;z-index:100;zoom:1;-moz-transition:-moz-transform .2s ease-out;-webkit-transition:-webkit-transform .2s ease-out;-o-transition:-o-transform .2s ease-out;transition:transform .2s ease-out;top:0}.sideBox{display:none}.containBox-bg{display:none}@media(max-width:767px){body,.content{font-size:16px;line-height:1.6}html,body{height:100%}.containBox{position:fixed;top:0;left:0;right:0;bottom:0;overflow:hidden}.containBox-bg{position:fixed;width:100%;top:0;left:0;display:block;z-index:2000}.sideBox{position:absolute;display:block;z-index:99;right:0;top:0;bottom:0;width:250px;background-color:#303135}.sideBox .navbar-nav{display:block}.sideBox .navbar-nav li{border-bottom:1px solid #222;display:block}.sideBox .navbar-nav a{color:#fff;display:block;padding-left:20px;padding:10px 30px}.sideBox .navbar-nav a:hover{text-decoration:none}.Hui-wraper{width:auto;padding:0 10px}.AD-img img{width:100%;height:auto}body.sideBox-open .containBox{-moz-transform:translate3d(-250px,0,0);-webkit-transform:translate3d(-250px,0,0);transform:translate3d(-250px,0,0);backface-visibility:hidden;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden}.wap-container{height:100%;width:100%;min-width:320px;overflow:auto}body.sideBox-open .containBox-bg{bottom:0;right:0}}.Hui-wraper,.wp{margin-left:auto;margin-right:auto;text-align:left}.sd{float:right}.ct2 .mn{float:left}.ct2 .sd{float:right}.ct2_r .leftmenu{float:left}.ct2_r .mn{float:right}.ct3 .app{float:left;margin-right:20px}.ct3 .mn{float:left;border-left:solid 1px #ddd}.ct3 .sd{float:right}.w-1000{width:1000px}.w-980{width:980px}.w-300{width:300px}.w-200{width:200px}@media(max-width:1000px){.Hui-wraper,.wp,{width:auto!important;padding:0 15px!important}}@media print{.Hui-wraper{width:auto}}h1,h2,h3,h4,h5,h6{font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small{font-weight:400;line-height:1;color:#999}h1,h2,h3{padding-top:20px;padding-bottom:10px}h1 small,h2 small,h3 small,h1 .small,h2 .small,h3 .small{font-size:65%}h4,h5,h6{margin-top:10px;margin-bottom:10px}h4 small,h5 small,h6 small,h4 .small,h5 .small,h6 .small{font-size:75%}h1{font-size:36px}h2{font-size:30px}h3{font-size:24px}h4{font-size:18px}h5{font-size:14px}h6{font-size:12px}p{margin-bottom:10px}small{font-size:85%}b,strong{font-weight:bold}em{font-style:italic}cite{font-style:normal}mark{color:#000;background:#ff0}dfn{font-style:italic}del{}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.en{font-family:Arial!important}.text-l{text-align:left}.text-r{text-align:right}.text-c{text-align:center}.va *{vertical-align:sub!important;*vertical-align:middle!important;_vertical-align:middle!important}.va-t{vertical-align:top!important}.va-m{vertical-align:middle!important}.va-b{vertical-align:bottom!important}.pos-r{position:relative}.pos-a{position:absolute}.pos-f{position:fixed}.l,.f-l{float:left!important;_display:inline}.r,.f-r{float:right!important;_display:inline}[class*="span"].r,[class*="span"].f-r{float:right}.pos-left{left:0;right:auto}.pos-right{right:0;left:auto}.pos-top{top:0;bottom:auto}.pos-bottom{top:auto;bottom:0}.text-overflow{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.line{font-size:0;line-height:0;border-top:solid 1px #eee;float:none}.mt-5{margin-top:5px}.mt-10{margin-top:10px}.mt-15{margin-top:15px}.mt-20{margin-top:20px}.mt-25{margin-top:25px}.mt-30{margin-top:30px}.mt-35{margin-top:35px}.mt-40{margin-top:40px}.mt-50{margin-top:50px}.mb-5{margin-bottom:5px}.mb-10{margin-bottom:10px}.mb-15{margin-bottom:15px}.mb-20{margin-bottom:20px}.mb-30{margin-bottom:30px}.mb-40{margin-bottom:40px}.mb-50{margin-bottom:50px}.ml-5{margin-left:5px}.ml-10{margin-left:10px}.ml-15{margin-left:15px}.ml-20{margin-left:20px}.ml-30{margin-left:30px}.ml-40{margin-left:40px}.ml-50{margin-left:50px}.mr-5{margin-right:5px}.mr-10{margin-right:10px}.mr-15{margin-right:15px}.mr-20{margin-right:20px}.mr-30{margin-right:30px}.mr-40{margin-right:40px}.mr-50{margin-right:50px}.pt-5{padding-top:5px}.pt-10{padding-top:10px}.pt-15{padding-top:15px}.pt-20{padding-top:20px}.pt-25{padding-top:25px}.pt-30{padding-top:30px}.pb-5{padding-bottom:5px}.pb-10{padding-bottom:10px}.pb-15{padding-bottom:15px}.pb-20{padding-bottom:20px}.pb-25{padding-bottom:25px}.pb-30{padding-bottom:30px}.pl-5{padding-left:5px}.pl-10{padding-left:10px}.pl-15{padding-left:15px}.pl-20{padding-left:20px}.pl-25{padding-left:25px}.pl-30{padding-left:30px}.pr-5{padding-right:5px}.pr-10{padding-right:10px}.pr-15{padding-right:15px}.pr-20{padding-right:20px}.pr-25{padding-right:25px}.pr-30{padding-right:30px}.pd-5{padding:5px}.pd-10{padding:10px}.pd-15{padding:15px}.pd-20{padding:20px}.pd-25{padding:25px}.pd-30{padding:30px}.pd-40{padding:40px}.bk-gray{border:solid 1px #eee}.radius{border-radius:4px}.size-MINI.radius{border-radius:3px}.size-L.radius{border-radius:5px}.size-XL.radius{border-radius:6px}.round{border-radius:50%;overflow:hidden}.box-shadow{-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.1);box-shadow:0 1px 2px rgba(0,0,0,0.1)}.text-shadow{-webkit-text-shadow:0 0 2px rgba(0,0,0,0.2);text-shadow:0 0 2px rgba(0,0,0,0.2)}.pipe{margin:0 5px;color:#CCC;font-size:10px!important}.f-12{font-size:12px}.f-14{font-size:14px}.f-16{font-size:16px}.f-18{font-size:18px}.f-20{font-size:20px}.f-22{font-size:22px}.f-24{font-size:24px}.f-26{font-size:26px}.f-28{font-size:28px}.f-30{font-size:30px}.lh-16{line-height:16px}.lh-18{line-height:18px}.lh-20{line-height:20px}.lh-22{line-height:22px}.lh-24{line-height:24px}.lh-26{line-height:26px}.lh-28{line-height:28px}.lh-30{line-height:30px}.l16{line-height:16px}.l18{line-height:18px}.l20{line-height:20px}.l22{line-height:22px}.l-24{line-height:24px}.l-26{line-height:26px}.l-28{line-height:28px}.l-30{line-height:30px}body{background-color:#fff;color:#333}.bg-fff{background-color:#fff}a{color:#333}a:hover,.active a{color:#06c}.c-primary,.c-primary a,a.c-primary{color:#5a98de}.c-primary a:hover,a.c-primary:hover{color:#5a98de}.c-secondary,.c-secondary a,a.c-secondary{color:#555}.c-secondary a:hover,a.c-secondary:hover{color:#555}.c-success,.c-success a,a.c-success{color:#5eb95e}.c-success a:hover,a.c-success:hover{color:#5eb95e}.c-danger,.c-danger a,a.c-danger{color:#dd514c}.c-danger a:hover,a.c-danger:hover{color:#dd514c}.c-warning,.c-warning a,a.c-warning{color:#f37b1d}.c-warning a:hover,a.c-warning:hover{color:#f37b1d}.c-error,.c-error a,a.c-error{color:#c00}.c-error a:hover,a.c-error:hover{color:#c00}.c-333,.c-333 a,a.c-333{color:#333}.c-333 a:hover,a.c-333:hover{color:#333}.c-666,.c-666 a,a.c-666{color:#666}.c-666 a:hover,a.c-666:hover{color:#666}.c-999,.c-999 a,a.c-999{color:#999}.c-999 a:hover,a.c-999:hover{color:#999}.c-red,.c-red a,a.c-red{color:red}.c-red a:hover,a.c-red:hover{color:red}.c-green,.c-green a,a.c-green{color:green}.c-red a:hover,a.c-red:hover{color:green}.c-blue,.c-blue a,a.c-blue{color:blue}.c-blue a:hover,a.c-blue:hover{color:blue}.c-white,.c-white a,a.c-white{color:white}.c-white a:hover,a.c-white:hover{color:white}.c-black,.c-black a{color:black}.c-black a:hover,a.c-black:hover{color:black}.c-orange,.c-orange a,a.c-orange{color:orange}.c-orange a:hover,a.c-orange:hover{color:orange}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.text-r{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.text-r p,blockquote.text-r small{text-align:right}blockquote.text-r small:before{content:''}blockquote.text-r small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}q{quotes:"\201C" "\201D" "\2018" "\2019"}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}.content{position:relative;font-size:17px;line-height:1.8;overflow:hidden;text-align:left;word-break:break-all;word-wrap:break-word}.content h3{font-size:18px}.content h4{font-size:16px}.content p{margin-bottom:1.5rem;text-align:justify;word-break:break-all}.content p.text-c{text-align:center}.indent{text-indent:2em}.content img{max-width:100%}.content ul{text-indent:2em}@media(max-width:767px){.content{font-size:16px}}@media(max-width:480px){.content img{max-width:100%!important;height:auto!important;width:expression(this.width>320 ? "320px":this.width)!important}*html .content img{width:expression(this.width>320&&this.width>this.height?320:auto)}}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}ul.inline,ol.inline{margin-left:0;list-style:none}ul.inline>li,ol.inline>li{display:inline-block;*display:inline;padding-right:5px;padding-left:5px;*zoom:1}.list-view>.item{padding:10px;position:relative;overflow:hidden}.list-view>.item .date{font-size:12px;font-family:Arial;color:#999}@media(max-width:767px){.list-view>.item{font-size:18px;padding:11px 15px;border-bottom:1px solid #eee}.list-view>.item>a{display:block;margin:-11px -15px}.night .list-view>.item{border-bottom:1px solid #1f1f1f}.list-view>.item .date{display:none}.list-view>.item .Hui-iconfont{background-size:9px auto;margin-top:-7px;position:absolute;right:15px;top:50%}}.list-top>.item{padding-left:30px}.list-top>.item .num{position:absolute;top:11px;display:block;width:20px;height:20px;color:#fff;background-color:#5a98de;text-align:center}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.hide{display:none}[hidden]{display:none}.hidden{display:none!important;visibility:hidden!important}.f-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}.show{display:block}.invisible{visibility:hidden}.input-text,.btn,.input-text.size-M,.btn.size-M{font-size:14px;height:31px;*height:auto;line-height:1.42857;padding:4px}a.btn,a.btn.size-M,span.btn,span.btn.size-M{line-height:21px}.btn,.btn.size-M{padding:4px 12px}.input-text.size-MINI,.btn.size-MINI{font-size:12px;height:23px;padding:1px 2px;line-height:1.42857}a.btn.size-MINI,span.btn.size-MINI{line-height:21px}.btn.size-MINI{padding:1px 4px}.input-text.size-S,.btn.size-S{font-size:12px;height:27px;padding:3px;line-height:1.42857}a.btn.size-S,span.btn.size-S{line-height:19px}.btn.size-S{padding:3px 8px}.input-text.size-L,.btn.size-L{font-size:16px;height:41px;padding:8px}a.btn.size-L,span.btn.size-L{line-height:23px}.btn.size-L{padding:8px 16px}.input-text.size-XL,.btn.size-XL{font-size:18px;height:48px;padding:10px}a.btn.size-XL,span.btn.size-XL{line-height:26px}.btn.size-XL{padding:10px 24px}@media(max-width:767px){.responsive .input-text.size-MINI,.responsive .btn.size-MINI{height:24px}.responsive .input-text.size-S,.responsive .btn.size-S{font-size:14px;height:30px}.responsive .input-text,.btn,.responsive .input-text.size-M,.responsive .btn.size-M{font-size:16px;height:36px}.responsive .input-text.size-L,.responsive .btn.size-L{font-size:18px;height:42px}.responsive .input-text.size-XL,.responsive .btn.size-XL{font-size:20px;height:48px}}code{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace}pre .title,pre .keyword,pre .body,pre .des{color:#333}pre{display:block;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;padding:9.5px;margin-bottom:10px;font-size:12px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px;color:#333}.prettyprint{margin-bottom:20px;padding:8px;background-color:#f7f7f9;border:1px solid #e1e1e8}.prettyprint .com{color:#998;font-style:italic}.prettyprint .tag{color:#007}.prettyprint .lit{color:#195f91}.prettyprint .pun,.prettyprint .opn,.prettyprint .clo{color:#93a1a1}.prettyprint .fun{color:#dc322f}.prettyprint .str,.prettyprint .atv{color:#D14}.prettyprint .kwd,.prettyprint .prettyprint .tag{color:#1e347b}.prettyprint .typ,.prettyprint .atn,.prettyprint .dec,.prettyprint .var{color:teal}.prettyprint .pln{color:#48484c}.prettyprint.linenums{box-shadow:inset 40px 0 0 #fbfbfc,inset 41px 0 0 #ececf0}.pre-scrollable{max-height:340px;overflow-y:scroll}ol.linenums{list-style:decimal outside none;margin-left:20px}ol.linenums li{line-height:28px;padding-left:10px}pre ol.linenums{margin:0 0 0 33px}pre ol.linenums li{padding-left:12px;color:#bbb;line-height:18px;text-shadow:0 1px 0 #fff}@media(max-width:767px){pre ol.linenums{margin-left:0;list-style:none}ol.linenums li{padding-left:0}.prettyprint.linenums{box-shadow:inset 0 0 0 #fbfbfc,inset 0 0 0 #ececf0}}table{width:100%;empty-cells:show;background-color:transparent;border-collapse:collapse;border-spacing:0}table th{text-align:left;font-weight:400}.table th{font-weight:bold}.table th,.table td{padding:8px;line-height:20px;word-break:break-all}.table td{text-align:left}.table tbody tr.success>td{background-color:#dff0d8}.table tbody tr.error>td{background-color:#f2dede}.table tbody tr.warning>td{background-color:#fcf8e3}.table tbody tr.info>td{background-color:#d9edf7}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-border{border-top:1px solid #ddd}.table-border th,.table-border td{border-bottom:1px solid #ddd}.table-bg thead th{background-color:#f5fafe}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-border.table-bordered{border-bottom:0}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-condensed th,.table-condensed td{padding:4px 5px}.table-hover tbody tr:hover td,.table-hover tbody tr:hover th{background-color:#f5f5f5}.table tbody tr.selected td{background-color:#f3f3f3}.table tbody tr.active,.table tbody tr.active>td,.table tbody tr.active>th,.table tbody tr .active{background-color:#f5f5f5!important}.table tbody tr.success,.table tbody tr.success>td,.table tbody tr.success>th,.table tbody tr .success{background-color:#dff0d8!important}.table tbody tr.warning,.table tbody tr.warning>td,.table tbody tr.warning>th,.table tbody tr .warning{background-color:#fcf8e3!important}.table tbody tr.danger,.table tbody tr.danger>td,.table tbody tr.danger>th,.table tbody tr .danger{background-color:#f2dede!important}.table .text-c th,.table .text-c td{text-align:center}.table .text-r th,.table .text-r td{text-align:right}.table th.text-l,.table td.text-l{text-align:left!important}.table th.text-c,.table td.text-c{text-align:center!important}.table th.text-r,.table td.text-r{text-align:right!important}table.dataTable{border-collapse:separate;border-spacing:0;clear:both}table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting{cursor:pointer;background-repeat:no-repeat;background-position:right center}table.dataTable thead .sorting{background-image:url(../images/dataTable/sort_both.png)}table.dataTable thead .sorting_asc{background-image:url(../images/dataTable/sort_asc.png)}table.dataTable thead .sorting_desc{background-image:url(../images/dataTable/sort_desc.png)}.dataTable td.sorting_1{background-color:#f5fafe}.dataTables_wrapper .dataTables_length{float:left;padding-bottom:20px}.dataTables_wrapper .dataTables_length .select{width:50px}.dataTables_wrapper .dataTables_filter{float:right;text-align:right}.dataTables_wrapper .dataTables_filter .input-text{width:auto}.dataTables_wrapper .dataTables_info{clear:both;float:left;padding-top:10px;font-size:14px;color:#666}.dataTables_wrapper .dataTables_paginate{float:right;padding-top:10px;text-align:right}.dataTables_wrapper .dataTables_paginate .paginate_button{border:1px solid #ccc;cursor:pointer;display:inline-block;margin-left:2px;text-align:center;text-decoration:none;color:#666;height:26px;line-height:26px;text-decoration:none;margin:0 0 6px 6px;padding:0 10px;font-size:14px}.dataTables_wrapper .dataTables_paginate .paginate_button:hover,.dataTables_wrapper .dataTables_paginate .paginate_button.current,.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{background:#5a98de;color:#fff}@media(max-width:767px){.table-responsive th,.table-responsive td{display:block;width:100%!important;box-sizing:border-box}}.input-text,.textarea{box-sizing:border-box;border:solid 1px #ddd;width:100%;-webkit-transition:all .2s linear 0s;-moz-transition:all .2s linear 0s;-o-transition:all .2s linear 0s;transition:all .2s linear 0s}.textarea{height:100px;resize:none;font-size:14px;padding:4px}.textarea-numberbar{position:absolute;right:20px;bottom:5px;z-index:1;margin-bottom:0}.textarea-length{font-style:normal}.input-text:hover,.textarea:hover{border:solid 1px #3bb4f2}.input-text.focus,.textarea.focus{border:solid 1px #0f9ae0 \9;border-color:rgba(82,168,236,0.8);box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6)}.input-text.disabled,.textarea.disabled,.input-text.disabled.focus,.textarea.disabled.focus{background-color:#ededed;cursor:default;border-color:#ddd;-webkit-box-shadow:inset 0 2px 2px #e8e7e7;-moz-box-shadow:inset 0 2px 2px #e8e7e7;box-shadow:inset 0 2px 2px #e8e7e7}.input-text.disabled,.textarea.disabled{background-color:#e6e6e6;cursor:default}.input-text.box-shadow,.textarea.box-shadow{-ms-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.input-text.inline{display:inline-block;width:auto}input[type="radio"],input[type="checkbox"]{line-height:normal;margin-top:-4px}.check-box,.radio-box{display:inline-block;box-sizing:border-box;cursor:pointer;position:relative;padding-left:30px;padding-right:20px}.icheckbox,.icheckbox-red,.icheckbox-green,.icheckbox-blue,.icheckbox-aero,.icheckbox-grey,.icheckbox-orange,.icheckbox-yellow,.icheckbox-pink,.icheckbox-purple,.iradio,.iradio-red,.iradio-green,.iradio-blue,.iradio-aero,.iradio-grey,.iradio-orange,.iradio-yellow,.iradio-pink,.iradio-purple{position:absolute;top:4px;left:0}@media(max-width:767px){.responsive .check-box,.responsive .radio-box{display:block}}.icheckbox,.iradio{display:block;margin:0;padding:0;width:18px;height:18px;background:url(../images/iCheck/minimal.png) no-repeat;border:0;cursor:pointer}.icheckbox,.icheckbox.static:hover{background-position:0 0}.icheckbox.hover,.icheckbox:hover{background-position:-20px 0}.icheckbox.checked{background-position:-40px 0}.icheckbox.disabled{background-position:-60px 0;cursor:default}.icheckbox.checked.disabled{background-position:-80px 0}.iradio,.iradio.static:hover{background-position:-100px 0}.iradio.hover,.iradio:hover{background-position:-120px 0}.iradio.checked{background-position:-140px 0}.iradio.disabled{background-position:-160px 0;cursor:default}.iradio.checked.disabled{background-position:-180px 0}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-moz-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.icheckbox,.iradio{background-image:url(../images/iCheck/minimal@2x.png);-webkit-background-size:200px 20px;background-size:200px 20px}}.icheckbox-red,.iradio-red{display:block;margin:0;padding:0;width:18px;height:18px;background:url(../images/iCheck/red.png) no-repeat;border:0;cursor:pointer}.icheckbox-red,.icheckbox-red.static:hover{background-position:0 0}.icheckbox-red.hover,.icheckbox-red:hover{background-position:-20px 0}.icheckbox-red.checked{background-position:-40px 0}.icheckbox-red.disabled{background-position:-60px 0;cursor:default}.icheckbox-red.checked.disabled{background-position:-80px 0}.iradio-red,.iradio-red.static:hover{background-position:-100px 0}.iradio-red.hover,.iradio-red:hover{background-position:-120px 0}.iradio-red.checked{background-position:-140px 0}.iradio-red.disabled{background-position:-160px 0;cursor:default}.iradio-red.checked.disabled{background-position:-180px 0}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-moz-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.icheckbox-red,.iradio-red{background-image:url(../images/iCheck/red@2x.png);-webkit-background-size:200px 20px;background-size:200px 20px}}.icheckbox-green,.iradio-green{display:block;margin:0;padding:0;width:18px;height:18px;background:url(../images/iCheck/green.png) no-repeat;border:0;cursor:pointer}.icheckbox-green,.icheckbox-green.static:hover{background-position:0 0}.icheckbox-green.hover,.icheckbox-green:hover{background-position:-20px 0}.icheckbox-green.checked{background-position:-40px 0}.icheckbox-green.disabled{background-position:-60px 0;cursor:default}.icheckbox-green.checked.disabled{background-position:-80px 0}.iradio-green,.iradio-green.static:hover{background-position:-100px 0}.iradio-green.hover,.iradio-green:hover{background-position:-120px 0}.iradio-green.checked{background-position:-140px 0}.iradio-green.disabled{background-position:-160px 0;cursor:default}.iradio-green.checked.disabled{background-position:-180px 0}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-moz-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.icheckbox-green,.iradio-green{background-image:url(../images/iCheck/green@2x.png);-webkit-background-size:200px 20px;background-size:200px 20px}}.icheckbox-blue,.iradio-blue{display:block;margin:0;padding:0;width:18px;height:18px;background:url(../images/iCheck/blue.png) no-repeat;border:0;cursor:pointer}.icheckbox-blue,.icheckbox-blue.static:hover{background-position:0 0}.icheckbox-blue.hover,.icheckbox-blue:hover{background-position:-20px 0}.icheckbox-blue.checked{background-position:-40px 0}.icheckbox-blue.disabled{background-position:-60px 0;cursor:default}.icheckbox-blue.checked.disabled{background-position:-80px 0}.iradio-blue,.iradio-blue.static:hover{background-position:-100px 0}.iradio-blue.hover,.iradio-blue:hover{background-position:-120px 0}.iradio-blue.checked{background-position:-140px 0}.iradio-blue.disabled{background-position:-160px 0;cursor:default}.iradio-blue.checked.disabled{background-position:-180px 0}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-moz-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.icheckbox-blue,.iradio-blue{background-image:url(../images/iCheck/blue@2x.png);-webkit-background-size:200px 20px;background-size:200px 20px}}.icheckbox-aero,.iradio-aero{display:block;margin:0;padding:0;width:18px;height:18px;background:url(../images/iCheck/aero.png) no-repeat;border:0;cursor:pointer}.icheckbox-aero,.icheckbox-aero.static:hover{background-position:0 0}.icheckbox-aero.hover,.icheckbox-aero:hover{background-position:-20px 0}.icheckbox-aero.checked{background-position:-40px 0}.icheckbox-aero.disabled{background-position:-60px 0;cursor:default}.icheckbox-aero.checked.disabled{background-position:-80px 0}.iradio-aero,.iradio-aero.static:hover{background-position:-100px 0}.iradio-aero.hover,.iradio-aero:hover{background-position:-120px 0}.iradio-aero.checked{background-position:-140px 0}.iradio-aero.disabled{background-position:-160px 0;cursor:default}.iradio-aero.checked.disabled{background-position:-180px 0}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-moz-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.icheckbox-aero,.iradio-aero{background-image:url(../images/iCheck/aero@2x.png);-webkit-background-size:200px 20px;background-size:200px 20px}}.icheckbox-grey,.iradio-grey{display:block;margin:0;padding:0;width:18px;height:18px;background:url(../images/iCheck/grey.png) no-repeat;border:0;cursor:pointer}.icheckbox-grey,.icheckbox-grey.static:hover{background-position:0 0}.icheckbox-grey.hover,.icheckbox-grey:hover{background-position:-20px 0}.icheckbox-grey.checked{background-position:-40px 0}.icheckbox-grey.disabled{background-position:-60px 0;cursor:default}.icheckbox-grey.checked.disabled{background-position:-80px 0}.iradio-grey,.iradio-grey.static:hover{background-position:-100px 0}.iradio-grey.hover,.iradio-grey:hover{background-position:-120px 0}.iradio-grey.checked{background-position:-140px 0}.iradio-grey.disabled{background-position:-160px 0;cursor:default}.iradio-grey.checked.disabled{background-position:-180px 0}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-moz-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.icheckbox-grey,.iradio-grey{background-image:url(../images/iCheck/grey@2x.png);-webkit-background-size:200px 20px;background-size:200px 20px}}.icheckbox-orange,.iradio-orange{display:block;margin:0;padding:0;width:18px;height:18px;background:url(../images/iCheck/orange.png) no-repeat;border:0;cursor:pointer}.icheckbox-orange,.icheckbox-orange.static:hover{background-position:0 0}.icheckbox-orange.hover,.icheckbox-orange:hover{background-position:-20px 0}.icheckbox-orange.checked{background-position:-40px 0}.icheckbox-orange.disabled{background-position:-60px 0;cursor:default}.icheckbox-orange.checked.disabled{background-position:-80px 0}.iradio-orange,.iradio-orange.static:hover{background-position:-100px 0}.iradio-orange.hover,.iradio-orange:hover{background-position:-120px 0}.iradio-orange.checked{background-position:-140px 0}.iradio-orange.disabled{background-position:-160px 0;cursor:default}.iradio-orange.checked.disabled{background-position:-180px 0}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-moz-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.icheckbox-orange,.iradio-orange{background-image:url(../images/iCheck/orange@2x.png);-webkit-background-size:200px 20px;background-size:200px 20px}}.icheckbox-yellow,.iradio-yellow{display:block;margin:0;padding:0;width:18px;height:18px;background:url(../images/iCheck/yellow.png) no-repeat;border:0;cursor:pointer}.icheckbox-yellow,.icheckbox-yellow.static:hover{background-position:0 0}.icheckbox-yellow.hover,.icheckbox-yellow:hover{background-position:-20px 0}.icheckbox-yellow.checked{background-position:-40px 0}.icheckbox-yellow.disabled{background-position:-60px 0;cursor:default}.icheckbox-yellow.checked.disabled{background-position:-80px 0}.iradio-yellow,.iradio-yellow.static:hover{background-position:-100px 0}.iradio-yellow.hover,.iradio-yellow:hover{background-position:-120px 0}.iradio-yellow.checked{background-position:-140px 0}.iradio-yellow.disabled{background-position:-160px 0;cursor:default}.iradio-yellow.checked.disabled{background-position:-180px 0}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-moz-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.icheckbox-yellow,.iradio-yellow{background-image:url(../images/iCheck/yellow@2x.png);-webkit-background-size:200px 20px;background-size:200px 20px}}.icheckbox-pink,.iradio-pink{display:block;margin:0;padding:0;width:18px;height:18px;background:url(../images/iCheck/pink.png) no-repeat;border:0;cursor:pointer}.icheckbox-pink,.icheckbox-pink.static:hover{background-position:0 0}.icheckbox-pink.hover,.icheckbox-pink:hover{background-position:-20px 0}.icheckbox-pink.checked{background-position:-40px 0}.icheckbox-pink.disabled{background-position:-60px 0;cursor:default}.icheckbox-pink.checked.disabled{background-position:-80px 0}.iradio-pink,.iradio-pink.static:hover{background-position:-100px 0}.iradio-pink.hover,.iradio-pink:hover{background-position:-120px 0}.iradio-pink.checked{background-position:-140px 0}.iradio-pink.disabled{background-position:-160px 0;cursor:default}.iradio-pink.checked.disabled{background-position:-180px 0}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-moz-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.icheckbox-pink,.iradio-pink{background-image:url(../images/iCheck/pink@2x.png);-webkit-background-size:200px 20px;background-size:200px 20px}}.icheckbox-purple,.iradio-purple{display:block;margin:0;padding:0;width:18px;height:18px;background:url(../images/iCheck/purple.png) no-repeat;border:0;cursor:pointer}.icheckbox-purple,.icheckbox-purple.static:hover{background-position:0 0}.icheckbox-purple.hover,.icheckbox-purple:hover{background-position:-20px 0}.icheckbox-purple.checked{background-position:-40px 0}.icheckbox-purple.disabled{background-position:-60px 0;cursor:default}.icheckbox-purple.checked.disabled{background-position:-80px 0}.iradio-purple,.iradio-purple.static:hover{background-position:-100px 0}.iradio-purple.hover,.iradio-purple:hover{background-position:-120px 0}.iradio-purple.checked{background-position:-140px 0}.iradio-purple.disabled{background-position:-160px 0;cursor:default}.iradio-purple.checked.disabled{background-position:-180px 0}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-moz-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.icheckbox-purple,.iradio-purple{background-image:url(../images/iCheck/purple@2x.png);-webkit-background-size:200px 20px;background-size:200px 20px}}.has-switch{display:inline-block;cursor:pointer;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:1px solid;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);position:relative;text-align:left;overflow:hidden;line-height:8px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;min-width:100px}.has-switch.size-MINI{min-width:72px}.has-switch.size-S{min-width:80px}.has-switch.size-L{min-width:120px}.has-switch.deactivate{opacity:.5;filter:alpha(opacity=50);cursor:default!important}.has-switch.deactivate label,.has-switch.deactivate span{cursor:default!important}.has-switch>div{display:inline-block;width:150%;position:relative;top:0}.has-switch>div.switch-animate{-webkit-transition:left .5s;-moz-transition:left .5s;-o-transition:left .5s;transition:left .5s}.has-switch>div.switch-off{left:-50%}.has-switch>div.switch-on{left:0}.has-switch input[type=checkbox]{display:none}.has-switch span,.has-switch label{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;position:relative;display:inline-block;padding-bottom:4px;padding-top:4px;font-size:14px;line-height:20px}.has-switch span.size-MINI,.has-switch label.size-MINI{padding-bottom:4px;padding-top:4px;font-size:10px;line-height:9px}.has-switch span.size-S,.has-switch label.size-S{padding-bottom:3px;padding-top:3px;font-size:12px;line-height:18px}.has-switch span.size-L,.has-switch label.size-L{padding-bottom:9px;padding-top:9px;font-size:16px;line-height:normal}.has-switch label{text-align:center;margin-top:-1px;margin-bottom:-1px;z-index:100;width:34%;border-left:1px solid #ccc;border-right:1px solid #ccc;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.has-switch label:hover,.has-switch label:focus,.has-switch label:active,.has-switch label.active,.has-switch label.disabled,.has-switch label[disabled]{color:#fff;background-color:#e6e6e6;*background-color:#d9d9d9}.has-switch label:active,.has-switch label.active{background-color:#ccc \9}.has-switch label i{color:#000;text-shadow:0 1px 0 #fff;line-height:18px;pointer-events:none}.has-switch span{text-align:center;z-index:1;width:33%}.has-switch span.switch-left{-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px}.has-switch span.switch-right{color:#333;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#f0f0f0;background-image:-moz-linear-gradient(top,#e6e6e6,#fff);background-image:-webkit-gradient(linear,0 0,0 100%,from(#e6e6e6),to(#fff));background-image:-webkit-linear-gradient(top,#e6e6e6,#fff);background-image:-o-linear-gradient(top,#e6e6e6,#fff);background-image:linear-gradient(to bottom,#e6e6e6,#fff);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6',endColorstr='#ffffffff',GradientType=0);border-color:#fff #fff #d9d9d9;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#fff;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.has-switch span.switch-right:hover,.has-switch span.switch-right:focus,.has-switch span.switch-right:active,.has-switch span.switch-right.active,.has-switch span.switch-right.disabled,.has-switch span.switch-right[disabled]{color:#333;background-color:#fff;*background-color:#f2f2f2}.has-switch span.switch-right:active,.has-switch span.switch-right.active{background-color:#e6e6e6 \9}.has-switch span.switch-primary,.has-switch span.switch-left{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#005fcc;background-image:-moz-linear-gradient(top,#04c,#08c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#04c),to(#08c));background-image:-webkit-linear-gradient(top,#04c,#08c);background-image:-o-linear-gradient(top,#04c,#08c);background-image:linear-gradient(to bottom,#04c,#08c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0044cc',endColorstr='#ff0088cc',GradientType=0);border-color:#08c #08c #005580;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#08c;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.has-switch span.switch-primary:hover,.has-switch span.switch-left:hover,.has-switch span.switch-primary:focus,.has-switch span.switch-left:focus,.has-switch span.switch-primary:active,.has-switch span.switch-left:active,.has-switch span.switch-primary.active,.has-switch span.switch-left.active,.has-switch span.switch-primary.disabled,.has-switch span.switch-left.disabled,.has-switch span.switch-primary[disabled],.has-switch span.switch-left[disabled]{color:#fff;background-color:#08c;*background-color:#0077b3}.has-switch span.switch-primary:active,.has-switch span.switch-left:active,.has-switch span.switch-primary.active,.has-switch span.switch-left.active{background-color:#069 \9}.has-switch span.switch-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#41a7c5;background-image:-moz-linear-gradient(top,#2f96b4,#5bc0de);background-image:-webkit-gradient(linear,0 0,0 100%,from(#2f96b4),to(#5bc0de));background-image:-webkit-linear-gradient(top,#2f96b4,#5bc0de);background-image:-o-linear-gradient(top,#2f96b4,#5bc0de);background-image:linear-gradient(to bottom,#2f96b4,#5bc0de);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff2f96b4',endColorstr='#ff5bc0de',GradientType=0);border-color:#5bc0de #5bc0de #28a1c5;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#5bc0de;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.has-switch span.switch-info:hover,.has-switch span.switch-info:focus,.has-switch span.switch-info:active,.has-switch span.switch-info.active,.has-switch span.switch-info.disabled,.has-switch span.switch-info[disabled]{color:#fff;background-color:#5bc0de;*background-color:#46b8da}.has-switch span.switch-info:active,.has-switch span.switch-info.active{background-color:#31b0d5 \9}.has-switch span.switch-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#58b058;background-image:-moz-linear-gradient(top,#51a351,#62c462);background-image:-webkit-gradient(linear,0 0,0 100%,from(#51a351),to(#62c462));background-image:-webkit-linear-gradient(top,#51a351,#62c462);background-image:-o-linear-gradient(top,#51a351,#62c462);background-image:linear-gradient(to bottom,#51a351,#62c462);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff51a351',endColorstr='#ff62c462',GradientType=0);border-color:#62c462 #62c462 #3b9e3b;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#62c462;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.has-switch span.switch-success:hover,.has-switch span.switch-success:focus,.has-switch span.switch-success:active,.has-switch span.switch-success.active,.has-switch span.switch-success.disabled,.has-switch span.switch-success[disabled]{color:#fff;background-color:#62c462;*background-color:#4fbd4f}.has-switch span.switch-success:active,.has-switch span.switch-success.active{background-color:#42b142 \9}.has-switch span.switch-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#f9a123;background-image:-moz-linear-gradient(top,#f89406,#fbb450);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f89406),to(#fbb450));background-image:-webkit-linear-gradient(top,#f89406,#fbb450);background-image:-o-linear-gradient(top,#f89406,#fbb450);background-image:linear-gradient(to bottom,#f89406,#fbb450);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff89406',endColorstr='#fffbb450',GradientType=0);border-color:#fbb450 #fbb450 #f89406;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#fbb450;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.has-switch span.switch-warning:hover,.has-switch span.switch-warning:focus,.has-switch span.switch-warning:active,.has-switch span.switch-warning.active,.has-switch span.switch-warning.disabled,.has-switch span.switch-warning[disabled]{color:#fff;background-color:#fbb450;*background-color:#faa937}.has-switch span.switch-warning:active,.has-switch span.switch-warning.active{background-color:#fa9f1e \9}.has-switch span.switch-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#d14641;background-image:-moz-linear-gradient(top,#bd362f,#ee5f5b);background-image:-webkit-gradient(linear,0 0,0 100%,from(#bd362f),to(#ee5f5b));background-image:-webkit-linear-gradient(top,#bd362f,#ee5f5b);background-image:-o-linear-gradient(top,#bd362f,#ee5f5b);background-image:linear-gradient(to bottom,#bd362f,#ee5f5b);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffbd362f',endColorstr='#ffee5f5b',GradientType=0);border-color:#ee5f5b #ee5f5b #e51d18;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#ee5f5b;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.has-switch span.switch-danger:hover,.has-switch span.switch-danger:focus,.has-switch span.switch-danger:active,.has-switch span.switch-danger.active,.has-switch span.switch-danger.disabled,.has-switch span.switch-danger[disabled]{color:#fff;background-color:#ee5f5b;*background-color:#ec4844}.has-switch span.switch-danger:active,.has-switch span.switch-danger.active{background-color:#e9322d \9}.select-box{border:solid 1px #ddd;box-sizing:border-box;vertical-align:middle;width:100%;display:inline-block}.select{border:solid 1px #ddd;box-sizing:border-box;cursor:pointer;line-height:normal;font-weight:normal;width:100%;white-space:nowrap}.select-box .select{border:0}.select-box.inline,.select-box.inline .select{width:auto}.select-box,.select-box.size-M{padding:4px 5px}.select,.size-M .select{font-size:14px}.select-box.size-MINI{padding:0 5px}.size-MINI .select{font-size:12px}.select-box.size-S{padding:3px 5px}.size-S .select{font-size:12px}.select-box.size-L{padding:8px 5px}.size-L .select{font-size:16px}.select-box.size-XL{padding:10px 5px}.size-XL .select{font-size:18px}@media(max-width:767px){.responsive .select-box{border:0}.responsive .select-box .select,.responsive .select{border:solid 1px #ddd;padding:10px;font-size:16px}.responsive .select-box,.responsive .select-box.size-M,.responsive .select-box.size-MINI,.responsive .select-box.size-S,.responsive .select-box.size-L,.responsive .select-box.size-XL{height:auto;padding:0}}.select-wrapper{position:relative;display:inline-block;font-size:14px;cursor:default}.select-default{zoom:1;display:block;padding-left:10px;padding-right:30px;background-color:#fff;border:solid 1px #d0d0d0;height:34px;line-height:34px}.jsselect.radius{overflow:visible}.jsselect.radius .select-default{border-radius:4px}.jsselect.radius .select-list{border-radius:4px;border-top-left-radius:0;border-top-right-radius:0}.select-icon{position:absolute;height:8px;width:12px;right:10px;top:50%;margin-top:-4px;background:url(../images/jselect/iconpic-arrow-down2.png) no-repeat center}.unselectable{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.select-list{position:absolute;left:0;right:0;top:100%;z-index:1;line-height:34px;max-height:320px;overflow:auto;background-color:#fff;background-clip:padding-box;_height:expression(this.scrollHeight>319 ? "320px":"auto");-moz-box-shadow:0 1px 2px rgba(0,1,1,0.2);-webkit-box-shadow:0 1px 2px rgba(0,1,1,0.2);box-shadow:0 1px 2px rgba(0,1,1,0.2);box-sizing:border-box;border:solid 1px #d0d0d0}.select-item{margin:0;padding:0}.select-option{background:#fff;line-height:34px;text-align:left;white-space:nowrap;cursor:pointer;border-bottom:1px solid #f2f2f2;padding:0 10px}.select-item .selected{background-color:#148cf1;color:#fff}.btn-upload{position:relative;display:inline-block;height:31px;*display:inline;overflow:hidden;vertical-align:middle;cursor:pointer}.upload-url{cursor:pointer;width:300px}.input-file{position:absolute;right:0;top:0;cursor:pointer;z-index:1;font-size:30em;opacity:0;filter:alpha(opacity=0)}.form-group .upload-btn{margin-left:-1px}.btn-upload .icon-add,.btn-upload .icon-minus{cursor:pointer;display:inline-block;font-family:Arial;font-size:30px;height:31px;line-height:31px;text-align:center;vertical-align:middle;width:36px}@media(max-width:767px){.upload-btn{display:none}.upload-url{display:none}}.numberControlBox{display:inline-block;overflow:hidden;vertical-align:middle}.ncb-up,.ncb-down{font-size:0;display:block;height:10px;background-color:#f4f4f4;background:-moz-linear-gradient(top,#fff 0,#e6e6e6 50%,#fff 100%);width:24px;border:1px solid #d1d1d1;cursor:pointer}.ncb-up{margin-bottom:1px}.numberControlBox .ncb_ico{display:block;height:10px;background-image:url(../images/iconpic-arrow.png);background-repeat:no-repeat}.ncb-up .ncb_ico{background-position:-22px center}.ncb-down .ncb_ico{background-position:1px center}.ncb_btn_hover{border:1px solid #9dc7e7;background-color:#dff2fc;background:-moz-linear-gradient(top,#fff 0,#d2edfa 50%,#fff 100%)}.ncb_btn_selected{border:1px solid #6198c2;background-color:#aee1fb;background:-moz-linear-gradient(top,#fff 0,#aee1fb 50%,#fff 100%)}.input-text[type="number"]{width:80px}.spinner{display:block;overflow:hidden;width:100px;position:relative;padding-left:29px;padding-right:29px}.spinner .input-text{height:30px;text-align:center;width:100%}.spinner a{display:inline-block;position:absolute;top:0;bottom:0;height:28px;line-height:28px;width:28px;cursor:pointer;outline:0;text-decoration:none;text-align:center;font-size:16px;border:1px solid #ddd;background-color:#f7f7f7}.spinner a:hover{text-decoration:none}.spinner a i{font-style:normal}.spinner a.subtract{left:0}.spinner a.add{right:0}.spinner a.add.disabled,.spinner a.subtract.disabled{color:#999;cursor:not-allowed}.emailSug-wrapper{position:absolute;background:#fff;text-align:left;z-index:999}.emailSug-wrapper .emailSug-list .emailSug-item{font-size:14px;height:25px;line-height:25px;padding-left:10px;color:#333}.emailSug-wrapper .emailSug-list .emailSug-item.active{background:#5a98de;cursor:pointer;color:#fff}label,.placeholder{font-size:14px}.form legend{font-size:20px}.form .row{margin-top:15px}.form-label{display:block;color:#555}.formControls{position:relative}.formControls>*{vertical-align:middle}.placeholder{position:absolute;left:4px;top:4px;color:#c6c6c6;cursor:text}.form-horizontal .form-label{margin-top:3px;cursor:text;text-align:right}.form-horizontal .Validform_checktip{margin-top:5px}::-webkit-input-placeholder{color:#b3b3b3}:-moz-placeholder{color:#b3b3b3}::-moz-placeholder{color:#b3b3b3}:-ms-input-placeholder{color:#b3b3b3}.placeholder{color:#adb0be;position:absolute;z-index:9}@media(max-width:767px){.form-horizontal .form-label{text-align:left}}.Validform_error,input.error,select.error,textarea.error{background-color:#fbe2e2;border-color:#c66161;color:#c00}.Validform_wrong,.Validform_right,.Validform_warning{display:inline-block;height:20px;font-size:12px;vertical-align:middle;padding-left:25px}.Validform_wrong{background:url(../images/validform/iconpic-error.png) no-repeat 0 center;color:#ef392b}.Validform_right{background:url(../images/validform/iconpic-right.png) no-repeat 0 center}.Validform_warning{background:url(../images/validform/iconpic-warning.png) no-repeat 0 center;color:#777}label.error{position:absolute;right:18px;top:5px;color:#ef392b;font-size:12px}.check-box label.error,.radio-box label.error{right:auto;width:150px;left:210px;top:-2px}.passwordStrength b{font-weight:400}.passwordStrength b,.passwordStrength span{display:inline-block;vertical-align:middle;line-height:16px;line-height:18px\9;height:16px}.passwordStrength span{width:57px;text-align:center;background-color:#d0d0d0;border-right:1px solid #fff}.passwordStrength .last{border-right:0}.passwordStrength .bgStrength{color:#fff;background-color:#fcc900}#Validform_msg{font-size:14px;width:300px;-webkit-box-shadow:2px 2px 3px #aaa;-moz-box-shadow:2px 2px 3px #aaa;background:#fff;position:absolute;top:0;right:50px;z-index:99999;display:none;filter:progid:DXImageTransform.Microsoft.Shadow(Strength=3,Direction=135,Color='#999999');box-shadow:2px 2px 0 rgba(0,0,0,0.1)}#Validform_msg .iframe{position:absolute;left:0;top:-1px;z-index:-1}#Validform_msg .Validform_title{font-size:20px;padding:10px;text-align:left;color:#fff;position:relative;background-color:#fcc900}#Validform_msg a.Validform_close:link,#Validform_msg a.Validform_close:visited{position:absolute;right:8px;top:6px;color:#fff;text-decoration:none;font-family:Verdana}#Validform_msg a.Validform_close:hover{color:#fff}#Validform_msg .Validform_info{padding:10px;border:1px solid #bbb;border-top:0;text-align:left}@media(max-width:767px){.responsive .Validform_checktip{margin-top:10px}}.close{font-size:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;box-sizing:border-box;cursor:pointer;text-align:center;font-weight:400;white-space:nowrap;vertical-align:middle;-moz-padding-start:npx;-moz-padding-end:npx;border:solid 1px #ddd;background-color:#fff;width:auto;*zoom:1;*overflow:visible;-webkit-transition:background-color .1s linear;-moz-transition:background-color .1s linear;-o-transition:background-color .1s linear;transition:background-color .1s linear}a.btn:hover,a.btn:focus,a.btn:active,a.btn.active,a.btn.disabled,a.btn[disabled]{text-decoration:none}.btn:active,.btn.active{background-color:#ccc}.btn:first-child{*margin-left:0}.btn.active,.btn:active{-moz-box-shadow:0 1px 8px rgba(0,0,0,0.125) inset;-webkit-box-shadow:0 1px 8px rgba(0,0,0,0.125) inset;box-shadow:0 1px 8px rgba(0,0,0,0.125) inset}.btn-default{background-color:#e6e6e6;border-color:#e6e6e6}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active{color:#333;background-color:#c7c7c7;border-color:#c7c7c7}.btn-primary{color:#fff;background-color:#5a98de;border-color:#5a98de}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active{color:#fff;background-color:#0a6999;border-color:#0a6999}.btn-secondary{color:#fff;background-color:#3bb4f2;border-color:#3bb4f2}.btn-secondary:hover,.btn-secondary:focus,.btn-secondary:active,.btn-secondary.active{color:#fff;background-color:#0f9ae0;border-color:#0f9ae0}.btn-success{color:#fff;background-color:#5eb95e;border-color:#5eb95e}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active{color:#fff;background-color:#429842;border-color:#429842}.btn-warning{color:#fff;background-color:#f37b1d;border-color:#f37b1d}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active{color:#fff;background-color:#c85e0b;border-color:#c85e0b}.btn-danger{color:#fff;background-color:#dd514c;border-color:#dd514c}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active{color:#fff;background-color:#c62b26;border-color:#c62b26}.btn-link{color:#0e90d2;cursor:pointer;border-color:transparent;background-color:transparent}.btn-link:hover,.btn-link:focus,.btn-link:active,.btn-link.active{color:#095f8a;text-decoration:underline;background-color:transparent}.btn-block{-moz-box-sizing:border-box;display:block;padding-left:0;padding-right:0;width:100%}.btn-default-outline{background-color:transparent;border-color:#e6e6e6}.btn-default-outline:hover,.btn-default-outline:focus,.btn-default-outline:active,.btn-default-outline.active{color:#333;background-color:transparent;border-color:#c7c7c7}.btn-primary-outline{color:#5a98de;background-color:transparent;border-color:#5a98de}.btn-primary-outline:hover,.btn-primary-outline:focus,.btn-primary-outline:active,.btn-primary-outline.active{color:#0a6999;background-color:transparent;border-color:#0a6999}.btn-secondary-outline{color:#3bb4f2;background-color:transparent;background-image:none;border-color:#3bb4f2}.btn-secondary-outline.active,.btn-secondary-outline.focus,.btn-secondary-outline:active,.btn-secondary-outline:focus,.open>.btn-secondary-outline.dropdown-toggle{color:#fff;background-color:#3bb4f2;border-color:#3bb4f2}.btn-secondary-outline:hover{color:#fff;background-color:#3bb4f2;border-color:#3bb4f2}.btn-secondary-outline.disabled.focus,.btn-secondary-outline.disabled:focus,.btn-secondary-outline:disabled.focus,.btn-secondary-outline:disabled:focus,fieldset[disabled] .btn-secondary-outline.focus,fieldset[disabled] .btn-secondary-outline:focus{border-color:#0f9ae0}.btn-success-outline{color:#5eb95e;background-color:transparent;background-image:none;border-color:#5eb95e}.btn-success-outline.active,.btn-success-outline.focus,.btn-success-outline:active,.btn-success-outline:focus,.open>.btn-success-outline.dropdown-toggle{color:#fff;background-color:#5eb95e;border-color:#5eb95e}.btn-success-outline:hover{color:#fff;background-color:#5eb95e;border-color:#5eb95e}.btn-success-outline.disabled.focus,.btn-success-outline.disabled:focus,.btn-success-outline:disabled.focus,.btn-success-outline:disabled:focus,fieldset[disabled] .btn-success-outline.focus,fieldset[disabled] .btn-success-outline:focus{border-color:#429842}.btn-warning-outline{color:#f37b1d;background-color:transparent;background-image:none;border-color:#f37b1d}.btn-warning-outline.active,.btn-warning-outline.focus,.btn-warning-outline:active,.btn-warning-outline:focus,.open>.btn-warning-outline.dropdown-toggle{color:#fff;background-color:#f37b1d;border-color:#f37b1d}.btn-warning-outline:hover{color:#fff;background-color:#f37b1d;border-color:#f37b1d}.btn-warning-outline.disabled.focus,.btn-warning-outline.disabled:focus,.btn-success-outline:disabled.focus,.btn-warning-outline:disabled:focus,fieldset[disabled] .btn-warning-outline.focus,fieldset[disabled] .btn-warning-outline:focus{border-color:#c85e0b}.btn-danger-outline{color:#dd514c;background-color:transparent;background-image:none;border-color:#dd514c}.btn-danger-outline.active,.btn-danger-outline.focus,.btn-danger-outline:active,.btn-danger-outline:focus,.open>.btn-danger-outline.dropdown-toggle{color:#fff;background-color:#dd514c;border-color:#dd514c}.btn-danger-outline:hover{color:#fff;background-color:#dd514c;border-color:#dd514c}.btn-danger-outline.disabled.focus,.btn-danger-outline.disabled:focus,.btn-success-outline:disabled.focus,.btn-danger-outline:disabled:focus,fieldset[disabled] .btn-danger-outline.focus,fieldset[disabled] .btn-danger-outline:focus{border-color:#c62b26}.btn.disabled{cursor:not-allowed;background-image:none;opacity:.65;filter:alpha(opacity=65);box-shadow:none;pointer-events:none}.form-group{display:inline-block;vertical-align:middle}.form-group .input-text{position:relative;vertical-align:top}.form-group.radius{overflow:hidden}.form-group.radius .input-text{border-radius:4px 0 0 4px}.form-group.round .input-text{border-radius:1000px 0 0 1000px}.form-group .btn{position:relative;margin-left:-1px}.form-group.radius .btn{border-radius:0 4px 4px 0}.form-group.round .btn{border-radius:0 1000px 1000px 0}.img-responsive{display:inline-block;max-width:100%;height:auto}.thumbnail{display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}@media(max-width:767px){.img-responsive{width:100%}}.duang-opacity img{-webkit-transition:opacity .1s linear;-moz-transition:opacity .1s linear;-o-transition:opacity .1s linear;transition:opacity .1s linear}.duang-opacity a:hover img,a:hover .opacity img{opacity:.85;filter:alpha(opacity=85)}.album-img{border:1px solid #e0e0e0}.album-img img{display:block;width:100%}.album-title{display:block;text-align:left;padding:7px 5px;line-height:18px;color:#555;text-decoration:none;font-size:12px;border:solid 1px #e0e0e0;border-top:0}.album-bg-Fir,.album-bg-Sec{border:1px solid #e6e6e6;border-top:1px solid #f5f5f5;height:1px;margin:0 auto;overflow:hidden}.album-bg-Fir{margin:0 3px}.album-bg-Sec{margin:0 6px}.avatar{display:inline-block;position:relative;overflow:hidden}.avatar img{display:block}.avatar.radius,.avatar.radius img{border-radius:50%}.avatar,.avatar img{width:32px;height:32px}.avatar.size-MINI{width:16px;height:16px}.avatar.size-S,.avatar.size-S img{width:24px;height:24px}.avatar.size-M,.avatar.size-M img{width:32px;height:32px}.avatar.size-L,.avatar.size-L img{width:48px;height:48px}.avatar.size-XL,.avatar.size-XL img{width:64px;height:64px}.avatar.size-XXL,.avatar.size-XXL img{width:100px;height:100px}.avatar.size-XXXL,.avatar.size-XXXL img{width:128px;height:128px}.iconpic{display:inline-block;vertical-align:sub;*vertical-align:middle;_vertical-align:middle;width:16px;height:16px;background-position:center;background-repeat:no-repeat}.hui-bounce,.hui-flip,.hui-flash,.hui-shake,.hui-swing,.hui-wobble,.hui-ring{-webkit-animation:1s ease;-moz-animation:1s ease;-ms-animation:1s ease;animation:1s ease}.hui-fadein,.hui-fadeinT,.hui-fadeinR,.hui-fadeinB,.hui-fadeinL,.hui-bouncein,.hui-bounceinT,.hui-bounceinR,.hui-bounceinB,.hui-bounceinL,.hui-rotatein,.hui-rotateinLT,.hui-rotateinLB,.hui-rotateinRT,.hui-rotateinRB,.hui-flipin,.hui-flipinX,.hui-flipinY{-webkit-animation:1s ease-out backwards;-moz-animation:1s ease-out backwards;-ms-animation:1s ease-out backwards;animation:1s ease-out backwards}.hui-fadeout,.hui-fadeoutT,.hui-fadeoutR,.hui-fadeoutB,.hui-fadeoutL,.hui-bounceout,.hui-bounceoutT,.hui-bounceoutR,.hui-bounceoutB,.hui-bounceoutL,.hui-rotateout,.hui-rotateoutLT,.hui-rotateoutLB,.hui-rotateoutRT,.hui-rotateoutRB,.hui-flipout,.hui-flipoutX,.hui-flipoutY{-webkit-animation:1s ease-in forwards;-moz-animation:1s ease-in forwards;-ms-animation:1s ease-in forwards;animation:1s ease-in forwards}.hui-fadein{-webkit-animation-name:fadein;-moz-animation-name:fadein;-ms-animation-name:fadein;animation-name:fadein}.hui-fadeinT{-webkit-animation-name:fadeinT;-moz-animation-name:fadeinT;-ms-animation-name:fadeinT;animation-name:fadeinT}.hui-fadeinR{-webkit-animation-name:fadeinR;-moz-animation-name:fadeinR;-ms-animation-name:fadeinR;animation-name:fadeinR}.hui-fadeinB{-webkit-animation-name:fadeinB;-moz-animation-name:fadeinB;-ms-animation-name:fadeinB;animation-name:fadeinB}.hui-fadeinL{-webkit-animation-name:fadeinL;-moz-animation-name:fadeinL;-ms-animation-name:fadeinL;animation-name:fadeinL}.hui-fadeout{-webkit-animation-name:fadeout;-moz-animation-name:fadeout;-ms-animation-name:fadeout;animation-name:fadeout}.hui-fadeoutT{-webkit-animation-name:fadeoutT;-moz-animation-name:fadeoutT;-ms-animation-name:fadeoutT;animation-name:fadeoutT}.hui-fadeoutR{-webkit-animation-name:fadeoutR;-moz-animation-name:fadeoutR;-ms-animation-name:fadeoutR;animation-name:fadeoutR}.hui-fadeoutB{-webkit-animation-name:fadeoutB;-moz-animation-name:fadeoutB;-ms-animation-name:fadeoutB;animation-name:fadeoutB}.hui-fadeoutL{-webkit-animation-name:fadeoutL;-moz-animation-name:fadeoutL;-ms-animation-name:fadeoutL;animation-name:fadeoutL}.hui-bounce{-webkit-animation-name:bounce;-moz-animation-name:bounce;-ms-animation-name:bounce;animation-name:bounce}.hui-bouncein{-webkit-animation-name:bouncein;-moz-animation-name:bouncein;-ms-animation-name:bouncein;animation-name:bouncein}.hui-bounceinT{-webkit-animation-name:bounceinT;-moz-animation-name:bounceinT;-ms-animation-name:bounceinT;animation-name:bounceinT}.hui-bounceinR{-webkit-animation-name:bounceinR;-moz-animation-name:bounceinR;-ms-animation-name:bounceinR;animation-name:bounceinR}.hui-bounceinB{-webkit-animation-name:bounceinB;-moz-animation-name:bounceinB;-ms-animation-name:bounceinB;animation-name:bounceinB}.hui-bounceinL{-webkit-animation-name:bounceinL;-moz-animation-name:bounceinL;-ms-animation-name:bounceinL;animation-name:bounceinL}.hui-bounceout{-webkit-animation-name:bounceout;-moz-animation-name:bounceout;-ms-animation-name:bounceout;animation-name:bounceout}.hui-bounceoutT{-webkit-animation-name:bounceoutT;-moz-animation-name:bounceoutT;-ms-animation-name:bounceoutT;animation-name:bounceoutT}.hui-bounceoutR{-webkit-animation-name:bounceoutR;-moz-animation-name:bounceoutR;-ms-animation-name:bounceoutR;animation-name:bounceoutR}.hui-bounceoutB{-webkit-animation-name:bounceoutB;-moz-animation-name:bounceoutB;-ms-animation-name:bounceoutB;animation-name:bounceoutB}.hui-bounceoutL{-webkit-animation-name:bounceoutL;-moz-animation-name:bounceoutL;-ms-animation-name:bounceoutL;animation-name:bounceoutL}.hui-rotatein{-webkit-animation-name:rotatein;-moz-animation-name:rotatein;-ms-animation-name:rotatein;animation-name:rotatein}.hui-rotateinLT{-webkit-animation-name:rotateinLT;-moz-animation-name:rotateinLT;-ms-animation-name:rotateinLT;animation-name:rotateinLT}.hui-rotateinLB{-webkit-animation-name:rotateinLB;-moz-animation-name:rotateinLB;-ms-animation-name:rotateinLB;animation-name:rotateinLB}.hui-rotateinRT{-webkit-animation-name:rotateinRT;-moz-animation-name:rotateinRT;-ms-animation-name:rotateinRT;animation-name:rotateinRT}.hui-rotateinRB{-webkit-animation-name:rotateinRB;-moz-animation-name:rotateinRB;-ms-animation-name:rotateinRB;animation-name:rotateinRB}.hui-rotateout{-webkit-animation-name:rotateout;-moz-animation-name:rotateout;-ms-animation-name:rotateout;animation-name:rotateout}.hui-rotateoutLT{-webkit-animation-name:rotateoutLT;-moz-animation-name:rotateoutLT;-ms-animation-name:rotateoutLT;animation-name:rotateoutLT}.hui-rotateoutLB{-webkit-animation-name:rotateoutLB;-moz-animation-name:rotateoutLB;-ms-animation-name:rotateoutLB;animation-name:rotateoutLB}.hui-rotateoutRT{-webkit-animation-name:rotateoutRT;-moz-animation-name:rotateoutRT;-ms-animation-name:rotateoutRT;animation-name:rotateoutRT}.hui-rotateoutRB{-webkit-animation-name:rotateoutRB;-moz-animation-name:rotateoutRB;-ms-animation-name:rotateoutRB;animation-name:rotateoutRB}.hui-flip{-webkit-animation-name:flip;-moz-animation-name:flip;-ms-animation-name:flip;animation-name:flip}.hui-flipinX{-webkit-animation-name:flipinX;-moz-animation-name:flipinX;-ms-animation-name:flipinX;animation-name:flipinX}.hui-flipin,.hui-flipinY{-webkit-animation-name:flipinY;-moz-animation-name:flipinY;-ms-animation-name:flipinY;animation-name:flipinY}.hui-flipoutX{-webkit-animation-name:flipoutX;-moz-animation-name:flipoutX;-ms-animation-name:flipoutX;animation-name:flipoutX}.hui-flipout,.hui-flipoutY{-webkit-animation-name:flipoutY;-moz-animation-name:flipoutY;-ms-animation-name:flipoutY;animation-name:flipoutY}.hui-flash{-webkit-animation-name:flash;-moz-animation-name:flash;-ms-animation-name:flash;animation-name:flash}.hui-shake{-webkit-animation-name:shake;-moz-animation-name:shake;-ms-animation-name:shake;animation-name:shake}.hui-swing{-webkit-animation-name:swing;-moz-animation-name:swing;-ms-animation-name:swing;animation-name:swing}.hui-wobble{-webkit-animation-name:wobble;-moz-animation-name:wobble;-ms-animation-name:wobble;animation-name:wobble}.hui-ring{-webkit-animation-name:ring;-moz-animation-name:ring;-ms-animation-name:ring;animation-name:ring}@-webkit-keyframes fadein{0%{opacity:0}100%{opacity:1}}@-moz-keyframes fadein{0%{opacity:0}100%{opacity:1}}@-ms-keyframes fadein{0%{opacity:0}100%{opacity:1}}@keyframes fadein{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes fadeinT{0%{opacity:0;-webkit-transform:translateY(-100px)}100%{opacity:1;-webkit-transform:translateY(0)}}@-moz-keyframes fadeinT{0%{opacity:0;-moz-transform:translateY(-100px)}100%{opacity:1;-moz-transform:translateY(0)}}@-ms-keyframes fadeinT{0%{opacity:0;-ms-transform:translateY(-100px)}100%{opacity:1;-ms-transform:translateY(0)}}@keyframes fadeinT{0%{opacity:0;transform:translateY(-100px)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes fadeinR{0%{opacity:0;-webkit-transform:translateX(100px)}100%{opacity:1;-webkit-transform:translateX(0)}}@-moz-keyframes fadeinR{0%{opacity:0;-moz-transform:translateX(100px)}100%{opacity:1;-moz-transform:translateX(0)}}@-ms-keyframes fadeinR{0%{opacity:0;-ms-transform:translateX(100px)}100%{opacity:1;-ms-transform:translateX(0)}}@keyframes fadeinR{0%{opacity:0;transform:translateX(100px)}100%{opacity:1;transform:translateX(0)}}@-webkit-keyframes fadeinB{0%{opacity:0;-webkit-transform:translateY(100px)}100%{opacity:1;-webkit-transform:translateY(0)}}@-moz-keyframes fadeinB{0%{opacity:0;-moz-transform:translateY(100px)}100%{opacity:1;-moz-transform:translateY(0)}}@-ms-keyframes fadeinB{0%{opacity:0;-ms-transform:translateY(100px)}100%{opacity:1;-ms-transform:translateY(0)}}@keyframes fadeinB{0%{opacity:0;transform:translateY(100px)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes fadeinL{0%{opacity:0;-webkit-transform:translateX(-100px)}100%{opacity:1;-webkit-transform:translateX(0)}}@-moz-keyframes fadeinL{0%{opacity:0;-moz-transform:translateX(-100px)}100%{opacity:1;-moz-transform:translateX(0)}}@-ms-keyframes fadeinL{0%{opacity:0;-ms-transform:translateX(-100px)}100%{opacity:1;-ms-transform:translateX(0)}}@keyframes fadeinL{0%{opacity:0;transform:translateX(-100px)}100%{opacity:1;transform:translateX(0)}}@-webkit-keyframes fadeout{0%{opacity:1}100%{opacity:0}}@-moz-keyframes fadeout{0%{opacity:1}100%{opacity:0}}@-ms-keyframes fadeout{0%{opacity:1}100%{opacity:0}}@keyframes fadeout{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes fadeoutT{0%{opacity:1;-webkit-transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-100px)}}@-moz-keyframes fadeoutT{0%{opacity:1;-moz-transform:translateY(0)}100%{opacity:0;-moz-transform:translateY(-100px)}}@-ms-keyframes fadeoutT{0%{opacity:1;-ms-transform:translateY(0)}100%{opacity:0;-ms-transform:translateY(-100px)}}@keyframes fadeoutT{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-100px)}}@-webkit-keyframes fadeoutR{0%{opacity:1;-webkit-transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(100px)}}@-moz-keyframes fadeoutR{0%{opacity:1;-moz-transform:translateX(0)}100%{opacity:0;-moz-transform:translateX(100px)}}@-ms-keyframes fadeoutR{0%{opacity:1;-ms-transform:translateX(0)}100%{opacity:0;-ms-transform:translateX(100px)}}@keyframes fadeoutR{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(100px)}}@-webkit-keyframes fadeoutB{0%{opacity:1;-webkit-transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(100px)}}@-moz-keyframes fadeoutB{0%{opacity:1;-moz-transform:translateY(0)}100%{opacity:0;-moz-transform:translateY(100px)}}@-ms-keyframes fadeoutB{0%{opacity:1;-ms-transform:translateY(0)}100%{opacity:0;-ms-transform:translateY(100px)}}@keyframes fadeoutB{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(100px)}}@-webkit-keyframes fadeoutL{0%{opacity:1;-webkit-transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-100px)}}@-moz-keyframes fadeoutL{0%{opacity:1;-moz-transform:translateX(0)}100%{opacity:0;-moz-transform:translateX(-100px)}}@-ms-keyframes fadeoutL{0%{opacity:1;-ms-transform:translateX(0)}100%{opacity:0;-ms-transform:translateX(-100px)}}@keyframes fadeoutL{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(-100px)}}@-webkit-keyframes bounce{0%,20%,50%,80%,100%{-webkit-transform:translateY(0)}40%{-webkit-transform:translateY(-30px)}60%{-webkit-transform:translateY(-15px)}}@-moz-keyframes bounce{0%,20%,50%,80%,100%{-moz-transform:translateY(0)}40%{-moz-transform:translateY(-30px)}60%{-moz-transform:translateY(-15px)}}@-ms-keyframes bounce{0%,20%,50%,80%,100%{-ms-transform:translateY(0)}40%{-ms-transform:translateY(-30px)}60%{-ms-transform:translateY(-15px)}}@keyframes bounce{0%,20%,50%,80%,100%{transform:translateY(0)}40%{transform:translateY(-30px)}60%{transform:translateY(-15px)}}@-webkit-keyframes bouncein{0%{opacity:0;-webkit-transform:scale(0.3)}50%{opacity:1;-webkit-transform:scale(1.05)}70%{-webkit-transform:scale(0.9)}100%{-webkit-transform:scale(1)}}@-moz-keyframes bouncein{0%{opacity:0;-moz-transform:scale(0.3)}50%{opacity:1;-moz-transform:scale(1.05)}70%{-moz-transform:scale(0.9)}100%{-moz-transform:scale(1)}}@-ms-keyframes bouncein{0%{opacity:0;-ms-transform:scale(0.3)}50%{opacity:1;-ms-transform:scale(1.05)}70%{-ms-transform:scale(0.9)}100%{-ms-transform:scale(1)}}@keyframes bouncein{0%{opacity:0;transform:scale(0.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(0.9)}100%{transform:scale(1)}}@-webkit-keyframes bounceinT{0%{opacity:0;-webkit-transform:translateY(-100px)}60%{opacity:1;-webkit-transform:translateY(30px)}80%{-webkit-transform:translateY(-10px)}100%{-webkit-transform:translateY(0)}}@-moz-keyframes bounceinT{0%{opacity:0;-moz-transform:translateY(-100px)}60%{opacity:1;-moz-transform:translateY(30px)}80%{-moz-transform:translateY(-10px)}100%{-moz-transform:translateY(0)}}@-ms-keyframes bounceinT{0%{opacity:0;-ms-transform:translateY(-100px)}60%{opacity:1;-ms-transform:translateY(30px)}80%{-ms-transform:translateY(-10px)}100%{-ms-transform:translateY(0)}}@keyframes bounceinT{0%{opacity:0;transform:translateY(-100px)}60%{opacity:1;transform:translateY(30px)}80%{transform:translateY(-10px)}100%{transform:translateY(0)}}@-webkit-keyframes bounceinR{0%{opacity:0;-webkit-transform:translateX(100px)}60%{opacity:1;-webkit-transform:translateX(-30px)}80%{-webkit-transform:translateX(10px)}100%{-webkit-transform:translateX(0)}}@-moz-keyframes bounceinR{0%{opacity:0;-moz-transform:translateX(100px)}60%{opacity:1;-moz-transform:translateX(-30px)}80%{-moz-transform:translateX(10px)}100%{-moz-transform:translateX(0)}}@-ms-keyframes bounceinR{0%{opacity:0;-ms-transform:translateX(100px)}60%{opacity:1;-ms-transform:translateX(-30px)}80%{-ms-transform:translateX(10px)}100%{-ms-transform:translateX(0)}}@keyframes bounceinR{0%{opacity:0;transform:translateX(100px)}60%{opacity:1;transform:translateX(-30px)}80%{transform:translateX(10px)}100%{transform:translateX(0)}}@-webkit-keyframes bounceinB{0%{opacity:0;-webkit-transform:translateY(100px)}60%{opacity:1;-webkit-transform:translateY(-30px)}80%{-webkit-transform:translateY(10px)}100%{-webkit-transform:translateY(0)}}@-moz-keyframes bounceinB{0%{opacity:0;-moz-transform:translateY(100px)}60%{opacity:1;-moz-transform:translateY(-30px)}80%{-moz-transform:translateY(10px)}100%{-moz-transform:translateY(0)}}@-ms-keyframes bounceinB{0%{opacity:0;-ms-transform:translateY(100px)}60%{opacity:1;-ms-transform:translateY(-30px)}80%{-ms-transform:translateY(10px)}100%{-ms-transform:translateY(0)}}@keyframes bounceinB{0%{opacity:0;transform:translateY(100px)}60%{opacity:1;transform:translateY(-30px)}80%{transform:translateY(10px)}100%{transform:translateY(0)}}@-webkit-keyframes bounceinL{0%{opacity:0;-webkit-transform:translateX(-100px)}60%{opacity:1;-webkit-transform:translateX(30px)}80%{-webkit-transform:translateX(-10px)}100%{-webkit-transform:translateX(0)}}@-moz-keyframes bounceinL{0%{opacity:0;-moz-transform:translateX(-100px)}60%{opacity:1;-moz-transform:translateX(30px)}80%{-moz-transform:translateX(-10px)}100%{-moz-transform:translateX(0)}}@-ms-keyframes bounceinL{0%{opacity:0;-ms-transform:translateX(-100px)}60%{opacity:1;-ms-transform:translateX(30px)}80%{-ms-transform:translateX(-10px)}100%{-ms-transform:translateX(0)}}@keyframes bounceinL{0%{opacity:0;transform:translateX(-100px)}60%{opacity:1;transform:translateX(30px)}80%{transform:translateX(-10px)}100%{transform:translateX(0)}}@-webkit-keyframes bounceout{0%{-webkit-transform:scale(1)}25%{-webkit-transform:scale(0.95)}50%{opacity:1;-webkit-transform:scale(1.1)}100%{opacity:0;-webkit-transform:scale(0.3)}}@-moz-keyframes bounceout{0%{-moz-transform:scale(1)}25%{-moz-transform:scale(0.95)}50%{opacity:1;-moz-transform:scale(1.1)}100%{opacity:0;-moz-transform:scale(0.3)}}@-ms-keyframes bounceout{0%{-ms-transform:scale(1)}25%{-ms-transform:scale(0.95)}50%{opacity:1;-ms-transform:scale(1.1)}100%{opacity:0;-ms-transform:scale(0.3)}}@keyframes bounceout{0%{transform:scale(1)}25%{transform:scale(0.95)}50%{opacity:1;transform:scale(1.1)}100%{opacity:0;transform:scale(0.3)}}@-webkit-keyframes bounceoutT{0%{-webkit-transform:translateY(0)}20%{opacity:1;-webkit-transform:translateY(20px)}100%{opacity:0;-webkit-transform:translateY(-100px)}}@-moz-keyframes bounceoutT{0%{-moz-transform:translateY(0)}20%{opacity:1;-moz-transform:translateY(20px)}100%{opacity:0;-moz-transform:translateY(-100px)}}@-ms-keyframes bounceoutT{0%{-ms-transform:translateY(0)}20%{opacity:1;-ms-transform:translateY(20px)}100%{opacity:0;-ms-transform:translateY(-100px)}}@keyframes bounceoutT{0%{transform:translateY(0)}20%{opacity:1;transform:translateY(20px)}100%{opacity:0;transform:translateY(-100px)}}@-webkit-keyframes bounceoutR{0%{-webkit-transform:translateX(0)}20%{opacity:1;-webkit-transform:translateX(-20px)}100%{opacity:0;-webkit-transform:translateX(100px)}}@-moz-keyframes bounceoutR{0%{-moz-transform:translateX(0)}20%{opacity:1;-moz-transform:translateX(-20px)}100%{opacity:0;-moz-transform:translateX(100px)}}@-ms-keyframes bounceoutR{0%{-ms-transform:translateX(0)}20%{opacity:1;-ms-transform:translateX(-20px)}100%{opacity:0;-ms-transform:translateX(100px)}}@keyframes bounceoutR{0%{transform:translateX(0)}20%{opacity:1;transform:translateX(-20px)}100%{opacity:0;transform:translateX(100px)}}@-webkit-keyframes bounceoutB{0%{-webkit-transform:translateY(0)}20%{opacity:1;-webkit-transform:translateY(-20px)}100%{opacity:0;-webkit-transform:translateY(100px)}}@-moz-keyframes bounceoutB{0%{-moz-transform:translateY(0)}20%{opacity:1;-moz-transform:translateY(-20px)}100%{opacity:0;-moz-transform:translateY(100px)}}@-ms-keyframes bounceoutB{0%{-ms-transform:translateY(0)}20%{opacity:1;-ms-transform:translateY(-20px)}100%{opacity:0;-ms-transform:translateY(100px)}}@keyframes bounceoutB{0%{transform:translateY(0)}20%{opacity:1;transform:translateY(-20px)}100%{opacity:0;transform:translateY(100px)}}@-webkit-keyframes bounceoutL{0%{-webkit-transform:translateX(0)}20%{opacity:1;-webkit-transform:translateX(20px)}100%{opacity:0;-webkit-transform:translateX(-100px)}}@-moz-keyframes bounceoutL{0%{-moz-transform:translateX(0)}20%{opacity:1;-moz-transform:translateX(20px)}100%{opacity:0;-moz-transform:translateX(-100px)}}@-ms-keyframes bounceoutL{0%{-ms-transform:translateX(0)}20%{opacity:1;-ms-transform:translateX(20px)}100%{opacity:0;-ms-transform:translateX(-100px)}}@keyframes bounceoutL{0%{transform:translateX(0)}20%{opacity:1;transform:translateX(20px)}100%{opacity:0;transform:translateX(-200px)}}@-webkit-keyframes rotatein{0%{opacity:0;-webkit-transform:rotate(-200deg)}100%{opacity:1;-webkit-transform:rotate(0)}}@-moz-keyframes rotatein{0%{opacity:0;-moz-transform:rotate(-200deg)}100%{opacity:1;-moz-transform:rotate(0)}}@-ms-keyframes rotatein{0%{opacity:0;-ms-transform:rotate(-200deg)}100%{opacity:1;-ms-transform:rotate(0)}}@keyframes rotatein{0%{opacity:0;transform:rotate(-200deg)}100%{opacity:1;transform:rotate(0)}}@-webkit-keyframes rotateinLT{0%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(-90deg);opacity:0}100%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(0);opacity:1}}@-moz-keyframes rotateinLT{0%{-moz-transform-origin:left bottom;-moz-transform:rotate(-90deg);opacity:0}100%{-moz-transform-origin:left bottom;-moz-transform:rotate(0);opacity:1}}@-ms-keyframes rotateinLT{0%{-ms-transform-origin:left bottom;-ms-transform:rotate(-90deg);opacity:0}100%{-ms-transform-origin:left bottom;-ms-transform:rotate(0);opacity:1}}@keyframes rotateinLT{0%{transform-origin:left bottom;transform:rotate(-90deg);opacity:0}100%{transform-origin:left bottom;transform:rotate(0);opacity:1}}@-webkit-keyframes rotateineftB{0%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(90deg);opacity:0}100%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(0);opacity:1}}@-moz-keyframes rotateineftB{0%{-moz-transform-origin:left bottom;-moz-transform:rotate(90deg);opacity:0}100%{-moz-transform-origin:left bottom;-moz-transform:rotate(0);opacity:1}}@-ms-keyframes rotateineftB{0%{-ms-transform-origin:left bottom;-ms-transform:rotate(90deg);opacity:0}100%{-ms-transform-origin:left bottom;-ms-transform:rotate(0);opacity:1}}@keyframes rotateineftB{0%{transform-origin:left bottom;transform:rotate(90deg);opacity:0}100%{transform-origin:left bottom;transform:rotate(0);opacity:1}}@-webkit-keyframes rotateinRT{0%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(90deg);opacity:0}100%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(0);opacity:1}}@-moz-keyframes rotateinRT{0%{-moz-transform-origin:right bottom;-moz-transform:rotate(90deg);opacity:0}100%{-moz-transform-origin:right bottom;-moz-transform:rotate(0);opacity:1}}@-ms-keyframes rotateinRT{0%{-ms-transform-origin:right bottom;-ms-transform:rotate(90deg);opacity:0}100%{-ms-transform-origin:right bottom;-ms-transform:rotate(0);opacity:1}}@keyframes rotateinRT{0%{transform-origin:right bottom;transform:rotate(90deg);opacity:0}100%{transform-origin:right bottom;transform:rotate(0);opacity:1}}@-webkit-keyframes rotateinRB{0%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(-90deg);opacity:0}100%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(0);opacity:1}}@-moz-keyframes rotateinRB{0%{-moz-transform-origin:right bottom;-moz-transform:rotate(-90deg);opacity:0}100%{-moz-transform-origin:right bottom;-moz-transform:rotate(0);opacity:1}}@-ms-keyframes rotateinRB{0%{-ms-transform-origin:right bottom;-ms-transform:rotate(-90deg);opacity:0}100%{-ms-transform-origin:right bottom;-ms-transform:rotate(0);opacity:1}}@keyframes rotateinRB{0%{transform-origin:right bottom;transform:rotate(-90deg);opacity:0}100%{transform-origin:right bottom;transform:rotate(0);opacity:1}}@-webkit-keyframes rotateout{0%{-webkit-transform-origin:center center;-webkit-transform:rotate(0);opacity:1}100%{-webkit-transform-origin:center center;-webkit-transform:rotate(200deg);opacity:0}}@-moz-keyframes rotateout{0%{-moz-transform-origin:center center;-moz-transform:rotate(0);opacity:1}100%{-moz-transform-origin:center center;-moz-transform:rotate(200deg);opacity:0}}@-ms-keyframes rotateout{0%{-ms-transform-origin:center center;-ms-transform:rotate(0);opacity:1}100%{-ms-transform-origin:center center;-ms-transform:rotate(200deg);opacity:0}}@keyframes rotateout{0%{transform-origin:center center;transform:rotate(0);opacity:1}100%{transform-origin:center center;transform:rotate(200deg);opacity:0}}@-webkit-keyframes rotateoutLT{0%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(0);opacity:1}100%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(-90deg);opacity:0}}@-moz-keyframes rotateoutLT{0%{-moz-transform-origin:left bottom;-moz-transform:rotate(0);opacity:1}100%{-moz-transform-origin:left bottom;-moz-transform:rotate(-90deg);opacity:0}}@-ms-keyframes rotateoutLT{0%{-ms-transform-origin:left bottom;-ms-transform:rotate(0);opacity:1}100%{-ms-transform-origin:left bottom;-ms-transform:rotate(-90deg);opacity:0}}@keyframes rotateoutLT{0%{transform-origin:left bottom;transform:rotate(0);opacity:1}100%{transform-origin:left bottom;transform:rotate(-90deg);opacity:0}}@-webkit-keyframes rotateoutLB{0%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(0);opacity:1}100%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(90deg);opacity:0}}@-moz-keyframes rotateoutLB{0%{-moz-transform-origin:left bottom;-moz-transform:rotate(0);opacity:1}100%{-moz-transform-origin:left bottom;-moz-transform:rotate(90deg);opacity:0}}@-ms-keyframes rotateoutLB{0%{-ms-transform-origin:left bottom;-ms-transform:rotate(0);opacity:1}100%{-ms-transform-origin:left bottom;-ms-transform:rotate(90deg);opacity:0}}@keyframes rotateoutLB{0%{transform-origin:left bottom;transform:rotate(0);opacity:1}100%{transform-origin:left bottom;transform:rotate(90deg);opacity:0}}@-webkit-keyframes rotateoutRT{0%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(0);opacity:1}100%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(90deg);opacity:0}}@-moz-keyframes rotateoutRT{0%{-moz-transform-origin:right bottom;-moz-transform:rotate(0);opacity:1}100%{-moz-transform-origin:right bottom;-moz-transform:rotate(90deg);opacity:0}}@-ms-keyframes rotateoutRT{0%{-ms-transform-origin:right bottom;-ms-transform:rotate(0);opacity:1}100%{-ms-transform-origin:right bottom;-ms-transform:rotate(90deg);opacity:0}}@keyframes rotateoutRT{0%{transform-origin:right bottom;transform:rotate(0);opacity:1}100%{transform-origin:right bottom;transform:rotate(90deg);opacity:0}}@-webkit-keyframes rotateoutBR{0%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(0);opacity:1}100%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(-90deg);opacity:0}}@-moz-keyframes rotateoutBR{0%{-moz-transform-origin:right bottom;-moz-transform:rotate(0);opacity:1}100%{-moz-transform-origin:right bottom;-moz-transform:rotate(-90deg);opacity:0}}@-ms-keyframes rotateoutBR{0%{-ms-transform-origin:right bottom;-ms-transform:rotate(0);opacity:1}100%{-ms-transform-origin:right bottom;-ms-transform:rotate(-90deg);opacity:0}}@keyframes rotateoutBR{0%{transform-origin:right bottom;transform:rotate(0);opacity:1}100%{transform-origin:right bottom;transform:rotate(-90deg);opacity:0}}@-webkit-keyframes flip{0%{-webkit-transform:perspective(400px) rotateY(0);-webkit-animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(170deg);-webkit-animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);-webkit-animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) rotateY(360deg) scale(0.95);-webkit-animation-timing-function:ease-in}100%{-webkit-transform:perspective(400px) scale(1);-webkit-animation-timing-function:ease-in}}@-moz-keyframes flip{0%{-moz-transform:perspective(400px) rotateY(0);-moz-animation-timing-function:ease-out}40%{-moz-transform:perspective(400px) translateZ(150px) rotateY(170deg);-moz-animation-timing-function:ease-out}50%{-moz-transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);-moz-animation-timing-function:ease-in}80%{-moz-transform:perspective(400px) rotateY(360deg) scale(0.95);-moz-animation-timing-function:ease-in}100%{-moz-transform:perspective(400px) scale(1);-moz-animation-timing-function:ease-in}}@-ms-keyframes flip{0%{-ms-transform:perspective(400px) rotateY(0);-ms-animation-timing-function:ease-out}40%{-ms-transform:perspective(400px) translateZ(150px) rotateY(170deg);-ms-animation-timing-function:ease-out}50%{-ms-transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);-ms-animation-timing-function:ease-in}80%{-ms-transform:perspective(400px) rotateY(360deg) scale(0.95);-ms-animation-timing-function:ease-in}100%{-ms-transform:perspective(400px) scale(1);-ms-animation-timing-function:ease-in}}@keyframes flip{0%{transform:perspective(400px) rotateY(0);animation-timing-function:ease-out}40%{transform:perspective(400px) translateZ(150px) rotateY(170deg);animation-timing-function:ease-out}50%{transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);animation-timing-function:ease-in}80%{transform:perspective(400px) rotateY(360deg) scale(0.95);animation-timing-function:ease-in}100%{transform:perspective(400px) scale(1);animation-timing-function:ease-in}}@-webkit-keyframes flipinX{0%{-webkit-transform:perspective(400px) rotateX(90deg);opacity:0}40%{-webkit-transform:perspective(400px) rotateX(-10deg)}70%{-webkit-transform:perspective(400px) rotateX(10deg)}100%{-webkit-transform:perspective(400px) rotateX(0);opacity:1}}@-moz-keyframes flipinX{0%{-moz-transform:perspective(400px) rotateX(90deg);opacity:0}40%{-moz-transform:perspective(400px) rotateX(-10deg)}70%{-moz-transform:perspective(400px) rotateX(10deg)}100%{-moz-transform:perspective(400px) rotateX(0);opacity:1}}@-ms-keyframes flipinX{0%{-ms-transform:perspective(400px) rotateX(90deg);opacity:0}40%{-ms-transform:perspective(400px) rotateX(-10deg)}70%{-ms-transform:perspective(400px) rotateX(10deg)}100%{-ms-transform:perspective(400px) rotateX(0);opacity:1}}@keyframes flipinX{0%{transform:perspective(400px) rotateX(90deg);opacity:0}40%{transform:perspective(400px) rotateX(-10deg)}70%{transform:perspective(400px) rotateX(10deg)}100%{transform:perspective(400px) rotateX(0);opacity:1}}@-webkit-keyframes flipinY{0%{-webkit-transform:perspective(400px) rotateY(90deg);opacity:0}40%{-webkit-transform:perspective(400px) rotateY(-10deg)}70%{-webkit-transform:perspective(400px) rotateY(10deg)}100%{-webkit-transform:perspective(400px) rotateY(0);opacity:1}}@-moz-keyframes flipinY{0%{-moz-transform:perspective(400px) rotateY(90deg);opacity:0}40%{-moz-transform:perspective(400px) rotateY(-10deg)}70%{-moz-transform:perspective(400px) rotateY(10deg)}100%{-moz-transform:perspective(400px) rotateY(0);opacity:1}}@-ms-keyframes flipinY{0%{-ms-transform:perspective(400px) rotateY(90deg);opacity:0}40%{-ms-transform:perspective(400px) rotateY(-10deg)}70%{-ms-transform:perspective(400px) rotateY(10deg)}100%{-ms-transform:perspective(400px) rotateY(0);opacity:1}}@keyframes flipinY{0%{transform:perspective(400px) rotateY(90deg);opacity:0}40%{transform:perspective(400px) rotateY(-10deg)}70%{transform:perspective(400px) rotateY(10deg)}100%{transform:perspective(400px) rotateY(0);opacity:1}}@-webkit-keyframes flipoutX{0%{-webkit-transform:perspective(400px) rotateX(0);opacity:1}100%{-webkit-transform:perspective(400px) rotateX(90deg);opacity:0}}@-moz-keyframes flipoutX{0%{-moz-transform:perspective(400px) rotateX(0);opacity:1}100%{-moz-transform:perspective(400px) rotateX(90deg);opacity:0}}@-ms-keyframes flipoutX{0%{-ms-transform:perspective(400px) rotateX(0);opacity:1}100%{-ms-transform:perspective(400px) rotateX(90deg);opacity:0}}@keyframes flipoutX{0%{transform:perspective(400px) rotateX(0);opacity:1}100%{transform:perspective(400px) rotateX(90deg);opacity:0}}@-webkit-keyframes flipoutY{0%{-webkit-transform:perspective(400px) rotateY(0);opacity:1}100%{-webkit-transform:perspective(400px) rotateY(90deg);opacity:0}}@-moz-keyframes flipoutY{0%{-moz-transform:perspective(400px) rotateY(0);opacity:1}100%{-moz-transform:perspective(400px) rotateY(90deg);opacity:0}}@-ms-keyframes flipoutY{0%{-ms-transform:perspective(400px) rotateY(0);opacity:1}100%{-ms-transform:perspective(400px) rotateY(90deg);opacity:0}}@keyframes flipoutY{0%{transform:perspective(400px) rotateY(0);opacity:1}100%{transform:perspective(400px) rotateY(90deg);opacity:0}}@-webkit-keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}@-moz-keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}@-ms-keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}@-webkit-keyframes shake{0%,100%{-webkit-transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px)}}@-moz-keyframes shake{0%,100%{-moz-transform:translateX(0)}10%,30%,50%,70%,90%{-moz-transform:translateX(-10px)}20%,40%,60%,80%{-moz-transform:translateX(10px)}}@-ms-keyframes shake{0%,100%{-ms-transform:translateX(0)}10%,30%,50%,70%,90%{-ms-transform:translateX(-10px)}20%,40%,60%,80%{-ms-transform:translateX(10px)}}@keyframes shake{0%,100%{transform:translateX(0)}10%,30%,50%,70%,90%{transform:translateX(-10px)}20%,40%,60%,80%{transform:translateX(10px)}}@-webkit-keyframes swing{20%{-webkit-transform:rotate(15deg)}40%{-webkit-transform:rotate(-10deg)}60%{-webkit-transform:rotate(5deg)}80%{-webkit-transform:rotate(-5deg)}100%{-webkit-transform:rotate(0)}}@-moz-keyframes swing{20%{-moz-transform:rotate(15deg)}40%{-moz-transform:rotate(-10deg)}60%{-moz-transform:rotate(5deg)}80%{-moz-transform:rotate(-5deg)}100%{-moz-transform:rotate(0)}}@-ms-keyframes swing{20%{-ms-transform:rotate(15deg)}40%{-ms-transform:rotate(-10deg)}60%{-ms-transform:rotate(5deg)}80%{-ms-transform:rotate(-5deg)}100%{-ms-transform:rotate(0)}}@keyframes swing{20%{transform:rotate(15deg)}40%{transform:rotate(-10deg)}60%{transform:rotate(5deg)}80%{transform:rotate(-5deg)}100%{transform:rotate(0)}}@-webkit-keyframes wobble{0%{-webkit-transform:translateX(0)}15%{-webkit-transform:translateX(-100px) rotate(-5deg)}30%{-webkit-transform:translateX(80px) rotate(3deg)}45%{-webkit-transform:translateX(-65px) rotate(-3deg)}60%{-webkit-transform:translateX(40px) rotate(2deg)}75%{-webkit-transform:translateX(-20px) rotate(-1deg)}100%{-webkit-transform:translateX(0)}}@-moz-keyframes wobble{0%{-moz-transform:translateX(0)}15%{-moz-transform:translateX(-100px) rotate(-5deg)}30%{-moz-transform:translateX(80px) rotate(3deg)}45%{-moz-transform:translateX(-65px) rotate(-3deg)}60%{-moz-transform:translateX(40px) rotate(2deg)}75%{-moz-transform:translateX(-20px) rotate(-1deg)}100%{-moz-transform:translateX(0)}}@-ms-keyframes wobble{0%{-ms-transform:translateX(0)}15%{-ms-transform:translateX(-100px) rotate(-5deg)}30%{-ms-transform:translateX(80px) rotate(3deg)}45%{-ms-transform:translateX(-65px) rotate(-3deg)}60%{-ms-transform:translateX(40px) rotate(2deg)}75%{-ms-transform:translateX(-20px) rotate(-1deg)}100%{-ms-transform:translateX(0)}}@keyframes wobble{0%{transform:translateX(0)}15%{transform:translateX(-100px) rotate(-5deg)}30%{transform:translateX(80px) rotate(3deg)}45%{transform:translateX(-65px) rotate(-3deg)}60%{transform:translateX(40px) rotate(2deg)}75%{transform:translateX(-20px) rotate(-1deg)}100%{transform:translateX(0)}}@-webkit-keyframes ring{0%{-webkit-transform:scale(1)}10%,20%{-webkit-transform:scale(0.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale(1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale(1.1) rotate(-3deg)}100%{-webkit-transform:scale(1) rotate(0)}}@-moz-keyframes ring{0%{-moz-transform:scale(1)}10%,20%{-moz-transform:scale(0.9) rotate(-3deg)}30%,50%,70%,90%{-moz-transform:scale(1.1) rotate(3deg)}40%,60%,80%{-moz-transform:scale(1.1) rotate(-3deg)}100%{-moz-transform:scale(1) rotate(0)}}@-ms-keyframes ring{0%{-ms-transform:scale(1)}10%,20%{-ms-transform:scale(0.9) rotate(-3deg)}30%,50%,70%,90%{-ms-transform:scale(1.1) rotate(3deg)}40%,60%,80%{-ms-transform:scale(1.1) rotate(-3deg)}100%{-ms-transform:scale(1) rotate(0)}}@keyframes ring{0%{transform:scale(1)}10%,20%{transform:scale(0.9) rotate(-3deg)}30%,50%,70%,90%{transform:scale(1.1) rotate(3deg)}40%,60%,80%{transform:scale(1.1) rotate(-3deg)}100%{transform:scale(1) rotate(0)}}.btn-group{font-size:0}.btn-group .btn{margin-left:-1px}.btn-group .btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.navbar-wrapper{height:45px}.navbar{position:relative;z-index:1030;background-color:#fff}.navbar-black{background-color:#222}.navbar-fixed-top{position:fixed;top:0;left:0;right:0;z-index:1030}.logo{display:inline-block;text-decoration:none;cursor:pointer;background-repeat:no-repeat;background-position:left center;background-size:auto 100%}a.logo:hover{text-decoration:none}.navbar .logo{height:44px;line-height:44px;margin-right:10px;float:left}.navbar-logo,.navbar-logo-m{font-size:16px}.navbar-slogan{font-size:12px;cursor:default}.navbar .container{position:relative}.navbar .container .navbar-userbar{right:0}.nav{z-index:1}.nav>ul{font-size:0;line-height:0}.nav>ul>li{position:relative;float:left}.nav>ul>li,.nav>ul>li>a{display:inline-block;text-align:center}.nav>ul>li>a{padding:0 20px}.nav>ul>li>a:hover,.nav>ul>li.current>a{background-color:rgba(255,255,255,0.2);text-decoration:none;-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s}.navbar-nav>ul>li,.navbar-nav>ul>li>a{line-height:44px;font-size:14px}@media(max-width:767px){.navbar-wrapper{height:45px!important}.logo{margin-right:0}.navbar .logo{height:44px!important;line-height:44px!important}.navbar-nav{display:none;float:none!important}.navbar-nav>ul>li{width:100%;text-align:left;border-bottom:solid 1px #eee}.navbar-nav>ul>li>a{display:block;padding:0 15px;text-align:left}.navbar-nav>ul>li.dropDown.open>.dropDown-menu{display:none}.navbar-nav>ul>li.dropDown>.dropDown_A>.Hui-iconfont{display:none}.navbar-nav>ul>li,.navbar-nav>ul>li>a{height:44px!important;line-height:44px!important}.nav-collapse>ul,.nav-collapse>ul>li{width:100%;display:block}.js .nav-collapse{position:absolute;display:block;float:none;clear:both;max-height:0;clip:rect(0 0 0 0);margin-left:-15px;margin-right:-15px;overflow:hidden;-webkt-transition:max-height 284ms ease 0s;-moz-transition:max-height 284ms ease 0s;-o-transition:max-height 284ms ease 0s;-ms-transition:max-height 284ms ease 0s;transition:max-height 284ms ease 0s}.js-nav-active .nav-collapse.closed{max-height:none}.nav-collapse.opened{max-height:9999px}}.navbar-black{background-color:#222;border-bottom:#080808 1px solid;-moz-box-shadow:0 0 4px #333;-webkit-box-shadow:0 0 4px #333;box-shadow:0 0 4px #333}.navbar-black .logo{color:#fff}.navbar-black .navbar-logo-m{color:#eee}.navbar-black .navbar-nav>ul>li,.navbar-black .navbar-nav>ul>li>a{color:#fff}.navbar-black .navbar-nav>ul>li>a:hover,.navbar-black .navbar-nav>ul>li.current>a{color:#fff}.navbar-black .navbar-userbar{color:#fff}@media(max-width:767px){.navbar-black .navbar-nav>ul>li{border-bottom:solid 1px #222}.navbar-black .navbar-nav>ul>li>a:hover,.navbar-black .navbar-nav>ul>li.current>a{background:#777}}.nav-toggle,a.nav-toggle{position:absolute;top:0;right:15px;font-size:20px;color:#999;padding:6px 11px;background-color:rgba(0,0,0,0.5);color:#fff;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.nav-toggle:hover,a.nav-toggle:hover{text-decoration:none;color:#fff}.mainnav{z-index:1;background-color:#222}.mainnav>ul{font-size:0;line-height:0}.mainnav>ul>li,.mainnav>ul>li>a{height:40px;line-height:40px}.mainnav>ul>li{display:inline-block;color:#fff;font-size:14px;font-weight:bold}.mainnav>ul>li>a{display:inline-block;padding:0 20px;color:#fff;text-align:center}.mainnav>ul>li>a:hover,.mainnav>ul>li.current>a{color:#fff;text-decoration:none;background-color:#000;-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s}.Hui-nav-toggle,a.Hui-nav-toggle{position:absolute;top:0;right:15px;font-size:20px;color:#999;padding:6px 11px;background-color:rgba(0,0,0,0.5);color:#fff}.Hui-nav-toggle:hover,a.Hui-nav-toggle:hover{text-decoration:none;color:#fff}@media(max-width:767px){.mainnav>ul>li{font-size:1.125em}}@media(max-width:480px){.mainnav>ul>li{text-align:center}.mainnav>ul>li{width:20%}.mainnav>ul>li>a{padding:0;padding:0;display:block}}.breadcrumb{border-bottom:1px solid #e5e5e5;line-height:39px;height:39px;overflow:hidden}.breadcrumb span{padding:0 5px}@media(max-width:767px){.breadcrumb>.container{padding:0}}.pageNav{float:none;clear:both;font-size:0;font-family:Arial,Helvetica,sans-serif;padding:18px 0;text-align:center}.pageNav span,.pageNav a,.pageNav b{font-size:14px;margin-right:5px;overflow:hidden;padding:3px 8px}.pageNav a{border:1px solid #ccdbe4;cursor:pointer}.pageNav b{color:#000}.pageNav .mor{padding:3px;font-weight:bold}.topnav{height:30px;line-height:30px;background-color;#f7f7f7;border-bottom:1px solid #ebebeb;font-size:12px}.topbar{background-color:#ececec;border-bottom:1px solid #ddd}.topbar a{margin-right:5px}.r_nav{display:inline-block;color:#999}.steps,.step{display:inline-block;position:relative;padding:1em 2em 1em 3em;vertical-align:top;background-color:#FFF;color:#888;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.step:after,.steps .step:after{position:absolute;z-index:2;content:'';top:0;right:-1.45em;border-bottom:1.5em solid transparent;border-left:1.5em solid #FFF;border-top:1.5em solid transparent;width:0;height:0}.step,.steps .step,.steps .step:after{-webkit-transition:opacity .1s ease,color .1s ease,-webkit-box-shadow .1s ease;transition:opacity .1s ease,color .1s ease,box-shadow .1s ease}.steps{cursor:pointer;display:inline-block;font-size:0;box-shadow:0 0 0 1px rgba(0,0,0,.1);border-radius:.3125rem;line-height:1;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.steps .step:first-child{padding-left:1.35em;border-radius:.3125em 0 0 .3125em}.steps .step:last-child{border-radius:0 .3125em .3125em 0}.steps .step:only-child{border-radius:.3125em}.steps .step:last-child{margin-right:0}.steps .step:last-child:after{display:none}.step:hover,.step.hover{background-color:#f7f7f7;color:rgba(0,0,0,.8)}.steps .step.hover:after,.steps .step:hover:after,.step:hover,.step.hover::after{border-left-color:#f7f7f7}.steps .step.down,.steps .step:active,.step.down,.step:active{background-color:#f0f0f0}.steps .step.down:after,.steps .step:active:after,.steps.down::after,.steps:active::after{border-left-color:#f0f0f0}.steps .step.active,.active.step{cursor:auto;background-color:#428bca;color:#FFF;font-weight:700}.steps .step.active:after,.active.steps:after{border-left-color:#428bca}.steps .disabled.step,.disabled.step{cursor:auto;background-color:#FFF;color:#cbcbcb}.disabled.step:after{border:0;background-color:#FFF;top:.42em;right:-1em;width:2.15em;height:2.15em;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);box-shadow:-1px -1px 0 0 rgba(0,0,0,.1) inset}.attached.steps{margin:0;border-radius:.3125em .3125em 0 0}.attached.steps .step:first-child{border-radius:.3125em 0 0}.attached.steps .step:last-child{border-radius:0 .3125em 0 0}.bottom.attached.steps{margin-top:-1px;border-radius:0 0 .3125em .3125em}.bottom.attached.steps .step:first-child{border-radius:0 0 0 .3125em}.bottom.attached.steps .step:last-child{border-radius:0 0 .3125em}.one.steps,.two.steps,.three.steps,.four.steps,.five.steps,.six.steps,.seven.steps,.eight.steps{display:block}.one.steps>.step{width:100%}.two.steps>.step{width:50%}.three.steps>.step{width:33.333%}.four.steps>.step{width:25%}.five.steps>.step{width:20%}.six.steps>.step{width:16.666%}.seven.steps>.step{width:14.285%}.eight.steps>.step{width:12.5%}.small.step,.small.steps .step{font-size:.8rem}.step,.steps .step{font-size:1rem}.large.step,.large.steps .step{font-size:1.25rem}.steps-ie,.step-ie,.step-ie .arrow{height:44px;line-height:44px}.steps-ie{background-color:#eaf4fd;border:solid 1px #afcfcc}.step-ie{position:relative;display:inline-block;float:left;cursor:pointer;padding:0 20px 0 40px;background:url(../images/steps/step_bg.png) repeat-x 0 center}.step-ie .arrow{position:absolute;right:-21px;top:0;width:21px;height:44px;display:block;cursor:pointer;background:url(../images/steps/step_arrow.png) no-repeat 0 center;z-index:50}.step-ie.active{background-image:url(../images/steps/step_bg-active.png);color:#fff;z-index:100}.step-ie.active .arrow{background-image:url(../images/steps/step_arrow-active.png)}.verticalTab{background:#fff url(../images/verticalTab/tab_bg.png) repeat-y 0 0;width:38px}.verticalTab a{position:relative;display:block;width:18px;height:auto;text-align:center;position:relative;padding:26px 10px 6px 10px;background:url(../images/verticalTab/tabNav.png) no-repeat 0 0}.verticalTab a em{position:absolute;left:0;bottom:-20px;width:38px;height:20px;background:url(../images/tabNav_right.png) no-repeat 0 0;z-index:50}.verticalTab a.active{background-image:url(../images/verticalTab/tabNav-active.png);color:#fff;z-index:99}.verticalTab a.active em{background-image:url(../images/verticalTab/tabNav_right-active.png)}.acrossTab,.acrossTab li,.acrossTab li em{background-image:url(../images/acrossTab/acrossTab-bg.png)}.acrossTab{height:29px;background-repeat:repeat-x;background-position:0 0;padding-top:1px}.acrossTab li,.acrossTab li em{background-repeat:no-repeat;background-position:0 0}.acrossTab li{position:relative;float:left;display:inline-block;height:29px;line-height:29px;font-size:12px;cursor:pointer;padding:0 30px;white-space:nowrap;color:#282828;background-position:0 0}.acrossTab li em{position:absolute;width:23px;height:29px;right:-20px;top:0;z-index:50;background-position:right -30px}.acrossTab li:hover{background-position:0 -60px}.acrossTab li:hover em{background-position:right -90px}.acrossTab li.active{background-position:0 -120px;z-index:99}.acrossTab li.active em{background-position:right -150px}.acrossTab li i{position:absolute;display:block;width:13px;height:13px;top:50%;margin-top:-6px;right:5px;font-size:0;line-height:0;cursor:pointer;background-image:url(../images/acrossTab/acrossTab-close.png);background-repeat:no-repeat;background-position:0 0}.acrossTab li i:hover{background-position:0 bottom}.dropDown{display:inline-block}.dropDown_A{display:inline-block}.dropDown-menu{display:none;transition:all .3s ease 0s}.dropDown:focus,.dropDown-menu:focus{outline:0}.dropDown-menu li.arrow{position:absolute;display:block;width:12px;height:8px;margin-top:-13px;margin-left:20%;line-height:0;background:url(../images/dropDown/icon-jt.png) no-repeat 0 0}.dropDown.hover .dropDown_A,.dropDown.open .dropDown_A{text-decoration:none;background-color:rgba(255,255,255,0.2)}.dropDown.open .dropDown_A .menu_dropdown-arrow{transition-duration:.3s;transition-property:all;_background-position:0 0;transform:rotate(180deg)}.menu{background-color:#fff;border:solid 1px #f2f2f2;display:inline-block}.menu.radius{border-top-left-radius:0;border-top-right-radius:0}.menu.box-shadow{border-top:0}.menu>li{position:relative;clear:both;* float:left}.menu>li>a{display:block;border-bottom:solid 1px #f2f2f2;padding:5px 20px;line-height:1.8;text-align:left;font-weight:normal;white-space:nowrap;vertical-align:top}.menu>li:last-child>a{border-bottom:0}.menu>li>a:hover,.menu>li>a:focus,.menu>li.open>a{text-decoration:none;background-color:#fafafa}.menu>li>a .arrow{position:absolute;top:50%;margin-top:-10px;right:5px;line-height:20px;height:20px;color:#999}.menu>li>.menu{display:none}.menu>li.open>.menu{display:inline-block;position:absolute;left:100%;top:-1px;min-width:100%}.menu>li.disabled>a{color:#999;text-decoration:none;cursor:no-drop;background-color:transparent}.menu>li.divider{display:block;height:0;line-height:0;margin:9px 0;overflow:hidden;border-top:solid 1px #eee}.dropDown>.dropDown-menu{display:none}.dropDown.open{position:relative;z-index:990}.dropDown.open>.dropDown-menu{position:absolute;z-index:1000;display:inline-block;top:100%;left:-1px;min-width:100%;background-color:#fff;border:solid 1px #f2f2f2}.dropDown.open.right>.dropDown-menu{right:-1px!important;left:auto!important}.slider{position:relative;text-align:center;margin:0 auto;z-index:1}.slider .bd,.slider .bd li,.slider .bd img{width:100%;height:100%}.slider .bd{z-index:2;overflow:hidden}.slider .bd li{float:left;width:100%;overflow:hidden;background-position:center;background-repeat:no-repeat}.slider .bd li a{display:block;width:100%;height:100%}.slider .bd li img{display:block}.slider .hd{position:absolute;z-index:3;left:0;right:0;bottom:10px;padding:0 10px;text-align:center}.slider .hd li{display:inline-block;text-align:center;margin-right:10px;cursor:pointer;background-color:#c2c2c2}.slider .hd li.active{background-color:#222}.dots li{width:10px;height:10px;font-size:0;line-height:0;border-radius:50%}.numbox li{width:20px;height:20px;line-height:20px;font-size:13px;font-family:Arial;font-weight:bold;text-indent:inherit}.numbox li.active{color:#fff}.rectangle li{width:40px;height:10px;font-size:0;line-height:0}.slider-arrow{display:block;position:absolute;top:50%;margin-top:-25px;height:50px;width:50px;line-height:50px;text-align:center;z-index:3;opacity:.7;filter:alpha(opacity=70)}.slider-arrow:hover{opacity:1;filter:alpha(opacity=100)}.slider-arrow.prev{left:0}.slider-arrow.next{right:0}.tabBar{border-bottom:2px solid #222}.tabBar span{background-color:#e8e8e8;cursor:pointer;display:inline-block;float:left;font-weight:bold;height:30px;line-height:30px;padding:0 15px}.tabBar span.current{background-color:#222;color:#fff}.tabCon{display:none}.label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:bold;line-height:14px;color:#fff;white-space:nowrap;vertical-align:middle;background-color:#999;overflow:hidden}.label.radius{border-radius:3px}.badge{padding-right:9px;padding-left:9px;border-radius:9px}.label:empty,.badge:empty{display:none}a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.label-default,.badge-default{background-color:#e6e6e6;color:#333}.label-default[href],.badge-default[href]{background-color:#e6e6e6;color:#333}.label-primary,.badge-primary{background-color:#5a98de}.label-primary[href],.badge-primary[href]{background-color:#5a98de}.label-secondary,.badge-secondary{background-color:#3bb4f2}.label-secondary[href],.badge-secondary[href]{background-color:#3bb4f2}.label-success,.badge-success{background-color:#5eb95e}.label-success[href],.badge-success[href]{background-color:#5eb95e}.label-warning,.badge-warning{background-color:#f37b1d}.label-warning[href],.badge-warning[href]{background-color:#f37b1d}.label-danger,.badge-danger{background-color:#dd514c}.label-danger[href],.badge-danger[href]{background-color:#dd514c}.Huialert{position:relative;padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5}.Huialert,.Huialert h4{color:#c09853}.Huialert h4{margin:0}.Huialert .Hui-iconfont{position:absolute;top:9px;right:10px;line-height:20px;cursor:pointer;color:#000;opacity:.2;_color:#666}.Huialert .Hui-iconfont.hover{color:#000;opacity:.8}.Huialert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.Huialert-success h4{color:#468847}.Huialert-danger{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.Huialert-danger h4{color:#b94a48}.Huialert-error{color:#fff;background-color:#f37b1d;border-color:#e56c0c}.Huialert-error h4{color:#fff}.Huialert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.Huialert-info h4{color:#31708f}.Huialert-block{padding-top:14px;padding-bottom:14px}.Huialert-block>p,.Huialert-block>ul{margin-bottom:0}.Huialert-block p+p{margin-top:5px}.progress,.progress-bar,.sr-only{height:10px;font-size:0;line-height:0}.progress{overflow:hidden;width:400px}.progress-bar{width:100%;background-color:#efefef}.sr-only{display:inline-block;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-success .sr-only{background-color:#5cb85c}.progress-bar-warning .sr-only{background-color:#f0ad4e}.progress-bar-danger .sr-only{background-color:#d9534f}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.modal-open{overflow:hidden}.modal{position:fixed;left:0;top:0;right:0;bottom:0;z-index:1040;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);-o-transform:translate(0,-50%);transform:translate(0,-50%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-dialog{position:relative;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);outline:0;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-header{min-height:16.42857143px;padding:15px;border-bottom:1px solid #eee;position:relative}.modal-header .close{position:absolute;right:15px;top:15px}.modal-close{position:absolute;right:15px;top:15px;font-size:24px;z-index:9}a.modal-close:hover{text-decoration:none}.modal-header h3,.modal-header .modal-title{margin:0;padding:10px 0;font-size:16px}.modal-body{position:relative;padding:15px;overflow-y:visible;word-break:break-all}.modal-form{margin-bottom:0}.modal-footer{padding:15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #eee;*zoom:1}.modal-footer:before,.modal-footer:after{display:table;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.radius .modal-content{border-radius:6px}.radius .modal-footer{border-bottom-left-radius:6px;border-bottom-right-radius:6px}.modal.middle .modal-dialog{position:absolute;margin:10px;left:0;right:0;top:50%}.modal.fade.middle .modal-dialog{-webkit-transform:translate(0,-100%);-ms-transform:translate(0,-100%);-o-transform:translate(0,-100%);transform:translate(0,-100%)}.modal.in.middle .modal-dialog{-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);-o-transform:translate(0,-50%);transform:translate(0,-50%)}@media(min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal.middle .modal-dialog{margin:10px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media(min-width:992px){.modal-lg{width:900px}}.modal-alert{position:fixed;right:auto;bottom:auto;width:300px;left:50%;margin-left:-150px;top:50%;margin-top:-30px;z-index:9999;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);outline:0;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-alert-info{padding:30px;text-align:center;font-size:14px;background-color:#fff}.loading{height:50px;width:50px;background:#fff url(../images/loading/loading-b.gif) no-repeat center}.mask{position:fixed;top:0;left:0;z-index:999;width:100%;height:100%;background-color:rgba(0,0,0,0.7);-moz-transition:all .3s ease-in;-webkit-transition:all .3s ease-in;-o-transition:all .3s ease-in;transition:all .3s ease-in}* html .mask{position:absolute;left:expression(documentElement.scrollLeft+documentElement.clientWidth - this.offsetWidth);top:expression(documentElement.scrollTop+documentElement.clientHeight - this.offsetHeight)}.mask_box{background-image:none;display:none;z-index:99}.hover .mask_box{position:absolute;bottom:0;left:0;display:block;background-color:rgba(0,0,0,0.3);text-align:left}.modal-open .dropdown-menu{z-index:2050}.modal-open .dropdown.open{*z-index:2050}.modal-open .popover{z-index:2060}.modal-open .tooltip{z-index:2070}.tools-right{position:fixed;right:15px;z-index:999;cursor:pointer;visibility:visible;background-color:#fff;border:1px solid #d9d9d9;color:#9c9c9c;font-size:16px;width:38px;height:38px;line-height:38px;text-align:center;text-decoration:none;_position:absolute;_top:expression(documentElement.scrollTop+documentElement.clientHeight-this.offsetHeight)}.tools-right:hover{color:#fff;text-decoration:none;background-color:#999;border-color:#999}.tools-right.toTop{bottom:60px;display:none}.tools-right.feedback{bottom:110px}.bdsharebuttonbox.Hui-share a.bds_more,.bdsharebuttonbox.Hui-share a.bds_weixin,.bdsharebuttonbox.Hui-share a.bds_qzone,.bdsharebuttonbox.Hui-share a.bds_sqq,.bdsharebuttonbox.Hui-share a.bds_tsina,.bdsharebuttonbox.Hui-share a.bds_tqq,.bdsharebuttonbox.Hui-share a.bds_douban{display:inline-block;background:0;padding-left:0;text-decoration:none;margin:0;margin-right:6px;height:auto;line-height:auto}.bdsharebuttonbox.Hui-share a:hover{text-decoration:none}.bdsharebuttonbox.Hui-share .share-text{display:inline-block;margin-right:6px;color:#999;cursor:default;float:left}.bdsharebuttonbox.bdshare-button-style0-16.Hui-share a,.bdsharebuttonbox.bdshare-button-style0-16.Hui-share .share-text,.bdsharebuttonbox.bdshare-button-style0-16.Hui-share .Hui-iconfont{line-height:16px}.bdsharebuttonbox.bdshare-button-style0-16.Hui-share .share-text,.bdsharebuttonbox.bdshare-button-style0-16.Hui-share .Hui-iconfont{font-size:16px}.bdsharebuttonbox.bdshare-button-style0-24.Hui-share a,.bdsharebuttonbox.bdshare-button-style0-24.Hui-share .share-text,.bdsharebuttonbox.bdshare-button-style0-24.Hui-share .Hui-iconfont{line-height:24px}.bdsharebuttonbox.bdshare-button-style0-24.Hui-share .share-text,.bdsharebuttonbox.bdshare-button-style0-24.Hui-share .Hui-iconfont{font-size:24px}.Hui-share.jiathis_style_24x24 .jtico{background:0;padding-left:0!important}.Hui-share.jiathis_style_24x24 .jiathis_separator{margin-left:0;margin-right:6px}.panel{background-color:#fff;border:solid 1px transparent}.panel-header{border-bottom:solid 1px transparent;padding:8px 15px;font-size:14px;font-weight:700;margin-bottom:-1px}.panel-body{padding:15px}.panel-footer{background-color:#f5f5f5;border-top:1px solid #ddd;padding:5px 20px}.panel-default{border-color:#ddd}.panel-default>.panel-header{border-color:#ddd;background-color:#f5f5f5;color:#444}.panel-primary{border-color:#5a98de}.panel-primary>.panel-header{border-color:#5a98de;background-color:#5a98de;color:#fff}.panel-secondary{border-color:#3bb4f2}.panel-secondary>.panel-header{border-color:#3bb4f2;background-color:#3bb4f2;color:#fff}.panel-success{border-color:#5eb95e}.panel-success>.panel-header{border-color:#5eb95e;background-color:#5eb95e;color:#fff}.panel-warning{border-color:#f37b1d}.panel-warning>.panel-header{border-color:#f37b1d;background-color:#f37b1d;color:#fff}.panel-danger{border-color:#dd514c}.panel-danger>.panel-header{border-color:#dd514c;background-color:#dd514c;color:#fff}.docs-example{position:relative;*position:static;*padding-top:19px;margin:15px 0;padding:39px 19px 14px;background-color:#fff;border:1px solid #ddd;border-radius:4px}.docs-example:after{content:"Example";position:absolute;top:-1px;left:-1px;*position:static;padding:3px 7px;font-size:12px;font-weight:bold;background-color:#f5f5f5;border:1px solid #ddd;color:#9da0a4;border-radius:4px 0 4px 0}.marquee{height:22px;overflow:hidden;line-height:22px}.rollpic .prev,.rollpic .next{display:block;height:38px;width:38px;cursor:pointer;float:left;background:url(../images/rollpic/unslider-arrow.png) no-repeat 0 0;margin-top:70px}.rollpic .prev{background-position:0 0;margin-right:5px}.rollpic .prev:hover{background-position:0 -38px}.rollpic .next{background-position:0 -76px;margin-left:5px}.rollpic .next:hover{background-position:0 -114px}.rollpicshow{float:left;border:solid 1px #ddd}.rollpicshow li{padding:10px}.ac_results{position:absolute;border:solid 1px #ddd;background-color:#fff;padding:3px;display:none;margin-top:-1px;z-index:999}.ac_results ul{width:100%;list-style-position:outside;list-style:none;padding:0;margin:0}.ac_results li{padding-left:5px;padding-right:5px;display:block;height:24px;line-height:24px;cursor:pointer}.ac_results li p{float:left;margin:0;padding:0;overflow:hidden}.ac_results li p tt{color:#666}.ac_results li span{margin:0;padding:0;display:inline;float:right;color:#f93;width:90px;text-align:right;overflow:hidden}.ac_results li.ac_over{background-color:#f0f1f2}.ac_loading{background:#fff url(../images/loading/loading-s.gif) right center no-repeat}.AD{text-align:center}.dual{top:260px;position:absolute;width:102px;overflow:hidden;display:none;z-index:100}.dual_l{left:6px}.dual_r{right:6px}.dual_con{border:#CCC solid 1px;width:100px;height:300px;overflow:hidden;background-color:#0C9}.dual_close{width:100%;height:24px;line-height:24px;text-align:center;display:block;font-size:13px;color:#555;text-decoration:none}.Hui-tags,.Huitags-wraper{border:solid 1px #dedede;padding:0 10px}.Hui-tags-editor,.Huitags-editor{position:relative;padding:10px 0 10px 24px;min-height:20px}.Hui-tags-editor .Hui-tags-icon,.Huitags-editor .Huitags-icon{position:absolute;left:0;top:11px;font-size:14px;color:#666}.Hui-tags-token,.Huitags-token{color:#aaa;float:left;font-size:12px;height:20px;line-height:20px;margin-right:8px;padding:0 1px;white-space:nowrap;cursor:pointer}.Hui-tags-token:before,.Huitags-token:before{content:"#"}.Hui-tags-token:hover,.Huitags-token:hover{text-decoration:line-through}.Hui-tags-iptwrap{position:relative;float:left}.Hui-tags-input{position:relative;height:20px;min-width:60px;border:0 none;vertical-align:top;line-height:20px;color:#333;z-index:2;background:url(../images/Hui-tags/empty.png) repeat scroll 0 0;display:inline-block;width:100%}.Hui-tags-label,.Huitags-label{position:absolute;top:0;left:2px;width:240px;height:20px;line-height:20px;font-size:14px;overflow:hidden;z-index:1;color:#ccc}.Hui-tags-list,.Huitags-list{padding:0 0 10px 0}.Hui-notag,.Huitags-notag{font-size:12px}.Hui-tags-has span,.Huitags-has span{cursor:pointer;font-size:12px;white-space:nowrap;margin-right:10px}.tags a{height:26px;line-height:26px;padding-right:6px}.tags1{color:#C00;font-size:24px}.tags2{color:#030;font-size:16px}.tags3{color:#00F}.tags4{font-size:16px}.tags5{color:#C00;font-size:20px}.tags6{color:#F06;font-size:20px}.tags7{color:#030;font-weight:bold;font-size:18px}.tags8{color:#F06;font-weight:bold}.tags9{color:#C00;font-weight:bold;font-size:16px}.tags a:hover{color:#F00;text-decoration:underline}#tagyun{position:relative}#tagyun a{position:absolute;top:0;left:0;font-weight:bold;text-decoration:none;padding:3px 6px}.Huifold .item{position:relative}.Huifold .item h4{margin:0;font-weight:bold;position:relative;border-top:1px solid #fff;font-size:15px;line-height:22px;padding:7px 10px;background-color:#eee;cursor:pointer;padding-right:30px}.Huifold .item h4 b{position:absolute;display:block;cursor:pointer;right:10px;top:7px;width:16px;height:16px;text-align:center;color:#666}.Huifold .item .info{display:none;padding:10px}.maskBar{position:absolute;height:auto;left:0;bottom:-100%;right:0;padding:10px;background-color:rgba(0,0,0,0.6);z-index:2;color:#fff!important}.maskWraper{position:relative;overflow:hidden}.maskWraper.hover .maskBar{bottom:0;transition:bottom 200ms;-moz-transition:bottom 200ms;-webkit-transition:bottom 200ms;-o-transition:bottom 200ms}.maskBox{position:absolute;width:100%;height:100%;top:0;left:0;bottom:0;right:0;z-index:2;color:#fff!important}.maskWraper.hover .maskBox{background-color:rgba(0,0,0,0.6);transition:all 500ms;-moz-transition:all 500ms;-webkit-transition:all 500ms;-o-transition:all 500ms}.commentList .item{list-style:none outside none;margin:1.6rem 0 0}.commentList .avatar{border:1px solid transparent;float:left}.comment-main{position:relative;margin-left:64px;border:1px solid #dedede;border-radius:2px}.comment-main:before,.comment-main:after{position:absolute;top:11px;left:-16px;right:100%;width:0;height:0;display:block;content:" ";border-color:transparent;border-style:solid solid outset;pointer-events:none}.comment-main:before{border-right-color:#dedede;border-width:8px}.comment-main:after{border-width:7px;border-right-color:#f8f8f8;margin-top:1px;margin-left:2px}.comment-header{padding:10px 15px;background:#f8f8f8;border-bottom:1px solid #eee}.comment-title{margin:0 0 8px 0;font-size:1.6rem;line-height:1.2}.comment-meta{font-size:13px;color:#999;line-height:1.2}.comment-meta a{color:#999}.comment-author{font-weight:700;color:#999}.comment-body{padding:15px;overflow:hidden}.comment-body>:last-child{margin-bottom:0}.commentList .comment-flip .avatar{float:right}.comment-flip .comment-main{margin-left:0;margin-right:64px}.comment-flip .comment-main:before{border-left-color:#dedede;border-right-color:transparent}.comment-flip .comment-main:before,.comment-flip .comment-main:after{left:100%;position:absolute;right:-16px}.comment-flip .comment-main:after{border-left-color:#f8f8f8;border-right-color:transparent;margin-left:auto;margin-right:2px}.footer{border-top:1px solid #e8e8e8;padding:15px 0;font-family:tahoma,Arial;font-size:12px;color:#999;line-height:22px;text-align:center}.footer a,.footer a:hover{color:#999}.star-bar-show{background:url(../images/star/iconpic-star-S-default.png) repeat-x 0 0}.star-bar-show .star{background:url(../images/star/iconpic-star-S.png) repeat-x 0 0}.star-1{width:20%}.star-2{width:40%}.star-3{width:60%}.star-4{width:80%}.star-5{width:100%}.star-bar-show.size-M{width:120px;height:24px}.star-bar-show.size-M,.star-bar-show.size-M .star{background-size:24px}.star-bar-show.size-M .star{height:24px}.star-bar-show.size-S{width:80px;height:16px}.star-bar-show.size-S,.star-bar-show.size-S .star{background-size:16px}.star-bar-show.size-S .star{height:16px}.star-bar{font-size:0;line-height:0}.star-bar .star{display:inline-block;text-align:center}.size-M img{width:24px;height:24px}.size-S img{width:16px;height:16px}.tooltip{position:absolute;z-index:1070;display:block;font-size:12px;line-height:1.4;visibility:visible;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{right:5px;bottom:0;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-size:14px;font-weight:normal;line-height:1.42857143;text-align:left;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.datetimepicker{padding:4px;margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;direction:ltr;position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);background-clip:padding-box}.datetimepicker-inline{width:220px}.datetimepicker.datetimepicker-rtl{direction:rtl}.datetimepicker.datetimepicker-rtl table tr td span{float:right}.datetimepicker-dropdown,.datetimepicker-dropdown-left{top:0;left:0}[class*=" datetimepicker-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}[class*=" datetimepicker-dropdown"]:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute}[class*=" datetimepicker-dropdown-top"]:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;border-top-color:rgba(0,0,0,0.2);border-bottom:0}[class*=" datetimepicker-dropdown-top"]:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #fff;border-bottom:0}.datetimepicker-dropdown-bottom-left:before{top:-7px;right:6px}.datetimepicker-dropdown-bottom-left:after{top:-6px;right:7px}.datetimepicker-dropdown-bottom-right:before{top:-7px;left:6px}.datetimepicker-dropdown-bottom-right:after{top:-6px;left:7px}.datetimepicker-dropdown-top-left:before{bottom:-7px;right:6px}.datetimepicker-dropdown-top-left:after{bottom:-6px;right:7px}.datetimepicker-dropdown-top-right:before{bottom:-7px;left:6px}.datetimepicker-dropdown-top-right:after{bottom:-6px;left:7px}.datetimepicker>div{display:none}.datetimepicker.minutes div.datetimepicker-minutes{display:block}.datetimepicker.hours div.datetimepicker-hours{display:block}.datetimepicker.days div.datetimepicker-days{display:block}.datetimepicker.months div.datetimepicker-months{display:block}.datetimepicker.years div.datetimepicker-years{display:block}.datetimepicker table{margin:0}.datetimepicker td,.datetimepicker th{text-align:center;width:20px;height:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;border:0}.table-striped .datetimepicker table tr td,.table-striped .datetimepicker table tr th{background-color:transparent}.datetimepicker table tr td.minute:hover{background:#eee;cursor:pointer}.datetimepicker table tr td.hour:hover{background:#eee;cursor:pointer}.datetimepicker table tr td.day:hover{background:#eee;cursor:pointer}.datetimepicker table tr td.old,.datetimepicker table tr td.new{color:#999}.datetimepicker table tr td.disabled,.datetimepicker table tr td.disabled:hover{background:0;color:#999;cursor:default}.datetimepicker table tr td.today,.datetimepicker table tr td.today:hover,.datetimepicker table tr td.today.disabled,.datetimepicker 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)}.datetimepicker table tr td.today:hover,.datetimepicker table tr td.today:hover:hover,.datetimepicker table tr td.today.disabled:hover,.datetimepicker table tr td.today.disabled:hover:hover,.datetimepicker table tr td.today:active,.datetimepicker table tr td.today:hover:active,.datetimepicker table tr td.today.disabled:active,.datetimepicker table tr td.today.disabled:hover:active,.datetimepicker table tr td.today.active,.datetimepicker table tr td.today:hover.active,.datetimepicker table tr td.today.disabled.active,.datetimepicker table tr td.today.disabled:hover.active,.datetimepicker table tr td.today.disabled,.datetimepicker table tr td.today:hover.disabled,.datetimepicker table tr td.today.disabled.disabled,.datetimepicker table tr td.today.disabled:hover.disabled,.datetimepicker table tr td.today[disabled],.datetimepicker table tr td.today:hover[disabled],.datetimepicker table tr td.today.disabled[disabled],.datetimepicker table tr td.today.disabled:hover[disabled]{background-color:#fdf59a}.datetimepicker table tr td.today:active,.datetimepicker table tr td.today:hover:active,.datetimepicker table tr td.today.disabled:active,.datetimepicker table tr td.today.disabled:hover:active,.datetimepicker table tr td.today.active,.datetimepicker table tr td.today:hover.active,.datetimepicker table tr td.today.disabled.active,.datetimepicker table tr td.today.disabled:hover.active{background-color:#fbf069}.datetimepicker table tr td.active,.datetimepicker table tr td.active:hover,.datetimepicker table tr td.active.disabled,.datetimepicker table tr td.active.disabled:hover{background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-ms-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(top,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc',endColorstr='#0044cc',GradientType=0);border-color:#04c #04c #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)}.datetimepicker table tr td.active:hover,.datetimepicker table tr td.active:hover:hover,.datetimepicker table tr td.active.disabled:hover,.datetimepicker table tr td.active.disabled:hover:hover,.datetimepicker table tr td.active:active,.datetimepicker table tr td.active:hover:active,.datetimepicker table tr td.active.disabled:active,.datetimepicker table tr td.active.disabled:hover:active,.datetimepicker table tr td.active.active,.datetimepicker table tr td.active:hover.active,.datetimepicker table tr td.active.disabled.active,.datetimepicker table tr td.active.disabled:hover.active,.datetimepicker table tr td.active.disabled,.datetimepicker table tr td.active:hover.disabled,.datetimepicker table tr td.active.disabled.disabled,.datetimepicker table tr td.active.disabled:hover.disabled,.datetimepicker table tr td.active[disabled],.datetimepicker table tr td.active:hover[disabled],.datetimepicker table tr td.active.disabled[disabled],.datetimepicker table tr td.active.disabled:hover[disabled]{background-color:#04c}.datetimepicker table tr td.active:active,.datetimepicker table tr td.active:hover:active,.datetimepicker table tr td.active.disabled:active,.datetimepicker table tr td.active.disabled:hover:active,.datetimepicker table tr td.active.active,.datetimepicker table tr td.active:hover.active,.datetimepicker table tr td.active.disabled.active,.datetimepicker table tr td.active.disabled:hover.active{background-color:#039}.datetimepicker 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}.datetimepicker .datetimepicker-hours span{height:26px;line-height:26px}.datetimepicker .datetimepicker-hours table tr td span.hour_am,.datetimepicker .datetimepicker-hours table tr td span.hour_pm{width:14.6%}.datetimepicker .datetimepicker-hours fieldset legend,.datetimepicker .datetimepicker-minutes fieldset legend{margin-bottom:inherit;line-height:30px}.datetimepicker .datetimepicker-minutes span{height:26px;line-height:26px}.datetimepicker table tr td span:hover{background:#eee}.datetimepicker table tr td span.disabled,.datetimepicker table tr td span.disabled:hover{background:0;color:#999;cursor:default}.datetimepicker table tr td span.active,.datetimepicker table tr td span.active:hover,.datetimepicker table tr td span.active.disabled,.datetimepicker table tr td span.active.disabled:hover{background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-ms-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(top,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc',endColorstr='#0044cc',GradientType=0);border-color:#04c #04c #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)}.datetimepicker table tr td span.active:hover,.datetimepicker table tr td span.active:hover:hover,.datetimepicker table tr td span.active.disabled:hover,.datetimepicker table tr td span.active.disabled:hover:hover,.datetimepicker table tr td span.active:active,.datetimepicker table tr td span.active:hover:active,.datetimepicker table tr td span.active.disabled:active,.datetimepicker table tr td span.active.disabled:hover:active,.datetimepicker table tr td span.active.active,.datetimepicker table tr td span.active:hover.active,.datetimepicker table tr td span.active.disabled.active,.datetimepicker table tr td span.active.disabled:hover.active,.datetimepicker table tr td span.active.disabled,.datetimepicker table tr td span.active:hover.disabled,.datetimepicker table tr td span.active.disabled.disabled,.datetimepicker table tr td span.active.disabled:hover.disabled,.datetimepicker table tr td span.active[disabled],.datetimepicker table tr td span.active:hover[disabled],.datetimepicker table tr td span.active.disabled[disabled],.datetimepicker table tr td span.active.disabled:hover[disabled]{background-color:#04c}.datetimepicker table tr td span.active:active,.datetimepicker table tr td span.active:hover:active,.datetimepicker table tr td span.active.disabled:active,.datetimepicker table tr td span.active.disabled:hover:active,.datetimepicker table tr td span.active.active,.datetimepicker table tr td span.active:hover.active,.datetimepicker table tr td span.active.disabled.active,.datetimepicker table tr td span.active.disabled:hover.active{background-color:#039}.datetimepicker table tr td span.old{color:#999}.datetimepicker th.switch{width:145px}.datetimepicker th span.glyphicon{pointer-events:none}.datetimepicker thead tr:first-child th,.datetimepicker tfoot th{cursor:pointer}.datetimepicker thead tr:first-child th:hover,.datetimepicker tfoot th:hover{background:#eee}.input-append.date .add-on i,.input-prepend.date .add-on i,.input-group.date .input-group-addon span{cursor:pointer;width:14px;height:14px}.select-category .item{padding:5px;position:relative;border-bottom:solid 1px #ddd}.select-category .item .dt{width:90px;float:left;white-space:nowrap}.select-category .item .dd{margin-left:100px;text-align:left;font-size:14px;height:auto}.select-category .item .dd a{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:10px;padding:0 5px;text-decoration:none}.ui-state-highlight{height:50px;margin-top:20px;border:1px solid #fcefa1;background:#fbf9ee;color:#363636}.sortable-control{cursor:move}.page-404{color:#afb5bf;padding-top:60px;padding-bottom:90px}.page-404 .error-title{font-size:80px}.page-404 .error-title .iconfont{font-size:80px}.page-404 .error-description{font-size:24px}.page-404 .error-info{font-size:14px} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/css/H-ui.reset.css b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/css/H-ui.reset.css deleted file mode 100644 index 59fb4762..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/css/H-ui.reset.css +++ /dev/null @@ -1,62 +0,0 @@ -@charset "utf-8"; -/* -----------H-ui前端框架------------- -* H-ui.reset.css v1.2 重定义浏览器默认样式 -* http://www.h-ui.net/ -* Created & Modified by guojunhui -* Date modified 2014.10.09 -* -* Copyright 2013-2015 北京颖杰联创科技有限公司 All rights reserved. -* Licensed under MIT license. -* http://opensource.org/licenses/MIT -* -*/ -/*1 重定义浏览器默认样式 - Name: style_reset - Level: Global - Explain: 重定义浏览器默认样式 - Last Modify: jackying -*/ -*{word-wrap:break-word} -html,body,h1,h2,h3,h4,h5,h6,hr,p,iframe,dl,dt,dd,ul,ol,li,pre,form,button,input,textarea,th,td,fieldset{margin:0;padding:0} -ul,ol,dl{list-style-type:none} -html,body{*position:static} -html{font-family: sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%} -address,caption,cite,code,dfn,em,th,var{font-style:normal;font-weight:400} -input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit} -input,button{overflow: visible;vertical-align:middle;outline:none} -body,th,td,button,input,select,textarea{font-family:"Microsoft Yahei","Hiragino Sans GB","Helvetica Neue",Helvetica,tahoma,arial,Verdana,sans-serif,"WenQuanYi Micro Hei","\5B8B\4F53";font-size:12px;color: #333;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing:grayscale} -body{line-height:1.6} -h1,h2,h3,h4,h5,h6{font-size:100%} -a,area{outline:none;blr:expression(this.onFocus=this.blur())} -a{text-decoration:none;cursor: pointer} -a:hover{text-decoration:underline;outline:none} -a.ie6:hover{zoom:1} -a:focus{outline:none} -a:hover,a:active{outline:none}:focus{outline:none} -sub,sup{vertical-align:baseline} -button,input[type="button"], input[type="submit"] {line-height:normal !important;} -/*img*/ -img{border:0;vertical-align:middle} -a img,img{-ms-interpolation-mode:bicubic} -.img-responsive{max-width: 100%;height: auto} - -/*IE下a:hover 背景闪烁*/ -*html{overflow:-moz-scrollbars-vertical;zoom:expression(function(ele){ele.style.zoom = "1";document.execCommand("BackgroundImageCache",false,true)}(this))} - -/*HTML5 reset*/ -header,footer,section,aside,details,menu,article,section,nav,address,hgroup,figure,figcaption,legend{display:block;margin:0;padding:0}time{display:inline} -audio,canvas,video{display:inline-block;*display:inline;*zoom:1} -audio:not([controls]){display:none} -legend{width:100%;margin-bottom:20px;font-size:21px;line-height:40px;border:0;border-bottom:1px solid #e5e5e5} -legend small{font-size:15px;color:#999} -svg:not(:root) {overflow: hidden} -fieldset {border-width:0;padding: 0.35em 0.625em 0.75em;margin: 0 2px;border: 1px solid #c0c0c0} -input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button {height: auto} -input[type="search"] {-webkit-appearance: textfield; /* 1 */-moz-box-sizing: content-box;-webkit-box-sizing: content-box; /* 2 */box-sizing: content-box} -input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration {-webkit-appearance: none} -/* - Name: style_clearfix - Example: class="clearfix|cl" - Explain: Clearfix(简写cl)避免因子元素浮动而导致的父元素高度缺失能问题 -*/ -.cl:after,.clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}.cl,.clearfix{zoom:1} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/Hui-tags/empty.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/Hui-tags/empty.png deleted file mode 100644 index 209a4386..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/Hui-tags/empty.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/acrossTab/acrossTab-bg.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/acrossTab/acrossTab-bg.png deleted file mode 100644 index 69d3eeac..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/acrossTab/acrossTab-bg.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/acrossTab/acrossTab-close.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/acrossTab/acrossTab-close.png deleted file mode 100644 index c7f1a414..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/acrossTab/acrossTab-close.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/acrossTab/acrossTab.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/acrossTab/acrossTab.png deleted file mode 100644 index f948893e..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/acrossTab/acrossTab.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/dataTable/sort_asc.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/dataTable/sort_asc.png deleted file mode 100644 index a88d7975..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/dataTable/sort_asc.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/dataTable/sort_both.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/dataTable/sort_both.png deleted file mode 100644 index 18670406..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/dataTable/sort_both.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/dataTable/sort_desc.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/dataTable/sort_desc.png deleted file mode 100644 index def071ed..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/dataTable/sort_desc.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/dropDown/icon-jt.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/dropDown/icon-jt.png deleted file mode 100644 index 30594ea3..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/dropDown/icon-jt.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/201.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/201.gif deleted file mode 100644 index 76898580..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/201.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/202.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/202.gif deleted file mode 100644 index e28d826b..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/202.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/203.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/203.gif deleted file mode 100644 index 3b4f7aaf..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/203.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/204.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/204.gif deleted file mode 100644 index 60ccd80f..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/204.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/205.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/205.gif deleted file mode 100644 index dae3bac5..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/205.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/206.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/206.gif deleted file mode 100644 index d819300d..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/206.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/207.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/207.gif deleted file mode 100644 index 250b0c85..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/207.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/208.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/208.gif deleted file mode 100644 index 4c96f2ad..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/208.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/209.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/209.gif deleted file mode 100644 index 773e930e..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/209.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/210.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/210.gif deleted file mode 100644 index b8689749..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/210.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/0.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/0.gif deleted file mode 100644 index f2e8304f..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/0.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/1.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/1.gif deleted file mode 100644 index a2644a9e..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/1.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/10.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/10.gif deleted file mode 100644 index e8c4837a..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/10.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/100.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/100.gif deleted file mode 100644 index c70e7d33..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/100.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/101.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/101.gif deleted file mode 100644 index 3620e591..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/101.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/102.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/102.gif deleted file mode 100644 index 92ad35d2..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/102.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/103.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/103.gif deleted file mode 100644 index 1f27663a..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/103.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/104.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/104.gif deleted file mode 100644 index 748ded1a..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/104.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/105.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/105.gif deleted file mode 100644 index be9eaa05..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/105.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/106.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/106.gif deleted file mode 100644 index d7c20663..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/106.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/11.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/11.gif deleted file mode 100644 index b512dd5d..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/11.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/12.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/12.gif deleted file mode 100644 index 547529ca..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/12.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/13.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/13.gif deleted file mode 100644 index 34753001..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/13.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/14.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/14.gif deleted file mode 100644 index 5be27cb0..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/14.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/15.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/15.gif deleted file mode 100644 index debab8ed..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/15.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/16.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/16.gif deleted file mode 100644 index ed5d29f4..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/16.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/18.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/18.gif deleted file mode 100644 index b6af2189..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/18.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/19.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/19.gif deleted file mode 100644 index e045ff2a..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/19.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/2.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/2.gif deleted file mode 100644 index 40cfda43..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/2.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/20.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/20.gif deleted file mode 100644 index efd650f5..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/20.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/21.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/21.gif deleted file mode 100644 index cb8cf6d2..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/21.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/22.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/22.gif deleted file mode 100644 index 2913255c..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/22.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/23.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/23.gif deleted file mode 100644 index 96516b8d..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/23.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/24.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/24.gif deleted file mode 100644 index 5f925c7b..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/24.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/25.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/25.gif deleted file mode 100644 index 97f8b1af..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/25.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/26.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/26.gif deleted file mode 100644 index c0aa92e2..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/26.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/27.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/27.gif deleted file mode 100644 index cc083b7a..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/27.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/28.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/28.gif deleted file mode 100644 index 298c3e5a..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/28.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/29.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/29.gif deleted file mode 100644 index e6602f91..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/29.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/3.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/3.gif deleted file mode 100644 index 6d6f7629..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/3.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/30.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/30.gif deleted file mode 100644 index e24a1801..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/30.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/31.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/31.gif deleted file mode 100644 index 9b25baff..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/31.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/32.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/32.gif deleted file mode 100644 index e96eee77..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/32.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/33.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/33.gif deleted file mode 100644 index 3dbd98f6..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/33.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/34.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/34.gif deleted file mode 100644 index e9d42131..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/34.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/35.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/35.gif deleted file mode 100644 index d6da2c33..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/35.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/36.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/36.gif deleted file mode 100644 index c1e6ac91..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/36.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/37.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/37.gif deleted file mode 100644 index 92efec6a..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/37.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/38.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/38.gif deleted file mode 100644 index 489f0f94..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/38.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/39.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/39.gif deleted file mode 100644 index 734f6d82..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/39.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/4.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/4.gif deleted file mode 100644 index 6ccdaa2c..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/4.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/40.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/40.gif deleted file mode 100644 index 7f71a8c9..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/40.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/41.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/41.gif deleted file mode 100644 index a462a0ad..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/41.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/42.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/42.gif deleted file mode 100644 index b909e16a..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/42.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/43.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/43.gif deleted file mode 100644 index f36cf58e..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/43.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/44.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/44.gif deleted file mode 100644 index d0d08560..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/44.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/45.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/45.gif deleted file mode 100644 index cf5114c4..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/45.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/46.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/46.gif deleted file mode 100644 index e0f28a07..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/46.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/47.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/47.gif deleted file mode 100644 index 24284cf3..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/47.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/48.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/48.gif deleted file mode 100644 index 80538854..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/48.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/49.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/49.gif deleted file mode 100644 index 7e113eea..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/49.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/5.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/5.gif deleted file mode 100644 index 90c3d867..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/5.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/50.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/50.gif deleted file mode 100644 index 1c52bde9..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/50.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/51.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/51.gif deleted file mode 100644 index 66d21136..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/51.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/52.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/52.gif deleted file mode 100644 index 034933ec..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/52.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/53.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/53.gif deleted file mode 100644 index d58fcf67..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/53.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/54.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/54.gif deleted file mode 100644 index c4e00bdf..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/54.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/55.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/55.gif deleted file mode 100644 index 310ec65f..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/55.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/56.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/56.gif deleted file mode 100644 index 51761ba4..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/56.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/57.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/57.gif deleted file mode 100644 index 8f882f53..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/57.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/58.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/58.gif deleted file mode 100644 index 8c255004..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/58.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/59.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/59.gif deleted file mode 100644 index 27019f8f..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/59.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/6.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/6.gif deleted file mode 100644 index a26b001e..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/6.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/60.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/60.gif deleted file mode 100644 index 9cb9aa79..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/60.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/61.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/61.gif deleted file mode 100644 index 61652a71..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/61.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/62.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/62.gif deleted file mode 100644 index 9a779364..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/62.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/63.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/63.gif deleted file mode 100644 index 2329101a..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/63.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/64.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/64.gif deleted file mode 100644 index 644748a9..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/64.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/65.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/65.gif deleted file mode 100644 index 608d0ad8..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/65.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/66.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/66.gif deleted file mode 100644 index c8c1fc36..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/66.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/67.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/67.gif deleted file mode 100644 index edf96f0a..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/67.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/68.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/68.gif deleted file mode 100644 index 3f4cb251..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/68.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/69.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/69.gif deleted file mode 100644 index 17e7e258..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/69.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/7.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/7.gif deleted file mode 100644 index d03ca933..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/7.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/70.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/70.gif deleted file mode 100644 index 99139e1d..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/70.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/71.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/71.gif deleted file mode 100644 index f60897e4..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/71.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/72.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/72.gif deleted file mode 100644 index e62312a2..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/72.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/73.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/73.gif deleted file mode 100644 index 650d3dd8..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/73.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/74.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/74.gif deleted file mode 100644 index 5c8e0718..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/74.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/75.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/75.gif deleted file mode 100644 index f3cb0742..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/75.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/76.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/76.gif deleted file mode 100644 index 28938379..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/76.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/77.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/77.gif deleted file mode 100644 index 27a30c15..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/77.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/78.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/78.gif deleted file mode 100644 index dcfa48af..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/78.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/79.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/79.gif deleted file mode 100644 index 029cf0fe..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/79.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/8.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/8.gif deleted file mode 100644 index 2e97e132..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/8.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/80.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/80.gif deleted file mode 100644 index 69f183f0..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/80.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/81.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/81.gif deleted file mode 100644 index d41e8aab..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/81.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/82.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/82.gif deleted file mode 100644 index 517ce36b..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/82.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/83.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/83.gif deleted file mode 100644 index 57d41870..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/83.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/84.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/84.gif deleted file mode 100644 index 9042b9d4..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/84.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/85.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/85.gif deleted file mode 100644 index e12e751c..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/85.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/86.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/86.gif deleted file mode 100644 index 47b1aaa3..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/86.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/87.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/87.gif deleted file mode 100644 index 918288b0..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/87.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/88.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/88.gif deleted file mode 100644 index 2dc2ea8d..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/88.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/89.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/89.gif deleted file mode 100644 index c0293c3a..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/89.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/9.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/9.gif deleted file mode 100644 index 73fc097a..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/9.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/90.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/90.gif deleted file mode 100644 index fbf275ba..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/90.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/91.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/91.gif deleted file mode 100644 index 076f0c65..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/91.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/92.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/92.gif deleted file mode 100644 index d254af44..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/92.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/93.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/93.gif deleted file mode 100644 index 8f09d336..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/93.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/94.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/94.gif deleted file mode 100644 index df70756f..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/94.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/95.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/95.gif deleted file mode 100644 index 4d8b15e7..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/95.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/96.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/96.gif deleted file mode 100644 index f7152f99..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/96.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/97.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/97.gif deleted file mode 100644 index 5ef6d382..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/97.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/98.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/98.gif deleted file mode 100644 index 2b709e15..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/98.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/99.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/99.gif deleted file mode 100644 index cf29be87..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/face/QQ/99.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/aero.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/aero.png deleted file mode 100644 index dccf7740..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/aero.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/aero@2x.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/aero@2x.png deleted file mode 100644 index 5537ee36..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/aero@2x.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/blue.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/blue.png deleted file mode 100644 index af04cee5..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/blue.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/blue@2x.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/blue@2x.png deleted file mode 100644 index f19210a9..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/blue@2x.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/green.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/green.png deleted file mode 100644 index 9171ebc7..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/green.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/green@2x.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/green@2x.png deleted file mode 100644 index 7f18f96a..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/green@2x.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/grey.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/grey.png deleted file mode 100644 index 22dcdbcf..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/grey.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/grey@2x.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/grey@2x.png deleted file mode 100644 index 85e82ddd..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/grey@2x.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/minimal.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/minimal.png deleted file mode 100644 index 943be16f..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/minimal.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/minimal@2x.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/minimal@2x.png deleted file mode 100644 index d62291da..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/minimal@2x.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/orange.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/orange.png deleted file mode 100644 index f2a31497..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/orange.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/orange@2x.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/orange@2x.png deleted file mode 100644 index 68c83591..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/orange@2x.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/pink.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/pink.png deleted file mode 100644 index 660553c0..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/pink.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/pink@2x.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/pink@2x.png deleted file mode 100644 index 7d7b3851..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/pink@2x.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/purple.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/purple.png deleted file mode 100644 index 48dec794..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/purple.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/purple@2x.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/purple@2x.png deleted file mode 100644 index 3bb70417..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/purple@2x.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/red.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/red.png deleted file mode 100644 index 4443f809..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/red.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/red@2x.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/red@2x.png deleted file mode 100644 index 2eb55a65..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/red@2x.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/yellow.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/yellow.png deleted file mode 100644 index 0999b7ec..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/yellow.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/yellow@2x.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/yellow@2x.png deleted file mode 100644 index c16f2b7d..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iCheck/yellow@2x.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iconpic-arrow.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iconpic-arrow.png deleted file mode 100644 index cfbdf39b..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/iconpic-arrow.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/jselect/iconpic-arrow-down2.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/jselect/iconpic-arrow-down2.png deleted file mode 100644 index a71816d9..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/jselect/iconpic-arrow-down2.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/loading/loading-b.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/loading/loading-b.gif deleted file mode 100644 index 95b02aaf..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/loading/loading-b.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/loading/loading-s.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/loading/loading-s.gif deleted file mode 100644 index db97087b..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/loading/loading-s.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/rollpic/unslider-arrow.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/rollpic/unslider-arrow.png deleted file mode 100644 index 541246ad..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/rollpic/unslider-arrow.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/star/iconpic-star-S-default.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/star/iconpic-star-S-default.png deleted file mode 100644 index db388774..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/star/iconpic-star-S-default.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/star/iconpic-star-S.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/star/iconpic-star-S.png deleted file mode 100644 index 1f6fbb04..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/star/iconpic-star-S.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/steps/step_arrow-active.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/steps/step_arrow-active.png deleted file mode 100644 index 9f6aff53..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/steps/step_arrow-active.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/steps/step_arrow.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/steps/step_arrow.png deleted file mode 100644 index 3162ebe4..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/steps/step_arrow.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/steps/step_bg-active.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/steps/step_bg-active.png deleted file mode 100644 index 6b8d9416..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/steps/step_bg-active.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/steps/step_bg.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/steps/step_bg.png deleted file mode 100644 index 2eabff9c..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/steps/step_bg.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/ucnter/avatar-default-S.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/ucnter/avatar-default-S.gif deleted file mode 100644 index cb4378a5..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/ucnter/avatar-default-S.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/ucnter/avatar-default.jpg b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/ucnter/avatar-default.jpg deleted file mode 100644 index a50c0ff9..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/ucnter/avatar-default.jpg and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/ucnter/avatar.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/ucnter/avatar.png deleted file mode 100644 index 2e7e760f..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/ucnter/avatar.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/ucnter/noavatar_small.gif b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/ucnter/noavatar_small.gif deleted file mode 100644 index b6dbfa08..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/ucnter/noavatar_small.gif and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/validform/iconpic-error.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/validform/iconpic-error.png deleted file mode 100644 index 3a232e5a..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/validform/iconpic-error.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/validform/iconpic-right.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/validform/iconpic-right.png deleted file mode 100644 index 3f548e94..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/validform/iconpic-right.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/validform/iconpic-warning.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/validform/iconpic-warning.png deleted file mode 100644 index 7c32122e..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/validform/iconpic-warning.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/verticalTab/tabNav-active.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/verticalTab/tabNav-active.png deleted file mode 100644 index e0c04393..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/verticalTab/tabNav-active.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/verticalTab/tabNav-hover.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/verticalTab/tabNav-hover.png deleted file mode 100644 index ba3d3e9e..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/verticalTab/tabNav-hover.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/verticalTab/tabNav.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/verticalTab/tabNav.png deleted file mode 100644 index ad056e45..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/verticalTab/tabNav.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/verticalTab/tabNav_right-active.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/verticalTab/tabNav_right-active.png deleted file mode 100644 index bcdb7306..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/verticalTab/tabNav_right-active.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/verticalTab/tabNav_right-hover.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/verticalTab/tabNav_right-hover.png deleted file mode 100644 index d698f001..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/verticalTab/tabNav_right-hover.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/verticalTab/tabNav_right.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/verticalTab/tabNav_right.png deleted file mode 100644 index 22baee14..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/verticalTab/tabNav_right.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/verticalTab/tab_bg.png b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/verticalTab/tab_bg.png deleted file mode 100644 index 2687be5f..00000000 Binary files a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/images/verticalTab/tab_bg.png and /dev/null differ diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/js/H-ui.js b/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/js/H-ui.js deleted file mode 100644 index f7c3b095..00000000 --- a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/js/H-ui.js +++ /dev/null @@ -1,9293 +0,0 @@ -/*-----------H-ui前端框架------------- -* H-ui.js v3.1.3 -* http://www.h-ui.net/ -* Created & Modified by guojunhui -* Date modified 2017.05.26 -* -* Copyright 2013-2017 北京颖杰联创科技有限公司 All rights reserved. -* Licensed under MIT license. -* http://opensource.org/licenses/MIT -*/ -/* -Includes: -jQuery.IEMobileHack.js -jQuery.cookie.js v1.4.1 -jQuery.form.js v3.51.0 -jQuery.lazyload.js v1.9.3 -jQuery.responsive-nav.js v1.0.39 -jQuery.placeholder.js -jQuery.emailsuggest.js v1.0 -jQuery.format.js -jQuery.togglePassword.js -jQuery.iCheck.js -jQuery.raty.js v2.4.5 -jQuery.onePageNav.js -jQuery.stickUp.js -jQuery.ColorPicker.js - -jQuery.HuiaddFavorite.js -jQuery.Huisethome.js -jQuery.Huisidenav.js -jQuery.Huihover.js v2.0 -jQuery.Huifocusblur.js V2.0 -jQuery.Huiselect.js -jQuery.Huitab.js v2.0 -jQuery.Huifold.js v2.0 -jQuery.Huitags.js v2.0 -jQuery.Huitagsmixed.js -jQuery.Huitextarealength.js v2.0 -jQuery.Huipreview.js v2.0 -jQuery.Huimodalalert.js -jQuery.Huialert.js -jQuery.Huitotop.js v2.0 -jQuery.Huimarquee.js -jQuery.Huispinner.js v2.0 - -Bootstrap.modal.js v3.3.0 -Bootstrap.dropdown.js v3.3.0 -Bootstrap.transition.js v3.3.0 -Bootstrap.tooltip.js v3.3.0 -Bootstrap.popover.js v3.3.0 -Bootstrap.alert.js v3.3.0 -Bootstrap.slider.js v1.0.1 -Bootstrap.datetimepicker.js -Bootstrap.Switch v1.3 - -*/ -/* ======================================================================= - * jQuery.IEMobileHack.js判断浏览器 - * ======================================================================== */ -!function(){ - if (navigator.userAgent.match(/IEMobile\/10\.0/)) { - var msViewportStyle = document.createElement("style"); - msViewportStyle.appendChild( - document.createTextNode( - "@-ms-viewport{width:auto!important}" - ) - ); - document.getElementsByTagName("head")[0].appendChild(msViewportStyle); - } -} (); - -/* ======================================================================= - * jQuery.stopDefault.js 阻止默认浏览器动作 - * ======================================================================== */ -function stopDefault(e) { - if (e && e.preventDefault) e.preventDefault(); - //IE中阻止函数器默认动作的方式 - else window.event.returnValue = false; - return false; -} - -/* ======================================================================= - * jQuery.cookie.js v1.4.1 - * https://github.com/carhartl/jQuery-cookie - * - * Copyright 2006, 2014 Klaus Hartl - * Released under the MIT license - * ======================================================================== */ -!(function(factory) { - if (typeof define === 'function' && define.amd) { - // AMD (Register as an anonymous module) - define(['jquery'], factory); - } else if (typeof exports === 'object') { - // Node/CommonJS - module.exports = factory(require('jquery')); - } else { - // Browser globals - factory(jQuery); - } -} -(function($){ - var pluses = /\+/g; - function encode(s) { - return config.raw ? s : encodeURIComponent(s); - } - function decode(s) { - return config.raw ? s : decodeURIComponent(s); - } - function stringifyCookieValue(value) { - return encode(config.json ? JSON.stringify(value) : String(value)); - } - function parseCookieValue(s) { - if (s.indexOf('"') === 0) { - // This is a quoted cookie as according to RFC2068, unescape... - s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); - } - - try { - // Replace server-side written pluses with spaces. - // If we can't decode the cookie, ignore it, it's unusable. - // If we can't parse the cookie, ignore it, it's unusable. - s = decodeURIComponent(s.replace(pluses, ' ')); - return config.json ? JSON.parse(s) : s; - } catch(e) {} - } - function read(s, converter) { - var value = config.raw ? s: parseCookieValue(s); - return $.isFunction(converter) ? converter(value) : value; - } - var config = $.cookie = function(key, value, options) { - // Write - if (arguments.length > 1 && !$.isFunction(value)) { - options = $.extend({}, - config.defaults, options); - - if (typeof options.expires === 'number') { - var days = options.expires, - t = options.expires = new Date(); - t.setMilliseconds(t.getMilliseconds() + days * 864e+5); - } - - return (document.cookie = [encode(key), '=', stringifyCookieValue(value), options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE - options.path ? '; path=' + options.path: '', options.domain ? '; domain=' + options.domain: '', options.secure ? '; secure': ''].join('')); - } - // Read - var result = key ? undefined: {}, - // To prevent the for loop in the first place assign an empty array - // in case there are no cookies at all. Also prevents odd result when - // calling $.cookie(). - cookies = document.cookie ? document.cookie.split('; ') : [], - i = 0, - l = cookies.length; - for (; i < l; i++) { - var parts = cookies[i].split('='), - name = decode(parts.shift()), - cookie = parts.join('='); - if (key === name) { - // If second argument (value) is a function it's a converter... - result = read(cookie, value); - break; - } - // Prevent storing a cookie that we couldn't decode. - if (!key && (cookie = read(cookie)) !== undefined) { - result[name] = cookie; - } - } - return result; - }; - config.defaults = {}; - $.removeCookie = function(key, options) { - // Must not alter options, thus extending a fresh object... - $.cookie(key, '', $.extend({}, - options, { - expires: -1 - })); - return ! $.cookie(key); - }; -})); - -/* ======================================================================= - * jQuery.form.js Plugin v3.51.0 2014.06.20 - * Requires jQuery v1.5 or later - * Copyright (c) 2014 M. Alsup - * Examples and documentation at: http://malsup.com/jquery/form/ - * Project repository: https://github.com/malsup/form - * Dual licensed under the MIT and GPL licenses. - * https://github.com/malsup/form#copyright-and-license - * ======================================================================== */ -// AMD support -(function(factory) { - "use strict"; - if (typeof define === 'function' && define.amd) { - // using AMD; register as anon module - define(['jquery'], factory); - } else { - // no AMD; invoke directly - factory((typeof(jQuery) != 'undefined') ? jQuery: window.Zepto); - } -} (function($) { - "use strict"; - /* - Usage Note: - ----------- - Do not use both ajaxSubmit and ajaxForm on the same form. These - functions are mutually exclusive. Use ajaxSubmit if you want - to bind your own submit handler to the form. For example, - - $(document).ready(function() { - $('#myForm').on('submit', function(e) { - e.preventDefault(); // <-- important - $(this).ajaxSubmit({ - target: '#output' - }); - }); - }); - - Use ajaxForm when you want the plugin to manage all the event binding - for you. For example, - - $(document).ready(function() { - $('#myForm').ajaxForm({ - target: '#output' - }); - }); - - You can also use ajaxForm with delegation (requires jQuery v1.7+), so the - form does not have to exist when you invoke ajaxForm: - - $('#myForm').ajaxForm({ - delegation: true, - target: '#output' - }); - - When using ajaxForm, the ajaxSubmit function will be invoked for you - at the appropriate time. - */ - /** - * Feature detection - */ - var feature = {}; - feature.fileapi = $("").get(0).files !== undefined; - feature.formdata = window.FormData !== undefined; - var hasProp = !!$.fn.prop; - // attr2 uses prop when it can but checks the return type for - // an expected string. this accounts for the case where a form - // contains inputs with names like "action" or "method"; in those - // cases "prop" returns the element - $.fn.attr2 = function() { - if (!hasProp) { - return this.attr.apply(this, arguments); - } - var val = this.prop.apply(this, arguments); - if ((val && val.jquery) || typeof val === 'string') { - return val; - } - return this.attr.apply(this, arguments); - }; - - /** - * ajaxSubmit() provides a mechanism for immediately submitting - * an HTML form using AJAX. - */ - $.fn.ajaxSubmit = function(options) { - /*jshint scripturl:true */ - // fast fail if nothing selected (http://dev.jquery.com/ticket/2752) - if (!this.length) { - log('ajaxSubmit: skipping submit process - no element selected'); - return this; - } - var method, action, url, $form = this; - if (typeof options == 'function') { - options = { - success: options - }; - } else if (options === undefined) { - options = {}; - } - method = options.type || this.attr2('method'); - action = options.url || this.attr2('action'); - url = (typeof action === 'string') ? $.trim(action) : ''; - url = url || window.location.href || ''; - if (url) { - // clean url (don't include hash vaue) - url = (url.match(/^([^#]+)/) || [])[1]; - } - - options = $.extend(true, { - url: url, - success: $.ajaxSettings.success, - type: method || $.ajaxSettings.type, - iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false': 'about:blank' - }, - options); - - // hook for manipulating the form data before it is extracted; - // convenient for use with rich editors like tinyMCE or FCKEditor - var veto = {}; - this.trigger('form-pre-serialize', [this, options, veto]); - if (veto.veto) { - log('ajaxSubmit: submit vetoed via form-pre-serialize trigger'); - return this; - } - - // provide opportunity to alter form data before it is serialized - if (options.beforeSerialize && options.beforeSerialize(this, options) === false) { - log('ajaxSubmit: submit aborted via beforeSerialize callback'); - return this; - } - - var traditional = options.traditional; - if (traditional === undefined) { - traditional = $.ajaxSettings.traditional; - } - - var elements = []; - var qx, a = this.formToArray(options.semantic, elements); - if (options.data) { - options.extraData = options.data; - qx = $.param(options.data, traditional); - } - - // give pre-submit callback an opportunity to abort the submit - if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) { - log('ajaxSubmit: submit aborted via beforeSubmit callback'); - return this; - } - - // fire vetoable 'validate' event - this.trigger('form-submit-validate', [a, this, options, veto]); - if (veto.veto) { - log('ajaxSubmit: submit vetoed via form-submit-validate trigger'); - return this; - } - - var q = $.param(a, traditional); - if (qx) { - q = (q ? (q + '&' + qx) : qx); - } - if (options.type.toUpperCase() == 'GET') { - options.url += (options.url.indexOf('?') >= 0 ? '&': '?') + q; - options.data = null; // data is null for 'get' - } else { - options.data = q; // data is the query string for 'post' - } - - var callbacks = []; - if (options.resetForm) { - callbacks.push(function() { - $form.resetForm(); - }); - } - if (options.clearForm) { - callbacks.push(function() { - $form.clearForm(options.includeHidden); - }); - } - - // perform a load on the target only if dataType is not provided - if (!options.dataType && options.target) { - var oldSuccess = options.success || - function() {}; - callbacks.push(function(data) { - var fn = options.replaceTarget ? 'replaceWith': 'html'; - $(options.target)[fn](data).each(oldSuccess, arguments); - }); - } else if (options.success) { - callbacks.push(options.success); - } - - options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg - var context = options.context || this; // jQuery 1.4+ supports scope context - for (var i = 0, - max = callbacks.length; i < max; i++) { - callbacks[i].apply(context, [data, status, xhr || $form, $form]); - } - }; - - if (options.error) { - var oldError = options.error; - options.error = function(xhr, status, error) { - var context = options.context || this; - oldError.apply(context, [xhr, status, error, $form]); - }; - } - - if (options.complete) { - var oldComplete = options.complete; - options.complete = function(xhr, status) { - var context = options.context || this; - oldComplete.apply(context, [xhr, status, $form]); - }; - } - - // are there files to upload? - // [value] (issue #113), also see comment: - // https://github.com/malsup/form/commit/588306aedba1de01388032d5f42a60159eea9228#commitcomment-2180219 - var fileInputs = $('input[type=file]:enabled', this).filter(function() { - return $(this).val() !== ''; - }); - - var hasFileInputs = fileInputs.length > 0; - var mp = 'multipart/form-data'; - var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp); - - var fileAPI = feature.fileapi && feature.formdata; - log("fileAPI :" + fileAPI); - var shouldUseFrame = (hasFileInputs || multipart) && !fileAPI; - - var jqxhr; - - // options.iframe allows user to force iframe mode - // 06-NOV-09: now defaulting to iframe mode if file input is detected - if (options.iframe !== false && (options.iframe || shouldUseFrame)) { - // hack to fix Safari hang (thanks to Tim Molendijk for this) - // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d - if (options.closeKeepAlive) { - $.get(options.closeKeepAlive, - function() { - jqxhr = fileUploadIframe(a); - }); - } else { - jqxhr = fileUploadIframe(a); - } - } else if ((hasFileInputs || multipart) && fileAPI) { - jqxhr = fileUploadXhr(a); - } else { - jqxhr = $.ajax(options); - } - - $form.removeData('jqxhr').data('jqxhr', jqxhr); - - // clear element array - for (var k = 0; k < elements.length; k++) { - elements[k] = null; - } - - // fire 'notify' event - this.trigger('form-submit-notify', [this, options]); - return this; - - // utility fn for deep serialization - function deepSerialize(extraData) { - var serialized = $.param(extraData, options.traditional).split('&'); - var len = serialized.length; - var result = []; - var i, part; - for (i = 0; i < len; i++) { - // #252; undo param space replacement - serialized[i] = serialized[i].replace(/\+/g, ' '); - part = serialized[i].split('='); - // #278; use array instead of object storage, favoring array serializations - result.push([decodeURIComponent(part[0]), decodeURIComponent(part[1])]); - } - return result; - } - - // XMLHttpRequest Level 2 file uploads (big hat tip to francois2metz) - function fileUploadXhr(a) { - var formdata = new FormData(); - - for (var i = 0; i < a.length; i++) { - formdata.append(a[i].name, a[i].value); - } - - if (options.extraData) { - var serializedData = deepSerialize(options.extraData); - for (i = 0; i < serializedData.length; i++) { - if (serializedData[i]) { - formdata.append(serializedData[i][0], serializedData[i][1]); - } - } - } - - options.data = null; - - var s = $.extend(true, {}, - $.ajaxSettings, options, { - contentType: false, - processData: false, - cache: false, - type: method || 'POST' - }); - - if (options.uploadProgress) { - // workaround because jqXHR does not expose upload property - s.xhr = function() { - var xhr = $.ajaxSettings.xhr(); - if (xhr.upload) { - xhr.upload.addEventListener('progress', - function(event) { - var percent = 0; - var position = event.loaded || event.position; - /*event.position is deprecated*/ - var total = event.total; - if (event.lengthComputable) { - percent = Math.ceil(position / total * 100); - } - options.uploadProgress(event, position, total, percent); - }, - false); - } - return xhr; - }; - } - - s.data = null; - var beforeSend = s.beforeSend; - s.beforeSend = function(xhr, o) { - //Send FormData() provided by user - if (options.formData) { - o.data = options.formData; - } else { - o.data = formdata; - } - if (beforeSend) { - beforeSend.call(this, xhr, o); - } - }; - return $.ajax(s); - } - - // private function for handling file uploads (hat tip to YAHOO!) - function fileUploadIframe(a) { - var form = $form[0], - el, - i, - s, - g, - id, - $io, - io, - xhr, - sub, - n, - timedOut, - timeoutHandle; - var deferred = $.Deferred(); - - // #341 - deferred.abort = function(status) { - xhr.abort(status); - }; - - if (a) { - // ensure that every serialized input is still enabled - for (i = 0; i < elements.length; i++) { - el = $(elements[i]); - if (hasProp) { - el.prop('disabled', false); - } else { - el.removeAttr('disabled'); - } - } - } - - s = $.extend(true, {}, - $.ajaxSettings, options); - s.context = s.context || s; - id = 'jqFormIO' + (new Date().getTime()); - if (s.iframeTarget) { - $io = $(s.iframeTarget); - n = $io.attr2('name'); - if (!n) { - $io.attr2('name', id); - } else { - id = n; - } - } else { - $io = $(' +
                                  +
                                  +
                                  +
                                  +
                                  +
                                  + + + + + + + + \ No newline at end of file diff --git a/public/static/xadmin/js/cookie.js b/public/static/xadmin/js/cookie.js new file mode 100644 index 00000000..79b05ac7 --- /dev/null +++ b/public/static/xadmin/js/cookie.js @@ -0,0 +1,38 @@ +function setCookie(name, value, expires, path, domain, secure) { + if(typeof is_remember!="undefined") + return false; + var today = new Date(); + today.setTime( today.getTime() ); + var expires_date = new Date( today.getTime() + (expires) ); + document.cookie= name + "=" + escape(value) + + ((expires) ? "; expires=" + expires_date.toGMTString() : "") + + ((path) ? "; path=" + path : "") + + ((domain) ? "; domain=" + domain : "") + + ((secure) ? "; secure" : ""); +} +function getCookie(name) { + var dc = document.cookie; + var prefix = name + "="; + var begin = dc.indexOf("; " + prefix); + if (begin == -1) { + begin = dc.indexOf(prefix); + if (begin != 0) return null; + } else { + begin += 2; + } + var end = document.cookie.indexOf(";", begin); + if (end == -1) { + end = dc.length; + } + return unescape(dc.substring(begin + prefix.length, end)); +} +function deleteCookie(name, path, domain) { + if (getCookie(name)) { + document.cookie = name + "=" + + ((path) ? "; path=" + path : "") + + ((domain) ? "; domain=" + domain : "") + + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; + } +} + + diff --git a/public/static/xadmin/js/xadmin.js b/public/static/xadmin/js/xadmin.js new file mode 100644 index 00000000..67970356 --- /dev/null +++ b/public/static/xadmin/js/xadmin.js @@ -0,0 +1,454 @@ +// Array.prototype.remove = function(val) { +// var index = this.indexOf(val); +// if (index > -1) { +// return this.splice(index, 1); +// } + +// }; +$(function () { + + layui.use(['form','element'], + function() { + layer = layui.layer; + element = layui.element; + + //tab 右键事件 + $(".layui-tab-title").on('contextmenu', 'li', function(event) { + var tab_left = $(this).position().left; + var left = $(this).position().top; + this_index = $(this).attr('lay-id'); + $('#tab_right').css({'left':tab_left+50}).show(); + $('#tab_show').show(); + return false; + }); + + $('.page-content,#tab_show,.container,.left-nav').click(function(event) { + $('#tab_right').hide(); + $('#tab_show').hide(); + }); + + $('#tab_right').on('click', 'dd', function(event) { + + if(getCookie('tab_list')){ + var tab_list = getCookie('tab_list').split(','); + }else{ + var tab_list = []; + } + + var type = $(this).attr('data-type'); + + if(type=='this'){ + + tab.tabDelete(this_index); + + var index = -1; + + for (var i in tab_list) { + if(tab_list[i]==(this_index-1)){ + index = i; + } + } + if (index > -1) { + tab_list.splice(index, 1); + } + + setCookie('tab_list',tab_list); + } + if(type=='all'){ + + for (var i in tab_list) { + tab.tabDelete(Number(tab_list[i])+1); + tab.tabDelete(tab_list[i]); + } + + setCookie('tab_list',[]); + } + + if(type=='other'){ + + for (var i in tab_list) { + if(tab_list[i]!=(this_index-1)){ + tab.tabDelete(Number(tab_list[i])+1); + } + } + + setCookie('tab_list',[this_index-1]); + } + // alert(this_index); + $('#tab_right').hide(); + }); + + // tab 双击事件 + $(".layui-tab-title").on('dblclick', 'li', function(event) { + var id = $(this).attr('lay-id'); + tab.tabDelete(id); + + if(getCookie('tab_list')){ + tab_list = getCookie('tab_list').split(','); + }else{ + tab_list = []; + } + + + var index = -1; + + for (var i in tab_list) { + if(tab_list[i]==(id-1)){ + index = i; + } + } + + + if (index > -1) { + tab_list.splice(index, 1); + } + + setCookie('tab_list',tab_list); + return false; + }); + + // tab 删除事件 + element.on('tabDelete(xbs_tab)', function(data){ + var id = $(this).parent().attr('lay-id')-1; + + if(getCookie('tab_list')){ + tab_list = getCookie('tab_list').split(','); + }else{ + tab_list = []; + } + + + var index = -1; + + for (var i in tab_list) { + if(tab_list[i]==id){ + index = i; + } + } + + + if (index > -1) { + tab_list.splice(index, 1); + } + + setCookie('tab_list',tab_list); + + }); + + if(getCookie('tab_list')){ + tab_list = getCookie('tab_list').split(','); + + for (var i in tab_list) { + $('.left-nav #nav li').eq(tab_list[i]).click(); + } + } + }); + + //触发事件 + tab = { + tabAdd: function(title,url,id){ + //新增一个Tab项 + element.tabAdd('xbs_tab', { + title: title + ,content: '' + ,id: id + }) + } + ,tabDelete: function(othis){ + //删除指定Tab项 + element.tabDelete('xbs_tab', othis); //删除:“商品管理” + + + // othis.addClass('layui-btn-disabled'); + } + ,tabChange: function(id){ + //切换到指定Tab项 + element.tabChange('xbs_tab', id); //切换到:用户管理 + } + }; + + + tableCheck = { + init:function () { + $(".x-admin .layui-form-checkbox").click(function(event) { + if($(this).hasClass('layui-form-checked')){ + $(this).removeClass('layui-form-checked'); + if($(this).hasClass('header')){ + $(".x-admin .layui-form-checkbox").removeClass('layui-form-checked'); + } + }else{ + $(this).addClass('layui-form-checked'); + if($(this).hasClass('header')){ + $(".x-admin .layui-form-checkbox").addClass('layui-form-checked'); + } + } + + }); + }, + getData:function () { + var obj = $(".x-admin .layui-form-checked").not('.header'); + var arr=[]; + obj.each(function(index, el) { + arr.push(obj.eq(index).attr('data-id')); + }); + return arr; + } + } + + // 开启表格多选 + tableCheck.init(); + + + $('.container .left_open i').click(function(event) { + if($('.left-nav').css('left')=='0px'){ + $('.left-nav').animate({left: '-221px'}, 100); + $('.page-content').animate({left: '0px'}, 100); + $('.page-content-bg').hide(); + }else{ + $('.left-nav').animate({left: '0px'}, 100); + $('.page-content').animate({left: '221px'}, 100); + if($(window).width()<768){ + $('.page-content-bg').show(); + } + } + + }); + + $('.page-content-bg').click(function(event) { + $('.left-nav').animate({left: '-221px'}, 100); + $('.page-content').animate({left: '0px'}, 100); + $(this).hide(); + }); + + + + $('.layui-tab-close').click(function(event) { + $('.layui-tab-title li').eq(0).find('i').remove(); + }); + + $("tbody.x-cate tr[fid!='0']").hide(); + // 栏目多级显示效果 + $('.x-show').click(function () { + if($(this).attr('status')=='true'){ + $(this).html(''); + $(this).attr('status','false'); + cateId = $(this).parents('tr').attr('cate-id'); + $("tbody tr[fid="+cateId+"]").show(); + }else{ + cateIds = []; + $(this).html(''); + $(this).attr('status','true'); + cateId = $(this).parents('tr').attr('cate-id'); + getCateId(cateId); + for (var i in cateIds) { + $("tbody tr[cate-id="+cateIds[i]+"]").hide().find('.x-show').html('').attr('status','true'); + } + } + }) + + //左侧菜单效果 + + $('.left-nav #nav').on('click', 'li', function(event) { + + var index = $('.left-nav #nav li').index($(this)); + + if($(this).children('.sub-menu').length){ + if($(this).hasClass('open')){ + + if($(this).parent().hasClass('sub-menu')){ + deleteCookie('left_menu_son'); + }else{ + deleteCookie('left_menu_father'); + } + + $(this).removeClass('open'); + $(this).find('.nav_right').html(''); + $(this).children('.sub-menu').stop().slideUp(); + $(this).siblings().children('.sub-menu').slideUp(); + }else{ + + + if($(this).parent().hasClass('sub-menu')){ + setCookie('left_menu_son',index); + }else{ + setCookie('left_menu_father',index); + } + + $(this).addClass('open'); + $(this).children('a').find('.nav_right').html(''); + $(this).children('.sub-menu').stop().slideDown(); + $(this).siblings().children('.sub-menu').stop().slideUp(); + $(this).siblings().find('.nav_right').html(''); + $(this).siblings().removeClass('open'); + } + }else{ + + var url = $(this).children('a').attr('_href'); + var title = $(this).find('cite').html(); + // var index = $('.left-nav #nav li').index($(this)); + + var is_refresh = $(this).attr('date-refresh')?true:false; + + for (var i = 0; i <$('.x-iframe').length; i++) { + if($('.x-iframe').eq(i).attr('tab-id')==index+1){ + tab.tabChange(index+1); + event.stopPropagation(); + + if(is_refresh) + $('.x-iframe').eq(i).attr("src",$('.x-iframe').eq(i).attr('src')); + + return; + } + }; + + if(getCookie('tab_list')){ + tab_list = getCookie('tab_list').split(','); + }else{ + tab_list = []; + } + + var is_exist = false; + + for (var i in tab_list) { + if(tab_list[i]==index) + is_exist = true; + } + + if(!is_exist){ + tab_list.push(index); + } + + setCookie('tab_list',tab_list); + + tab.tabAdd(title,url,index+1); + tab.tabChange(index+1); + } + + event.stopPropagation(); + + }) + + // 左侧菜单记忆功能 + if(getCookie('left_menu_father')!=null){ + $('.left-nav #nav li').eq(getCookie('left_menu_father')).click(); + } + + if(getCookie('left_menu_son')!=null){ + $('.left-nav #nav li').eq(getCookie('left_menu_son')).click(); + } + + + + +}) +var cateIds = []; +function getCateId(cateId) { + + $("tbody tr[fid="+cateId+"]").each(function(index, el) { + id = $(el).attr('cate-id'); + cateIds.push(id); + getCateId(id); + }); +} + +/*弹出层*/ +/* + 参数解释: + title 标题 + url 请求的url + id 需要操作的数据id + w 弹出层宽度(缺省调默认值) + h 弹出层高度(缺省调默认值) +*/ +function x_admin_show(title,url,w,h){ + if (title == null || title == '') { + title=false; + }; + if (url == null || url == '') { + url="404.html"; + }; + if (w == null || w == '') { + w=($(window).width()*0.9); + }; + if (h == null || h == '') { + h=($(window).height() - 50); + }; + layer.open({ + type: 2, + area: [w+'px', h +'px'], + fix: false, //不固定 + maxmin: true, + shadeClose: true, + shade:0.4, + title: title, + content: url, + success: function(){ + //窗口加载成功刷新frame + // location.replace(location.href); + }, + cancel:function(){ + //关闭窗口之后刷新frame + // location.replace(location.href); + }, + end:function(){ + //窗口销毁之后刷新frame + // location.replace(location.href); + } + }); +} + +/*关闭弹出框口*/ +function x_admin_close(){ + var index = parent.layer.getFrameIndex(window.name); + parent.layer.close(index); +} + +function x_admin_father_reload(){ + + parent.location.reload(); +} + +function x_admin_add_to_tab(title,url,is_refresh) { + + var id = md5(url); + + is_refresh = arguments[2] ? arguments[2] : false; + + + for (var i = 0; i <$('.x-iframe').length; i++) { + if($('.x-iframe').eq(i).attr('tab-id')==id){ + tab.tabChange(id); + event.stopPropagation(); + + if(is_refresh) + $('.x-iframe').eq(i).attr("src",$('.x-iframe').eq(i).attr('src')); + + return; + } + }; + + if(getCookie('tab_list')){ + tab_list = getCookie('tab_list').split(','); + }else{ + tab_list = []; + } + + var is_exist = false; + + for (var i in tab_list) { + if(tab_list[i]==id) + is_exist = true; + } + + if(!is_exist){ + tab_list.push(id); + } + + setCookie('tab_list',tab_list); + + tab.tabAdd(title,url,id); + tab.tabChange(id); +} + + + diff --git a/public/static/xadmin/js/xcity.js b/public/static/xadmin/js/xcity.js new file mode 100644 index 00000000..e1fb2cf3 --- /dev/null +++ b/public/static/xadmin/js/xcity.js @@ -0,0 +1,511 @@ +$.fn.xcity = function(pName,cName,aName){ + + var p = $(this).find('select[lay-filter=province]'); + + var c = $(this).find('select[lay-filter=city]'); + + var a = $(this).find('select[lay-filter=area]'); + + var cityList = []; + + var areaList = []; + + showP(provinceList); + + showC(cityList); + + showA(areaList); + + function showP(provinceList) { + p.html(''); + + is_pName = false; + + for (var i in provinceList) { + + if(pName==provinceList[i].name){ + is_pName = true; + cityList = provinceList[i].cityList; + p.append("") + }else{ + p.append("") + } + } + if(!is_pName){ + cityList = provinceList[0].cityList; + } + + } + + function showC(cityList) { + + c.html(''); + + is_cName = false; + + for (var i in cityList) { + if(cName==cityList[i].name){ + is_cName = true; + areaList = cityList[i].areaList; + c.append("") + }else{ + c.append("") + } + } + + if(!is_cName){ + areaList = cityList[0].areaList; + } + } + + function showA(areaList) { + a.html(''); + + for (var i in areaList) { + + if(aName==areaList[i]){ + a.append("") + }else{ + a.append("") + } + } + } + + form.render('select'); + + form.on('select(province)', function(data){ + pName = data.value; + showP(provinceList); + showC(cityList); + showA(areaList); + form.render('select'); + }); + + form.on('select(city)', function(data){ + cName = data.value; + showC(cityList); + showA(areaList); + form.render('select'); + }); + + + +} +var provinceList = [ +{name:'北京', cityList:[ +{name:'市辖区', areaList:['东城区','西城区','崇文区','宣武区','朝阳区','丰台区','石景山区','海淀区','门头沟区','房山区','通州区','顺义区','昌平区','大兴区','怀柔区','平谷区']}, +{name:'县', areaList:['密云县','延庆县']} +]}, +{name:'上海', cityList:[ +{name:'市辖区', areaList:['黄浦区','卢湾区','徐汇区','长宁区','静安区','普陀区','闸北区','虹口区','杨浦区','闵行区','宝山区','嘉定区','浦东新区','金山区','松江区','青浦区','南汇区','奉贤区']}, +{name:'县', areaList:['崇明县']} +]}, +{name:'天津', cityList:[ +{name:'市辖区', areaList:['和平区','河东区','河西区','南开区','河北区','红桥区','塘沽区','汉沽区','大港区','东丽区','西青区','津南区','北辰区','武清区','宝坻区']}, +{name:'县', areaList:['宁河县','静海县','蓟 县']} +]}, +{name:'重庆', cityList:[ +{name:'市辖区', areaList:['万州区','涪陵区','渝中区','大渡口区','江北区','沙坪坝区','九龙坡区','南岸区','北碚区','万盛区','双桥区','渝北区','巴南区','黔江区','长寿区']}, +{name:'县', areaList:['綦江县','潼南县','铜梁县','大足县','荣昌县','璧山县','梁平县','城口县','丰都县','垫江县','武隆县','忠 县','开 县','云阳县','奉节县','巫山县','巫溪县','石柱土家族自治县','秀山土家族苗族自治县','酉阳土家族苗族自治县','彭水苗族土家族自治县']}, +{name:'市', areaList:['江津市','合川市','永川市','南川市']} +]}, +{name:'四川', cityList:[ +{name:'成都市', areaList:['市辖区','锦江区','青羊区','金牛区','武侯区','成华区','龙泉驿区','青白江区','新都区','温江县','金堂县','双流县','郫 县','大邑县','蒲江县','新津县','都江堰市','彭州市','邛崃市','崇州市']}, +{name:'自贡市', areaList:['市辖区','自流井区','贡井区','大安区','沿滩区','荣 县','富顺县']}, +{name:'攀枝花市', areaList:['市辖区','东 区','西 区','仁和区','米易县','盐边县']}, +{name:'泸州市', areaList:['市辖区','江阳区','纳溪区','龙马潭区','泸 县','合江县','叙永县','古蔺县']}, +{name:'德阳市', areaList:['市辖区','旌阳区','中江县','罗江县','广汉市','什邡市','绵竹市']}, +{name:'绵阳市', areaList:['市辖区','涪城区','游仙区','三台县','盐亭县','安 县','梓潼县','北川羌族自治县','平武县','江油市']}, +{name:'广元市', areaList:['市辖区','市中区','元坝区','朝天区','旺苍县','青川县','剑阁县','苍溪县']}, +{name:'遂宁市', areaList:['市辖区','船山区','安居区','蓬溪县','射洪县','大英县']}, +{name:'内江市', areaList:['市辖区','市中区','东兴区','威远县','资中县','隆昌县']}, +{name:'乐山市', areaList:['市辖区','市中区','沙湾区','五通桥区','金口河区','犍为县','井研县','夹江县','沐川县','峨边彝族自治县','马边彝族自治县','峨眉山市']}, +{name:'南充市', areaList:['市辖区','顺庆区','高坪区','嘉陵区','南部县','营山县','蓬安县','仪陇县','西充县','阆中市']}, +{name:'眉山市', areaList:['市辖区','东坡区','仁寿县','彭山县','洪雅县','丹棱县','青神县']}, +{name:'宜宾市', areaList:['市辖区','翠屏区','宜宾县','南溪县','江安县','长宁县','高 县','珙 县','筠连县','兴文县','屏山县']}, +{name:'广安市', areaList:['市辖区','广安区','岳池县','武胜县','邻水县','华莹市']}, +{name:'达州市', areaList:['市辖区','通川区','达 县','宣汉县','开江县','大竹县','渠 县','万源市']}, +{name:'雅安市', areaList:['市辖区','雨城区','名山县','荥经县','汉源县','石棉县','天全县','芦山县','宝兴县']}, +{name:'巴中市', areaList:['市辖区','巴州区','通江县','南江县','平昌县']}, +{name:'资阳市', areaList:['市辖区','雁江区','安岳县','乐至县','简阳市']}, +{name:'阿坝藏族羌族自治州', areaList:['汶川县','理 县','茂 县','松潘县','九寨沟县','金川县','小金县','黑水县','马尔康县','壤塘县','阿坝县','若尔盖县','红原县']}, +{name:'甘孜藏族自治州', areaList:['康定县','泸定县','丹巴县','九龙县','雅江县','道孚县','炉霍县','甘孜县','新龙县','德格县','白玉县','石渠县','色达县','理塘县','巴塘县','乡城县','稻城县','得荣县']}, +{name:'凉山彝族自治州', areaList:['西昌市','木里藏族自治县','盐源县','德昌县','会理县','会东县','宁南县','普格县','布拖县','金阳县','昭觉县','喜德县','冕宁县','越西县','甘洛县','美姑县','雷波县']} +]}, +{name:'贵州', cityList:[ +{name:'贵阳市', areaList:['市辖区','南明区','云岩区','花溪区','乌当区','白云区','小河区','开阳县','息烽县','修文县','清镇市']}, +{name:'六盘水市', areaList:['钟山区','六枝特区','水城县','盘 县']}, +{name:'遵义市', areaList:['市辖区','红花岗区','汇川区','遵义县','桐梓县','绥阳县','正安县','道真仡佬族苗族自治县','务川仡佬族苗族自治县','凤冈县','湄潭县','余庆县','习水县','赤水市','仁怀市']}, +{name:'安顺市', areaList:['市辖区','西秀区','平坝县','普定县','镇宁布依族苗族自治县','关岭布依族苗族自治县','紫云苗族布依族自治县']}, +{name:'铜仁地区', areaList:['铜仁市','江口县','玉屏侗族自治县','石阡县','思南县','印江土家族苗族自治县','德江县','沿河土家族自治县','松桃苗族自治县','万山特区']}, +{name:'黔西南布依族苗族自治州', areaList:['兴义市','兴仁县','普安县','晴隆县','贞丰县','望谟县','册亨县','安龙县']}, +{name:'毕节地区', areaList:['毕节市','大方县','黔西县','金沙县','织金县','纳雍县','威宁彝族回族苗族自治县','赫章县']}, +{name:'黔东南苗族侗族自治州', areaList:['凯里市','黄平县','施秉县','三穗县','镇远县','岑巩县','天柱县','锦屏县','剑河县','台江县','黎平县','榕江县','从江县','雷山县','麻江县','丹寨县']}, +{name:'黔南布依族苗族自治州', areaList:['都匀市','福泉市','荔波县','贵定县','瓮安县','独山县','平塘县','罗甸县','长顺县','龙里县','惠水县','三都水族自治县']} +]}, +{name:'云南', cityList:[ +{name:'昆明市', areaList:['市辖区','五华区','盘龙区','官渡区','西山区','东川区','呈贡县','晋宁县','富民县','宜良县','石林彝族自治县','嵩明县','禄劝彝族苗族自治县','寻甸回族彝族自治县','安宁市']}, +{name:'曲靖市', areaList:['市辖区','麒麟区','马龙县','陆良县','师宗县','罗平县','富源县','会泽县','沾益县','宣威市']}, +{name:'玉溪市', areaList:['市辖区','红塔区','江川县','澄江县','通海县','华宁县','易门县','峨山彝族自治县','新平彝族傣族自治县','元江哈尼族彝族傣族自治县']}, +{name:'保山市', areaList:['市辖区','隆阳区','施甸县','腾冲县','龙陵县','昌宁县']}, +{name:'昭通市', areaList:['市辖区','昭阳区','鲁甸县','巧家县','盐津县','大关县','永善县','绥江县','镇雄县','彝良县','威信县','水富县']}, +{name:'丽江市', areaList:['市辖区','古城区','玉龙纳西族自治县','永胜县','华坪县','宁蒗彝族自治县']}, +{name:'思茅市', areaList:['市辖区','翠云区','普洱哈尼族彝族自治县','墨江哈尼族自治县','景东彝族自治县','景谷傣族彝族自治县','镇沅彝族哈尼族拉祜族自治县','江城哈尼族彝族自治县','孟连傣族拉祜族佤族自治县','澜沧拉祜族自治县','西盟佤族自治县']}, +{name:'临沧市', areaList:['市辖区','临翔区','凤庆县','云 县','永德县','镇康县','双江拉祜族佤族布朗族傣族自治县','耿马傣族佤族自治县','沧源佤族自治县']}, +{name:'楚雄彝族自治州', areaList:['楚雄市','双柏县','牟定县','南华县','姚安县','大姚县','永仁县','元谋县','武定县','禄丰县']}, +{name:'红河哈尼族彝族自治州', areaList:['个旧市','开远市','蒙自县','屏边苗族自治县','建水县','石屏县','弥勒县','泸西县','元阳县','红河县','金平苗族瑶族傣族自治县','绿春县','河口瑶族自治县']}, +{name:'文山壮族苗族自治州', areaList:['文山县','砚山县','西畴县','麻栗坡县','马关县','丘北县','广南县','富宁县']}, +{name:'西双版纳傣族自治州', areaList:['景洪市','勐海县','勐腊县']}, +{name:'大理白族自治州', areaList:['大理市','漾濞彝族自治县','祥云县','宾川县','弥渡县','南涧彝族自治县','巍山彝族回族自治县','永平县','云龙县','洱源县','剑川县','鹤庆县']}, +{name:'德宏傣族景颇族自治州', areaList:['瑞丽市','潞西市','梁河县','盈江县','陇川县']}, +{name:'怒江傈僳族自治州', areaList:['泸水县','福贡县','贡山独龙族怒族自治县','兰坪白族普米族自治县']}, +{name:'迪庆藏族自治州', areaList:['香格里拉县','德钦县','维西傈僳族自治县']} +]}, +{name:'西藏', cityList:[ +{name:'拉萨市', areaList:['市辖区','城关区','林周县','当雄县','尼木县','曲水县','堆龙德庆县','达孜县','墨竹工卡县']}, +{name:'昌都地区', areaList:['昌都县','江达县','贡觉县','类乌齐县','丁青县','察雅县','八宿县','左贡县','芒康县','洛隆县','边坝县']}, +{name:'山南地区', areaList:['乃东县','扎囊县','贡嘎县','桑日县','琼结县','曲松县','措美县','洛扎县','加查县','隆子县','错那县','浪卡子县']}, +{name:'日喀则地区', areaList:['日喀则市','南木林县','江孜县','定日县','萨迦县','拉孜县','昂仁县','谢通门县','白朗县','仁布县','康马县','定结县','仲巴县','亚东县','吉隆县','聂拉木县','萨嘎县','岗巴县']}, +{name:'那曲地区', areaList:['那曲县','嘉黎县','比如县','聂荣县','安多县','申扎县','索 县','班戈县','巴青县','尼玛县']}, +{name:'阿里地区', areaList:['普兰县','札达县','噶尔县','日土县','革吉县','改则县','措勤县']}, +{name:'林芝地区', areaList:['林芝县','工布江达县','米林县','墨脱县','波密县','察隅县','朗 县']} +]}, +{name:'河南', cityList:[ +{name:'郑州市', areaList:['市辖区','中原区','二七区','管城回族区','金水区','上街区','邙山区','中牟县','巩义市','荥阳市','新密市','新郑市','登封市']}, +{name:'开封市', areaList:['市辖区','龙亭区','顺河回族区','鼓楼区','南关区','郊 区','杞 县','通许县','尉氏县','开封县','兰考县']}, +{name:'洛阳市', areaList:['市辖区','老城区','西工区','廛河回族区','涧西区','吉利区','洛龙区','孟津县','新安县','栾川县','嵩 县','汝阳县','宜阳县','洛宁县','伊川县','偃师市']}, +{name:'平顶山市', areaList:['市辖区','新华区','卫东区','石龙区','湛河区','宝丰县','叶 县','鲁山县','郏 县','舞钢市','汝州市']}, +{name:'安阳市', areaList:['市辖区','文峰区','北关区','殷都区','龙安区','安阳县','汤阴县','滑 县','内黄县','林州市']}, +{name:'鹤壁市', areaList:['市辖区','鹤山区','山城区','淇滨区','浚 县','淇 县']}, +{name:'新乡市', areaList:['市辖区','红旗区','卫滨区','凤泉区','牧野区','新乡县','获嘉县','原阳县','延津县','封丘县','长垣县','卫辉市','辉县市']}, +{name:'焦作市', areaList:['市辖区','解放区','中站区','马村区','山阳区','修武县','博爱县','武陟县','温 县','济源市','沁阳市','孟州市']}, +{name:'濮阳市', areaList:['市辖区','华龙区','清丰县','南乐县','范 县','台前县','濮阳县']}, +{name:'许昌市', areaList:['市辖区','魏都区','许昌县','鄢陵县','襄城县','禹州市','长葛市']}, +{name:'漯河市', areaList:['市辖区','源汇区','郾城区','召陵区','舞阳县','临颍县']}, +{name:'三门峡市', areaList:['市辖区','湖滨区','渑池县','陕 县','卢氏县','义马市','灵宝市']}, +{name:'南阳市', areaList:['市辖区','宛城区','卧龙区','南召县','方城县','西峡县','镇平县','内乡县','淅川县','社旗县','唐河县','新野县','桐柏县','邓州市']}, +{name:'商丘市', areaList:['市辖区','梁园区','睢阳区','民权县','睢 县','宁陵县','柘城县','虞城县','夏邑县','永城市']}, +{name:'信阳市', areaList:['市辖区','师河区','平桥区','罗山县','光山县','新 县','商城县','固始县','潢川县','淮滨县','息 县']}, +{name:'周口市', areaList:['市辖区','川汇区','扶沟县','西华县','商水县','沈丘县','郸城县','淮阳县','太康县','鹿邑县','项城市']}, +{name:'驻马店市', areaList:['市辖区','驿城区','西平县','上蔡县','平舆县','正阳县','确山县','泌阳县','汝南县','遂平县','新蔡县']} +]}, +{name:'湖北', cityList:[ +{name:'武汉市', areaList:['市辖区','江岸区','江汉区','乔口区','汉阳区','武昌区','青山区','洪山区','东西湖区','汉南区','蔡甸区','江夏区','黄陂区','新洲区']}, +{name:'黄石市', areaList:['市辖区','黄石港区','西塞山区','下陆区','铁山区','阳新县','大冶市']}, +{name:'十堰市', areaList:['市辖区','茅箭区','张湾区','郧 县','郧西县','竹山县','竹溪县','房 县','丹江口市']}, +{name:'宜昌市', areaList:['市辖区','西陵区','伍家岗区','点军区','猇亭区','夷陵区','远安县','兴山县','秭归县','长阳土家族自治县','五峰土家族自治县','宜都市','当阳市','枝江市']}, +{name:'襄樊市', areaList:['市辖区','襄城区','樊城区','襄阳区','南漳县','谷城县','保康县','老河口市','枣阳市','宜城市']}, +{name:'鄂州市', areaList:['市辖区','梁子湖区','华容区','鄂城区']}, +{name:'荆门市', areaList:['市辖区','东宝区','掇刀区','京山县','沙洋县','钟祥市']}, +{name:'孝感市', areaList:['市辖区','孝南区','孝昌县','大悟县','云梦县','应城市','安陆市','汉川市']}, +{name:'荆州市', areaList:['市辖区','沙市区','荆州区','公安县','监利县','江陵县','石首市','洪湖市','松滋市']}, +{name:'黄冈市', areaList:['市辖区','黄州区','团风县','红安县','罗田县','英山县','浠水县','蕲春县','黄梅县','麻城市','武穴市']}, +{name:'咸宁市', areaList:['市辖区','咸安区','嘉鱼县','通城县','崇阳县','通山县','赤壁市']}, +{name:'随州市', areaList:['市辖区','曾都区','广水市']}, +{name:'恩施土家族苗族自治州', areaList:['恩施市','利川市','建始县','巴东县','宣恩县','咸丰县','来凤县','鹤峰县']}, +{name:'省直辖行政单位', areaList:['仙桃市','潜江市','天门市','神农架林区']} +]}, +{name:'湖南', cityList:[ +{name:'长沙市', areaList:['市辖区','芙蓉区','天心区','岳麓区','开福区','雨花区','长沙县','望城县','宁乡县','浏阳市']}, +{name:'株洲市', areaList:['市辖区','荷塘区','芦淞区','石峰区','天元区','株洲县','攸 县','茶陵县','炎陵县','醴陵市']}, +{name:'湘潭市', areaList:['市辖区','雨湖区','岳塘区','湘潭县','湘乡市','韶山市']}, +{name:'衡阳市', areaList:['市辖区','珠晖区','雁峰区','石鼓区','蒸湘区','南岳区','衡阳县','衡南县','衡山县','衡东县','祁东县','耒阳市','常宁市']}, +{name:'邵阳市', areaList:['市辖区','双清区','大祥区','北塔区','邵东县','新邵县','邵阳县','隆回县','洞口县','绥宁县','新宁县','城步苗族自治县','武冈市']}, +{name:'岳阳市', areaList:['市辖区','岳阳楼区','云溪区','君山区','岳阳县','华容县','湘阴县','平江县','汨罗市','临湘市']}, +{name:'常德市', areaList:['市辖区','武陵区','鼎城区','安乡县','汉寿县','澧 县','临澧县','桃源县','石门县','津市市']}, +{name:'张家界市', areaList:['市辖区','永定区','武陵源区','慈利县','桑植县']}, +{name:'益阳市', areaList:['市辖区','资阳区','赫山区','南 县','桃江县','安化县','沅江市']}, +{name:'郴州市', areaList:['市辖区','北湖区','苏仙区','桂阳县','宜章县','永兴县','嘉禾县','临武县','汝城县','桂东县','安仁县','资兴市']}, +{name:'永州市', areaList:['市辖区','芝山区','冷水滩区','祁阳县','东安县','双牌县','道 县','江永县','宁远县','蓝山县','新田县','江华瑶族自治县']}, +{name:'怀化市', areaList:['市辖区','鹤城区','中方县','沅陵县','辰溪县','溆浦县','会同县','麻阳苗族自治县','新晃侗族自治县','芷江侗族自治县','靖州苗族侗族自治县','通道侗族自治县','洪江市']}, +{name:'娄底市', areaList:['市辖区','娄星区','双峰县','新化县','冷水江市','涟源市']}, +{name:'湘西土家族苗族自治州', areaList:['吉首市','泸溪县','凤凰县','花垣县','保靖县','古丈县','永顺县','龙山县']} +]}, +{name:'广东', cityList:[ +{name:'广州市', areaList:['市辖区','东山区','荔湾区','越秀区','海珠区','天河区','芳村区','白云区','黄埔区','番禺区','花都区','增城市','从化市']}, +{name:'韶关市', areaList:['市辖区','武江区','浈江区','曲江区','始兴县','仁化县','翁源县','乳源瑶族自治县','新丰县','乐昌市','南雄市']}, +{name:'深圳市', areaList:['市辖区','罗湖区','福田区','南山区','宝安区','龙岗区','盐田区']}, +{name:'珠海市', areaList:['市辖区','香洲区','斗门区','金湾区']}, +{name:'汕头市', areaList:['市辖区','龙湖区','金平区','濠江区','潮阳区','潮南区','澄海区','南澳县']}, +{name:'佛山市', areaList:['市辖区','禅城区','南海区','顺德区','三水区','高明区']}, +{name:'江门市', areaList:['市辖区','蓬江区','江海区','新会区','台山市','开平市','鹤山市','恩平市']}, +{name:'湛江市', areaList:['市辖区','赤坎区','霞山区','坡头区','麻章区','遂溪县','徐闻县','廉江市','雷州市','吴川市']}, +{name:'茂名市', areaList:['市辖区','茂南区','茂港区','电白县','高州市','化州市','信宜市']}, +{name:'肇庆市', areaList:['市辖区','端州区','鼎湖区','广宁县','怀集县','封开县','德庆县','高要市','四会市']}, +{name:'惠州市', areaList:['市辖区','惠城区','惠阳区','博罗县','惠东县','龙门县']}, +{name:'梅州市', areaList:['市辖区','梅江区','梅 县','大埔县','丰顺县','五华县','平远县','蕉岭县','兴宁市']}, +{name:'汕尾市', areaList:['市辖区','城 区','海丰县','陆河县','陆丰市']}, +{name:'河源市', areaList:['市辖区','源城区','紫金县','龙川县','连平县','和平县','东源县']}, +{name:'阳江市', areaList:['市辖区','江城区','阳西县','阳东县','阳春市']}, +{name:'清远市', areaList:['市辖区','清城区','佛冈县','阳山县','连山壮族瑶族自治县','连南瑶族自治县','清新县','英德市','连州市']}, +{name:'东莞市', areaList:['东莞市']}, +{name:'中山市', areaList:['中山市']}, +{name:'潮州市', areaList:['市辖区','湘桥区','潮安县','饶平县']}, +{name:'揭阳市', areaList:['市辖区','榕城区','揭东县','揭西县','惠来县','普宁市']}, +{name:'云浮市', areaList:['市辖区','云城区','新兴县','郁南县','云安县','罗定市']} +]}, +{name:'广西', cityList:[ +{name:'南宁市', areaList:['市辖区','兴宁区','青秀区','江南区','西乡塘区','良庆区','邕宁区','武鸣县','隆安县','马山县','上林县','宾阳县','横 县']}, +{name:'柳州市', areaList:['市辖区','城中区','鱼峰区','柳南区','柳北区','柳江县','柳城县','鹿寨县','融安县','融水苗族自治县','三江侗族自治县']}, +{name:'桂林市', areaList:['市辖区','秀峰区','叠彩区','象山区','七星区','雁山区','阳朔县','临桂县','灵川县','全州县','兴安县','永福县','灌阳县','龙胜各族自治县','资源县','平乐县','荔蒲县','恭城瑶族自治县']}, +{name:'梧州市', areaList:['市辖区','万秀区','蝶山区','长洲区','苍梧县','藤 县','蒙山县','岑溪市']}, +{name:'北海市', areaList:['市辖区','海城区','银海区','铁山港区','合浦县']}, +{name:'防城港市', areaList:['市辖区','港口区','防城区','上思县','东兴市']}, +{name:'钦州市', areaList:['市辖区','钦南区','钦北区','灵山县','浦北县']}, +{name:'贵港市', areaList:['市辖区','港北区','港南区','覃塘区','平南县','桂平市']}, +{name:'玉林市', areaList:['市辖区','玉州区','容 县','陆川县','博白县','兴业县','北流市']}, +{name:'百色市', areaList:['市辖区','右江区','田阳县','田东县','平果县','德保县','靖西县','那坡县','凌云县','乐业县','田林县','西林县','隆林各族自治县']}, +{name:'贺州市', areaList:['市辖区','八步区','昭平县','钟山县','富川瑶族自治县']}, +{name:'河池市', areaList:['市辖区','金城江区','南丹县','天峨县','凤山县','东兰县','罗城仫佬族自治县','环江毛南族自治县','巴马瑶族自治县','都安瑶族自治县','大化瑶族自治县','宜州市']}, +{name:'来宾市', areaList:['市辖区','兴宾区','忻城县','象州县','武宣县','金秀瑶族自治县','合山市']}, +{name:'崇左市', areaList:['市辖区','江洲区','扶绥县','宁明县','龙州县','大新县','天等县','凭祥市']} +]}, +{name:'陕西', cityList:[ +{name:'西安市', areaList:['市辖区','新城区','碑林区','莲湖区','灞桥区','未央区','雁塔区','阎良区','临潼区','长安区','蓝田县','周至县','户 县','高陵县']}, +{name:'铜川市', areaList:['市辖区','王益区','印台区','耀州区','宜君县']}, +{name:'宝鸡市', areaList:['市辖区','渭滨区','金台区','陈仓区','凤翔县','岐山县','扶风县','眉 县','陇 县','千阳县','麟游县','凤 县','太白县']}, +{name:'咸阳市', areaList:['市辖区','秦都区','杨凌区','渭城区','三原县','泾阳县','乾 县','礼泉县','永寿县','彬 县','长武县','旬邑县','淳化县','武功县','兴平市']}, +{name:'渭南市', areaList:['市辖区','临渭区','华 县','潼关县','大荔县','合阳县','澄城县','蒲城县','白水县','富平县','韩城市','华阴市']}, +{name:'延安市', areaList:['市辖区','宝塔区','延长县','延川县','子长县','安塞县','志丹县','吴旗县','甘泉县','富 县','洛川县','宜川县','黄龙县','黄陵县']}, +{name:'汉中市', areaList:['市辖区','汉台区','南郑县','城固县','洋 县','西乡县','勉 县','宁强县','略阳县','镇巴县','留坝县','佛坪县']}, +{name:'榆林市', areaList:['市辖区','榆阳区','神木县','府谷县','横山县','靖边县','定边县','绥德县','米脂县','佳 县','吴堡县','清涧县','子洲县']}, +{name:'安康市', areaList:['市辖区','汉滨区','汉阴县','石泉县','宁陕县','紫阳县','岚皋县','平利县','镇坪县','旬阳县','白河县']}, +{name:'商洛市', areaList:['市辖区','商州区','洛南县','丹凤县','商南县','山阳县','镇安县','柞水县']} +]}, +{name:'甘肃', cityList:[ +{name:'兰州市', areaList:['市辖区','城关区','七里河区','西固区','安宁区','红古区','永登县','皋兰县','榆中县']}, +{name:'嘉峪关市', areaList:['市辖区']}, +{name:'金昌市', areaList:['市辖区','金川区','永昌县']}, +{name:'白银市', areaList:['市辖区','白银区','平川区','靖远县','会宁县','景泰县']}, +{name:'天水市', areaList:['市辖区','秦城区','北道区','清水县','秦安县','甘谷县','武山县','张家川回族自治县']}, +{name:'武威市', areaList:['市辖区','凉州区','民勤县','古浪县','天祝藏族自治县']}, +{name:'张掖市', areaList:['市辖区','甘州区','肃南裕固族自治县','民乐县','临泽县','高台县','山丹县']}, +{name:'平凉市', areaList:['市辖区','崆峒区','泾川县','灵台县','崇信县','华亭县','庄浪县','静宁县']}, +{name:'酒泉市', areaList:['市辖区','肃州区','金塔县','安西县','肃北蒙古族自治县','阿克塞哈萨克族自治县','玉门市','敦煌市']}, +{name:'庆阳市', areaList:['市辖区','西峰区','庆城县','环 县','华池县','合水县','正宁县','宁 县','镇原县']}, +{name:'定西市', areaList:['市辖区','安定区','通渭县','陇西县','渭源县','临洮县','漳 县','岷 县']}, +{name:'陇南市', areaList:['市辖区','武都区','成 县','文 县','宕昌县','康 县','西和县','礼 县','徽 县','两当县']}, +{name:'临夏回族自治州', areaList:['临夏市','临夏县','康乐县','永靖县','广河县','和政县','东乡族自治县','积石山保安族东乡族撒拉族自治县']}, +{name:'甘南藏族自治州', areaList:['合作市','临潭县','卓尼县','舟曲县','迭部县','玛曲县','碌曲县','夏河县']} +]}, +{name:'青海', cityList:[ +{name:'西宁市', areaList:['市辖区','城东区','城中区','城西区','城北区','大通回族土族自治县','湟中县','湟源县']}, +{name:'海东地区', areaList:['平安县','民和回族土族自治县','乐都县','互助土族自治县','化隆回族自治县','循化撒拉族自治县']}, +{name:'海北藏族自治州', areaList:['门源回族自治县','祁连县','海晏县','刚察县']}, +{name:'黄南藏族自治州', areaList:['同仁县','尖扎县','泽库县','河南蒙古族自治县']}, +{name:'海南藏族自治州', areaList:['共和县','同德县','贵德县','兴海县','贵南县']}, +{name:'果洛藏族自治州', areaList:['玛沁县','班玛县','甘德县','达日县','久治县','玛多县']}, +{name:'玉树藏族自治州', areaList:['玉树县','杂多县','称多县','治多县','囊谦县','曲麻莱县']}, +{name:'海西蒙古族藏族自治州', areaList:['格尔木市','德令哈市','乌兰县','都兰县','天峻县']} +]}, +{name:'宁夏', cityList:[ +{name:'银川市', areaList:['市辖区','兴庆区','西夏区','金凤区','永宁县','贺兰县','灵武市']}, +{name:'石嘴山市', areaList:['市辖区','大武口区','惠农区','平罗县']}, +{name:'吴忠市', areaList:['市辖区','利通区','盐池县','同心县','青铜峡市']}, +{name:'固原市', areaList:['市辖区','原州区','西吉县','隆德县','泾源县','彭阳县','海原县']}, +{name:'中卫市', areaList:['市辖区','沙坡头区','中宁县']} +]}, +{name:'新疆', cityList:[ +{name:'乌鲁木齐市', areaList:['市辖区','天山区','沙依巴克区','新市区','水磨沟区','头屯河区','达坂城区','东山区','乌鲁木齐县']}, +{name:'克拉玛依市', areaList:['市辖区','独山子区','克拉玛依区','白碱滩区','乌尔禾区']}, +{name:'吐鲁番地区', areaList:['吐鲁番市','鄯善县','托克逊县']}, +{name:'哈密地区', areaList:['哈密市','巴里坤哈萨克自治县','伊吾县']}, +{name:'昌吉回族自治州', areaList:['昌吉市','阜康市','米泉市','呼图壁县','玛纳斯县','奇台县','吉木萨尔县','木垒哈萨克自治县']}, +{name:'博尔塔拉蒙古自治州', areaList:['博乐市','精河县','温泉县']}, +{name:'巴音郭楞蒙古自治州', areaList:['库尔勒市','轮台县','尉犁县','若羌县','且末县','焉耆回族自治县','和静县','和硕县','博湖县']}, +{name:'阿克苏地区', areaList:['阿克苏市','温宿县','库车县','沙雅县','新和县','拜城县','乌什县','阿瓦提县','柯坪县']}, +{name:'克孜勒苏柯尔克孜自治州', areaList:['阿图什市','阿克陶县','阿合奇县','乌恰县']}, +{name:'喀什地区', areaList:['喀什市','疏附县','疏勒县','英吉沙县','泽普县','莎车县','叶城县','麦盖提县','岳普湖县','伽师县','巴楚县','塔什库尔干塔吉克自治县']}, +{name:'和田地区', areaList:['和田市','和田县','墨玉县','皮山县','洛浦县','策勒县','于田县','民丰县']}, +{name:'伊犁哈萨克自治州', areaList:['伊宁市','奎屯市','伊宁县','察布查尔锡伯自治县','霍城县','巩留县','新源县','昭苏县','特克斯县','尼勒克县']}, +{name:'塔城地区', areaList:['塔城市','乌苏市','额敏县','沙湾县','托里县','裕民县','和布克赛尔蒙古自治县']}, +{name:'阿勒泰地区', areaList:['阿勒泰市','布尔津县','富蕴县','福海县','哈巴河县','青河县','吉木乃县']}, +{name:'省直辖行政单位', areaList:['石河子市','阿拉尔市','图木舒克市','五家渠市']} +]}, +{name:'河北', cityList:[ +{name:'石家庄市', areaList:['市辖区','长安区','桥东区','桥西区','新华区','井陉矿区','裕华区','井陉县','正定县','栾城县','行唐县','灵寿县','高邑县','深泽县','赞皇县','无极县','平山县','元氏县','赵 县','辛集市','藁城市','晋州市','新乐市','鹿泉市']}, +{name:'唐山市', areaList:['市辖区','路南区','路北区','古冶区','开平区','丰南区','丰润区','滦 县','滦南县','乐亭县','迁西县','玉田县','唐海县','遵化市','迁安市']}, +{name:'秦皇岛市', areaList:['市辖区','海港区','山海关区','北戴河区','青龙满族自治县','昌黎县','抚宁县','卢龙县']}, +{name:'邯郸市', areaList:['市辖区','邯山区','丛台区','复兴区','峰峰矿区','邯郸县','临漳县','成安县','大名县','涉 县','磁 县','肥乡县','永年县','邱 县','鸡泽县','广平县','馆陶县','魏 县','曲周县','武安市']}, +{name:'邢台市', areaList:['市辖区','桥东区','桥西区','邢台县','临城县','内丘县','柏乡县','隆尧县','任 县','南和县','宁晋县','巨鹿县','新河县','广宗县','平乡县','威 县','清河县','临西县','南宫市','沙河市']}, +{name:'保定市', areaList:['市辖区','新市区','北市区','南市区','满城县','清苑县','涞水县','阜平县','徐水县','定兴县','唐 县','高阳县','容城县','涞源县','望都县','安新县','易 县','曲阳县','蠡 县','顺平县','博野县','雄 县','涿州市','定州市','安国市','高碑店市']}, +{name:'张家口市', areaList:['市辖区','桥东区','桥西区','宣化区','下花园区','宣化县','张北县','康保县','沽源县','尚义县','蔚 县','阳原县','怀安县','万全县','怀来县','涿鹿县','赤城县','崇礼县']}, +{name:'承德市', areaList:['市辖区','双桥区','双滦区','鹰手营子矿区','承德县','兴隆县','平泉县','滦平县','隆化县','丰宁满族自治县','宽城满族自治县','围场满族蒙古族自治县']}, +{name:'沧州市', areaList:['市辖区','新华区','运河区','沧 县','青 县','东光县','海兴县','盐山县','肃宁县','南皮县','吴桥县','献 县','孟村回族自治县','泊头市','任丘市','黄骅市','河间市']}, +{name:'廊坊市', areaList:['市辖区','安次区','广阳区','固安县','永清县','香河县','大城县','文安县','大厂回族自治县','霸州市','三河市']}, +{name:'衡水市', areaList:['市辖区','桃城区','枣强县','武邑县','武强县','饶阳县','安平县','故城县','景 县','阜城县','冀州市','深州市']} +]}, +{name:'山西', cityList:[ +{name:'太原市', areaList:['市辖区','小店区','迎泽区','杏花岭区','尖草坪区','万柏林区','晋源区','清徐县','阳曲县','娄烦县','古交市']}, +{name:'大同市', areaList:['市辖区','城 区','矿 区','南郊区','新荣区','阳高县','天镇县','广灵县','灵丘县','浑源县','左云县','大同县']}, +{name:'阳泉市', areaList:['市辖区','城 区','矿 区','郊 区','平定县','盂 县']}, +{name:'长治市', areaList:['市辖区','城 区','郊 区','长治县','襄垣县','屯留县','平顺县','黎城县','壶关县','长子县','武乡县','沁 县','沁源县','潞城市']}, +{name:'晋城市', areaList:['市辖区','城 区','沁水县','阳城县','陵川县','泽州县','高平市']}, +{name:'朔州市', areaList:['市辖区','朔城区','平鲁区','山阴县','应 县','右玉县','怀仁县']}, +{name:'晋中市', areaList:['市辖区','榆次区','榆社县','左权县','和顺县','昔阳县','寿阳县','太谷县','祁 县','平遥县','灵石县','介休市']}, +{name:'运城市', areaList:['市辖区','盐湖区','临猗县','万荣县','闻喜县','稷山县','新绛县','绛 县','垣曲县','夏 县','平陆县','芮城县','永济市','河津市']}, +{name:'忻州市', areaList:['市辖区','忻府区','定襄县','五台县','代 县','繁峙县','宁武县','静乐县','神池县','五寨县','岢岚县','河曲县','保德县','偏关县','原平市']}, +{name:'临汾市', areaList:['市辖区','尧都区','曲沃县','翼城县','襄汾县','洪洞县','古 县','安泽县','浮山县','吉 县','乡宁县','大宁县','隰 县','永和县','蒲 县','汾西县','侯马市','霍州市']}, +{name:'吕梁市', areaList:['市辖区','离石区','文水县','交城县','兴 县','临 县','柳林县','石楼县','岚 县','方山县','中阳县','交口县','孝义市','汾阳市']} +]}, +{name:'内蒙古', cityList:[ +{name:'呼和浩特市', areaList:['市辖区','新城区','回民区','玉泉区','赛罕区','土默特左旗','托克托县','和林格尔县','清水河县','武川县']}, +{name:'包头市', areaList:['市辖区','东河区','昆都仑区','青山区','石拐区','白云矿区','九原区','土默特右旗','固阳县','达尔罕茂明安联合旗']}, +{name:'乌海市', areaList:['市辖区','海勃湾区','海南区','乌达区']}, +{name:'赤峰市', areaList:['市辖区','红山区','元宝山区','松山区','阿鲁科尔沁旗','巴林左旗','巴林右旗','林西县','克什克腾旗','翁牛特旗','喀喇沁旗','宁城县','敖汉旗']}, +{name:'通辽市', areaList:['市辖区','科尔沁区','科尔沁左翼中旗','科尔沁左翼后旗','开鲁县','库伦旗','奈曼旗','扎鲁特旗','霍林郭勒市']}, +{name:'鄂尔多斯市', areaList:['东胜区','达拉特旗','准格尔旗','鄂托克前旗','鄂托克旗','杭锦旗','乌审旗','伊金霍洛旗']}, +{name:'呼伦贝尔市', areaList:['市辖区','海拉尔区','阿荣旗','莫力达瓦达斡尔族自治旗','鄂伦春自治旗','鄂温克族自治旗','陈巴尔虎旗','新巴尔虎左旗','新巴尔虎右旗','满洲里市','牙克石市','扎兰屯市','额尔古纳市','根河市']}, +{name:'巴彦淖尔市', areaList:['市辖区','临河区','五原县','磴口县','乌拉特前旗','乌拉特中旗','乌拉特后旗','杭锦后旗']}, +{name:'乌兰察布市', areaList:['市辖区','集宁区','卓资县','化德县','商都县','兴和县','凉城县','察哈尔右翼前旗','察哈尔右翼中旗','察哈尔右翼后旗','四子王旗','丰镇市']}, +{name:'兴安盟', areaList:['乌兰浩特市','阿尔山市','科尔沁右翼前旗','科尔沁右翼中旗','扎赉特旗','突泉县']}, +{name:'锡林郭勒盟', areaList:['二连浩特市','锡林浩特市','阿巴嘎旗','苏尼特左旗','苏尼特右旗','东乌珠穆沁旗','西乌珠穆沁旗','太仆寺旗','镶黄旗','正镶白旗','正蓝旗','多伦县']}, +{name:'阿拉善盟', areaList:['阿拉善左旗','阿拉善右旗','额济纳旗']} +]}, +{name:'江苏', cityList:[ +{name:'南京市', areaList:['市辖区','玄武区','白下区','秦淮区','建邺区','鼓楼区','下关区','浦口区','栖霞区','雨花台区','江宁区','六合区','溧水县','高淳县']}, +{name:'无锡市', areaList:['市辖区','崇安区','南长区','北塘区','锡山区','惠山区','滨湖区','江阴市','宜兴市']}, +{name:'徐州市', areaList:['市辖区','鼓楼区','云龙区','九里区','贾汪区','泉山区','丰 县','沛 县','铜山县','睢宁县','新沂市','邳州市']}, +{name:'常州市', areaList:['市辖区','天宁区','钟楼区','戚墅堰区','新北区','武进区','溧阳市','金坛市']}, +{name:'苏州市', areaList:['市辖区','沧浪区','平江区','金阊区','虎丘区','吴中区','相城区','常熟市','张家港市','昆山市','吴江市','太仓市']}, +{name:'南通市', areaList:['市辖区','崇川区','港闸区','海安县','如东县','启东市','如皋市','通州市','海门市']}, +{name:'连云港市', areaList:['市辖区','连云区','新浦区','海州区','赣榆县','东海县','灌云县','灌南县']}, +{name:'淮安市', areaList:['市辖区','清河区','楚州区','淮阴区','清浦区','涟水县','洪泽县','盱眙县','金湖县']}, +{name:'盐城市', areaList:['市辖区','亭湖区','盐都区','响水县','滨海县','阜宁县','射阳县','建湖县','东台市','大丰市']}, +{name:'扬州市', areaList:['市辖区','广陵区','邗江区','郊 区','宝应县','仪征市','高邮市','江都市']}, +{name:'镇江市', areaList:['市辖区','京口区','润州区','丹徒区','丹阳市','扬中市','句容市']}, +{name:'泰州市', areaList:['市辖区','海陵区','高港区','兴化市','靖江市','泰兴市','姜堰市']}, +{name:'宿迁市', areaList:['市辖区','宿城区','宿豫区','沭阳县','泗阳县','泗洪县']} +]}, +{name:'浙江', cityList:[ +{name:'杭州市', areaList:['市辖区','上城区','下城区','江干区','拱墅区','西湖区','滨江区','萧山区','余杭区','桐庐县','淳安县','建德市','富阳市','临安市']}, +{name:'宁波市', areaList:['市辖区','海曙区','江东区','江北区','北仑区','镇海区','鄞州区','象山县','宁海县','余姚市','慈溪市','奉化市']}, +{name:'温州市', areaList:['市辖区','鹿城区','龙湾区','瓯海区','洞头县','永嘉县','平阳县','苍南县','文成县','泰顺县','瑞安市','乐清市']}, +{name:'嘉兴市', areaList:['市辖区','秀城区','秀洲区','嘉善县','海盐县','海宁市','平湖市','桐乡市']}, +{name:'湖州市', areaList:['市辖区','吴兴区','南浔区','德清县','长兴县','安吉县']}, +{name:'绍兴市', areaList:['市辖区','越城区','绍兴县','新昌县','诸暨市','上虞市','嵊州市']}, +{name:'金华市', areaList:['市辖区','婺城区','金东区','武义县','浦江县','磐安县','兰溪市','义乌市','东阳市','永康市']}, +{name:'衢州市', areaList:['市辖区','柯城区','衢江区','常山县','开化县','龙游县','江山市']}, +{name:'舟山市', areaList:['市辖区','定海区','普陀区','岱山县','嵊泗县']}, +{name:'台州市', areaList:['市辖区','椒江区','黄岩区','路桥区','玉环县','三门县','天台县','仙居县','温岭市','临海市']}, +{name:'丽水市', areaList:['市辖区','莲都区','青田县','缙云县','遂昌县','松阳县','云和县','庆元县','景宁畲族自治县','龙泉市']} +]}, +{name:'安徽', cityList:[ +{name:'合肥市', areaList:['市辖区','瑶海区','庐阳区','蜀山区','包河区','长丰县','肥东县','肥西县']}, +{name:'芜湖市', areaList:['市辖区','镜湖区','马塘区','新芜区','鸠江区','芜湖县','繁昌县','南陵县']}, +{name:'蚌埠市', areaList:['市辖区','龙子湖区','蚌山区','禹会区','淮上区','怀远县','五河县','固镇县']}, +{name:'淮南市', areaList:['市辖区','大通区','田家庵区','谢家集区','八公山区','潘集区','凤台县']}, +{name:'马鞍山市', areaList:['市辖区','金家庄区','花山区','雨山区','当涂县']}, +{name:'淮北市', areaList:['市辖区','杜集区','相山区','烈山区','濉溪县']}, +{name:'铜陵市', areaList:['市辖区','铜官山区','狮子山区','郊 区','铜陵县']}, +{name:'安庆市', areaList:['市辖区','迎江区','大观区','郊 区','怀宁县','枞阳县','潜山县','太湖县','宿松县','望江县','岳西县','桐城市']}, +{name:'黄山市', areaList:['市辖区','屯溪区','黄山区','徽州区','歙 县','休宁县','黟 县','祁门县']}, +{name:'滁州市', areaList:['市辖区','琅琊区','南谯区','来安县','全椒县','定远县','凤阳县','天长市','明光市']}, +{name:'阜阳市', areaList:['市辖区','颍州区','颍东区','颍泉区','临泉县','太和县','阜南县','颍上县','界首市']}, +{name:'宿州市', areaList:['市辖区','墉桥区','砀山县','萧 县','灵璧县','泗 县']}, +{name:'巢湖市', areaList:['市辖区','居巢区','庐江县','无为县','含山县','和 县']}, +{name:'六安市', areaList:['市辖区','金安区','裕安区','寿 县','霍邱县','舒城县','金寨县','霍山县']}, +{name:'亳州市', areaList:['市辖区','谯城区','涡阳县','蒙城县','利辛县']}, +{name:'池州市', areaList:['市辖区','贵池区','东至县','石台县','青阳县']}, +{name:'宣城市', areaList:['市辖区','宣州区','郎溪县','广德县','泾 县','绩溪县','旌德县','宁国市']} +]}, +{name:'福建', cityList:[ +{name:'福州市', areaList:['市辖区','鼓楼区','台江区','仓山区','马尾区','晋安区','闽侯县','连江县','罗源县','闽清县','永泰县','平潭县','福清市','长乐市']}, +{name:'厦门市', areaList:['市辖区','思明区','海沧区','湖里区','集美区','同安区','翔安区']}, +{name:'莆田市', areaList:['市辖区','城厢区','涵江区','荔城区','秀屿区','仙游县']}, +{name:'三明市', areaList:['市辖区','梅列区','三元区','明溪县','清流县','宁化县','大田县','尤溪县','沙 县','将乐县','泰宁县','建宁县','永安市']}, +{name:'泉州市', areaList:['市辖区','鲤城区','丰泽区','洛江区','泉港区','惠安县','安溪县','永春县','德化县','金门县','石狮市','晋江市','南安市']}, +{name:'漳州市', areaList:['市辖区','芗城区','龙文区','云霄县','漳浦县','诏安县','长泰县','东山县','南靖县','平和县','华安县','龙海市']}, +{name:'南平市', areaList:['市辖区','延平区','顺昌县','浦城县','光泽县','松溪县','政和县','邵武市','武夷山市','建瓯市','建阳市']}, +{name:'龙岩市', areaList:['市辖区','新罗区','长汀县','永定县','上杭县','武平县','连城县','漳平市']}, +{name:'宁德市', areaList:['市辖区','蕉城区','霞浦县','古田县','屏南县','寿宁县','周宁县','柘荣县','福安市','福鼎市']} +]}, +{name:'江西', cityList:[ +{name:'南昌市', areaList:['市辖区','东湖区','西湖区','青云谱区','湾里区','青山湖区','南昌县','新建县','安义县','进贤县']}, +{name:'景德镇市', areaList:['市辖区','昌江区','珠山区','浮梁县','乐平市']}, +{name:'萍乡市', areaList:['市辖区','安源区','湘东区','莲花县','上栗县','芦溪县']}, +{name:'九江市', areaList:['市辖区','庐山区','浔阳区','九江县','武宁县','修水县','永修县','德安县','星子县','都昌县','湖口县','彭泽县','瑞昌市']}, +{name:'新余市', areaList:['市辖区','渝水区','分宜县']}, +{name:'鹰潭市', areaList:['市辖区','月湖区','余江县','贵溪市']}, +{name:'赣州市', areaList:['市辖区','章贡区','赣 县','信丰县','大余县','上犹县','崇义县','安远县','龙南县','定南县','全南县','宁都县','于都县','兴国县','会昌县','寻乌县','石城县','瑞金市','南康市']}, +{name:'吉安市', areaList:['市辖区','吉州区','青原区','吉安县','吉水县','峡江县','新干县','永丰县','泰和县','遂川县','万安县','安福县','永新县','井冈山市']}, +{name:'宜春市', areaList:['市辖区','袁州区','奉新县','万载县','上高县','宜丰县','靖安县','铜鼓县','丰城市','樟树市','高安市']}, +{name:'抚州市', areaList:['市辖区','临川区','南城县','黎川县','南丰县','崇仁县','乐安县','宜黄县','金溪县','资溪县','东乡县','广昌县']}, +{name:'上饶市', areaList:['市辖区','信州区','上饶县','广丰县','玉山县','铅山县','横峰县','弋阳县','余干县','鄱阳县','万年县','婺源县','德兴市']} +]}, +{name:'山东', cityList:[ +{name:'济南市', areaList:['市辖区','历下区','市中区','槐荫区','天桥区','历城区','长清区','平阴县','济阳县','商河县','章丘市']}, +{name:'青岛市', areaList:['市辖区','市南区','市北区','四方区','黄岛区','崂山区','李沧区','城阳区','胶州市','即墨市','平度市','胶南市','莱西市']}, +{name:'淄博市', areaList:['市辖区','淄川区','张店区','博山区','临淄区','周村区','桓台县','高青县','沂源县']}, +{name:'枣庄市', areaList:['市辖区','市中区','薛城区','峄城区','台儿庄区','山亭区','滕州市']}, +{name:'东营市', areaList:['市辖区','东营区','河口区','垦利县','利津县','广饶县']}, +{name:'烟台市', areaList:['市辖区','芝罘区','福山区','牟平区','莱山区','长岛县','龙口市','莱阳市','莱州市','蓬莱市','招远市','栖霞市','海阳市']}, +{name:'潍坊市', areaList:['市辖区','潍城区','寒亭区','坊子区','奎文区','临朐县','昌乐县','青州市','诸城市','寿光市','安丘市','高密市','昌邑市']}, +{name:'济宁市', areaList:['市辖区','市中区','任城区','微山县','鱼台县','金乡县','嘉祥县','汶上县','泗水县','梁山县','曲阜市','兖州市','邹城市']}, +{name:'泰安市', areaList:['市辖区','泰山区','岱岳区','宁阳县','东平县','新泰市','肥城市']}, +{name:'威海市', areaList:['市辖区','环翠区','文登市','荣成市','乳山市']}, +{name:'日照市', areaList:['市辖区','东港区','岚山区','五莲县','莒 县']}, +{name:'莱芜市', areaList:['市辖区','莱城区','钢城区']}, +{name:'临沂市', areaList:['市辖区','兰山区','罗庄区','河东区','沂南县','郯城县','沂水县','苍山县','费 县','平邑县','莒南县','蒙阴县','临沭县']}, +{name:'德州市', areaList:['市辖区','德城区','陵 县','宁津县','庆云县','临邑县','齐河县','平原县','夏津县','武城县','乐陵市','禹城市']}, +{name:'聊城市', areaList:['市辖区','东昌府区','阳谷县','莘 县','茌平县','东阿县','冠 县','高唐县','临清市']}, +{name:'滨州市', areaList:['市辖区','滨城区','惠民县','阳信县','无棣县','沾化县','博兴县','邹平县']}, +{name:'荷泽市', areaList:['市辖区','牡丹区','曹 县','单 县','成武县','巨野县','郓城县','鄄城县','定陶县','东明县']} +]}, +{name:'辽宁', cityList:[ +{name:'沈阳市', areaList:['市辖区','和平区','沈河区','大东区','皇姑区','铁西区','苏家屯区','东陵区','新城子区','于洪区','辽中县','康平县','法库县','新民市']}, +{name:'大连市', areaList:['市辖区','中山区','西岗区','沙河口区','甘井子区','旅顺口区','金州区','长海县','瓦房店市','普兰店市','庄河市']}, +{name:'鞍山市', areaList:['市辖区','铁东区','铁西区','立山区','千山区','台安县','岫岩满族自治县','海城市']}, +{name:'抚顺市', areaList:['市辖区','新抚区','东洲区','望花区','顺城区','抚顺县','新宾满族自治县','清原满族自治县']}, +{name:'本溪市', areaList:['市辖区','平山区','溪湖区','明山区','南芬区','本溪满族自治县','桓仁满族自治县']}, +{name:'丹东市', areaList:['市辖区','元宝区','振兴区','振安区','宽甸满族自治县','东港市','凤城市']}, +{name:'锦州市', areaList:['市辖区','古塔区','凌河区','太和区','黑山县','义 县','凌海市','北宁市']}, +{name:'营口市', areaList:['市辖区','站前区','西市区','鲅鱼圈区','老边区','盖州市','大石桥市']}, +{name:'阜新市', areaList:['市辖区','海州区','新邱区','太平区','清河门区','细河区','阜新蒙古族自治县','彰武县']}, +{name:'辽阳市', areaList:['市辖区','白塔区','文圣区','宏伟区','弓长岭区','太子河区','辽阳县','灯塔市']}, +{name:'盘锦市', areaList:['市辖区','双台子区','兴隆台区','大洼县','盘山县']}, +{name:'铁岭市', areaList:['市辖区','银州区','清河区','铁岭县','西丰县','昌图县','调兵山市','开原市']}, +{name:'朝阳市', areaList:['市辖区','双塔区','龙城区','朝阳县','建平县','喀喇沁左翼蒙古族自治县','北票市','凌源市']}, +{name:'葫芦岛市', areaList:['市辖区','连山区','龙港区','南票区','绥中县','建昌县','兴城市']} +]}, +{name:'吉林', cityList:[ +{name:'长春市', areaList:['市辖区','南关区','宽城区','朝阳区','二道区','绿园区','双阳区','农安县','九台市','榆树市','德惠市']}, +{name:'吉林市', areaList:['市辖区','昌邑区','龙潭区','船营区','丰满区','永吉县','蛟河市','桦甸市','舒兰市','磐石市']}, +{name:'四平市', areaList:['市辖区','铁西区','铁东区','梨树县','伊通满族自治县','公主岭市','双辽市']}, +{name:'辽源市', areaList:['市辖区','龙山区','西安区','东丰县','东辽县']}, +{name:'通化市', areaList:['市辖区','东昌区','二道江区','通化县','辉南县','柳河县','梅河口市','集安市']}, +{name:'白山市', areaList:['市辖区','八道江区','抚松县','靖宇县','长白朝鲜族自治县','江源县','临江市']}, +{name:'松原市', areaList:['市辖区','宁江区','前郭尔罗斯蒙古族自治县','长岭县','乾安县','扶余县']}, +{name:'白城市', areaList:['市辖区','洮北区','镇赉县','通榆县','洮南市','大安市']}, +{name:'延边朝鲜族自治州', areaList:['延吉市','图们市','敦化市','珲春市','龙井市','和龙市','汪清县','安图县']} +]}, +{name:'黑龙江', cityList:[ +{name:'哈尔滨市', areaList:['市辖区','道里区','南岗区','道外区','香坊区','动力区','平房区','松北区','呼兰区','依兰县','方正县','宾 县','巴彦县','木兰县','通河县','延寿县','阿城市','双城市','尚志市','五常市']}, +{name:'齐齐哈尔市', areaList:['市辖区','龙沙区','建华区','铁锋区','昂昂溪区','富拉尔基区','碾子山区','梅里斯达斡尔族区','龙江县','依安县','泰来县','甘南县','富裕县','克山县','克东县','拜泉县','讷河市']}, +{name:'鸡西市', areaList:['市辖区','鸡冠区','恒山区','滴道区','梨树区','城子河区','麻山区','鸡东县','虎林市','密山市']}, +{name:'鹤岗市', areaList:['市辖区','向阳区','工农区','南山区','兴安区','东山区','兴山区','萝北县','绥滨县']}, +{name:'双鸭山市', areaList:['市辖区','尖山区','岭东区','四方台区','宝山区','集贤县','友谊县','宝清县','饶河县']}, +{name:'大庆市', areaList:['市辖区','萨尔图区','龙凤区','让胡路区','红岗区','大同区','肇州县','肇源县','林甸县','杜尔伯特蒙古族自治县']}, +{name:'伊春市', areaList:['市辖区','伊春区','南岔区','友好区','西林区','翠峦区','新青区','美溪区','金山屯区','五营区','乌马河区','汤旺河区','带岭区','乌伊岭区','红星区','上甘岭区','嘉荫县','铁力市']}, +{name:'佳木斯市', areaList:['市辖区','永红区','向阳区','前进区','东风区','郊 区','桦南县','桦川县','汤原县','抚远县','同江市','富锦市']}, +{name:'七台河市', areaList:['市辖区','新兴区','桃山区','茄子河区','勃利县']}, +{name:'牡丹江市', areaList:['市辖区','东安区','阳明区','爱民区','西安区','东宁县','林口县','绥芬河市','海林市','宁安市','穆棱市']}, +{name:'黑河市', areaList:['市辖区','爱辉区','嫩江县','逊克县','孙吴县','北安市','五大连池市']}, +{name:'绥化市', areaList:['市辖区','北林区','望奎县','兰西县','青冈县','庆安县','明水县','绥棱县','安达市','肇东市','海伦市']}, +{name:'大兴安岭地区', areaList:['呼玛县','塔河县','漠河县']} +]}, +{name:'海南', cityList:[ +{name:'海口市', areaList:['市辖区','秀英区','龙华区','琼山区','美兰区']}, +{name:'三亚市', areaList:['市辖区']}, +{name:'省直辖县级行政单位', areaList:['五指山市','琼海市','儋州市','文昌市','万宁市','东方市','定安县','屯昌县','澄迈县','临高县','白沙黎族自治县','昌江黎族自治县','乐东黎族自治县','陵水黎族自治县','保亭黎族苗族自治县','琼中黎族苗族自治县','西沙群岛','南沙群岛','中沙群岛的岛礁及其海域']} +]}, +{name:'台湾', cityList:[ +{name:'台湾', areaList:['台湾']} +]}, +{name:'香港', cityList:[ +{name:'香港', areaList:['香港']} +]}, +{name:'澳门', cityList:[ +{name:'澳门', areaList:['澳门']} +]} +]; diff --git a/public/static/xadmin/lib/layui/css/layui.css b/public/static/xadmin/lib/layui/css/layui.css new file mode 100644 index 00000000..f297bf6e --- /dev/null +++ b/public/static/xadmin/lib/layui/css/layui.css @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + .layui-inline,img{display:inline-block;vertical-align:middle}h1,h2,h3,h4,h5,h6{font-weight:400}.layui-edge,.layui-header,.layui-inline,.layui-main{position:relative}.layui-elip,.layui-form-checkbox span,.layui-form-pane .layui-form-label{text-overflow:ellipsis;white-space:nowrap}.layui-btn,.layui-edge,.layui-inline,img{vertical-align:middle}.layui-btn,.layui-disabled,.layui-icon,.layui-unselect{-webkit-user-select:none;-ms-user-select:none;-moz-user-select:none}blockquote,body,button,dd,div,dl,dt,form,h1,h2,h3,h4,h5,h6,input,li,ol,p,pre,td,textarea,th,ul{margin:0;padding:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}a:active,a:hover{outline:0}img{border:none}li{list-style:none}table{border-collapse:collapse;border-spacing:0}h4,h5,h6{font-size:100%}button,input,optgroup,option,select,textarea{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;outline:0}pre{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}body{line-height:24px;font:14px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif}hr{height:1px;margin:10px 0;border:0;clear:both}a{color:#333;text-decoration:none}a:hover{color:#777}a cite{font-style:normal;*cursor:pointer}.layui-border-box,.layui-border-box *{box-sizing:border-box}.layui-box,.layui-box *{box-sizing:content-box}.layui-clear{clear:both;*zoom:1}.layui-clear:after{content:'\20';clear:both;*zoom:1;display:block;height:0}.layui-inline{*display:inline;*zoom:1}.layui-edge{display:inline-block;width:0;height:0;border-width:6px;border-style:dashed;border-color:transparent;overflow:hidden}.layui-edge-top{top:-4px;border-bottom-color:#999;border-bottom-style:solid}.layui-edge-right{border-left-color:#999;border-left-style:solid}.layui-edge-bottom{top:2px;border-top-color:#999;border-top-style:solid}.layui-edge-left{border-right-color:#999;border-right-style:solid}.layui-elip{overflow:hidden}.layui-disabled,.layui-disabled:hover{color:#d2d2d2!important;cursor:not-allowed!important}.layui-circle{border-radius:100%}.layui-show{display:block!important}.layui-hide{display:none!important}@font-face{font-family:layui-icon;src:url(../font/iconfont.eot?v=240);src:url(../font/iconfont.eot?v=240#iefix) format('embedded-opentype'),url(../font/iconfont.svg?v=240#iconfont) format('svg'),url(../font/iconfont.woff?v=240) format('woff'),url(../font/iconfont.ttf?v=240) format('truetype')}.layui-icon{font-family:layui-icon!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.layui-icon-reply-fill:before{content:"\e611"}.layui-icon-set-fill:before{content:"\e614"}.layui-icon-menu-fill:before{content:"\e60f"}.layui-icon-search:before{content:"\e615"}.layui-icon-share:before{content:"\e641"}.layui-icon-set-sm:before{content:"\e620"}.layui-icon-engine:before{content:"\e628"}.layui-icon-close:before{content:"\1006"}.layui-icon-close-fill:before{content:"\1007"}.layui-icon-chart-screen:before{content:"\e629"}.layui-icon-star:before{content:"\e600"}.layui-icon-circle-dot:before{content:"\e617"}.layui-icon-chat:before{content:"\e606"}.layui-icon-release:before{content:"\e609"}.layui-icon-list:before{content:"\e60a"}.layui-icon-chart:before{content:"\e62c"}.layui-icon-ok-circle:before{content:"\1005"}.layui-icon-layim-theme:before{content:"\e61b"}.layui-icon-table:before{content:"\e62d"}.layui-icon-right:before{content:"\e602"}.layui-icon-left:before{content:"\e603"}.layui-icon-cart-simple:before{content:"\e698"}.layui-icon-face-cry:before{content:"\e69c"}.layui-icon-face-smile:before{content:"\e6af"}.layui-icon-survey:before{content:"\e6b2"}.layui-icon-tree:before{content:"\e62e"}.layui-icon-upload-circle:before{content:"\e62f"}.layui-icon-add-circle:before{content:"\e61f"}.layui-icon-download-circle:before{content:"\e601"}.layui-icon-templeate-1:before{content:"\e630"}.layui-icon-util:before{content:"\e631"}.layui-icon-face-surprised:before{content:"\e664"}.layui-icon-edit:before{content:"\e642"}.layui-icon-speaker:before{content:"\e645"}.layui-icon-down:before{content:"\e61a"}.layui-icon-file:before{content:"\e621"}.layui-icon-layouts:before{content:"\e632"}.layui-icon-rate-half:before{content:"\e6c9"}.layui-icon-add-circle-fine:before{content:"\e608"}.layui-icon-prev-circle:before{content:"\e633"}.layui-icon-read:before{content:"\e705"}.layui-icon-404:before{content:"\e61c"}.layui-icon-carousel:before{content:"\e634"}.layui-icon-help:before{content:"\e607"}.layui-icon-code-circle:before{content:"\e635"}.layui-icon-water:before{content:"\e636"}.layui-icon-username:before{content:"\e66f"}.layui-icon-find-fill:before{content:"\e670"}.layui-icon-about:before{content:"\e60b"}.layui-icon-location:before{content:"\e715"}.layui-icon-up:before{content:"\e619"}.layui-icon-pause:before{content:"\e651"}.layui-icon-date:before{content:"\e637"}.layui-icon-layim-uploadfile:before{content:"\e61d"}.layui-icon-delete:before{content:"\e640"}.layui-icon-play:before{content:"\e652"}.layui-icon-top:before{content:"\e604"}.layui-icon-friends:before{content:"\e612"}.layui-icon-refresh-3:before{content:"\e9aa"}.layui-icon-ok:before{content:"\e605"}.layui-icon-layer:before{content:"\e638"}.layui-icon-face-smile-fine:before{content:"\e60c"}.layui-icon-dollar:before{content:"\e659"}.layui-icon-group:before{content:"\e613"}.layui-icon-layim-download:before{content:"\e61e"}.layui-icon-picture-fine:before{content:"\e60d"}.layui-icon-link:before{content:"\e64c"}.layui-icon-diamond:before{content:"\e735"}.layui-icon-log:before{content:"\e60e"}.layui-icon-rate-solid:before{content:"\e67a"}.layui-icon-fonts-del:before{content:"\e64f"}.layui-icon-unlink:before{content:"\e64d"}.layui-icon-fonts-clear:before{content:"\e639"}.layui-icon-triangle-r:before{content:"\e623"}.layui-icon-circle:before{content:"\e63f"}.layui-icon-radio:before{content:"\e643"}.layui-icon-align-center:before{content:"\e647"}.layui-icon-align-right:before{content:"\e648"}.layui-icon-align-left:before{content:"\e649"}.layui-icon-loading-1:before{content:"\e63e"}.layui-icon-return:before{content:"\e65c"}.layui-icon-fonts-strong:before{content:"\e62b"}.layui-icon-upload:before{content:"\e67c"}.layui-icon-dialogue:before{content:"\e63a"}.layui-icon-video:before{content:"\e6ed"}.layui-icon-headset:before{content:"\e6fc"}.layui-icon-cellphone-fine:before{content:"\e63b"}.layui-icon-add-1:before{content:"\e654"}.layui-icon-face-smile-b:before{content:"\e650"}.layui-icon-fonts-html:before{content:"\e64b"}.layui-icon-form:before{content:"\e63c"}.layui-icon-cart:before{content:"\e657"}.layui-icon-camera-fill:before{content:"\e65d"}.layui-icon-tabs:before{content:"\e62a"}.layui-icon-fonts-code:before{content:"\e64e"}.layui-icon-fire:before{content:"\e756"}.layui-icon-set:before{content:"\e716"}.layui-icon-fonts-u:before{content:"\e646"}.layui-icon-triangle-d:before{content:"\e625"}.layui-icon-tips:before{content:"\e702"}.layui-icon-picture:before{content:"\e64a"}.layui-icon-more-vertical:before{content:"\e671"}.layui-icon-flag:before{content:"\e66c"}.layui-icon-loading:before{content:"\e63d"}.layui-icon-fonts-i:before{content:"\e644"}.layui-icon-refresh-1:before{content:"\e666"}.layui-icon-rmb:before{content:"\e65e"}.layui-icon-home:before{content:"\e68e"}.layui-icon-user:before{content:"\e770"}.layui-icon-notice:before{content:"\e667"}.layui-icon-login-weibo:before{content:"\e675"}.layui-icon-voice:before{content:"\e688"}.layui-icon-upload-drag:before{content:"\e681"}.layui-icon-login-qq:before{content:"\e676"}.layui-icon-snowflake:before{content:"\e6b1"}.layui-icon-file-b:before{content:"\e655"}.layui-icon-template:before{content:"\e663"}.layui-icon-auz:before{content:"\e672"}.layui-icon-console:before{content:"\e665"}.layui-icon-app:before{content:"\e653"}.layui-icon-prev:before{content:"\e65a"}.layui-icon-website:before{content:"\e7ae"}.layui-icon-next:before{content:"\e65b"}.layui-icon-component:before{content:"\e857"}.layui-icon-more:before{content:"\e65f"}.layui-icon-login-wechat:before{content:"\e677"}.layui-icon-shrink-right:before{content:"\e668"}.layui-icon-spread-left:before{content:"\e66b"}.layui-icon-camera:before{content:"\e660"}.layui-icon-note:before{content:"\e66e"}.layui-icon-refresh:before{content:"\e669"}.layui-icon-female:before{content:"\e661"}.layui-icon-male:before{content:"\e662"}.layui-icon-password:before{content:"\e673"}.layui-icon-senior:before{content:"\e674"}.layui-icon-theme:before{content:"\e66a"}.layui-icon-tread:before{content:"\e6c5"}.layui-icon-praise:before{content:"\e6c6"}.layui-icon-star-fill:before{content:"\e658"}.layui-icon-rate:before{content:"\e67b"}.layui-icon-template-1:before{content:"\e656"}.layui-icon-vercode:before{content:"\e679"}.layui-icon-cellphone:before{content:"\e678"}.layui-icon-screen-full:before{content:"\e622"}.layui-icon-screen-restore:before{content:"\e758"}.layui-icon-cols:before{content:"\e610"}.layui-icon-export:before{content:"\e67d"}.layui-icon-print:before{content:"\e66d"}.layui-icon-slider:before{content:"\e714"}.layui-main{width:1140px;margin:0 auto}.layui-header{z-index:1000;height:60px}.layui-header a:hover{transition:all .5s;-webkit-transition:all .5s}.layui-side{position:fixed;left:0;top:0;bottom:0;z-index:999;width:200px;overflow-x:hidden}.layui-side-scroll{position:relative;width:220px;height:100%;overflow-x:hidden}.layui-body{position:absolute;left:200px;right:0;top:0;bottom:0;z-index:998;width:auto;overflow:hidden;overflow-y:auto;box-sizing:border-box}.layui-layout-body{overflow:hidden}.layui-layout-admin .layui-header{background-color:#23262E}.layui-layout-admin .layui-side{top:60px;width:200px;overflow-x:hidden}.layui-layout-admin .layui-body{top:60px;bottom:44px}.layui-layout-admin .layui-main{width:auto;margin:0 15px}.layui-layout-admin .layui-footer{position:fixed;left:200px;right:0;bottom:0;height:44px;line-height:44px;padding:0 15px;background-color:#eee}.layui-layout-admin .layui-logo{position:absolute;left:0;top:0;width:200px;height:100%;line-height:60px;text-align:center;color:#009688;font-size:16px}.layui-layout-admin .layui-header .layui-nav{background:0 0}.layui-layout-left{position:absolute!important;left:200px;top:0}.layui-layout-right{position:absolute!important;right:0;top:0}.layui-container{position:relative;margin:0 auto;padding:0 15px;box-sizing:border-box}.layui-fluid{position:relative;margin:0 auto;padding:0 15px}.layui-row:after,.layui-row:before{content:'';display:block;clear:both}.layui-col-lg1,.layui-col-lg10,.layui-col-lg11,.layui-col-lg12,.layui-col-lg2,.layui-col-lg3,.layui-col-lg4,.layui-col-lg5,.layui-col-lg6,.layui-col-lg7,.layui-col-lg8,.layui-col-lg9,.layui-col-md1,.layui-col-md10,.layui-col-md11,.layui-col-md12,.layui-col-md2,.layui-col-md3,.layui-col-md4,.layui-col-md5,.layui-col-md6,.layui-col-md7,.layui-col-md8,.layui-col-md9,.layui-col-sm1,.layui-col-sm10,.layui-col-sm11,.layui-col-sm12,.layui-col-sm2,.layui-col-sm3,.layui-col-sm4,.layui-col-sm5,.layui-col-sm6,.layui-col-sm7,.layui-col-sm8,.layui-col-sm9,.layui-col-xs1,.layui-col-xs10,.layui-col-xs11,.layui-col-xs12,.layui-col-xs2,.layui-col-xs3,.layui-col-xs4,.layui-col-xs5,.layui-col-xs6,.layui-col-xs7,.layui-col-xs8,.layui-col-xs9{position:relative;display:block;box-sizing:border-box}.layui-col-xs1,.layui-col-xs10,.layui-col-xs11,.layui-col-xs12,.layui-col-xs2,.layui-col-xs3,.layui-col-xs4,.layui-col-xs5,.layui-col-xs6,.layui-col-xs7,.layui-col-xs8,.layui-col-xs9{float:left}.layui-col-xs1{width:8.33333333%}.layui-col-xs2{width:16.66666667%}.layui-col-xs3{width:25%}.layui-col-xs4{width:33.33333333%}.layui-col-xs5{width:41.66666667%}.layui-col-xs6{width:50%}.layui-col-xs7{width:58.33333333%}.layui-col-xs8{width:66.66666667%}.layui-col-xs9{width:75%}.layui-col-xs10{width:83.33333333%}.layui-col-xs11{width:91.66666667%}.layui-col-xs12{width:100%}.layui-col-xs-offset1{margin-left:8.33333333%}.layui-col-xs-offset2{margin-left:16.66666667%}.layui-col-xs-offset3{margin-left:25%}.layui-col-xs-offset4{margin-left:33.33333333%}.layui-col-xs-offset5{margin-left:41.66666667%}.layui-col-xs-offset6{margin-left:50%}.layui-col-xs-offset7{margin-left:58.33333333%}.layui-col-xs-offset8{margin-left:66.66666667%}.layui-col-xs-offset9{margin-left:75%}.layui-col-xs-offset10{margin-left:83.33333333%}.layui-col-xs-offset11{margin-left:91.66666667%}.layui-col-xs-offset12{margin-left:100%}@media screen and (max-width:768px){.layui-hide-xs{display:none!important}.layui-show-xs-block{display:block!important}.layui-show-xs-inline{display:inline!important}.layui-show-xs-inline-block{display:inline-block!important}}@media screen and (min-width:768px){.layui-container{width:750px}.layui-hide-sm{display:none!important}.layui-show-sm-block{display:block!important}.layui-show-sm-inline{display:inline!important}.layui-show-sm-inline-block{display:inline-block!important}.layui-col-sm1,.layui-col-sm10,.layui-col-sm11,.layui-col-sm12,.layui-col-sm2,.layui-col-sm3,.layui-col-sm4,.layui-col-sm5,.layui-col-sm6,.layui-col-sm7,.layui-col-sm8,.layui-col-sm9{float:left}.layui-col-sm1{width:8.33333333%}.layui-col-sm2{width:16.66666667%}.layui-col-sm3{width:25%}.layui-col-sm4{width:33.33333333%}.layui-col-sm5{width:41.66666667%}.layui-col-sm6{width:50%}.layui-col-sm7{width:58.33333333%}.layui-col-sm8{width:66.66666667%}.layui-col-sm9{width:75%}.layui-col-sm10{width:83.33333333%}.layui-col-sm11{width:91.66666667%}.layui-col-sm12{width:100%}.layui-col-sm-offset1{margin-left:8.33333333%}.layui-col-sm-offset2{margin-left:16.66666667%}.layui-col-sm-offset3{margin-left:25%}.layui-col-sm-offset4{margin-left:33.33333333%}.layui-col-sm-offset5{margin-left:41.66666667%}.layui-col-sm-offset6{margin-left:50%}.layui-col-sm-offset7{margin-left:58.33333333%}.layui-col-sm-offset8{margin-left:66.66666667%}.layui-col-sm-offset9{margin-left:75%}.layui-col-sm-offset10{margin-left:83.33333333%}.layui-col-sm-offset11{margin-left:91.66666667%}.layui-col-sm-offset12{margin-left:100%}}@media screen and (min-width:992px){.layui-container{width:970px}.layui-hide-md{display:none!important}.layui-show-md-block{display:block!important}.layui-show-md-inline{display:inline!important}.layui-show-md-inline-block{display:inline-block!important}.layui-col-md1,.layui-col-md10,.layui-col-md11,.layui-col-md12,.layui-col-md2,.layui-col-md3,.layui-col-md4,.layui-col-md5,.layui-col-md6,.layui-col-md7,.layui-col-md8,.layui-col-md9{float:left}.layui-col-md1{width:8.33333333%}.layui-col-md2{width:16.66666667%}.layui-col-md3{width:25%}.layui-col-md4{width:33.33333333%}.layui-col-md5{width:41.66666667%}.layui-col-md6{width:50%}.layui-col-md7{width:58.33333333%}.layui-col-md8{width:66.66666667%}.layui-col-md9{width:75%}.layui-col-md10{width:83.33333333%}.layui-col-md11{width:91.66666667%}.layui-col-md12{width:100%}.layui-col-md-offset1{margin-left:8.33333333%}.layui-col-md-offset2{margin-left:16.66666667%}.layui-col-md-offset3{margin-left:25%}.layui-col-md-offset4{margin-left:33.33333333%}.layui-col-md-offset5{margin-left:41.66666667%}.layui-col-md-offset6{margin-left:50%}.layui-col-md-offset7{margin-left:58.33333333%}.layui-col-md-offset8{margin-left:66.66666667%}.layui-col-md-offset9{margin-left:75%}.layui-col-md-offset10{margin-left:83.33333333%}.layui-col-md-offset11{margin-left:91.66666667%}.layui-col-md-offset12{margin-left:100%}}@media screen and (min-width:1200px){.layui-container{width:1170px}.layui-hide-lg{display:none!important}.layui-show-lg-block{display:block!important}.layui-show-lg-inline{display:inline!important}.layui-show-lg-inline-block{display:inline-block!important}.layui-col-lg1,.layui-col-lg10,.layui-col-lg11,.layui-col-lg12,.layui-col-lg2,.layui-col-lg3,.layui-col-lg4,.layui-col-lg5,.layui-col-lg6,.layui-col-lg7,.layui-col-lg8,.layui-col-lg9{float:left}.layui-col-lg1{width:8.33333333%}.layui-col-lg2{width:16.66666667%}.layui-col-lg3{width:25%}.layui-col-lg4{width:33.33333333%}.layui-col-lg5{width:41.66666667%}.layui-col-lg6{width:50%}.layui-col-lg7{width:58.33333333%}.layui-col-lg8{width:66.66666667%}.layui-col-lg9{width:75%}.layui-col-lg10{width:83.33333333%}.layui-col-lg11{width:91.66666667%}.layui-col-lg12{width:100%}.layui-col-lg-offset1{margin-left:8.33333333%}.layui-col-lg-offset2{margin-left:16.66666667%}.layui-col-lg-offset3{margin-left:25%}.layui-col-lg-offset4{margin-left:33.33333333%}.layui-col-lg-offset5{margin-left:41.66666667%}.layui-col-lg-offset6{margin-left:50%}.layui-col-lg-offset7{margin-left:58.33333333%}.layui-col-lg-offset8{margin-left:66.66666667%}.layui-col-lg-offset9{margin-left:75%}.layui-col-lg-offset10{margin-left:83.33333333%}.layui-col-lg-offset11{margin-left:91.66666667%}.layui-col-lg-offset12{margin-left:100%}}.layui-col-space1{margin:-.5px}.layui-col-space1>*{padding:.5px}.layui-col-space3{margin:-1.5px}.layui-col-space3>*{padding:1.5px}.layui-col-space5{margin:-2.5px}.layui-col-space5>*{padding:2.5px}.layui-col-space8{margin:-3.5px}.layui-col-space8>*{padding:3.5px}.layui-col-space10{margin:-5px}.layui-col-space10>*{padding:5px}.layui-col-space12{margin:-6px}.layui-col-space12>*{padding:6px}.layui-col-space15{margin:-7.5px}.layui-col-space15>*{padding:7.5px}.layui-col-space18{margin:-9px}.layui-col-space18>*{padding:9px}.layui-col-space20{margin:-10px}.layui-col-space20>*{padding:10px}.layui-col-space22{margin:-11px}.layui-col-space22>*{padding:11px}.layui-col-space25{margin:-12.5px}.layui-col-space25>*{padding:12.5px}.layui-col-space30{margin:-15px}.layui-col-space30>*{padding:15px}.layui-btn,.layui-input,.layui-select,.layui-textarea,.layui-upload-button{outline:0;-webkit-appearance:none;transition:all .3s;-webkit-transition:all .3s;box-sizing:border-box}.layui-elem-quote{margin-bottom:10px;padding:15px;line-height:22px;border-left:5px solid #009688;border-radius:0 2px 2px 0;background-color:#f2f2f2}.layui-quote-nm{border-style:solid;border-width:1px 1px 1px 5px;background:0 0}.layui-elem-field{margin-bottom:10px;padding:0;border-width:1px;border-style:solid}.layui-elem-field legend{margin-left:20px;padding:0 10px;font-size:20px;font-weight:300}.layui-field-title{margin:10px 0 20px;border-width:1px 0 0}.layui-field-box{padding:10px 15px}.layui-field-title .layui-field-box{padding:10px 0}.layui-progress{position:relative;height:6px;border-radius:20px;background-color:#e2e2e2}.layui-progress-bar{position:absolute;left:0;top:0;width:0;max-width:100%;height:6px;border-radius:20px;text-align:right;background-color:#5FB878;transition:all .3s;-webkit-transition:all .3s}.layui-progress-big,.layui-progress-big .layui-progress-bar{height:18px;line-height:18px}.layui-progress-text{position:relative;top:-20px;line-height:18px;font-size:12px;color:#666}.layui-progress-big .layui-progress-text{position:static;padding:0 10px;color:#fff}.layui-collapse{border-width:1px;border-style:solid;border-radius:2px}.layui-colla-content,.layui-colla-item{border-top-width:1px;border-top-style:solid}.layui-colla-item:first-child{border-top:none}.layui-colla-title{position:relative;height:42px;line-height:42px;padding:0 15px 0 35px;color:#333;background-color:#f2f2f2;cursor:pointer;font-size:14px;overflow:hidden}.layui-colla-content{display:none;padding:10px 15px;line-height:22px;color:#666}.layui-colla-icon{position:absolute;left:15px;top:0;font-size:14px}.layui-card{margin-bottom:15px;border-radius:2px;background-color:#fff;box-shadow:0 1px 2px 0 rgba(0,0,0,.05)}.layui-card:last-child{margin-bottom:0}.layui-card-header{position:relative;height:42px;line-height:42px;padding:0 15px;border-bottom:1px solid #f6f6f6;color:#333;border-radius:2px 2px 0 0;font-size:14px}.layui-bg-black,.layui-bg-blue,.layui-bg-cyan,.layui-bg-green,.layui-bg-orange,.layui-bg-red{color:#fff!important}.layui-card-body{position:relative;padding:10px 15px;line-height:24px}.layui-card-body[pad15]{padding:15px}.layui-card-body[pad20]{padding:20px}.layui-card-body .layui-table{margin:5px 0}.layui-card .layui-tab{margin:0}.layui-panel-window{position:relative;padding:15px;border-radius:0;border-top:5px solid #E6E6E6;background-color:#fff}.layui-auxiliar-moving{position:fixed;left:0;right:0;top:0;bottom:0;width:100%;height:100%;background:0 0;z-index:9999999999}.layui-form-label,.layui-form-mid,.layui-form-select,.layui-input-block,.layui-input-inline,.layui-textarea{position:relative}.layui-bg-red{background-color:#FF5722!important}.layui-bg-orange{background-color:#FFB800!important}.layui-bg-green{background-color:#009688!important}.layui-bg-cyan{background-color:#2F4056!important}.layui-bg-blue{background-color:#1E9FFF!important}.layui-bg-black{background-color:#393D49!important}.layui-bg-gray{background-color:#eee!important;color:#666!important}.layui-badge-rim,.layui-colla-content,.layui-colla-item,.layui-collapse,.layui-elem-field,.layui-form-pane .layui-form-item[pane],.layui-form-pane .layui-form-label,.layui-input,.layui-layedit,.layui-layedit-tool,.layui-quote-nm,.layui-select,.layui-tab-bar,.layui-tab-card,.layui-tab-title,.layui-tab-title .layui-this:after,.layui-textarea{border-color:#e6e6e6}.layui-timeline-item:before,hr{background-color:#e6e6e6}.layui-text{line-height:22px;font-size:14px;color:#666}.layui-text h1,.layui-text h2,.layui-text h3{font-weight:500;color:#333}.layui-text h1{font-size:30px}.layui-text h2{font-size:24px}.layui-text h3{font-size:18px}.layui-text a:not(.layui-btn){color:#01AAED}.layui-text a:not(.layui-btn):hover{text-decoration:underline}.layui-text ul{padding:5px 0 5px 15px}.layui-text ul li{margin-top:5px;list-style-type:disc}.layui-text em,.layui-word-aux{color:#999!important;padding:0 5px!important}.layui-btn{display:inline-block;height:38px;line-height:38px;padding:0 18px;background-color:#009688;color:#fff;white-space:nowrap;text-align:center;font-size:14px;border:none;border-radius:2px;cursor:pointer}.layui-btn:hover{opacity:.8;filter:alpha(opacity=80);color:#fff}.layui-btn:active{opacity:1;filter:alpha(opacity=100)}.layui-btn+.layui-btn{margin-left:10px}.layui-btn-container{font-size:0}.layui-btn-container .layui-btn{margin-right:10px;margin-bottom:10px}.layui-btn-container .layui-btn+.layui-btn{margin-left:0}.layui-table .layui-btn-container .layui-btn{margin-bottom:9px}.layui-btn-radius{border-radius:100px}.layui-btn .layui-icon{margin-right:3px;font-size:18px;vertical-align:bottom;vertical-align:middle\9}.layui-btn-primary{border:1px solid #C9C9C9;background-color:#fff;color:#555}.layui-btn-primary:hover{border-color:#009688;color:#333}.layui-btn-normal{background-color:#1E9FFF}.layui-btn-warm{background-color:#FFB800}.layui-btn-danger{background-color:#FF5722}.layui-btn-disabled,.layui-btn-disabled:active,.layui-btn-disabled:hover{border:1px solid #e6e6e6;background-color:#FBFBFB;color:#C9C9C9;cursor:not-allowed;opacity:1}.layui-btn-lg{height:44px;line-height:44px;padding:0 25px;font-size:16px}.layui-btn-sm{height:30px;line-height:30px;padding:0 10px;font-size:12px}.layui-btn-sm i{font-size:16px!important}.layui-btn-xs{height:22px;line-height:22px;padding:0 5px;font-size:12px}.layui-btn-xs i{font-size:14px!important}.layui-btn-group{display:inline-block;vertical-align:middle;font-size:0}.layui-btn-group .layui-btn{margin-left:0!important;margin-right:0!important;border-left:1px solid rgba(255,255,255,.5);border-radius:0}.layui-btn-group .layui-btn-primary{border-left:none}.layui-btn-group .layui-btn-primary:hover{border-color:#C9C9C9;color:#009688}.layui-btn-group .layui-btn:first-child{border-left:none;border-radius:2px 0 0 2px}.layui-btn-group .layui-btn-primary:first-child{border-left:1px solid #c9c9c9}.layui-btn-group .layui-btn:last-child{border-radius:0 2px 2px 0}.layui-btn-group .layui-btn+.layui-btn{margin-left:0}.layui-btn-group+.layui-btn-group{margin-left:10px}.layui-btn-fluid{width:100%}.layui-input,.layui-select,.layui-textarea{height:38px;line-height:1.3;line-height:38px\9;border-width:1px;border-style:solid;background-color:#fff;border-radius:2px}.layui-input::-webkit-input-placeholder,.layui-select::-webkit-input-placeholder,.layui-textarea::-webkit-input-placeholder{line-height:1.3}.layui-input,.layui-textarea{display:block;width:100%;padding-left:10px}.layui-input:hover,.layui-textarea:hover{border-color:#D2D2D2!important}.layui-input:focus,.layui-textarea:focus{border-color:#C9C9C9!important}.layui-textarea{min-height:100px;height:auto;line-height:20px;padding:6px 10px;resize:vertical}.layui-select{padding:0 10px}.layui-form input[type=checkbox],.layui-form input[type=radio],.layui-form select{display:none}.layui-form [lay-ignore]{display:initial}.layui-form-item{margin-bottom:15px;clear:both;*zoom:1}.layui-form-item:after{content:'\20';clear:both;*zoom:1;display:block;height:0}.layui-form-label{float:left;display:block;padding:9px 15px;width:80px;font-weight:400;line-height:20px;text-align:right}.layui-form-label-col{display:block;float:none;padding:9px 0;line-height:20px;text-align:left}.layui-form-item .layui-inline{margin-bottom:5px;margin-right:10px}.layui-input-block{margin-left:110px;min-height:36px}.layui-input-inline{display:inline-block;vertical-align:middle}.layui-form-item .layui-input-inline{float:left;width:190px;margin-right:10px}.layui-form-text .layui-input-inline{width:auto}.layui-form-mid{float:left;display:block;padding:9px 0!important;line-height:20px;margin-right:10px}.layui-form-danger+.layui-form-select .layui-input,.layui-form-danger:focus{border-color:#FF5722!important}.layui-form-select .layui-input{padding-right:30px;cursor:pointer}.layui-form-select .layui-edge{position:absolute;right:10px;top:50%;margin-top:-3px;cursor:pointer;border-width:6px;border-top-color:#c2c2c2;border-top-style:solid;transition:all .3s;-webkit-transition:all .3s}.layui-form-select dl{display:none;position:absolute;left:0;top:42px;padding:5px 0;z-index:899;min-width:100%;border:1px solid #d2d2d2;max-height:300px;overflow-y:auto;background-color:#fff;border-radius:2px;box-shadow:0 2px 4px rgba(0,0,0,.12);box-sizing:border-box}.layui-form-select dl dd,.layui-form-select dl dt{padding:0 10px;line-height:36px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.layui-form-select dl dt{font-size:12px;color:#999}.layui-form-select dl dd{cursor:pointer}.layui-form-select dl dd:hover{background-color:#f2f2f2;-webkit-transition:.5s all;transition:.5s all}.layui-form-select .layui-select-group dd{padding-left:20px}.layui-form-select dl dd.layui-select-tips{padding-left:10px!important;color:#999}.layui-form-select dl dd.layui-this{background-color:#5FB878;color:#fff}.layui-form-checkbox,.layui-form-select dl dd.layui-disabled{background-color:#fff}.layui-form-selected dl{display:block}.layui-form-checkbox,.layui-form-checkbox *,.layui-form-switch{display:inline-block;vertical-align:middle}.layui-form-selected .layui-edge{margin-top:-9px;-webkit-transform:rotate(180deg);transform:rotate(180deg);margin-top:-3px\9}:root .layui-form-selected .layui-edge{margin-top:-9px\0/IE9}.layui-form-selectup dl{top:auto;bottom:42px}.layui-select-none{margin:5px 0;text-align:center;color:#999}.layui-select-disabled .layui-disabled{border-color:#eee!important}.layui-select-disabled .layui-edge{border-top-color:#d2d2d2}.layui-form-checkbox{position:relative;height:30px;line-height:30px;margin-right:10px;padding-right:30px;cursor:pointer;font-size:0;-webkit-transition:.1s linear;transition:.1s linear;box-sizing:border-box}.layui-form-checkbox span{padding:0 10px;height:100%;font-size:14px;border-radius:2px 0 0 2px;background-color:#d2d2d2;color:#fff;overflow:hidden}.layui-form-checkbox:hover span{background-color:#c2c2c2}.layui-form-checkbox i{position:absolute;right:0;top:0;width:30px;height:28px;border:1px solid #d2d2d2;border-left:none;border-radius:0 2px 2px 0;color:#fff;font-size:20px;text-align:center}.layui-form-checkbox:hover i{border-color:#c2c2c2;color:#c2c2c2}.layui-form-checked,.layui-form-checked:hover{border-color:#5FB878}.layui-form-checked span,.layui-form-checked:hover span{background-color:#5FB878}.layui-form-checked i,.layui-form-checked:hover i{color:#5FB878}.layui-form-item .layui-form-checkbox{margin-top:4px}.layui-form-checkbox[lay-skin=primary]{height:auto!important;line-height:normal!important;min-width:18px;min-height:18px;border:none!important;margin-right:0;padding-left:28px;padding-right:0;background:0 0}.layui-form-checkbox[lay-skin=primary] span{padding-left:0;padding-right:15px;line-height:18px;background:0 0;color:#666}.layui-form-checkbox[lay-skin=primary] i{right:auto;left:0;width:16px;height:16px;line-height:16px;border:1px solid #d2d2d2;font-size:12px;border-radius:2px;background-color:#fff;-webkit-transition:.1s linear;transition:.1s linear}.layui-form-checkbox[lay-skin=primary]:hover i{border-color:#5FB878;color:#fff}.layui-form-checked[lay-skin=primary] i{border-color:#5FB878;background-color:#5FB878;color:#fff}.layui-checkbox-disbaled[lay-skin=primary] span{background:0 0!important;color:#c2c2c2}.layui-checkbox-disbaled[lay-skin=primary]:hover i{border-color:#d2d2d2}.layui-form-item .layui-form-checkbox[lay-skin=primary]{margin-top:10px}.layui-form-switch{position:relative;height:22px;line-height:22px;min-width:35px;padding:0 5px;margin-top:8px;border:1px solid #d2d2d2;border-radius:20px;cursor:pointer;background-color:#fff;-webkit-transition:.1s linear;transition:.1s linear}.layui-form-switch i{position:absolute;left:5px;top:3px;width:16px;height:16px;border-radius:20px;background-color:#d2d2d2;-webkit-transition:.1s linear;transition:.1s linear}.layui-form-switch em{position:relative;top:0;width:25px;margin-left:21px;padding:0!important;text-align:center!important;color:#999!important;font-style:normal!important;font-size:12px}.layui-form-onswitch{border-color:#5FB878;background-color:#5FB878}.layui-checkbox-disbaled,.layui-checkbox-disbaled i{border-color:#e2e2e2!important}.layui-form-onswitch i{left:100%;margin-left:-21px;background-color:#fff}.layui-form-onswitch em{margin-left:5px;margin-right:21px;color:#fff!important}.layui-checkbox-disbaled span{background-color:#e2e2e2!important}.layui-checkbox-disbaled:hover i{color:#fff!important}[lay-radio]{display:none}.layui-form-radio,.layui-form-radio *{display:inline-block;vertical-align:middle}.layui-form-radio{line-height:28px;margin:6px 10px 0 0;padding-right:10px;cursor:pointer;font-size:0}.layui-form-radio *{font-size:14px}.layui-form-radio>i{margin-right:8px;font-size:22px;color:#c2c2c2}.layui-form-radio>i:hover,.layui-form-radioed>i{color:#5FB878}.layui-radio-disbaled>i{color:#e2e2e2!important}.layui-form-pane .layui-form-label{width:110px;padding:8px 15px;height:38px;line-height:20px;border-width:1px;border-style:solid;border-radius:2px 0 0 2px;text-align:center;background-color:#FBFBFB;overflow:hidden;box-sizing:border-box}.layui-form-pane .layui-input-inline{margin-left:-1px}.layui-form-pane .layui-input-block{margin-left:110px;left:-1px}.layui-form-pane .layui-input{border-radius:0 2px 2px 0}.layui-form-pane .layui-form-text .layui-form-label{float:none;width:100%;border-radius:2px;box-sizing:border-box;text-align:left}.layui-form-pane .layui-form-text .layui-input-inline{display:block;margin:0;top:-1px;clear:both}.layui-form-pane .layui-form-text .layui-input-block{margin:0;left:0;top:-1px}.layui-form-pane .layui-form-text .layui-textarea{min-height:100px;border-radius:0 0 2px 2px}.layui-form-pane .layui-form-checkbox{margin:4px 0 4px 10px}.layui-form-pane .layui-form-radio,.layui-form-pane .layui-form-switch{margin-top:6px;margin-left:10px}.layui-form-pane .layui-form-item[pane]{position:relative;border-width:1px;border-style:solid}.layui-form-pane .layui-form-item[pane] .layui-form-label{position:absolute;left:0;top:0;height:100%;border-width:0 1px 0 0}.layui-form-pane .layui-form-item[pane] .layui-input-inline{margin-left:110px}@media screen and (max-width:450px){.layui-form-item .layui-form-label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-form-item .layui-inline{display:block;margin-right:0;margin-bottom:20px;clear:both}.layui-form-item .layui-inline:after{content:'\20';clear:both;display:block;height:0}.layui-form-item .layui-input-inline{display:block;float:none;left:-3px;width:auto;margin:0 0 10px 112px}.layui-form-item .layui-input-inline+.layui-form-mid{margin-left:110px;top:-5px;padding:0}.layui-form-item .layui-form-checkbox{margin-right:5px;margin-bottom:5px}}.layui-layedit{border-width:1px;border-style:solid;border-radius:2px}.layui-layedit-tool{padding:3px 5px;border-bottom-width:1px;border-bottom-style:solid;font-size:0}.layedit-tool-fixed{position:fixed;top:0;border-top:1px solid #e2e2e2}.layui-layedit-tool .layedit-tool-mid,.layui-layedit-tool .layui-icon{display:inline-block;vertical-align:middle;text-align:center;font-size:14px}.layui-layedit-tool .layui-icon{position:relative;width:32px;height:30px;line-height:30px;margin:3px 5px;color:#777;cursor:pointer;border-radius:2px}.layui-layedit-tool .layui-icon:hover{color:#393D49}.layui-layedit-tool .layui-icon:active{color:#000}.layui-layedit-tool .layedit-tool-active{background-color:#e2e2e2;color:#000}.layui-layedit-tool .layui-disabled,.layui-layedit-tool .layui-disabled:hover{color:#d2d2d2;cursor:not-allowed}.layui-layedit-tool .layedit-tool-mid{width:1px;height:18px;margin:0 10px;background-color:#d2d2d2}.layedit-tool-html{width:50px!important;font-size:30px!important}.layedit-tool-b,.layedit-tool-code,.layedit-tool-help{font-size:16px!important}.layedit-tool-d,.layedit-tool-face,.layedit-tool-image,.layedit-tool-unlink{font-size:18px!important}.layedit-tool-image input{position:absolute;font-size:0;left:0;top:0;width:100%;height:100%;opacity:.01;filter:Alpha(opacity=1);cursor:pointer}.layui-layedit-iframe iframe{display:block;width:100%}#LAY_layedit_code{overflow:hidden}.layui-laypage{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;margin:10px 0;font-size:0}.layui-laypage>a:first-child,.layui-laypage>a:first-child em{border-radius:2px 0 0 2px}.layui-laypage>a:last-child,.layui-laypage>a:last-child em{border-radius:0 2px 2px 0}.layui-laypage>:first-child{margin-left:0!important}.layui-laypage>:last-child{margin-right:0!important}.layui-laypage a,.layui-laypage button,.layui-laypage input,.layui-laypage select,.layui-laypage span{border:1px solid #e2e2e2}.layui-laypage a,.layui-laypage span{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;padding:0 15px;height:28px;line-height:28px;margin:0 -1px 5px 0;background-color:#fff;color:#333;font-size:12px}.layui-flow-more a *,.layui-laypage input,.layui-table-view select[lay-ignore]{display:inline-block}.layui-laypage a:hover{color:#009688}.layui-laypage em{font-style:normal}.layui-laypage .layui-laypage-spr{color:#999;font-weight:700}.layui-laypage a{text-decoration:none}.layui-laypage .layui-laypage-curr{position:relative}.layui-laypage .layui-laypage-curr em{position:relative;color:#fff}.layui-laypage .layui-laypage-curr .layui-laypage-em{position:absolute;left:-1px;top:-1px;padding:1px;width:100%;height:100%;background-color:#009688}.layui-laypage-em{border-radius:2px}.layui-laypage-next em,.layui-laypage-prev em{font-family:Sim sun;font-size:16px}.layui-laypage .layui-laypage-count,.layui-laypage .layui-laypage-limits,.layui-laypage .layui-laypage-refresh,.layui-laypage .layui-laypage-skip{margin-left:10px;margin-right:10px;padding:0;border:none}.layui-laypage .layui-laypage-limits,.layui-laypage .layui-laypage-refresh{vertical-align:top}.layui-laypage .layui-laypage-refresh i{font-size:18px;cursor:pointer}.layui-laypage select{height:22px;padding:3px;border-radius:2px;cursor:pointer}.layui-laypage .layui-laypage-skip{height:30px;line-height:30px;color:#999}.layui-laypage button,.layui-laypage input{height:30px;line-height:30px;border-radius:2px;vertical-align:top;background-color:#fff;box-sizing:border-box}.layui-laypage input{width:40px;margin:0 10px;padding:0 3px;text-align:center}.layui-laypage input:focus,.layui-laypage select:focus{border-color:#009688!important}.layui-laypage button{margin-left:10px;padding:0 10px;cursor:pointer}.layui-table,.layui-table-view{margin:10px 0}.layui-flow-more{margin:10px 0;text-align:center;color:#999;font-size:14px}.layui-flow-more a{height:32px;line-height:32px}.layui-flow-more a *{vertical-align:top}.layui-flow-more a cite{padding:0 20px;border-radius:3px;background-color:#eee;color:#333;font-style:normal}.layui-flow-more a cite:hover{opacity:.8}.layui-flow-more a i{font-size:30px;color:#737383}.layui-table{width:100%;background-color:#fff;color:#666}.layui-table tr{transition:all .3s;-webkit-transition:all .3s}.layui-table th{text-align:left;font-weight:400}.layui-table tbody tr:hover,.layui-table thead tr,.layui-table-click,.layui-table-header,.layui-table-hover,.layui-table-mend,.layui-table-patch,.layui-table-tool,.layui-table-total,.layui-table-total tr,.layui-table[lay-even] tr:nth-child(even){background-color:#f2f2f2}.layui-table td,.layui-table th,.layui-table-col-set,.layui-table-fixed-r,.layui-table-grid-down,.layui-table-header,.layui-table-page,.layui-table-tips-main,.layui-table-tool,.layui-table-total,.layui-table-view,.layui-table[lay-skin=line],.layui-table[lay-skin=row]{border-width:1px;border-style:solid;border-color:#e6e6e6}.layui-table td,.layui-table th{position:relative;padding:9px 15px;min-height:20px;line-height:20px;font-size:14px}.layui-table[lay-skin=line] td,.layui-table[lay-skin=line] th{border-width:0 0 1px}.layui-table[lay-skin=row] td,.layui-table[lay-skin=row] th{border-width:0 1px 0 0}.layui-table[lay-skin=nob] td,.layui-table[lay-skin=nob] th{border:none}.layui-table img{max-width:100px}.layui-table[lay-size=lg] td,.layui-table[lay-size=lg] th{padding:15px 30px}.layui-table-view .layui-table[lay-size=lg] .layui-table-cell{height:40px;line-height:40px}.layui-table[lay-size=sm] td,.layui-table[lay-size=sm] th{font-size:12px;padding:5px 10px}.layui-table-view .layui-table[lay-size=sm] .layui-table-cell{height:20px;line-height:20px}.layui-table[lay-data]{display:none}.layui-table-box{position:relative;overflow:hidden}.layui-table-view .layui-table{position:relative;width:auto;margin:0}.layui-table-view .layui-table[lay-skin=line]{border-width:0 1px 0 0}.layui-table-view .layui-table[lay-skin=row]{border-width:0 0 1px}.layui-table-view .layui-table td,.layui-table-view .layui-table th{padding:5px 0;border-top:none;border-left:none}.layui-table-view .layui-table th.layui-unselect .layui-table-cell span{cursor:pointer}.layui-table-view .layui-table td{cursor:default}.layui-table-view .layui-form-checkbox[lay-skin=primary] i{width:18px;height:18px}.layui-table-view .layui-form-radio{line-height:0;padding:0}.layui-table-view .layui-form-radio>i{margin:0;font-size:20px}.layui-table-init{position:absolute;left:0;top:0;width:100%;height:100%;text-align:center;z-index:110}.layui-table-init .layui-icon{position:absolute;left:50%;top:50%;margin:-15px 0 0 -15px;font-size:30px;color:#c2c2c2}.layui-table-header{border-width:0 0 1px;overflow:hidden}.layui-table-header .layui-table{margin-bottom:-1px}.layui-table-tool .layui-inline[lay-event]{position:relative;width:26px;height:26px;padding:5px;line-height:16px;margin-right:10px;text-align:center;color:#333;border:1px solid #ccc;cursor:pointer;-webkit-transition:.5s all;transition:.5s all}.layui-table-tool .layui-inline[lay-event]:hover{border:1px solid #999}.layui-table-tool-temp{padding-right:120px}.layui-table-tool-self{position:absolute;right:17px;top:10px}.layui-table-tool .layui-table-tool-self .layui-inline[lay-event]{margin:0 0 0 10px}.layui-table-tool-panel{position:absolute;top:29px;left:-1px;padding:5px 0;min-width:150px;min-height:40px;border:1px solid #d2d2d2;text-align:left;overflow-y:auto;background-color:#fff;box-shadow:0 2px 4px rgba(0,0,0,.12)}.layui-table-cell,.layui-table-tool-panel li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.layui-table-tool-panel li{padding:0 10px;line-height:30px;-webkit-transition:.5s all;transition:.5s all}.layui-table-tool-panel li .layui-form-checkbox[lay-skin=primary]{width:100%;padding-left:28px}.layui-table-tool-panel li:hover{background-color:#f2f2f2}.layui-table-tool-panel li .layui-form-checkbox[lay-skin=primary] i{position:absolute;left:0;top:0}.layui-table-tool-panel li .layui-form-checkbox[lay-skin=primary] span{padding:0}.layui-table-tool .layui-table-tool-self .layui-table-tool-panel{left:auto;right:-1px}.layui-table-col-set{position:absolute;right:0;top:0;width:20px;height:100%;border-width:0 0 0 1px;background-color:#fff}.layui-table-sort{width:10px;height:20px;margin-left:5px;cursor:pointer!important}.layui-table-sort .layui-edge{position:absolute;left:5px;border-width:5px}.layui-table-sort .layui-table-sort-asc{top:3px;border-top:none;border-bottom-style:solid;border-bottom-color:#b2b2b2}.layui-table-sort .layui-table-sort-asc:hover{border-bottom-color:#666}.layui-table-sort .layui-table-sort-desc{bottom:5px;border-bottom:none;border-top-style:solid;border-top-color:#b2b2b2}.layui-table-sort .layui-table-sort-desc:hover{border-top-color:#666}.layui-table-sort[lay-sort=asc] .layui-table-sort-asc{border-bottom-color:#000}.layui-table-sort[lay-sort=desc] .layui-table-sort-desc{border-top-color:#000}.layui-table-cell{height:28px;line-height:28px;padding:0 15px;position:relative;box-sizing:border-box}.layui-table-cell .layui-form-checkbox[lay-skin=primary]{top:-1px;padding:0}.layui-table-cell .layui-table-link{color:#01AAED}.laytable-cell-checkbox,.laytable-cell-numbers,.laytable-cell-radio,.laytable-cell-space{padding:0;text-align:center}.layui-table-body{position:relative;overflow:auto;margin-right:-1px;margin-bottom:-1px}.layui-table-body .layui-none{line-height:26px;padding:15px;text-align:center;color:#999}.layui-table-fixed{position:absolute;left:0;top:0;z-index:101}.layui-table-fixed .layui-table-body{overflow:hidden}.layui-table-fixed-l{box-shadow:0 -1px 8px rgba(0,0,0,.08)}.layui-table-fixed-r{left:auto;right:-1px;border-width:0 0 0 1px;box-shadow:-1px 0 8px rgba(0,0,0,.08)}.layui-table-fixed-r .layui-table-header{position:relative;overflow:visible}.layui-table-mend{position:absolute;right:-49px;top:0;height:100%;width:50px}.layui-table-tool{position:relative;z-index:890;width:100%;min-height:50px;line-height:30px;padding:10px 15px;border-width:0 0 1px}.layui-table-tool .layui-btn-container{margin-bottom:-10px}.layui-table-page,.layui-table-total{border-width:1px 0 0;margin-bottom:-1px;overflow:hidden}.layui-table-page{position:relative;width:100%;padding:7px 7px 0;height:41px;font-size:12px;white-space:nowrap}.layui-table-page>div{height:26px}.layui-table-page .layui-laypage{margin:0}.layui-table-page .layui-laypage a,.layui-table-page .layui-laypage span{height:26px;line-height:26px;margin-bottom:10px;border:none;background:0 0}.layui-table-page .layui-laypage a,.layui-table-page .layui-laypage span.layui-laypage-curr{padding:0 12px}.layui-table-page .layui-laypage span{margin-left:0;padding:0}.layui-table-page .layui-laypage .layui-laypage-prev{margin-left:-7px!important}.layui-table-page .layui-laypage .layui-laypage-curr .layui-laypage-em{left:0;top:0;padding:0}.layui-table-page .layui-laypage button,.layui-table-page .layui-laypage input{height:26px;line-height:26px}.layui-table-page .layui-laypage input{width:40px}.layui-table-page .layui-laypage button{padding:0 10px}.layui-table-page select{height:18px}.layui-table-patch .layui-table-cell{padding:0;width:30px}.layui-table-edit{position:absolute;left:0;top:0;width:100%;height:100%;padding:0 14px 1px;border-radius:0;box-shadow:1px 1px 20px rgba(0,0,0,.15)}.layui-table-edit:focus{border-color:#5FB878!important}select.layui-table-edit{padding:0 0 0 10px;border-color:#C9C9C9}.layui-table-view .layui-form-checkbox,.layui-table-view .layui-form-radio,.layui-table-view .layui-form-switch{top:0;margin:0;box-sizing:content-box}.layui-table-view .layui-form-checkbox{top:-1px;height:26px;line-height:26px}.layui-table-view .layui-form-checkbox i{height:26px}.layui-table-grid .layui-table-cell{overflow:visible}.layui-table-grid-down{position:absolute;top:0;right:0;width:26px;height:100%;padding:5px 0;border-width:0 0 0 1px;text-align:center;background-color:#fff;color:#999;cursor:pointer}.layui-table-grid-down .layui-icon{position:absolute;top:50%;left:50%;margin:-8px 0 0 -8px}.layui-table-grid-down:hover{background-color:#fbfbfb}body .layui-table-tips .layui-layer-content{background:0 0;padding:0;box-shadow:0 1px 6px rgba(0,0,0,.12)}.layui-table-tips-main{margin:-44px 0 0 -1px;max-height:150px;padding:8px 15px;font-size:14px;overflow-y:scroll;background-color:#fff;color:#666}.layui-table-tips-c{position:absolute;right:-3px;top:-13px;width:20px;height:20px;padding:3px;cursor:pointer;background-color:#666;border-radius:50%;color:#fff}.layui-table-tips-c:hover{background-color:#777}.layui-table-tips-c:before{position:relative;right:-2px}.layui-upload-file{display:none!important;opacity:.01;filter:Alpha(opacity=1)}.layui-upload-drag,.layui-upload-form,.layui-upload-wrap{display:inline-block}.layui-upload-list{margin:10px 0}.layui-upload-choose{padding:0 10px;color:#999}.layui-upload-drag{position:relative;padding:30px;border:1px dashed #e2e2e2;background-color:#fff;text-align:center;cursor:pointer;color:#999}.layui-upload-drag .layui-icon{font-size:50px;color:#009688}.layui-upload-drag[lay-over]{border-color:#009688}.layui-upload-iframe{position:absolute;width:0;height:0;border:0;visibility:hidden}.layui-upload-wrap{position:relative;vertical-align:middle}.layui-upload-wrap .layui-upload-file{display:block!important;position:absolute;left:0;top:0;z-index:10;font-size:100px;width:100%;height:100%;opacity:.01;filter:Alpha(opacity=1);cursor:pointer}.layui-tree{line-height:26px}.layui-tree li{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-tree li .layui-tree-spread,.layui-tree li a{display:inline-block;vertical-align:top;height:26px;*display:inline;*zoom:1;cursor:pointer}.layui-tree li a{font-size:0}.layui-tree li a i{font-size:16px}.layui-tree li a cite{padding:0 6px;font-size:14px;font-style:normal}.layui-tree li i{padding-left:6px;color:#333;-moz-user-select:none}.layui-tree li .layui-tree-check{font-size:13px}.layui-tree li .layui-tree-check:hover{color:#009E94}.layui-tree li ul{display:none;margin-left:20px}.layui-tree li .layui-tree-enter{line-height:24px;border:1px dotted #000}.layui-tree-drag{display:none;position:absolute;left:-666px;top:-666px;background-color:#f2f2f2;padding:5px 10px;border:1px dotted #000;white-space:nowrap}.layui-tree-drag i{padding-right:5px}.layui-nav{position:relative;padding:0 20px;background-color:#393D49;color:#fff;border-radius:2px;font-size:0;box-sizing:border-box}.layui-nav *{font-size:14px}.layui-nav .layui-nav-item{position:relative;display:inline-block;*display:inline;*zoom:1;vertical-align:middle;line-height:60px}.layui-nav .layui-nav-item a{display:block;padding:0 20px;color:#fff;color:rgba(255,255,255,.7);transition:all .3s;-webkit-transition:all .3s}.layui-nav .layui-this:after,.layui-nav-bar,.layui-nav-tree .layui-nav-itemed:after{position:absolute;left:0;top:0;width:0;height:5px;background-color:#5FB878;transition:all .2s;-webkit-transition:all .2s}.layui-nav-bar{z-index:1000}.layui-nav .layui-nav-item a:hover,.layui-nav .layui-this a{color:#fff}.layui-nav .layui-this:after{content:'';top:auto;bottom:0;width:100%}.layui-nav-img{width:30px;height:30px;margin-right:10px;border-radius:50%}.layui-nav .layui-nav-more{content:'';width:0;height:0;border-style:solid dashed dashed;border-color:#fff transparent transparent;overflow:hidden;cursor:pointer;transition:all .2s;-webkit-transition:all .2s;position:absolute;top:50%;right:3px;margin-top:-3px;border-width:6px;border-top-color:rgba(255,255,255,.7)}.layui-nav .layui-nav-mored,.layui-nav-itemed>a .layui-nav-more{margin-top:-9px;border-style:dashed dashed solid;border-color:transparent transparent #fff}.layui-nav-child{display:none;position:absolute;left:0;top:65px;min-width:100%;line-height:36px;padding:5px 0;box-shadow:0 2px 4px rgba(0,0,0,.12);border:1px solid #d2d2d2;background-color:#fff;z-index:100;border-radius:2px;white-space:nowrap}.layui-nav .layui-nav-child a{color:#333}.layui-nav .layui-nav-child a:hover{background-color:#f2f2f2;color:#000}.layui-nav-child dd{position:relative}.layui-nav .layui-nav-child dd.layui-this a,.layui-nav-child dd.layui-this{background-color:#5FB878;color:#fff}.layui-nav-child dd.layui-this:after{display:none}.layui-nav-tree{width:200px;padding:0}.layui-nav-tree .layui-nav-item{display:block;width:100%;line-height:45px}.layui-nav-tree .layui-nav-item a{position:relative;height:45px;line-height:45px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-nav-tree .layui-nav-item a:hover{background-color:#4E5465}.layui-nav-tree .layui-nav-bar{width:5px;height:0;background-color:#009688}.layui-nav-tree .layui-nav-child dd.layui-this,.layui-nav-tree .layui-nav-child dd.layui-this a,.layui-nav-tree .layui-this,.layui-nav-tree .layui-this>a,.layui-nav-tree .layui-this>a:hover{background-color:#009688;color:#fff}.layui-nav-tree .layui-this:after{display:none}.layui-nav-itemed>a,.layui-nav-tree .layui-nav-title a,.layui-nav-tree .layui-nav-title a:hover{color:#fff!important}.layui-nav-tree .layui-nav-child{position:relative;z-index:0;top:0;border:none;box-shadow:none}.layui-nav-tree .layui-nav-child a{height:40px;line-height:40px;color:#fff;color:rgba(255,255,255,.7)}.layui-nav-tree .layui-nav-child,.layui-nav-tree .layui-nav-child a:hover{background:0 0;color:#fff}.layui-nav-tree .layui-nav-more{right:10px}.layui-nav-itemed>.layui-nav-child{display:block;padding:0;background-color:rgba(0,0,0,.3)!important}.layui-nav-itemed>.layui-nav-child>.layui-this>.layui-nav-child{display:block}.layui-nav-side{position:fixed;top:0;bottom:0;left:0;overflow-x:hidden;z-index:999}.layui-bg-blue .layui-nav-bar,.layui-bg-blue .layui-nav-itemed:after,.layui-bg-blue .layui-this:after{background-color:#93D1FF}.layui-bg-blue .layui-nav-child dd.layui-this{background-color:#1E9FFF}.layui-bg-blue .layui-nav-itemed>a,.layui-nav-tree.layui-bg-blue .layui-nav-title a,.layui-nav-tree.layui-bg-blue .layui-nav-title a:hover{background-color:#007DDB!important}.layui-breadcrumb{visibility:hidden;font-size:0}.layui-breadcrumb>*{font-size:14px}.layui-breadcrumb a{color:#999!important}.layui-breadcrumb a:hover{color:#5FB878!important}.layui-breadcrumb a cite{color:#666;font-style:normal}.layui-breadcrumb span[lay-separator]{margin:0 10px;color:#999}.layui-tab{margin:10px 0;text-align:left!important}.layui-tab[overflow]>.layui-tab-title{overflow:hidden}.layui-tab-title{position:relative;left:0;height:40px;white-space:nowrap;font-size:0;border-bottom-width:1px;border-bottom-style:solid;transition:all .2s;-webkit-transition:all .2s}.layui-tab-title li{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;font-size:14px;transition:all .2s;-webkit-transition:all .2s;position:relative;line-height:40px;min-width:65px;padding:0 15px;text-align:center;cursor:pointer}.layui-tab-title li a{display:block}.layui-tab-title .layui-this{color:#000}.layui-tab-title .layui-this:after{position:absolute;left:0;top:0;content:'';width:100%;height:41px;border-width:1px;border-style:solid;border-bottom-color:#fff;border-radius:2px 2px 0 0;box-sizing:border-box;pointer-events:none}.layui-tab-bar{position:absolute;right:0;top:0;z-index:10;width:30px;height:39px;line-height:39px;border-width:1px;border-style:solid;border-radius:2px;text-align:center;background-color:#fff;cursor:pointer}.layui-tab-bar .layui-icon{position:relative;display:inline-block;top:3px;transition:all .3s;-webkit-transition:all .3s}.layui-tab-item{display:none}.layui-tab-more{padding-right:30px;height:auto!important;white-space:normal!important}.layui-tab-more li.layui-this:after{border-bottom-color:#e2e2e2;border-radius:2px}.layui-tab-more .layui-tab-bar .layui-icon{top:-2px;top:3px\9;-webkit-transform:rotate(180deg);transform:rotate(180deg)}:root .layui-tab-more .layui-tab-bar .layui-icon{top:-2px\0/IE9}.layui-tab-content{padding:10px}.layui-tab-title li .layui-tab-close{position:relative;display:inline-block;width:18px;height:18px;line-height:20px;margin-left:8px;top:1px;text-align:center;font-size:14px;color:#c2c2c2;transition:all .2s;-webkit-transition:all .2s}.layui-tab-title li .layui-tab-close:hover{border-radius:2px;background-color:#FF5722;color:#fff}.layui-tab-brief>.layui-tab-title .layui-this{color:#009688}.layui-tab-brief>.layui-tab-more li.layui-this:after,.layui-tab-brief>.layui-tab-title .layui-this:after{border:none;border-radius:0;border-bottom:2px solid #5FB878}.layui-tab-brief[overflow]>.layui-tab-title .layui-this:after{top:-1px}.layui-tab-card{border-width:1px;border-style:solid;border-radius:2px;box-shadow:0 2px 5px 0 rgba(0,0,0,.1)}.layui-tab-card>.layui-tab-title{background-color:#f2f2f2}.layui-tab-card>.layui-tab-title li{margin-right:-1px;margin-left:-1px}.layui-tab-card>.layui-tab-title .layui-this{background-color:#fff}.layui-tab-card>.layui-tab-title .layui-this:after{border-top:none;border-width:1px;border-bottom-color:#fff}.layui-tab-card>.layui-tab-title .layui-tab-bar{height:40px;line-height:40px;border-radius:0;border-top:none;border-right:none}.layui-tab-card>.layui-tab-more .layui-this{background:0 0;color:#5FB878}.layui-tab-card>.layui-tab-more .layui-this:after{border:none}.layui-timeline{padding-left:5px}.layui-timeline-item{position:relative;padding-bottom:20px}.layui-timeline-axis{position:absolute;left:-5px;top:0;z-index:10;width:20px;height:20px;line-height:20px;background-color:#fff;color:#5FB878;border-radius:50%;text-align:center;cursor:pointer}.layui-timeline-axis:hover{color:#FF5722}.layui-timeline-item:before{content:'';position:absolute;left:5px;top:0;z-index:0;width:1px;height:100%}.layui-timeline-item:last-child:before{display:none}.layui-timeline-item:first-child:before{display:block}.layui-timeline-content{padding-left:25px}.layui-timeline-title{position:relative;margin-bottom:10px}.layui-badge,.layui-badge-dot,.layui-badge-rim{position:relative;display:inline-block;padding:0 6px;font-size:12px;text-align:center;background-color:#FF5722;color:#fff;border-radius:2px}.layui-badge{height:18px;line-height:18px}.layui-badge-dot{width:8px;height:8px;padding:0;border-radius:50%}.layui-badge-rim{height:18px;line-height:18px;border-width:1px;border-style:solid;background-color:#fff;color:#666}.layui-btn .layui-badge,.layui-btn .layui-badge-dot{margin-left:5px}.layui-nav .layui-badge,.layui-nav .layui-badge-dot{position:absolute;top:50%;margin:-8px 6px 0}.layui-tab-title .layui-badge,.layui-tab-title .layui-badge-dot{left:5px;top:-2px}.layui-carousel{position:relative;left:0;top:0;background-color:#f8f8f8}.layui-carousel>[carousel-item]{position:relative;width:100%;height:100%;overflow:hidden}.layui-carousel>[carousel-item]:before{position:absolute;content:'\e63d';left:50%;top:50%;width:100px;line-height:20px;margin:-10px 0 0 -50px;text-align:center;color:#c2c2c2;font-family:layui-icon!important;font-size:30px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.layui-carousel>[carousel-item]>*{display:none;position:absolute;left:0;top:0;width:100%;height:100%;background-color:#f8f8f8;transition-duration:.3s;-webkit-transition-duration:.3s}.layui-carousel-updown>*{-webkit-transition:.3s ease-in-out up;transition:.3s ease-in-out up}.layui-carousel-arrow{display:none\9;opacity:0;position:absolute;left:10px;top:50%;margin-top:-18px;width:36px;height:36px;line-height:36px;text-align:center;font-size:20px;border:0;border-radius:50%;background-color:rgba(0,0,0,.2);color:#fff;-webkit-transition-duration:.3s;transition-duration:.3s;cursor:pointer}.layui-carousel-arrow[lay-type=add]{left:auto!important;right:10px}.layui-carousel:hover .layui-carousel-arrow[lay-type=add],.layui-carousel[lay-arrow=always] .layui-carousel-arrow[lay-type=add]{right:20px}.layui-carousel[lay-arrow=always] .layui-carousel-arrow{opacity:1;left:20px}.layui-carousel[lay-arrow=none] .layui-carousel-arrow{display:none}.layui-carousel-arrow:hover,.layui-carousel-ind ul:hover{background-color:rgba(0,0,0,.35)}.layui-carousel:hover .layui-carousel-arrow{display:block\9;opacity:1;left:20px}.layui-carousel-ind{position:relative;top:-35px;width:100%;line-height:0!important;text-align:center;font-size:0}.layui-carousel[lay-indicator=outside]{margin-bottom:30px}.layui-carousel[lay-indicator=outside] .layui-carousel-ind{top:10px}.layui-carousel[lay-indicator=outside] .layui-carousel-ind ul{background-color:rgba(0,0,0,.5)}.layui-carousel[lay-indicator=none] .layui-carousel-ind{display:none}.layui-carousel-ind ul{display:inline-block;padding:5px;background-color:rgba(0,0,0,.2);border-radius:10px;-webkit-transition-duration:.3s;transition-duration:.3s}.layui-carousel-ind li{display:inline-block;width:10px;height:10px;margin:0 3px;font-size:14px;background-color:#e2e2e2;background-color:rgba(255,255,255,.5);border-radius:50%;cursor:pointer;-webkit-transition-duration:.3s;transition-duration:.3s}.layui-carousel-ind li:hover{background-color:rgba(255,255,255,.7)}.layui-carousel-ind li.layui-this{background-color:#fff}.layui-carousel>[carousel-item]>.layui-carousel-next,.layui-carousel>[carousel-item]>.layui-carousel-prev,.layui-carousel>[carousel-item]>.layui-this{display:block}.layui-carousel>[carousel-item]>.layui-this{left:0}.layui-carousel>[carousel-item]>.layui-carousel-prev{left:-100%}.layui-carousel>[carousel-item]>.layui-carousel-next{left:100%}.layui-carousel>[carousel-item]>.layui-carousel-next.layui-carousel-left,.layui-carousel>[carousel-item]>.layui-carousel-prev.layui-carousel-right{left:0}.layui-carousel>[carousel-item]>.layui-this.layui-carousel-left{left:-100%}.layui-carousel>[carousel-item]>.layui-this.layui-carousel-right{left:100%}.layui-carousel[lay-anim=updown] .layui-carousel-arrow{left:50%!important;top:20px;margin:0 0 0 -18px}.layui-carousel[lay-anim=updown]>[carousel-item]>*,.layui-carousel[lay-anim=fade]>[carousel-item]>*{left:0!important}.layui-carousel[lay-anim=updown] .layui-carousel-arrow[lay-type=add]{top:auto!important;bottom:20px}.layui-carousel[lay-anim=updown] .layui-carousel-ind{position:absolute;top:50%;right:20px;width:auto;height:auto}.layui-carousel[lay-anim=updown] .layui-carousel-ind ul{padding:3px 5px}.layui-carousel[lay-anim=updown] .layui-carousel-ind li{display:block;margin:6px 0}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-this{top:0}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-carousel-prev{top:-100%}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-carousel-next{top:100%}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-carousel-next.layui-carousel-left,.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-carousel-prev.layui-carousel-right{top:0}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-this.layui-carousel-left{top:-100%}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-this.layui-carousel-right{top:100%}.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-carousel-next,.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-carousel-prev{opacity:0}.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-carousel-next.layui-carousel-left,.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-carousel-prev.layui-carousel-right{opacity:1}.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-this.layui-carousel-left,.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-this.layui-carousel-right{opacity:0}.layui-fixbar{position:fixed;right:15px;bottom:15px;z-index:999999}.layui-fixbar li{width:50px;height:50px;line-height:50px;margin-bottom:1px;text-align:center;cursor:pointer;font-size:30px;background-color:#9F9F9F;color:#fff;border-radius:2px;opacity:.95}.layui-fixbar li:hover{opacity:.85}.layui-fixbar li:active{opacity:1}.layui-fixbar .layui-fixbar-top{display:none;font-size:40px}body .layui-util-face{border:none;background:0 0}body .layui-util-face .layui-layer-content{padding:0;background-color:#fff;color:#666;box-shadow:none}.layui-util-face .layui-layer-TipsG{display:none}.layui-util-face ul{position:relative;width:372px;padding:10px;border:1px solid #D9D9D9;background-color:#fff;box-shadow:0 0 20px rgba(0,0,0,.2)}.layui-util-face ul li{cursor:pointer;float:left;border:1px solid #e8e8e8;height:22px;width:26px;overflow:hidden;margin:-1px 0 0 -1px;padding:4px 2px;text-align:center}.layui-util-face ul li:hover{position:relative;z-index:2;border:1px solid #eb7350;background:#fff9ec}.layui-code{position:relative;margin:10px 0;padding:15px;line-height:20px;border:1px solid #ddd;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New;font-size:12px}.layui-rate,.layui-rate *{display:inline-block;vertical-align:middle}.layui-rate{padding:10px 5px 10px 0;font-size:0}.layui-rate li i.layui-icon{font-size:20px;color:#FFB800;margin-right:5px;transition:all .3s;-webkit-transition:all .3s}.layui-rate li i:hover{cursor:pointer;transform:scale(1.12);-webkit-transform:scale(1.12)}.layui-rate[readonly] li i:hover{cursor:default;transform:scale(1)}.layui-colorpicker{width:26px;height:26px;border:1px solid #e6e6e6;padding:5px;border-radius:2px;line-height:24px;display:inline-block;cursor:pointer;transition:all .3s;-webkit-transition:all .3s}.layui-colorpicker:hover{border-color:#d2d2d2}.layui-colorpicker.layui-colorpicker-lg{width:34px;height:34px;line-height:32px}.layui-colorpicker.layui-colorpicker-sm{width:24px;height:24px;line-height:22px}.layui-colorpicker.layui-colorpicker-xs{width:22px;height:22px;line-height:20px}.layui-colorpicker-trigger-bgcolor{display:block;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);border-radius:2px}.layui-colorpicker-trigger-span{display:block;height:100%;box-sizing:border-box;border:1px solid rgba(0,0,0,.15);border-radius:2px;text-align:center}.layui-colorpicker-trigger-i{display:inline-block;color:#FFF;font-size:12px}.layui-colorpicker-trigger-i.layui-icon-close{color:#999}.layui-colorpicker-main{position:absolute;z-index:66666666;width:280px;padding:7px;background:#FFF;border:1px solid #d2d2d2;border-radius:2px;box-shadow:0 2px 4px rgba(0,0,0,.12)}.layui-colorpicker-main-wrapper{height:180px;position:relative}.layui-colorpicker-basis{width:260px;height:100%;position:relative}.layui-colorpicker-basis-white{width:100%;height:100%;position:absolute;top:0;left:0;background:linear-gradient(90deg,#FFF,hsla(0,0%,100%,0))}.layui-colorpicker-basis-black{width:100%;height:100%;position:absolute;top:0;left:0;background:linear-gradient(0deg,#000,transparent)}.layui-colorpicker-basis-cursor{width:10px;height:10px;border:1px solid #FFF;border-radius:50%;position:absolute;top:-3px;right:-3px;cursor:pointer}.layui-colorpicker-side{position:absolute;top:0;right:0;width:12px;height:100%;background:linear-gradient(red,#FF0,#0F0,#0FF,#00F,#F0F,red)}.layui-colorpicker-side-slider{width:100%;height:5px;box-shadow:0 0 1px #888;box-sizing:border-box;background:#FFF;border-radius:1px;border:1px solid #f0f0f0;cursor:pointer;position:absolute;left:0}.layui-colorpicker-main-alpha{display:none;height:12px;margin-top:7px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.layui-colorpicker-alpha-bgcolor{height:100%;position:relative}.layui-colorpicker-alpha-slider{width:5px;height:100%;box-shadow:0 0 1px #888;box-sizing:border-box;background:#FFF;border-radius:1px;border:1px solid #f0f0f0;cursor:pointer;position:absolute;top:0}.layui-colorpicker-main-pre{padding-top:7px;font-size:0}.layui-colorpicker-pre{width:20px;height:20px;border-radius:2px;display:inline-block;margin-left:6px;margin-bottom:7px;cursor:pointer}.layui-colorpicker-pre:nth-child(11n+1){margin-left:0}.layui-colorpicker-pre-isalpha{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.layui-colorpicker-pre.layui-this{box-shadow:0 0 3px 2px rgba(0,0,0,.15)}.layui-colorpicker-pre>div{height:100%;border-radius:2px}.layui-colorpicker-main-input{text-align:right;padding-top:7px}.layui-colorpicker-main-input .layui-btn-container .layui-btn{margin:0 0 0 10px}.layui-colorpicker-main-input div.layui-inline{float:left;margin-right:10px;font-size:14px}.layui-colorpicker-main-input input.layui-input{width:150px;height:30px;color:#666}.layui-slider{height:4px;background:#e2e2e2;border-radius:3px;position:relative;cursor:pointer}.layui-slider-bar{border-radius:3px;position:absolute;height:100%}.layui-slider-step{position:absolute;top:0;width:4px;height:4px;border-radius:50%;background:#FFF;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.layui-slider-wrap{width:36px;height:36px;position:absolute;top:-16px;-webkit-transform:translateX(-50%);transform:translateX(-50%);z-index:10;text-align:center}.layui-slider-wrap-btn{width:12px;height:12px;border-radius:50%;background:#FFF;display:inline-block;vertical-align:middle;cursor:pointer;transition:.3s}.layui-slider-wrap:after{content:"";height:100%;display:inline-block;vertical-align:middle}.layui-slider-wrap-btn.layui-slider-hover,.layui-slider-wrap-btn:hover{transform:scale(1.2)}.layui-slider-wrap-btn.layui-disabled:hover{transform:scale(1)!important}.layui-slider-tips{position:absolute;top:-42px;z-index:66666666;white-space:nowrap;display:none;-webkit-transform:translateX(-50%);transform:translateX(-50%);color:#FFF;background:#000;border-radius:3px;height:25px;line-height:25px;padding:0 10px}.layui-slider-tips:after{content:'';position:absolute;bottom:-12px;left:50%;margin-left:-6px;width:0;height:0;border-width:6px;border-style:solid;border-color:#000 transparent transparent}.layui-slider-input{width:70px;height:32px;border:1px solid #e6e6e6;border-radius:3px;font-size:16px;line-height:32px;position:absolute;right:0;top:-15px}.layui-slider-input-btn{display:none;position:absolute;top:0;right:0;width:20px;height:100%;border-left:1px solid #d2d2d2}.layui-slider-input-btn i{cursor:pointer;position:absolute;right:0;bottom:0;width:20px;height:50%;font-size:12px;line-height:16px;text-align:center;color:#999}.layui-slider-input-btn i:first-child{top:0;border-bottom:1px solid #d2d2d2}.layui-slider-input-txt{height:100%;font-size:14px}.layui-slider-input-txt input{height:100%;border:none}.layui-slider-input-btn i:hover{color:#009688}.layui-slider-vertical{width:4px;margin-left:34px}.layui-slider-vertical .layui-slider-bar{width:4px}.layui-slider-vertical .layui-slider-step{top:auto;left:0;-webkit-transform:translateY(50%);transform:translateY(50%)}.layui-slider-vertical .layui-slider-wrap{top:auto;left:-16px;-webkit-transform:translateY(50%);transform:translateY(50%)}.layui-slider-vertical .layui-slider-tips{top:auto;left:2px}@media \0screen{.layui-slider-wrap-btn{margin-left:-20px}.layui-slider-vertical .layui-slider-wrap-btn{margin-left:0;margin-bottom:-20px}.layui-slider-vertical .layui-slider-tips{margin-left:-8px}.layui-slider>span{margin-left:8px}}.layui-anim{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.layui-anim.layui-icon{display:inline-block}.layui-anim-loop{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.layui-trans,.layui-trans a{transition:all .3s;-webkit-transition:all .3s}@-webkit-keyframes layui-rotate{from{-webkit-transform:rotate(0)}to{-webkit-transform:rotate(360deg)}}@keyframes layui-rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}.layui-anim-rotate{-webkit-animation-name:layui-rotate;animation-name:layui-rotate;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-timing-function:linear;animation-timing-function:linear}@-webkit-keyframes layui-up{from{-webkit-transform:translate3d(0,100%,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes layui-up{from{transform:translate3d(0,100%,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-anim-up{-webkit-animation-name:layui-up;animation-name:layui-up}@-webkit-keyframes layui-upbit{from{-webkit-transform:translate3d(0,30px,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes layui-upbit{from{transform:translate3d(0,30px,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-anim-upbit{-webkit-animation-name:layui-upbit;animation-name:layui-upbit}@-webkit-keyframes layui-scale{0%{opacity:.3;-webkit-transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes layui-scale{0%{opacity:.3;-ms-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-ms-transform:scale(1);transform:scale(1)}}.layui-anim-scale{-webkit-animation-name:layui-scale;animation-name:layui-scale}@-webkit-keyframes layui-scale-spring{0%{opacity:.5;-webkit-transform:scale(.5)}80%{opacity:.8;-webkit-transform:scale(1.1)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes layui-scale-spring{0%{opacity:.5;transform:scale(.5)}80%{opacity:.8;transform:scale(1.1)}100%{opacity:1;transform:scale(1)}}.layui-anim-scaleSpring{-webkit-animation-name:layui-scale-spring;animation-name:layui-scale-spring}@-webkit-keyframes layui-fadein{0%{opacity:0}100%{opacity:1}}@keyframes layui-fadein{0%{opacity:0}100%{opacity:1}}.layui-anim-fadein{-webkit-animation-name:layui-fadein;animation-name:layui-fadein}@-webkit-keyframes layui-fadeout{0%{opacity:1}100%{opacity:0}}@keyframes layui-fadeout{0%{opacity:1}100%{opacity:0}}.layui-anim-fadeout{-webkit-animation-name:layui-fadeout;animation-name:layui-fadeout} \ No newline at end of file diff --git a/public/static/xadmin/lib/layui/css/layui.mobile.css b/public/static/xadmin/lib/layui/css/layui.mobile.css new file mode 100644 index 00000000..6f7f0a14 --- /dev/null +++ b/public/static/xadmin/lib/layui/css/layui.mobile.css @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + blockquote,body,button,dd,div,dl,dt,form,h1,h2,h3,h4,h5,h6,input,legend,li,ol,p,td,textarea,th,ul{margin:0;padding:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}html{font:12px 'Helvetica Neue','PingFang SC',STHeitiSC-Light,Helvetica,Arial,sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}a,button,input{-webkit-tap-highlight-color:rgba(255,0,0,0)}a{text-decoration:none;background:0 0}a:active,a:hover{outline:0}table{border-collapse:collapse;border-spacing:0}li{list-style:none}b,strong{font-weight:700}h1,h2,h3,h4,h5,h6{font-weight:500}address,cite,dfn,em,var{font-style:normal}dfn{font-style:italic}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}img{border:0;vertical-align:bottom}.layui-inline,input,label{vertical-align:middle}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;outline:0}button,select{text-transform:none}select{-webkit-appearance:none;border:none}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}@font-face{font-family:layui-icon;src:url(../font/iconfont.eot?v=1.0.7);src:url(../font/iconfont.eot?v=1.0.7#iefix) format('embedded-opentype'),url(../font/iconfont.woff?v=1.0.7) format('woff'),url(../font/iconfont.ttf?v=1.0.7) format('truetype'),url(../font/iconfont.svg?v=1.0.7#iconfont) format('svg')}.layui-icon{font-family:layui-icon!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.layui-box,.layui-box *{-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important;box-sizing:content-box!important}.layui-border-box,.layui-border-box *{-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;box-sizing:border-box!important}.layui-inline{position:relative;display:inline-block;*display:inline;*zoom:1}.layui-edge,.layui-upload-iframe{position:absolute;width:0;height:0}.layui-edge{border-style:dashed;border-color:transparent;overflow:hidden}.layui-elip{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-unselect{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-disabled,.layui-disabled:active{background-color:#d2d2d2!important;color:#fff!important;cursor:not-allowed!important}.layui-circle{border-radius:100%}.layui-show{display:block!important}.layui-hide{display:none!important}.layui-upload-iframe{border:0;visibility:hidden}.layui-upload-enter{border:1px solid #009E94;background-color:#009E94;color:#fff;-webkit-transform:scale(1.1);transform:scale(1.1)}@-webkit-keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.layui-m-anim-scale{animation-name:layui-m-anim-scale;-webkit-animation-name:layui-m-anim-scale}@-webkit-keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.layui-m-anim-up{-webkit-animation-name:layui-m-anim-up;animation-name:layui-m-anim-up}@-webkit-keyframes layui-m-anim-left{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes layui-m-anim-left{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.layui-m-anim-left{-webkit-animation-name:layui-m-anim-left;animation-name:layui-m-anim-left}@-webkit-keyframes layui-m-anim-right{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes layui-m-anim-right{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.layui-m-anim-right{-webkit-animation-name:layui-m-anim-right;animation-name:layui-m-anim-right}@-webkit-keyframes layui-m-anim-lout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes layui-m-anim-lout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.layui-m-anim-lout{-webkit-animation-name:layui-m-anim-lout;animation-name:layui-m-anim-lout}@-webkit-keyframes layui-m-anim-rout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes layui-m-anim-rout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(100%);transform:translateX(100%)}}.layui-m-anim-rout{-webkit-animation-name:layui-m-anim-rout;animation-name:layui-m-anim-rout}.layui-m-layer{position:relative;z-index:19891014}.layui-m-layer *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.layui-m-layermain,.layui-m-layershade{position:fixed;left:0;top:0;width:100%;height:100%}.layui-m-layershade{background-color:rgba(0,0,0,.7);pointer-events:auto}.layui-m-layermain{display:table;font-family:Helvetica,arial,sans-serif;pointer-events:none}.layui-m-layermain .layui-m-layersection{display:table-cell;vertical-align:middle;text-align:center}.layui-m-layerchild{position:relative;display:inline-block;text-align:left;background-color:#fff;font-size:14px;border-radius:5px;box-shadow:0 0 8px rgba(0,0,0,.1);pointer-events:auto;-webkit-overflow-scrolling:touch;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}.layui-m-layer0 .layui-m-layerchild{width:90%;max-width:640px}.layui-m-layer1 .layui-m-layerchild{border:none;border-radius:0}.layui-m-layer2 .layui-m-layerchild{width:auto;max-width:260px;min-width:40px;border:none;background:0 0;box-shadow:none;color:#fff}.layui-m-layerchild h3{padding:0 10px;height:60px;line-height:60px;font-size:16px;font-weight:400;border-radius:5px 5px 0 0;text-align:center}.layui-m-layerbtn span,.layui-m-layerchild h3{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-m-layercont{padding:50px 30px;line-height:22px;text-align:center}.layui-m-layer1 .layui-m-layercont{padding:0;text-align:left}.layui-m-layer2 .layui-m-layercont{text-align:center;padding:0;line-height:0}.layui-m-layer2 .layui-m-layercont i{width:25px;height:25px;margin-left:8px;display:inline-block;background-color:#fff;border-radius:100%;-webkit-animation:layui-m-anim-loading 1.4s infinite ease-in-out;animation:layui-m-anim-loading 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.layui-m-layerbtn,.layui-m-layerbtn span{position:relative;text-align:center;border-radius:0 0 5px 5px}.layui-m-layer2 .layui-m-layercont p{margin-top:20px}@-webkit-keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}@keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.layui-m-layer2 .layui-m-layercont i:first-child{margin-left:0;-webkit-animation-delay:-.32s;animation-delay:-.32s}.layui-m-layer2 .layui-m-layercont i.layui-m-layerload{-webkit-animation-delay:-.16s;animation-delay:-.16s}.layui-m-layer2 .layui-m-layercont>div{line-height:22px;padding-top:7px;margin-bottom:20px;font-size:14px}.layui-m-layerbtn{display:box;display:-moz-box;display:-webkit-box;width:100%;height:50px;line-height:50px;font-size:0;border-top:1px solid #D0D0D0;background-color:#F2F2F2}.layui-m-layerbtn span{display:block;-moz-box-flex:1;box-flex:1;-webkit-box-flex:1;font-size:14px;cursor:pointer}.layui-m-layerbtn span[yes]{color:#40AFFE}.layui-m-layerbtn span[no]{border-right:1px solid #D0D0D0;border-radius:0 0 0 5px}.layui-m-layerbtn span:active{background-color:#F6F6F6}.layui-m-layerend{position:absolute;right:7px;top:10px;width:30px;height:30px;border:0;font-weight:400;background:0 0;cursor:pointer;-webkit-appearance:none;font-size:30px}.layui-m-layerend::after,.layui-m-layerend::before{position:absolute;left:5px;top:15px;content:'';width:18px;height:1px;background-color:#999;transform:rotate(45deg);-webkit-transform:rotate(45deg);border-radius:3px}.layui-m-layerend::after{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}body .layui-m-layer .layui-m-layer-footer{position:fixed;width:95%;max-width:100%;margin:0 auto;left:0;right:0;bottom:10px;background:0 0}.layui-m-layer-footer .layui-m-layercont{padding:20px;border-radius:5px 5px 0 0;background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn{display:block;height:auto;background:0 0;border-top:none}.layui-m-layer-footer .layui-m-layerbtn span{background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn span[no]{color:#FD482C;border-top:1px solid #c2c2c2;border-radius:0 0 5px 5px}.layui-m-layer-footer .layui-m-layerbtn span[yes]{margin-top:10px;border-radius:5px}body .layui-m-layer .layui-m-layer-msg{width:auto;max-width:90%;margin:0 auto;bottom:-150px;background-color:rgba(0,0,0,.7);color:#fff}.layui-m-layer-msg .layui-m-layercont{padding:10px 20px} \ No newline at end of file diff --git a/public/static/xadmin/lib/layui/css/modules/code.css b/public/static/xadmin/lib/layui/css/modules/code.css new file mode 100644 index 00000000..d0d3822c --- /dev/null +++ b/public/static/xadmin/lib/layui/css/modules/code.css @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none} \ No newline at end of file diff --git a/public/static/xadmin/lib/layui/css/modules/laydate/default/laydate.css b/public/static/xadmin/lib/layui/css/modules/laydate/default/laydate.css new file mode 100644 index 00000000..f7e690e5 --- /dev/null +++ b/public/static/xadmin/lib/layui/css/modules/laydate/default/laydate.css @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + .laydate-set-ym,.layui-laydate,.layui-laydate *,.layui-laydate-list{box-sizing:border-box}html #layuicss-laydate{display:none;position:absolute;width:1989px}.layui-laydate *{margin:0;padding:0}.layui-laydate{position:absolute;z-index:66666666;margin:5px 0;border-radius:2px;font-size:14px;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:laydate-upbit;animation-name:laydate-upbit}.layui-laydate-main{width:272px}.layui-laydate-content td,.layui-laydate-header *,.layui-laydate-list li{transition-duration:.3s;-webkit-transition-duration:.3s}@-webkit-keyframes laydate-upbit{from{-webkit-transform:translate3d(0,20px,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes laydate-upbit{from{transform:translate3d(0,20px,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-laydate-static{position:relative;z-index:0;display:inline-block;margin:0;-webkit-animation:none;animation:none}.laydate-ym-show .laydate-next-m,.laydate-ym-show .laydate-prev-m{display:none!important}.laydate-ym-show .laydate-next-y,.laydate-ym-show .laydate-prev-y{display:inline-block!important}.laydate-time-show .laydate-set-ym span[lay-type=month],.laydate-time-show .laydate-set-ym span[lay-type=year],.laydate-time-show .layui-laydate-header .layui-icon,.laydate-ym-show .laydate-set-ym span[lay-type=month]{display:none!important}.layui-laydate-header{position:relative;line-height:30px;padding:10px 70px 5px}.laydate-set-ym span,.layui-laydate-header i{padding:0 5px;cursor:pointer}.layui-laydate-header *{display:inline-block;vertical-align:bottom}.layui-laydate-header i{position:absolute;top:10px;color:#999;font-size:18px}.layui-laydate-header i.laydate-prev-y{left:15px}.layui-laydate-header i.laydate-prev-m{left:45px}.layui-laydate-header i.laydate-next-y{right:15px}.layui-laydate-header i.laydate-next-m{right:45px}.laydate-set-ym{width:100%;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.laydate-time-text{cursor:default!important}.layui-laydate-content{position:relative;padding:10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-laydate-content table{border-collapse:collapse;border-spacing:0}.layui-laydate-content td,.layui-laydate-content th{width:36px;height:30px;padding:5px;text-align:center}.layui-laydate-content td{position:relative;cursor:pointer}.laydate-day-mark{position:absolute;left:0;top:0;width:100%;height:100%;line-height:30px;font-size:12px;overflow:hidden}.laydate-day-mark::after{position:absolute;content:'';right:2px;top:2px;width:5px;height:5px;border-radius:50%}.layui-laydate-footer{position:relative;height:46px;line-height:26px;padding:10px 20px}.layui-laydate-footer span{margin-right:15px;display:inline-block;cursor:pointer;font-size:12px}.layui-laydate-footer span:hover{color:#5FB878}.laydate-footer-btns{position:absolute;right:10px;top:10px}.laydate-footer-btns span{height:26px;line-height:26px;margin:0 0 0 -1px;padding:0 10px;border:1px solid #C9C9C9;background-color:#fff;white-space:nowrap;vertical-align:top;border-radius:2px}.layui-laydate-list>li,.layui-laydate-range .layui-laydate-main{display:inline-block;vertical-align:middle}.layui-laydate-list{position:absolute;left:0;top:0;width:100%;height:100%;padding:10px;background-color:#fff}.layui-laydate-list>li{position:relative;width:33.3%;height:36px;line-height:36px;margin:3px 0;text-align:center;cursor:pointer}.laydate-month-list>li{width:25%;margin:17px 0}.laydate-time-list>li{height:100%;margin:0;line-height:normal;cursor:default}.laydate-time-list p{position:relative;top:-4px;line-height:29px}.laydate-time-list ol{height:181px;overflow:hidden}.laydate-time-list>li:hover ol{overflow-y:auto}.laydate-time-list ol li{width:130%;padding-left:33px;line-height:30px;text-align:left;cursor:pointer}.layui-laydate-hint{position:absolute;top:115px;left:50%;width:250px;margin-left:-125px;line-height:20px;padding:15px;text-align:center;font-size:12px}.layui-laydate-range{width:546px}.layui-laydate-range .laydate-main-list-0 .laydate-next-m,.layui-laydate-range .laydate-main-list-0 .laydate-next-y,.layui-laydate-range .laydate-main-list-1 .laydate-prev-m,.layui-laydate-range .laydate-main-list-1 .laydate-prev-y{display:none}.layui-laydate-range .laydate-main-list-1 .layui-laydate-content{border-left:1px solid #e2e2e2}.layui-laydate,.layui-laydate-hint{border:1px solid #d2d2d2;box-shadow:0 2px 4px rgba(0,0,0,.12);background-color:#fff;color:#666}.layui-laydate-header{border-bottom:1px solid #e2e2e2}.layui-laydate-header i:hover,.layui-laydate-header span:hover{color:#5FB878}.layui-laydate-content{border-top:none 0;border-bottom:none 0}.layui-laydate-content th{font-weight:400;color:#333}.layui-laydate-content td{color:#666}.layui-laydate-content td.laydate-selected{background-color:#00F7DE}.laydate-selected:hover{background-color:#00F7DE!important}.layui-laydate-content td:hover,.layui-laydate-list li:hover{background-color:#eaeaea;color:#333}.laydate-time-list li ol{margin:0;padding:0;border:1px solid #e2e2e2;border-left-width:0}.laydate-time-list li:first-child ol{border-left-width:1px}.laydate-time-list>li:hover{background:0 0}.layui-laydate-content .laydate-day-next,.layui-laydate-content .laydate-day-prev{color:#d2d2d2}.laydate-selected.laydate-day-next,.laydate-selected.laydate-day-prev{background-color:#f8f8f8!important}.layui-laydate-footer{border-top:1px solid #e2e2e2}.layui-laydate-hint{color:#FF5722}.laydate-day-mark::after{background-color:#5FB878}.layui-laydate-content td.layui-this .laydate-day-mark::after{display:none}.layui-laydate-footer span[lay-type=date]{color:#5FB878}.layui-laydate .layui-this{background-color:#009688!important;color:#fff!important}.layui-laydate .laydate-disabled,.layui-laydate .laydate-disabled:hover{background:0 0!important;color:#d2d2d2!important;cursor:not-allowed!important;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.laydate-theme-molv{border:none}.laydate-theme-molv.layui-laydate-range{width:548px}.laydate-theme-molv .layui-laydate-main{width:274px}.laydate-theme-molv .layui-laydate-header{border:none;background-color:#009688}.laydate-theme-molv .layui-laydate-header i,.laydate-theme-molv .layui-laydate-header span{color:#f6f6f6}.laydate-theme-molv .layui-laydate-header i:hover,.laydate-theme-molv .layui-laydate-header span:hover{color:#fff}.laydate-theme-molv .layui-laydate-content{border:1px solid #e2e2e2;border-top:none;border-bottom:none}.laydate-theme-molv .laydate-main-list-1 .layui-laydate-content{border-left:none}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li,.laydate-theme-grid .layui-laydate-content td,.laydate-theme-grid .layui-laydate-content thead,.laydate-theme-molv .layui-laydate-footer{border:1px solid #e2e2e2}.laydate-theme-grid .laydate-selected,.laydate-theme-grid .laydate-selected:hover{background-color:#f2f2f2!important;color:#009688!important}.laydate-theme-grid .laydate-selected.laydate-day-next,.laydate-theme-grid .laydate-selected.laydate-day-prev{color:#d2d2d2!important}.laydate-theme-grid .laydate-month-list,.laydate-theme-grid .laydate-year-list{margin:1px 0 0 1px}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li{margin:0 -1px -1px 0}.laydate-theme-grid .laydate-year-list>li{height:43px;line-height:43px}.laydate-theme-grid .laydate-month-list>li{height:71px;line-height:71px} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/layer/2.4/skin/default/icon-ext.png b/public/static/xadmin/lib/layui/css/modules/layer/default/icon-ext.png similarity index 100% rename from public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/layer/2.4/skin/default/icon-ext.png rename to public/static/xadmin/lib/layui/css/modules/layer/default/icon-ext.png diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/layer/2.4/skin/default/icon.png b/public/static/xadmin/lib/layui/css/modules/layer/default/icon.png similarity index 100% rename from public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/layer/2.4/skin/default/icon.png rename to public/static/xadmin/lib/layui/css/modules/layer/default/icon.png diff --git a/public/static/xadmin/lib/layui/css/modules/layer/default/layer.css b/public/static/xadmin/lib/layui/css/modules/layer/default/layer.css new file mode 100644 index 00000000..157d537f --- /dev/null +++ b/public/static/xadmin/lib/layui/css/modules/layer/default/layer.css @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + .layui-layer-imgbar,.layui-layer-imgtit a,.layui-layer-tab .layui-layer-title span,.layui-layer-title{text-overflow:ellipsis;white-space:nowrap}html #layuicss-layer{display:none;position:absolute;width:1989px}.layui-layer,.layui-layer-shade{position:fixed;_position:absolute;pointer-events:auto}.layui-layer-shade{top:0;left:0;width:100%;height:100%;_height:expression(document.body.offsetHeight+"px")}.layui-layer{-webkit-overflow-scrolling:touch;top:150px;left:0;margin:0;padding:0;background-color:#fff;-webkit-background-clip:content;border-radius:2px;box-shadow:1px 1px 50px rgba(0,0,0,.3)}.layui-layer-close{position:absolute}.layui-layer-content{position:relative}.layui-layer-border{border:1px solid #B2B2B2;border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 5px rgba(0,0,0,.2)}.layui-layer-load{background:url(loading-1.gif) center center no-repeat #eee}.layui-layer-ico{background:url(icon.png) no-repeat}.layui-layer-btn a,.layui-layer-dialog .layui-layer-ico,.layui-layer-setwin a{display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-move{display:none;position:fixed;*position:absolute;left:0;top:0;width:100%;height:100%;cursor:move;opacity:0;filter:alpha(opacity=0);background-color:#fff;z-index:2147483647}.layui-layer-resize{position:absolute;width:15px;height:15px;right:0;bottom:0;cursor:se-resize}.layer-anim{-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.3s;animation-duration:.3s}@-webkit-keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);-ms-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-00{-webkit-animation-name:layer-bounceIn;animation-name:layer-bounceIn}@-webkit-keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);-ms-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);-ms-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-01{-webkit-animation-name:layer-zoomInDown;animation-name:layer-zoomInDown}@-webkit-keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.layer-anim-02{-webkit-animation-name:layer-fadeInUpBig;animation-name:layer-fadeInUpBig}@-webkit-keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);-ms-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);-ms-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-03{-webkit-animation-name:layer-zoomInLeft;animation-name:layer-zoomInLeft}@-webkit-keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}@keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);-ms-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);-ms-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}.layer-anim-04{-webkit-animation-name:layer-rollIn;animation-name:layer-rollIn}@keyframes layer-fadeIn{0%{opacity:0}100%{opacity:1}}.layer-anim-05{-webkit-animation-name:layer-fadeIn;animation-name:layer-fadeIn}@-webkit-keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.layer-anim-06{-webkit-animation-name:layer-shake;animation-name:layer-shake}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.layui-layer-title{padding:0 80px 0 20px;height:42px;line-height:42px;border-bottom:1px solid #eee;font-size:14px;color:#333;overflow:hidden;background-color:#F8F8F8;border-radius:2px 2px 0 0}.layui-layer-setwin{position:absolute;right:15px;*right:0;top:15px;font-size:0;line-height:initial}.layui-layer-setwin a{position:relative;width:16px;height:16px;margin-left:10px;font-size:12px;_overflow:hidden}.layui-layer-setwin .layui-layer-min cite{position:absolute;width:14px;height:2px;left:0;top:50%;margin-top:-1px;background-color:#2E2D3C;cursor:pointer;_overflow:hidden}.layui-layer-setwin .layui-layer-min:hover cite{background-color:#2D93CA}.layui-layer-setwin .layui-layer-max{background-position:-32px -40px}.layui-layer-setwin .layui-layer-max:hover{background-position:-16px -40px}.layui-layer-setwin .layui-layer-maxmin{background-position:-65px -40px}.layui-layer-setwin .layui-layer-maxmin:hover{background-position:-49px -40px}.layui-layer-setwin .layui-layer-close1{background-position:1px -40px;cursor:pointer}.layui-layer-setwin .layui-layer-close1:hover{opacity:.7}.layui-layer-setwin .layui-layer-close2{position:absolute;right:-28px;top:-28px;width:30px;height:30px;margin-left:0;background-position:-149px -31px;*right:-18px;_display:none}.layui-layer-setwin .layui-layer-close2:hover{background-position:-180px -31px}.layui-layer-btn{text-align:right;padding:0 15px 12px;pointer-events:auto;user-select:none;-webkit-user-select:none}.layui-layer-btn a{height:28px;line-height:28px;margin:5px 5px 0;padding:0 15px;border:1px solid #dedede;background-color:#fff;color:#333;border-radius:2px;font-weight:400;cursor:pointer;text-decoration:none}.layui-layer-btn a:hover{opacity:.9;text-decoration:none}.layui-layer-btn a:active{opacity:.8}.layui-layer-btn .layui-layer-btn0{border-color:#1E9FFF;background-color:#1E9FFF;color:#fff}.layui-layer-btn-l{text-align:left}.layui-layer-btn-c{text-align:center}.layui-layer-dialog{min-width:260px}.layui-layer-dialog .layui-layer-content{position:relative;padding:20px;line-height:24px;word-break:break-all;overflow:hidden;font-size:14px;overflow-x:hidden;overflow-y:auto}.layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute;top:16px;left:15px;_left:-40px;width:30px;height:30px}.layui-layer-ico1{background-position:-30px 0}.layui-layer-ico2{background-position:-60px 0}.layui-layer-ico3{background-position:-90px 0}.layui-layer-ico4{background-position:-120px 0}.layui-layer-ico5{background-position:-150px 0}.layui-layer-ico6{background-position:-180px 0}.layui-layer-rim{border:6px solid #8D8D8D;border:6px solid rgba(0,0,0,.3);border-radius:5px;box-shadow:none}.layui-layer-msg{min-width:180px;border:1px solid #D3D4D3;box-shadow:none}.layui-layer-hui{min-width:100px;background-color:#000;filter:alpha(opacity=60);background-color:rgba(0,0,0,.6);color:#fff;border:none}.layui-layer-hui .layui-layer-content{padding:12px 25px;text-align:center}.layui-layer-dialog .layui-layer-padding{padding:20px 20px 20px 55px;text-align:left}.layui-layer-page .layui-layer-content{position:relative;overflow:auto}.layui-layer-iframe .layui-layer-btn,.layui-layer-page .layui-layer-btn{padding-top:10px}.layui-layer-nobg{background:0 0}.layui-layer-iframe iframe{display:block;width:100%}.layui-layer-loading{border-radius:100%;background:0 0;box-shadow:none;border:none}.layui-layer-loading .layui-layer-content{width:60px;height:24px;background:url(loading-0.gif) no-repeat}.layui-layer-loading .layui-layer-loading1{width:37px;height:37px;background:url(loading-1.gif) no-repeat}.layui-layer-ico16,.layui-layer-loading .layui-layer-loading2{width:32px;height:32px;background:url(loading-2.gif) no-repeat}.layui-layer-tips{background:0 0;box-shadow:none;border:none}.layui-layer-tips .layui-layer-content{position:relative;line-height:22px;min-width:12px;padding:8px 15px;font-size:12px;_float:left;border-radius:2px;box-shadow:1px 1px 3px rgba(0,0,0,.2);background-color:#000;color:#fff}.layui-layer-tips .layui-layer-close{right:-2px;top:-1px}.layui-layer-tips i.layui-layer-TipsG{position:absolute;width:0;height:0;border-width:8px;border-color:transparent;border-style:dashed;*overflow:hidden}.layui-layer-tips i.layui-layer-TipsB,.layui-layer-tips i.layui-layer-TipsT{left:5px;border-right-style:solid;border-right-color:#000}.layui-layer-tips i.layui-layer-TipsT{bottom:-8px}.layui-layer-tips i.layui-layer-TipsB{top:-8px}.layui-layer-tips i.layui-layer-TipsL,.layui-layer-tips i.layui-layer-TipsR{top:5px;border-bottom-style:solid;border-bottom-color:#000}.layui-layer-tips i.layui-layer-TipsR{left:-8px}.layui-layer-tips i.layui-layer-TipsL{right:-8px}.layui-layer-lan[type=dialog]{min-width:280px}.layui-layer-lan .layui-layer-title{background:#4476A7;color:#fff;border:none}.layui-layer-lan .layui-layer-btn{padding:5px 10px 10px;text-align:right;border-top:1px solid #E9E7E7}.layui-layer-lan .layui-layer-btn a{background:#fff;border-color:#E9E7E7;color:#333}.layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#C9C5C5}.layui-layer-molv .layui-layer-title{background:#009f95;color:#fff;border:none}.layui-layer-molv .layui-layer-btn a{background:#009f95;border-color:#009f95}.layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92B8B1}.layui-layer-iconext{background:url(icon-ext.png) no-repeat}.layui-layer-prompt .layui-layer-input{display:block;width:230px;height:36px;margin:0 auto;line-height:30px;padding-left:10px;border:1px solid #e6e6e6;color:#333}.layui-layer-prompt textarea.layui-layer-input{width:300px;height:100px;line-height:20px;padding:6px 10px}.layui-layer-prompt .layui-layer-content{padding:20px}.layui-layer-prompt .layui-layer-btn{padding-top:0}.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4)}.layui-layer-tab .layui-layer-title{padding-left:0;overflow:visible}.layui-layer-tab .layui-layer-title span{position:relative;float:left;min-width:80px;max-width:260px;padding:0 20px;text-align:center;overflow:hidden;cursor:pointer}.layui-layer-tab .layui-layer-title span.layui-this{height:43px;border-left:1px solid #eee;border-right:1px solid #eee;background-color:#fff;z-index:10}.layui-layer-tab .layui-layer-title span:first-child{border-left:none}.layui-layer-tabmain{line-height:24px;clear:both}.layui-layer-tabmain .layui-layer-tabli{display:none}.layui-layer-tabmain .layui-layer-tabli.layui-this{display:block}.layui-layer-photos{-webkit-animation-duration:.8s;animation-duration:.8s}.layui-layer-photos .layui-layer-content{overflow:hidden;text-align:center}.layui-layer-photos .layui-layer-phimg img{position:relative;width:100%;display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-imgbar,.layui-layer-imguide{display:none}.layui-layer-imgnext,.layui-layer-imgprev{position:absolute;top:50%;width:27px;_width:44px;height:44px;margin-top:-22px;outline:0;blr:expression(this.onFocus=this.blur())}.layui-layer-imgprev{left:10px;background-position:-5px -5px;_background-position:-70px -5px}.layui-layer-imgprev:hover{background-position:-33px -5px;_background-position:-120px -5px}.layui-layer-imgnext{right:10px;_right:8px;background-position:-5px -50px;_background-position:-70px -50px}.layui-layer-imgnext:hover{background-position:-33px -50px;_background-position:-120px -50px}.layui-layer-imgbar{position:absolute;left:0;bottom:0;width:100%;height:32px;line-height:32px;background-color:rgba(0,0,0,.8);background-color:#000\9;filter:Alpha(opacity=80);color:#fff;overflow:hidden;font-size:0}.layui-layer-imgtit *{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:12px}.layui-layer-imgtit a{max-width:65%;overflow:hidden;color:#fff}.layui-layer-imgtit a:hover{color:#fff;text-decoration:underline}.layui-layer-imgtit em{padding-left:10px;font-style:normal}@-webkit-keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);-ms-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-close{-webkit-animation-name:layer-bounceOut;animation-name:layer-bounceOut;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}@media screen and (max-width:1100px){.layui-layer-iframe{overflow-y:auto;-webkit-overflow-scrolling:touch}} \ No newline at end of file diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/layer/2.4/skin/default/loading-0.gif b/public/static/xadmin/lib/layui/css/modules/layer/default/loading-0.gif similarity index 100% rename from public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/layer/2.4/skin/default/loading-0.gif rename to public/static/xadmin/lib/layui/css/modules/layer/default/loading-0.gif diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/layer/2.4/skin/default/loading-1.gif b/public/static/xadmin/lib/layui/css/modules/layer/default/loading-1.gif similarity index 100% rename from public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/layer/2.4/skin/default/loading-1.gif rename to public/static/xadmin/lib/layui/css/modules/layer/default/loading-1.gif diff --git a/public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/layer/2.4/skin/default/loading-2.gif b/public/static/xadmin/lib/layui/css/modules/layer/default/loading-2.gif similarity index 100% rename from public/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/layer/2.4/skin/default/loading-2.gif rename to public/static/xadmin/lib/layui/css/modules/layer/default/loading-2.gif diff --git a/public/static/xadmin/lib/layui/font/iconfont.eot b/public/static/xadmin/lib/layui/font/iconfont.eot new file mode 100644 index 00000000..93b3d5ab Binary files /dev/null and b/public/static/xadmin/lib/layui/font/iconfont.eot differ diff --git a/public/static/xadmin/lib/layui/font/iconfont.svg b/public/static/xadmin/lib/layui/font/iconfont.svg new file mode 100644 index 00000000..1c7ffe97 --- /dev/null +++ b/public/static/xadmin/lib/layui/font/iconfont.svg @@ -0,0 +1,473 @@ + + + + + +Created by iconfont + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/static/xadmin/lib/layui/font/iconfont.ttf b/public/static/xadmin/lib/layui/font/iconfont.ttf new file mode 100644 index 00000000..0c8b0a50 Binary files /dev/null and b/public/static/xadmin/lib/layui/font/iconfont.ttf differ diff --git a/public/static/xadmin/lib/layui/font/iconfont.woff b/public/static/xadmin/lib/layui/font/iconfont.woff new file mode 100644 index 00000000..786bb2a8 Binary files /dev/null and b/public/static/xadmin/lib/layui/font/iconfont.woff differ diff --git a/public/static/xadmin/lib/layui/images/face/0.gif b/public/static/xadmin/lib/layui/images/face/0.gif new file mode 100644 index 00000000..a63f0d52 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/0.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/1.gif b/public/static/xadmin/lib/layui/images/face/1.gif new file mode 100644 index 00000000..b2b78b21 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/1.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/10.gif b/public/static/xadmin/lib/layui/images/face/10.gif new file mode 100644 index 00000000..556c7e32 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/10.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/11.gif b/public/static/xadmin/lib/layui/images/face/11.gif new file mode 100644 index 00000000..2bfc58be Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/11.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/12.gif b/public/static/xadmin/lib/layui/images/face/12.gif new file mode 100644 index 00000000..1c321c7e Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/12.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/13.gif b/public/static/xadmin/lib/layui/images/face/13.gif new file mode 100644 index 00000000..300bbc2a Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/13.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/14.gif b/public/static/xadmin/lib/layui/images/face/14.gif new file mode 100644 index 00000000..43b6d0a4 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/14.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/15.gif b/public/static/xadmin/lib/layui/images/face/15.gif new file mode 100644 index 00000000..c9f25fa1 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/15.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/16.gif b/public/static/xadmin/lib/layui/images/face/16.gif new file mode 100644 index 00000000..34f28e4c Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/16.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/17.gif b/public/static/xadmin/lib/layui/images/face/17.gif new file mode 100644 index 00000000..39cd0353 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/17.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/18.gif b/public/static/xadmin/lib/layui/images/face/18.gif new file mode 100644 index 00000000..7bce2997 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/18.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/19.gif b/public/static/xadmin/lib/layui/images/face/19.gif new file mode 100644 index 00000000..adac542f Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/19.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/2.gif b/public/static/xadmin/lib/layui/images/face/2.gif new file mode 100644 index 00000000..7edbb58a Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/2.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/20.gif b/public/static/xadmin/lib/layui/images/face/20.gif new file mode 100644 index 00000000..50631a6e Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/20.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/21.gif b/public/static/xadmin/lib/layui/images/face/21.gif new file mode 100644 index 00000000..b9842128 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/21.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/22.gif b/public/static/xadmin/lib/layui/images/face/22.gif new file mode 100644 index 00000000..1f0bd8b0 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/22.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/23.gif b/public/static/xadmin/lib/layui/images/face/23.gif new file mode 100644 index 00000000..e05e0f97 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/23.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/24.gif b/public/static/xadmin/lib/layui/images/face/24.gif new file mode 100644 index 00000000..f35928a2 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/24.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/25.gif b/public/static/xadmin/lib/layui/images/face/25.gif new file mode 100644 index 00000000..0b4a8832 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/25.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/26.gif b/public/static/xadmin/lib/layui/images/face/26.gif new file mode 100644 index 00000000..45c4fb55 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/26.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/27.gif b/public/static/xadmin/lib/layui/images/face/27.gif new file mode 100644 index 00000000..7a4c0131 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/27.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/28.gif b/public/static/xadmin/lib/layui/images/face/28.gif new file mode 100644 index 00000000..fc5a0cfa Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/28.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/29.gif b/public/static/xadmin/lib/layui/images/face/29.gif new file mode 100644 index 00000000..5dd7442b Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/29.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/3.gif b/public/static/xadmin/lib/layui/images/face/3.gif new file mode 100644 index 00000000..86df67b7 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/3.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/30.gif b/public/static/xadmin/lib/layui/images/face/30.gif new file mode 100644 index 00000000..b751f98a Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/30.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/31.gif b/public/static/xadmin/lib/layui/images/face/31.gif new file mode 100644 index 00000000..c9476d79 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/31.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/32.gif b/public/static/xadmin/lib/layui/images/face/32.gif new file mode 100644 index 00000000..9931b063 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/32.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/33.gif b/public/static/xadmin/lib/layui/images/face/33.gif new file mode 100644 index 00000000..59111a38 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/33.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/34.gif b/public/static/xadmin/lib/layui/images/face/34.gif new file mode 100644 index 00000000..a334548e Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/34.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/35.gif b/public/static/xadmin/lib/layui/images/face/35.gif new file mode 100644 index 00000000..a9322643 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/35.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/36.gif b/public/static/xadmin/lib/layui/images/face/36.gif new file mode 100644 index 00000000..6de432ae Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/36.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/37.gif b/public/static/xadmin/lib/layui/images/face/37.gif new file mode 100644 index 00000000..d05f2da4 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/37.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/38.gif b/public/static/xadmin/lib/layui/images/face/38.gif new file mode 100644 index 00000000..8b1c88a3 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/38.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/39.gif b/public/static/xadmin/lib/layui/images/face/39.gif new file mode 100644 index 00000000..38b84a51 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/39.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/4.gif b/public/static/xadmin/lib/layui/images/face/4.gif new file mode 100644 index 00000000..d52200c5 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/4.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/40.gif b/public/static/xadmin/lib/layui/images/face/40.gif new file mode 100644 index 00000000..ae429912 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/40.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/41.gif b/public/static/xadmin/lib/layui/images/face/41.gif new file mode 100644 index 00000000..b9c715c5 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/41.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/42.gif b/public/static/xadmin/lib/layui/images/face/42.gif new file mode 100644 index 00000000..0eb1434b Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/42.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/43.gif b/public/static/xadmin/lib/layui/images/face/43.gif new file mode 100644 index 00000000..ac0b7008 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/43.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/44.gif b/public/static/xadmin/lib/layui/images/face/44.gif new file mode 100644 index 00000000..ad444976 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/44.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/45.gif b/public/static/xadmin/lib/layui/images/face/45.gif new file mode 100644 index 00000000..6837fcaf Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/45.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/46.gif b/public/static/xadmin/lib/layui/images/face/46.gif new file mode 100644 index 00000000..d62916d4 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/46.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/47.gif b/public/static/xadmin/lib/layui/images/face/47.gif new file mode 100644 index 00000000..58a08361 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/47.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/48.gif b/public/static/xadmin/lib/layui/images/face/48.gif new file mode 100644 index 00000000..7ffd1613 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/48.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/49.gif b/public/static/xadmin/lib/layui/images/face/49.gif new file mode 100644 index 00000000..959b9929 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/49.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/5.gif b/public/static/xadmin/lib/layui/images/face/5.gif new file mode 100644 index 00000000..4e8b09f1 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/5.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/50.gif b/public/static/xadmin/lib/layui/images/face/50.gif new file mode 100644 index 00000000..6e22e7ff Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/50.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/51.gif b/public/static/xadmin/lib/layui/images/face/51.gif new file mode 100644 index 00000000..ad3f4d3a Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/51.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/52.gif b/public/static/xadmin/lib/layui/images/face/52.gif new file mode 100644 index 00000000..39f8a228 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/52.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/53.gif b/public/static/xadmin/lib/layui/images/face/53.gif new file mode 100644 index 00000000..a181ee77 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/53.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/54.gif b/public/static/xadmin/lib/layui/images/face/54.gif new file mode 100644 index 00000000..e289d929 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/54.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/55.gif b/public/static/xadmin/lib/layui/images/face/55.gif new file mode 100644 index 00000000..4351083a Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/55.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/56.gif b/public/static/xadmin/lib/layui/images/face/56.gif new file mode 100644 index 00000000..e0eff222 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/56.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/57.gif b/public/static/xadmin/lib/layui/images/face/57.gif new file mode 100644 index 00000000..0bf130f0 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/57.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/58.gif b/public/static/xadmin/lib/layui/images/face/58.gif new file mode 100644 index 00000000..0f065087 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/58.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/59.gif b/public/static/xadmin/lib/layui/images/face/59.gif new file mode 100644 index 00000000..7081e4f0 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/59.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/6.gif b/public/static/xadmin/lib/layui/images/face/6.gif new file mode 100644 index 00000000..f7715bf5 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/6.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/60.gif b/public/static/xadmin/lib/layui/images/face/60.gif new file mode 100644 index 00000000..6e15f89d Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/60.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/61.gif b/public/static/xadmin/lib/layui/images/face/61.gif new file mode 100644 index 00000000..f092d7e3 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/61.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/62.gif b/public/static/xadmin/lib/layui/images/face/62.gif new file mode 100644 index 00000000..7fe49840 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/62.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/63.gif b/public/static/xadmin/lib/layui/images/face/63.gif new file mode 100644 index 00000000..cf8e23e5 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/63.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/64.gif b/public/static/xadmin/lib/layui/images/face/64.gif new file mode 100644 index 00000000..a7797198 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/64.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/65.gif b/public/static/xadmin/lib/layui/images/face/65.gif new file mode 100644 index 00000000..7bb98f2d Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/65.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/66.gif b/public/static/xadmin/lib/layui/images/face/66.gif new file mode 100644 index 00000000..bb6d0775 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/66.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/67.gif b/public/static/xadmin/lib/layui/images/face/67.gif new file mode 100644 index 00000000..6e33f7c4 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/67.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/68.gif b/public/static/xadmin/lib/layui/images/face/68.gif new file mode 100644 index 00000000..1a6c400d Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/68.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/69.gif b/public/static/xadmin/lib/layui/images/face/69.gif new file mode 100644 index 00000000..a02f0b22 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/69.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/7.gif b/public/static/xadmin/lib/layui/images/face/7.gif new file mode 100644 index 00000000..e6d4db80 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/7.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/70.gif b/public/static/xadmin/lib/layui/images/face/70.gif new file mode 100644 index 00000000..416c5c14 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/70.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/71.gif b/public/static/xadmin/lib/layui/images/face/71.gif new file mode 100644 index 00000000..c17d60cb Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/71.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/8.gif b/public/static/xadmin/lib/layui/images/face/8.gif new file mode 100644 index 00000000..66f967b4 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/8.gif differ diff --git a/public/static/xadmin/lib/layui/images/face/9.gif b/public/static/xadmin/lib/layui/images/face/9.gif new file mode 100644 index 00000000..60447400 Binary files /dev/null and b/public/static/xadmin/lib/layui/images/face/9.gif differ diff --git a/public/static/xadmin/lib/layui/lay/modules/carousel.js b/public/static/xadmin/lib/layui/lay/modules/carousel.js new file mode 100644 index 00000000..2be2c8ca --- /dev/null +++ b/public/static/xadmin/lib/layui/lay/modules/carousel.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
                                    ',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("")}),i.join("")}(),"
                                  "].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a/g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
                                  1. '+o.replace(/[\r\t\n]+/g,"
                                  2. ")+"
                                  "),c.find(">.layui-code-h3")[0]||c.prepend('

                                  '+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

                                  ");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); \ No newline at end of file diff --git a/public/static/xadmin/lib/layui/lay/modules/colorpicker.js b/public/static/xadmin/lib/layui/lay/modules/colorpicker.js new file mode 100644 index 00000000..fd99bf88 --- /dev/null +++ b/public/static/xadmin/lib/layui/lay/modules/colorpicker.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(e){"use strict";var i=layui.jquery,o={config:{},index:layui.colorpicker?layui.colorpicker.index+1e4:0,set:function(e){var o=this;return o.config=i.extend({},o.config,e),o},on:function(e,i){return layui.onevent.call(this,"colorpicker",e,i)}},r=function(){var e=this,i=e.config;return{config:i}},t="colorpicker",n="layui-show",l="layui-colorpicker",c=".layui-colorpicker-main",a="layui-icon-down",s="layui-icon-close",f="layui-colorpicker-trigger-span",d="layui-colorpicker-trigger-i",u="layui-colorpicker-side",p="layui-colorpicker-side-slider",g="layui-colorpicker-basis",v="layui-colorpicker-alpha-bgcolor",h="layui-colorpicker-alpha-slider",m="layui-colorpicker-basis-cursor",b="layui-colorpicker-main-input",k=function(e){var i={h:0,s:0,b:0},o=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b),t=r-o;return i.b=r,i.s=0!=r?255*t/r:0,0!=i.s?e.r==r?i.h=(e.g-e.b)/t:e.g==r?i.h=2+(e.b-e.r)/t:i.h=4+(e.r-e.g)/t:i.h=-1,r==o&&(i.h=0),i.h*=60,i.h<0&&(i.h+=360),i.s*=100/255,i.b*=100/255,i},y=function(e){var e=e.indexOf("#")>-1?e.substring(1):e;if(3==e.length){var i=e.split("");e=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]}e=parseInt(e,16);var o={r:e>>16,g:(65280&e)>>8,b:255&e};return k(o)},x=function(e){var i={},o=e.h,r=255*e.s/100,t=255*e.b/100;if(0==r)i.r=i.g=i.b=t;else{var n=t,l=(255-r)*t/255,c=(n-l)*(o%60)/60;360==o&&(o=0),o<60?(i.r=n,i.b=l,i.g=l+c):o<120?(i.g=n,i.b=l,i.r=n-c):o<180?(i.g=n,i.r=l,i.b=l+c):o<240?(i.b=n,i.r=l,i.g=n-c):o<300?(i.b=n,i.g=l,i.r=l+c):o<360?(i.r=n,i.g=l,i.b=n-c):(i.r=0,i.g=0,i.b=0)}return{r:Math.round(i.r),g:Math.round(i.g),b:Math.round(i.b)}},C=function(e){var o=x(e),r=[o.r.toString(16),o.g.toString(16),o.b.toString(16)];return i.each(r,function(e,i){1==i.length&&(r[e]="0"+i)}),r.join("")},P=function(e){var i=/[0-9]{1,3}/g,o=e.match(i)||[];return{r:o[0],g:o[1],b:o[2]}},B=i(window),w=i(document),D=function(e){var r=this;r.index=++o.index,r.config=i.extend({},r.config,o.config,e),r.render()};D.prototype.config={color:"",size:null,alpha:!1,format:"hex",predefine:!1,colors:["#009688","#5FB878","#1E9FFF","#FF5722","#FFB800","#01AAED","#999","#c00","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","rgb(0, 186, 189)","rgb(255, 120, 0)","rgb(250, 212, 0)","#393D49","rgba(0,0,0,.5)","rgba(255, 69, 0, 0.68)","rgba(144, 240, 144, 0.5)","rgba(31, 147, 255, 0.73)"]},D.prototype.render=function(){var e=this,o=e.config,r=i(['
                                  ',"",'3&&(o.alpha&&"rgb"==o.format||(e="#"+C(k(P(o.color))))),"background: "+e):e}()+'">','',"","","
                                  "].join("")),t=i(o.elem);o.size&&r.addClass("layui-colorpicker-"+o.size),t.addClass("layui-inline").html(e.elemColorBox=r),e.color=e.elemColorBox.find("."+f)[0].style.background,e.events()},D.prototype.renderPicker=function(){var e=this,o=e.config,r=e.elemColorBox[0],t=e.elemPicker=i(['
                                  ','
                                  ','
                                  ','
                                  ','
                                  ','
                                  ',"
                                  ",'
                                  ','
                                  ',"
                                  ","
                                  ",'
                                  ','
                                  ','
                                  ',"
                                  ","
                                  ",function(){if(o.predefine){var e=['
                                  '];return layui.each(o.colors,function(i,o){e.push(['
                                  ','
                                  ',"
                                  "].join(""))}),e.push("
                                  "),e.join("")}return""}(),'
                                  ','
                                  ','',"
                                  ",'
                                  ','','',"","
                                  "].join(""));e.elemColorBox.find("."+f)[0];i(c)[0]&&i(c).data("index")==e.index?e.removePicker(D.thisElemInd):(e.removePicker(D.thisElemInd),i("body").append(t)),D.thisElemInd=e.index,D.thisColor=r.style.background,e.position(),e.pickerEvents()},D.prototype.removePicker=function(e){var o=this;o.config;return i("#layui-colorpicker"+(e||o.index)).remove(),o},D.prototype.position=function(){var e=this,i=e.config,o=e.bindElem||e.elemColorBox[0],r=e.elemPicker[0],t=o.getBoundingClientRect(),n=r.offsetWidth,l=r.offsetHeight,c=function(e){return e=e?"scrollLeft":"scrollTop",document.body[e]|document.documentElement[e]},a=function(e){return document.documentElement[e?"clientWidth":"clientHeight"]},s=5,f=t.left,d=t.bottom;f-=(n-o.offsetWidth)/2,d+=s,f+n+s>a("width")?f=a("width")-n-s:fa()&&(d=t.top>l?t.top-l:a()-l,d-=2*s),i.position&&(r.style.position=i.position),r.style.left=f+("fixed"===i.position?0:c(1))+"px",r.style.top=d+("fixed"===i.position?0:c())+"px"},D.prototype.val=function(){var e=this,i=(e.config,e.elemColorBox.find("."+f)),o=e.elemPicker.find("."+b),r=i[0],t=r.style.backgroundColor;if(t){var n=k(P(t)),l=i.attr("lay-type");if(e.select(n.h,n.s,n.b),"torgb"===l&&o.find("input").val(t),"rgba"===l){var c=P(t);if(3==(t.match(/[0-9]{1,3}/g)||[]).length)o.find("input").val("rgba("+c.r+", "+c.g+", "+c.b+", 1)"),e.elemPicker.find("."+h).css("left",280);else{o.find("input").val(t);var a=280*t.slice(t.lastIndexOf(",")+1,t.length-1);e.elemPicker.find("."+h).css("left",a)}e.elemPicker.find("."+v)[0].style.background="linear-gradient(to right, rgba("+c.r+", "+c.g+", "+c.b+", 0), rgb("+c.r+", "+c.g+", "+c.b+"))"}}else e.select(0,100,100),o.find("input").val(""),e.elemPicker.find("."+v)[0].style.background="",e.elemPicker.find("."+h).css("left",280)},D.prototype.side=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f),t=r.attr("lay-type"),n=e.elemPicker.find("."+u),l=e.elemPicker.find("."+p),c=e.elemPicker.find("."+g),y=e.elemPicker.find("."+m),C=e.elemPicker.find("."+v),w=e.elemPicker.find("."+h),D=l[0].offsetTop/180*360,E=100-(y[0].offsetTop+3)/180*100,H=(y[0].offsetLeft+3)/260*100,W=Math.round(w[0].offsetLeft/280*100)/100,j=e.elemColorBox.find("."+d),F=e.elemPicker.find(".layui-colorpicker-pre").children("div"),L=function(i,n,l,c){e.select(i,n,l);var f=x({h:i,s:n,b:l});if(j.addClass(a).removeClass(s),r[0].style.background="rgb("+f.r+", "+f.g+", "+f.b+")","torgb"===t&&e.elemPicker.find("."+b).find("input").val("rgb("+f.r+", "+f.g+", "+f.b+")"),"rgba"===t){var d=0;d=280*c,w.css("left",d),e.elemPicker.find("."+b).find("input").val("rgba("+f.r+", "+f.g+", "+f.b+", "+c+")"),r[0].style.background="rgba("+f.r+", "+f.g+", "+f.b+", "+c+")",C[0].style.background="linear-gradient(to right, rgba("+f.r+", "+f.g+", "+f.b+", 0), rgb("+f.r+", "+f.g+", "+f.b+"))"}o.change&&o.change(e.elemPicker.find("."+b).find("input").val())},M=i(['
                                  t&&(r=t);var l=r/180*360;D=l,L(l,H,E,W),e.preventDefault()};Y(r),e.preventDefault()}),n.on("click",function(e){var o=e.clientY-i(this).offset().top;o<0&&(o=0),o>this.offsetHeight&&(o=this.offsetHeight);var r=o/180*360;D=r,L(r,H,E,W),e.preventDefault()}),y.on("mousedown",function(e){var i=this.offsetTop,o=this.offsetLeft,r=e.clientY,t=e.clientX,n=function(e){var n=i+(e.clientY-r),l=o+(e.clientX-t),a=c[0].offsetHeight-3,s=c[0].offsetWidth-3;n<-3&&(n=-3),n>a&&(n=a),l<-3&&(l=-3),l>s&&(l=s);var f=(l+3)/260*100,d=100-(n+3)/180*100;E=d,H=f,L(D,f,d,W),e.preventDefault()};layui.stope(e),Y(n),e.preventDefault()}),c.on("mousedown",function(e){var o=e.clientY-i(this).offset().top-3+B.scrollTop(),r=e.clientX-i(this).offset().left-3+B.scrollLeft();o<-3&&(o=-3),o>this.offsetHeight-3&&(o=this.offsetHeight-3),r<-3&&(r=-3),r>this.offsetWidth-3&&(r=this.offsetWidth-3);var t=(r+3)/260*100,n=100-(o+3)/180*100;E=n,H=t,L(D,t,n,W),e.preventDefault(),y.trigger(e,"mousedown")}),w.on("mousedown",function(e){var i=this.offsetLeft,o=e.clientX,r=function(e){var r=i+(e.clientX-o),t=C[0].offsetWidth;r<0&&(r=0),r>t&&(r=t);var n=Math.round(r/280*100)/100;W=n,L(D,H,E,n),e.preventDefault()};Y(r),e.preventDefault()}),C.on("click",function(e){var o=e.clientX-i(this).offset().left;o<0&&(o=0),o>this.offsetWidth&&(o=this.offsetWidth);var r=Math.round(o/280*100)/100;W=r,L(D,H,E,r),e.preventDefault()}),F.each(function(){i(this).on("click",function(){i(this).parent(".layui-colorpicker-pre").addClass("selected").siblings().removeClass("selected");var e,o=this.style.backgroundColor,r=k(P(o)),t=o.slice(o.lastIndexOf(",")+1,o.length-1);D=r.h,H=r.s,E=r.b,3==(o.match(/[0-9]{1,3}/g)||[]).length&&(t=1),W=t,e=280*t,L(r.h,r.s,r.b,t)})})},D.prototype.select=function(e,i,o,r){var t=this,n=(t.config,C({h:e,s:100,b:100})),l=C({h:e,s:i,b:o}),c=e/360*180,a=180-o/100*180-3,s=i/100*260-3;t.elemPicker.find("."+p).css("top",c),t.elemPicker.find("."+g)[0].style.background="#"+n,t.elemPicker.find("."+m).css({top:a,left:s}),"change"!==r&&t.elemPicker.find("."+b).find("input").val("#"+l)},D.prototype.pickerEvents=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f),t=e.elemPicker.find("."+b+" input"),n={clear:function(i){r[0].style.background="",e.elemColorBox.find("."+d).removeClass(a).addClass(s),e.color="",o.done&&o.done(""),e.removePicker()},confirm:function(i,n){var l=t.val(),c=l,f={};if(l.indexOf(",")>-1){if(f=k(P(l)),e.select(f.h,f.s,f.b),r[0].style.background=c="#"+C(f),(l.match(/[0-9]{1,3}/g)||[]).length>3&&"rgba"===r.attr("lay-type")){var u=280*l.slice(l.lastIndexOf(",")+1,l.length-1);e.elemPicker.find("."+h).css("left",u),r[0].style.background=l,c=l}}else f=y(l),r[0].style.background=c="#"+C(f),e.elemColorBox.find("."+d).removeClass(s).addClass(a);return"change"===n?(e.select(f.h,f.s,f.b,n),void(o.change&&o.change(c))):(e.color=l,o.done&&o.done(l),void e.removePicker())}};e.elemPicker.on("click","*[colorpicker-events]",function(){var e=i(this),o=e.attr("colorpicker-events");n[o]&&n[o].call(this,e)}),t.on("keyup",function(e){var o=i(this);n.confirm.call(this,o,13===e.keyCode?null:"change")})},D.prototype.events=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f);e.elemColorBox.on("click",function(){e.renderPicker(),i(c)[0]&&(e.val(),e.side())}),o.elem[0]&&!e.elemColorBox[0].eventHandler&&(w.on("click",function(o){if(!i(o.target).hasClass(l)&&!i(o.target).parents("."+l)[0]&&!i(o.target).hasClass(c.replace(/\./g,""))&&!i(o.target).parents(c)[0]&&e.elemPicker){if(e.color){var t=k(P(e.color));e.select(t.h,t.s,t.b)}else e.elemColorBox.find("."+d).removeClass(a).addClass(s);r[0].style.background=e.color||"",e.removePicker()}}),B.on("resize",function(){return!(!e.elemPicker||!i(c)[0])&&void e.position()}),e.elemColorBox[0].eventHandler=!0)},o.render=function(e){var i=new D(e);return r.call(i)},e(t,o)}); \ No newline at end of file diff --git a/public/static/xadmin/lib/layui/lay/modules/element.js b/public/static/xadmin/lib/layui/lay/modules/element.js new file mode 100644 index 00000000..ac628df9 --- /dev/null +++ b/public/static/xadmin/lib/layui/lay/modules/element.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(t){"use strict";var a=layui.$,i=(layui.hint(),layui.device()),e="element",l="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(t){var i=this;return a.extend(!0,i.config,t),i},s.prototype.on=function(t,a){return layui.onevent.call(this,e,t,a)},s.prototype.tabAdd=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.children(".layui-tab-bar"),o=l.children(".layui-tab-content"),r='
                                • "+(i.title||"unnaming")+"
                                • ";return s[0]?s.before(r):n.append(r),o.append('
                                  '+(i.content||"")+"
                                  "),f.hideTabMore(!0),f.tabAuto(),this},s.prototype.tabDelete=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabDelete(null,s),this},s.prototype.tabChange=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabClick.call(s[0],null,null,s),this},s.prototype.tab=function(t){t=t||{},b.on("click",t.headerElem,function(i){var e=a(this).index();f.tabClick.call(this,i,e,null,t)})},s.prototype.progress=function(t,i){var e="layui-progress",l=a("."+e+"[lay-filter="+t+"]"),n=l.find("."+e+"-bar"),s=n.find("."+e+"-text");return n.css("width",i),s.text(i),this};var o=".layui-nav",r="layui-nav-item",c="layui-nav-bar",u="layui-nav-tree",d="layui-nav-child",y="layui-nav-more",h="layui-anim layui-anim-upbit",f={tabClick:function(t,i,s,o){o=o||{};var r=s||a(this),i=i||r.parent().children("li").index(r),c=o.headerElem?r.parent():r.parents(".layui-tab").eq(0),u=o.bodyElem?a(o.bodyElem):c.children(".layui-tab-content").children(".layui-tab-item"),d=r.find("a"),y=c.attr("lay-filter");"javascript:;"!==d.attr("href")&&"_blank"===d.attr("target")||(r.addClass(l).siblings().removeClass(l),u.eq(i).addClass(n).siblings().removeClass(n)),layui.event.call(this,e,"tab("+y+")",{elem:c,index:i})},tabDelete:function(t,i){var n=i||a(this).parent(),s=n.index(),o=n.parents(".layui-tab").eq(0),r=o.children(".layui-tab-content").children(".layui-tab-item"),c=o.attr("lay-filter");n.hasClass(l)&&(n.next()[0]?f.tabClick.call(n.next()[0],null,s+1):n.prev()[0]&&f.tabClick.call(n.prev()[0],null,s-1)),n.remove(),r.eq(s).remove(),setTimeout(function(){f.tabAuto()},50),layui.event.call(this,e,"tabDelete("+c+")",{elem:o,index:s})},tabAuto:function(){var t="layui-tab-more",e="layui-tab-bar",l="layui-tab-close",n=this;a(".layui-tab").each(function(){var s=a(this),o=s.children(".layui-tab-title"),r=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),c=a('');if(n===window&&8!=i.ie&&f.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var t=a(this);if(!t.find("."+l)[0]){var i=a('ဆ');i.on("click",f.tabDelete),t.append(i)}}),"string"!=typeof s.attr("lay-unauto"))if(o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+e)[0])return;o.append(c),s.attr("overflow",""),c.on("click",function(a){o[this.title?"removeClass":"addClass"](t),this.title=this.title?"":"收缩"})}else o.find("."+e).remove(),s.removeAttr("overflow")})},hideTabMore:function(t){var i=a(".layui-tab-title");t!==!0&&"tabmore"===a(t.target).attr("lay-stope")||(i.removeClass("layui-tab-more"),i.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var t=a(this),i=t.parents(o),n=i.attr("lay-filter"),s=t.parent(),c=t.siblings("."+d),y="string"==typeof s.attr("lay-unselect");"javascript:;"!==t.attr("href")&&"_blank"===t.attr("target")||y||c[0]||(i.find("."+l).removeClass(l),s.addClass(l)),i.hasClass(u)&&(c.removeClass(h),c[0]&&(s["none"===c.css("display")?"addClass":"removeClass"](r+"ed"),"all"===i.attr("lay-shrink")&&s.siblings().removeClass(r+"ed"))),layui.event.call(this,e,"nav("+n+")",t)},collapse:function(){var t=a(this),i=t.find(".layui-colla-icon"),l=t.siblings(".layui-colla-content"),s=t.parents(".layui-collapse").eq(0),o=s.attr("lay-filter"),r="none"===l.css("display");if("string"==typeof s.attr("lay-accordion")){var c=s.children(".layui-colla-item").children("."+n);c.siblings(".layui-colla-title").children(".layui-colla-icon").html(""),c.removeClass(n)}l[r?"addClass":"removeClass"](n),i.html(r?"":""),layui.event.call(this,e,"collapse("+o+")",{title:t,content:l,show:r})}};s.prototype.init=function(t,e){var l=function(){return e?'[lay-filter="'+e+'"]':""}(),s={tab:function(){f.tabAuto.call({})},nav:function(){var t=200,e={},s={},p={},b=function(l,o,r){var c=a(this),f=c.find("."+d);o.hasClass(u)?l.css({top:c.position().top,height:c.children("a").outerHeight(),opacity:1}):(f.addClass(h),l.css({left:c.position().left+parseFloat(c.css("marginLeft")),top:c.position().top+c.height()-l.height()}),e[r]=setTimeout(function(){l.css({width:c.width(),opacity:1})},i.ie&&i.ie<10?0:t),clearTimeout(p[r]),"block"===f.css("display")&&clearTimeout(s[r]),s[r]=setTimeout(function(){f.addClass(n),c.find("."+y).addClass(y+"d")},300))};a(o+l).each(function(i){var l=a(this),o=a(''),h=l.find("."+r);l.find("."+c)[0]||(l.append(o),h.on("mouseenter",function(){b.call(this,o,l,i)}).on("mouseleave",function(){l.hasClass(u)||(clearTimeout(s[i]),s[i]=setTimeout(function(){l.find("."+d).removeClass(n),l.find("."+y).removeClass(y+"d")},300))}),l.on("mouseleave",function(){clearTimeout(e[i]),p[i]=setTimeout(function(){l.hasClass(u)?o.css({height:0,top:o.position().top+o.height()/2,opacity:0}):o.css({width:0,left:o.position().left+o.width()/2,opacity:0})},t)})),h.find("a").each(function(){var t=a(this),i=(t.parent(),t.siblings("."+d));i[0]&&!t.children("."+y)[0]&&t.append(''),t.off("click",f.clickThis).on("click",f.clickThis)})})},breadcrumb:function(){var t=".layui-breadcrumb";a(t+l).each(function(){var t=a(this),i="lay-separator",e=t.attr(i)||"/",l=t.find("a");l.next("span["+i+"]")[0]||(l.each(function(t){t!==l.length-1&&a(this).after(""+e+"")}),t.css("visibility","visible"))})},progress:function(){var t="layui-progress";a("."+t+l).each(function(){var i=a(this),e=i.find(".layui-progress-bar"),l=e.attr("lay-percent");e.css("width",function(){return/^.+\/.+$/.test(l)?100*new Function("return "+l)()+"%":l}()),i.attr("lay-showPercent")&&setTimeout(function(){e.html(''+l+"")},350)})},collapse:function(){var t="layui-collapse";a("."+t+l).each(function(){var t=a(this).find(".layui-colla-item");t.each(function(){var t=a(this),i=t.find(".layui-colla-title"),e=t.find(".layui-colla-content"),l="none"===e.css("display");i.find(".layui-colla-icon").remove(),i.append(''+(l?"":"")+""),i.off("click",f.collapse).on("click",f.collapse)})})}};return s[t]?s[t]():layui.each(s,function(t,a){a()})},s.prototype.render=s.prototype.init;var p=new s,b=a(document);p.render();var v=".layui-tab-title li";b.on("click",v,f.tabClick),b.on("click",f.hideTabMore),a(window).on("resize",f.tabAuto),t(e,p)}); \ No newline at end of file diff --git a/public/static/xadmin/lib/layui/lay/modules/flow.js b/public/static/xadmin/lib/layui/lay/modules/flow.js new file mode 100644 index 00000000..8a80c05d --- /dev/null +++ b/public/static/xadmin/lib/layui/lay/modules/flow.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)}); \ No newline at end of file diff --git a/public/static/xadmin/lib/layui/lay/modules/form.js b/public/static/xadmin/lib/layui/lay/modules/form.js new file mode 100644 index 00000000..daa8ce5b --- /dev/null +++ b/public/static/xadmin/lib/layui/lay/modules/form.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define("layer",function(e){"use strict";var t=layui.$,i=layui.layer,a=layui.hint(),n=layui.device(),l="form",r=".layui-form",s="layui-this",o="layui-hide",c="layui-disabled",u=function(){this.config={verify:{required:[/[\S]+/,"必填项不能为空"],phone:[/^1\d{10}$/,"请输入正确的手机号"],email:[/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,"邮箱格式不正确"],url:[/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/,"链接格式不正确"],number:function(e){if(!e||isNaN(e))return"只能填写数字"},date:[/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/,"日期格式不正确"],identity:[/(^\d{15}$)|(^\d{17}(x|X|\d)$)/,"请输入正确的身份证号"]}}};u.prototype.set=function(e){var i=this;return t.extend(!0,i.config,e),i},u.prototype.verify=function(e){var i=this;return t.extend(!0,i.config.verify,e),i},u.prototype.on=function(e,t){return layui.onevent.call(this,l,e,t)},u.prototype.val=function(e,i){var a=t(r+'[lay-filter="'+e+'"]');a.each(function(e,a){var n=t(this);layui.each(i,function(e,t){var i,a=n.find('[name="'+e+'"]');a[0]&&(i=a[0].type,"checkbox"===i?a[0].checked=t:"radio"===i?a.each(function(){this.value===t&&(this.checked=!0)}):a.val(t))})}),f.render(null,e)},u.prototype.render=function(e,i){var n=this,u=t(r+function(){return i?'[lay-filter="'+i+'"]':""}()),d={select:function(){var e,i="请选择",a="layui-form-select",n="layui-select-title",r="layui-select-none",d="",f=u.find("select"),v=function(i,l){t(i.target).parent().hasClass(n)&&!l||(t("."+a).removeClass(a+"ed "+a+"up"),e&&d&&e.val(d)),e=null},y=function(i,u,f){var y,p=t(this),m=i.find("."+n),k=m.find("input"),x=i.find("dl"),g=x.children("dd"),b=this.selectedIndex;if(!u){var C=function(){var e=i.offset().top+i.outerHeight()+5-h.scrollTop(),t=x.outerHeight();b=p[0].selectedIndex,i.addClass(a+"ed"),g.removeClass(o),y=null,g.eq(b).addClass(s).siblings().removeClass(s),e+t>h.height()&&e>=t&&i.addClass(a+"up"),$()},w=function(e){i.removeClass(a+"ed "+a+"up"),k.blur(),y=null,e||T(k.val(),function(e){var i=p[0].selectedIndex;e&&(d=t(p[0].options[i]).html(),0===i&&d===k.attr("placeholder")&&(d=""),k.val(d||""))})},$=function(){var e=x.children("dd."+s);if(e[0]){var t=e.position().top,i=x.height(),a=e.height();t>i&&x.scrollTop(t+x.scrollTop()-i+a-5),t<0&&x.scrollTop(t+x.scrollTop()-5)}};m.on("click",function(e){i.hasClass(a+"ed")?w():(v(e,!0),C()),x.find("."+r).remove()}),m.find(".layui-edge").on("click",function(){k.focus()}),k.on("keyup",function(e){var t=e.keyCode;9===t&&C()}).on("keydown",function(e){var t=e.keyCode;9===t&&w();var i=function(t,a){var n,l;e.preventDefault();var r=function(){var e=x.children("dd."+s);if(x.children("dd."+o)[0]&&"next"===t){var i=x.children("dd:not(."+o+",."+c+")"),n=i.eq(0).index();if(n>=0&&n无匹配项

                                  '):x.find("."+r).remove()},"keyup"),""===t&&x.find("."+r).remove(),void $())};f&&k.on("keyup",j).on("blur",function(i){var a=p[0].selectedIndex;e=k,d=t(p[0].options[a]).html(),0===a&&d===k.attr("placeholder")&&(d=""),setTimeout(function(){T(k.val(),function(e){d||k.val("")},"blur")},200)}),g.on("click",function(){var e=t(this),a=e.attr("lay-value"),n=p.attr("lay-filter");return!e.hasClass(c)&&(e.hasClass("layui-select-tips")?k.val(""):(k.val(e.text()),e.addClass(s)),e.siblings().removeClass(s),p.val(a).removeClass("layui-form-danger"),layui.event.call(this,l,"select("+n+")",{elem:p[0],value:a,othis:i}),w(!0),!1)}),i.find("dl>dt").on("click",function(e){return!1}),t(document).off("click",v).on("click",v)}};f.each(function(e,l){var r=t(this),o=r.next("."+a),u=this.disabled,d=l.value,f=t(l.options[l.selectedIndex]),v=l.options[0];if("string"==typeof r.attr("lay-ignore"))return r.show();var h="string"==typeof r.attr("lay-search"),p=v?v.value?i:v.innerHTML||i:i,m=t(['
                                  ','
                                  ','','
                                  ','
                                  ',function(e){var t=[];return layui.each(e,function(e,a){0!==e||a.value?"optgroup"===a.tagName.toLowerCase()?t.push("
                                  "+a.label+"
                                  "):t.push('
                                  '+a.innerHTML+"
                                  "):t.push('
                                  '+(a.innerHTML||i)+"
                                  ")}),0===t.length&&t.push('
                                  没有选项
                                  '),t.join("")}(r.find("*"))+"
                                  ","
                                  "].join(""));o[0]&&o.remove(),r.after(m),y.call(this,m,u,h)})},checkbox:function(){var e={checkbox:["layui-form-checkbox","layui-form-checked","checkbox"],_switch:["layui-form-switch","layui-form-onswitch","switch"]},i=u.find("input[type=checkbox]"),a=function(e,i){var a=t(this);e.on("click",function(){var t=a.attr("lay-filter"),n=(a.attr("lay-text")||"").split("|");a[0].disabled||(a[0].checked?(a[0].checked=!1,e.removeClass(i[1]).find("em").text(n[1])):(a[0].checked=!0,e.addClass(i[1]).find("em").text(n[0])),layui.event.call(a[0],l,i[2]+"("+t+")",{elem:a[0],value:a[0].value,othis:e}))})};i.each(function(i,n){var l=t(this),r=l.attr("lay-skin"),s=(l.attr("lay-text")||"").split("|"),o=this.disabled;"switch"===r&&(r="_"+r);var u=e[r]||e.checkbox;if("string"==typeof l.attr("lay-ignore"))return l.show();var d=l.next("."+u[0]),f=t(['
                                  ",function(){var e=n.title.replace(/\s/g,""),t={checkbox:[e?""+n.title+"":"",''].join(""),_switch:""+((n.checked?s[0]:s[1])||"")+""};return t[r]||t.checkbox}(),"
                                  "].join(""));d[0]&&d.remove(),l.after(f),a.call(this,f,u)})},radio:function(){var e="layui-form-radio",i=["",""],a=u.find("input[type=radio]"),n=function(a){var n=t(this),s="layui-anim-scaleSpring";a.on("click",function(){var o=n[0].name,c=n.parents(r),u=n.attr("lay-filter"),d=c.find("input[name="+o.replace(/(\.|#|\[|\])/g,"\\$1")+"]");n[0].disabled||(layui.each(d,function(){var a=t(this).next("."+e);this.checked=!1,a.removeClass(e+"ed"),a.find(".layui-icon").removeClass(s).html(i[1])}),n[0].checked=!0,a.addClass(e+"ed"),a.find(".layui-icon").addClass(s).html(i[0]),layui.event.call(n[0],l,"radio("+u+")",{elem:n[0],value:n[0].value,othis:a}))})};a.each(function(a,l){var r=t(this),s=r.next("."+e),o=this.disabled;if("string"==typeof r.attr("lay-ignore"))return r.show();s[0]&&s.remove();var u=t(['
                                  ',''+i[l.checked?0:1]+"","
                                  "+function(){var e=l.title||"";return"string"==typeof r.next().attr("lay-radio")&&(e=r.next().html(),r.next().remove()),e}()+"
                                  ","
                                  "].join(""));r.after(u),n.call(this,u)})}};return e?d[e]?d[e]():a.error("不支持的"+e+"表单渲染"):layui.each(d,function(e,t){t()}),n};var d=function(){var e=t(this),a=f.config.verify,s=null,o="layui-form-danger",c={},u=e.parents(r),d=u.find("*[lay-verify]"),v=e.parents("form")[0],h=u.find("input,select,textarea"),y=e.attr("lay-filter");if(layui.each(d,function(e,l){var r=t(this),c=r.attr("lay-verify").split("|"),u=r.attr("lay-verType"),d=r.val();if(r.removeClass(o),layui.each(c,function(e,t){var c,f="",v="function"==typeof a[t];if(a[t]){var c=v?f=a[t](d,l):!a[t][0].test(d);if(f=f||a[t][1],c)return"tips"===u?i.tips(f,function(){return"string"==typeof r.attr("lay-ignore")||"select"!==l.tagName.toLowerCase()&&!/^checkbox|radio$/.test(l.type)?r:r.next()}(),{tips:1}):"alert"===u?i.alert(f,{title:"提示",shadeClose:!0}):i.msg(f,{icon:5,shift:6}),n.android||n.ios||l.focus(),r.addClass(o),s=!0}}),s)return s}),s)return!1;var p={};return layui.each(h,function(e,t){if(t.name=(t.name||"").replace(/^\s*|\s*&/,""),t.name){if(/^.*\[\]$/.test(t.name)){var i=t.name.match(/^(.*)\[\]$/g)[0];p[i]=0|p[i],t.name=t.name.replace(/^(.*)\[\]$/,"$1["+p[i]++ +"]")}/^checkbox|radio$/.test(t.type)&&!t.checked||(c[t.name]=t.value)}}),layui.event.call(this,l,"submit("+y+")",{elem:this,form:v,field:c})},f=new u,v=t(document),h=t(window);f.render(),v.on("reset",r,function(){var e=t(this).attr("lay-filter");setTimeout(function(){f.render(null,e)},50)}),v.on("submit",r,d).on("click","*[lay-submit]",d),e(l,f)}); \ No newline at end of file diff --git a/public/static/xadmin/lib/layui/lay/modules/jquery.js b/public/static/xadmin/lib/layui/lay/modules/jquery.js new file mode 100644 index 00000000..242696a4 --- /dev/null +++ b/public/static/xadmin/lib/layui/lay/modules/jquery.js @@ -0,0 +1,5 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=pe.type(e);return"function"!==n&&!pe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Ce.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function i(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t={};return pe.each(e.match(De)||[],function(e,n){t[n]=!0}),t}function a(){re.addEventListener?(re.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(re.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(re.addEventListener||"load"===e.event.type||"complete"===re.readyState)&&(a(),pe.ready())}function u(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(_e,"-$1").toLowerCase();if(n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:qe.test(n)?pe.parseJSON(n):n)}catch(i){}pe.data(e,t,n)}else n=void 0}return n}function l(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(He(e)){var i,o,a=pe.expando,s=e.nodeType,u=s?pe.cache:e,l=s?e[a]:e[a]&&a;if(l&&u[l]&&(r||u[l].data)||void 0!==n||"string"!=typeof t)return l||(l=s?e[a]=ne.pop()||pe.guid++:a),u[l]||(u[l]=s?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(r?u[l]=pe.extend(u[l],t):u[l].data=pe.extend(u[l].data,t)),o=u[l],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[pe.camelCase(t)]=n),"string"==typeof t?(i=o[t],null==i&&(i=o[pe.camelCase(t)])):i=o,i}}function f(e,t,n){if(He(e)){var r,i,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in r?t=[t]:(t=pe.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!l(r):!pe.isEmptyObject(r))return}(n||(delete a[s].data,l(a[s])))&&(o?pe.cleanData([e],!0):fe.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function d(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return pe.css(e,t,"")},u=s(),l=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==l&&+u)&&Me.exec(pe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do o=o||".5",c/=o,pe.style(e,t,c+l);while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function p(e){var t=ze.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,r,i=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||pe.nodeName(r,t)?o.push(r):pe.merge(o,h(r,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function g(e,t){for(var n,r=0;null!=(n=e[r]);r++)pe._data(n,"globalEval",!t||pe._data(t[r],"globalEval"))}function m(e){Be.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t,n,r,i){for(var o,a,s,u,l,c,f,d=e.length,y=p(t),v=[],x=0;x"!==f[1]||Ve.test(a)?0:u:u.firstChild,o=a&&a.childNodes.length;o--;)pe.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(pe.merge(v,u.childNodes),u.textContent="";u.firstChild;)u.removeChild(u.firstChild);u=y.lastChild}else v.push(t.createTextNode(a));for(u&&y.removeChild(u),fe.appendChecked||pe.grep(h(v,"input"),m),x=0;a=v[x++];)if(r&&pe.inArray(a,r)>-1)i&&i.push(a);else if(s=pe.contains(a.ownerDocument,a),u=h(y.appendChild(a),"script"),s&&g(u),n)for(o=0;a=u[o++];)Ie.test(a.type||"")&&n.push(a);return u=null,y}function v(){return!0}function x(){return!1}function b(){try{return re.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=x;else if(!i)return e;return 1===o&&(a=i,i=function(e){return pe().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,i,r,n)})}function T(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function C(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function E(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function N(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,r,i,o=pe._data(e),a=pe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;r1&&"string"==typeof p&&!fe.checkClone&&rt.test(p))return e.each(function(i){var o=e.eq(i);g&&(t[0]=p.call(this,i,o.html())),S(o,t,n,r)});if(f&&(l=y(t,e[0].ownerDocument,!1,e,r),i=l.firstChild,1===l.childNodes.length&&(l=i),i||r)){for(s=pe.map(h(l,"script"),C),a=s.length;c")).appendTo(t.documentElement),t=(ut[0].contentWindow||ut[0].contentDocument).document,t.write(),t.close(),n=D(e,t),ut.detach()),lt[e]=n),n}function L(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function H(e){if(e in Et)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=Ct.length;n--;)if(e=Ct[n]+t,e in Et)return e}function q(e,t){for(var n,r,i,o=[],a=0,s=e.length;a=0&&n=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==pe.type(e)||e.nodeType||pe.isWindow(e))return!1;try{if(e.constructor&&!ce.call(e,"constructor")&&!ce.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(!fe.ownFirst)for(t in e)return ce.call(e,t);for(t in e);return void 0===t||ce.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ue[le.call(e)]||"object":typeof e},globalEval:function(t){t&&pe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ge,"ms-").replace(me,ye)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,i=0;if(n(e))for(r=e.length;iT.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[P]=!0,e}function i(e){var t=H.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)T.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||V)-(~e.sourceIndex||V);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function d(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var i=0,o=n.length;i-1&&(r[l]=!(a[l]=f))}}else x=m(x===a?x.splice(h,x.length):x),o?o(null,a,x,u):Q.apply(a,x)})}function v(e){for(var t,n,r,i=e.length,o=T.relative[e[0].type],a=o||T.relative[" "],s=o?1:0,u=p(function(e){return e===t},a,!0),l=p(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s1&&h(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,h="0",g=r&&[],y=[],v=A,x=r||o&&T.find.TAG("*",l),b=W+=null==v?1:Math.random()||.1,w=x.length;for(l&&(A=a===H||a||l);h!==w&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===H||(L(c),s=!_);d=e[f++];)if(d(c,a||H,s)){u.push(c);break}l&&(W=b)}i&&((c=!d&&c)&&p--,r&&g.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(g,y,a,s);if(r){if(p>0)for(;h--;)g[h]||y[h]||(y[h]=G.call(u));y=m(y)}Q.apply(u,y),l&&!r&&y.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(W=b,A=v),g};return i?r(a):a}var b,w,T,C,E,N,k,S,A,D,j,L,H,q,_,F,M,O,R,P="sizzle"+1*new Date,B=e.document,W=0,I=0,$=n(),z=n(),X=n(),U=function(e,t){return e===t&&(j=!0),0},V=1<<31,Y={}.hasOwnProperty,J=[],G=J.pop,K=J.push,Q=J.push,Z=J.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),de=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,xe=/'|\\/g,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Te=function(){L()};try{Q.apply(J=Z.call(B.childNodes),B.childNodes),J[B.childNodes.length].nodeType}catch(Ce){Q={apply:J.length?function(e,t){K.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}w=t.support={},E=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},L=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:B;return r!==H&&9===r.nodeType&&r.documentElement?(H=r,q=H.documentElement,_=!E(H),(n=H.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Te,!1):n.attachEvent&&n.attachEvent("onunload",Te)),w.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=i(function(e){return e.appendChild(H.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=me.test(H.getElementsByClassName),w.getById=i(function(e){return q.appendChild(e).id=P,!H.getElementsByName||!H.getElementsByName(P).length}),w.getById?(T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&_){var n=t.getElementById(e);return n?[n]:[]}},T.filter.ID=function(e){var t=e.replace(be,we);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(be,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},T.find.CLASS=w.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&_)return t.getElementsByClassName(e)},M=[],F=[],(w.qsa=me.test(H.querySelectorAll))&&(i(function(e){q.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||F.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+P+"-]").length||F.push("~="),e.querySelectorAll(":checked").length||F.push(":checked"),e.querySelectorAll("a#"+P+"+*").length||F.push(".#.+[+~]")}),i(function(e){var t=H.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&F.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||F.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),F.push(",.*:")})),(w.matchesSelector=me.test(O=q.matches||q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&i(function(e){w.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),M.push("!=",oe)}),F=F.length&&new RegExp(F.join("|")),M=M.length&&new RegExp(M.join("|")),t=me.test(q.compareDocumentPosition),R=t||me.test(q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return j=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===H||e.ownerDocument===B&&R(B,e)?-1:t===H||t.ownerDocument===B&&R(B,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return j=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===H?-1:t===H?1:i?-1:o?1:D?ee(D,e)-ee(D,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===B?-1:u[r]===B?1:0},H):H},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==H&&L(e),n=n.replace(ce,"='$1']"),w.matchesSelector&&_&&!X[n+" "]&&(!M||!M.test(n))&&(!F||!F.test(n)))try{var r=O.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,H,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==H&&L(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==H&&L(e);var n=T.attrHandle[t.toLowerCase()],r=n&&Y.call(T.attrHandle,t.toLowerCase())?n(e,t,!_):void 0;return void 0!==r?r:w.attributes||!_?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(j=!w.detectDuplicates,D=!w.sortStable&&e.slice(0),e.sort(U),j){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return D=null,e},C=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=C(t);return n},T=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,we),e[3]=(e[3]||e[4]||e[5]||"").replace(be,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=N(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s,x=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(d=m,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}), +l=c[e]||[],p=l[0]===W&&l[1],x=p&&l[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[W,p,x];break}}else if(v&&(d=t,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===W&&l[1],x=p),x===!1)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==y:1!==d.nodeType)||!++x||(v&&(f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[W,x]),d!==t)););return x-=i,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[P]?o(n):o.length>1?(i=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=ee(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=k(e.replace(se,"$1"));return i[P]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(be,we),function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,we).toLowerCase(),function(t){var n;do if(n=_?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(a=o[0]).type&&w.getById&&9===t.nodeType&&_&&T.relative[o[1].type]){if(t=(T.find.ID(a.matches[0].replace(be,we),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!T.relative[s=a.type]);)if((u=T.find[s])&&(r=u(a.matches[0].replace(be,we),ve.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return Q.apply(n,r),n;break}}return(l||k(e,f))(r,t,!_,n,!t||ve.test(e)&&c(t.parentNode)||t),n},w.sortStable=P.split("").sort(U).join("")===P,w.detectDuplicates=!!j,L(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(H.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);pe.find=ve,pe.expr=ve.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=ve.uniqueSort,pe.text=ve.getText,pe.isXMLDoc=ve.isXML,pe.contains=ve.contains;var xe=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&pe(e).is(n))break;r.push(e)}return r},be=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},we=pe.expr.match.needsContext,Te=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Ce=/^.[^:#\[\.,]*$/;pe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?pe.find.matchesSelector(r,e)?[r]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;t1?pe.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&we.test(e)?pe(e):e||[],!1).length}});var Ee,Ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ke=pe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ee,"string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Ne.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:re,!0)),Te.test(r[1])&&pe.isPlainObject(t))for(r in t)pe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(i=re.getElementById(r[2]),i&&i.parentNode){if(i.id!==r[2])return Ee.find(e);this.length=1,this[0]=i}return this.context=re,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):pe.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(pe):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),pe.makeArray(e,this))};ke.prototype=pe.fn,Ee=pe(re);var Se=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t,n=pe(e,this),r=n.length;return this.filter(function(){for(t=0;t-1:1===n.nodeType&&pe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?pe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?pe.inArray(this[0],pe(e)):pe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return xe(e,"parentNode")},parentsUntil:function(e,t,n){return xe(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return xe(e,"nextSibling")},prevAll:function(e){return xe(e,"previousSibling")},nextUntil:function(e,t,n){return xe(e,"nextSibling",n)},prevUntil:function(e,t,n){return xe(e,"previousSibling",n)},siblings:function(e){return be((e.parentNode||{}).firstChild,e)},children:function(e){return be(e.firstChild)},contents:function(e){return pe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:pe.merge([],e.childNodes)}},function(e,t){pe.fn[e]=function(n,r){var i=pe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=pe.filter(r,i)),this.length>1&&(Ae[e]||(i=pe.uniqueSort(i)),Se.test(e)&&(i=i.reverse())),this.pushStack(i)}});var De=/\S+/g;pe.Callbacks=function(e){e="string"==typeof e?o(e):pe.extend({},e);var t,n,r,i,a=[],s=[],u=-1,l=function(){for(i=e.once,r=t=!0;s.length;u=-1)for(n=s.shift();++u-1;)a.splice(n,1),n<=u&&u--}),this},has:function(e){return e?pe.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=!0,n||c.disable(),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},pe.extend({Deferred:function(e){var t=[["resolve","done",pe.Callbacks("once memory"),"resolved"],["reject","fail",pe.Callbacks("once memory"),"rejected"],["notify","progress",pe.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return pe.Deferred(function(n){pe.each(t,function(t,o){var a=pe.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?pe.extend(e,r):r}},i={};return r.pipe=r.then,pe.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=ie.call(arguments),a=o.length,s=1!==a||e&&pe.isFunction(e.promise)?a:0,u=1===s?e:pe.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?ie.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);i0||(je.resolveWith(re,[pe]),pe.fn.triggerHandler&&(pe(re).triggerHandler("ready"),pe(re).off("ready"))))}}),pe.ready.promise=function(t){if(!je)if(je=pe.Deferred(),"complete"===re.readyState||"loading"!==re.readyState&&!re.documentElement.doScroll)e.setTimeout(pe.ready);else if(re.addEventListener)re.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s);else{re.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&re.documentElement}catch(r){}n&&n.doScroll&&!function i(){if(!pe.isReady){try{n.doScroll("left")}catch(t){return e.setTimeout(i,50)}a(),pe.ready()}}()}return je.promise(t)},pe.ready.promise();var Le;for(Le in pe(fe))break;fe.ownFirst="0"===Le,fe.inlineBlockNeedsLayout=!1,pe(function(){var e,t,n,r;n=re.getElementsByTagName("body")[0],n&&n.style&&(t=re.createElement("div"),r=re.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",fe.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=re.createElement("div");fe.deleteExpando=!0;try{delete e.test}catch(t){fe.deleteExpando=!1}e=null}();var He=function(e){var t=pe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||t!==!0&&e.getAttribute("classid")===t)},qe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,_e=/([A-Z])/g;pe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?pe.cache[e[pe.expando]]:e[pe.expando],!!e&&!l(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return f(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return f(e,t,!0)}}),pe.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=pe.data(o),1===o.nodeType&&!pe._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=pe.camelCase(r.slice(5)),u(o,r,i[r])));pe._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){pe.data(this,e)}):arguments.length>1?this.each(function(){pe.data(this,e,t)}):o?u(o,e,pe.data(o,e)):void 0},removeData:function(e){return this.each(function(){pe.removeData(this,e)})}}),pe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=pe._data(e,t),n&&(!r||pe.isArray(n)?r=pe._data(e,t,pe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=pe.queue(e,t),r=n.length,i=n.shift(),o=pe._queueHooks(e,t),a=function(){pe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return pe._data(e,n)||pe._data(e,n,{empty:pe.Callbacks("once memory").add(function(){pe._removeData(e,t+"queue"),pe._removeData(e,n)})})}}),pe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length
                                  a",fe.leadingWhitespace=3===e.firstChild.nodeType,fe.tbody=!e.getElementsByTagName("tbody").length,fe.htmlSerialize=!!e.getElementsByTagName("link").length,fe.html5Clone="<:nav>"!==re.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,t.appendChild(n),fe.appendChecked=n.checked,e.innerHTML="",fe.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,t.appendChild(e),n=re.createElement("input"),n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),fe.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.noCloneEvent=!!e.addEventListener,e[pe.expando]=1,fe.attributes=!e.getAttribute(pe.expando)}();var Xe={option:[1,""],legend:[1,"
                                  ","
                                  "],area:[1,"",""],param:[1,"",""],thead:[1,"","
                                  "],tr:[2,"","
                                  "],col:[2,"","
                                  "],td:[3,"","
                                  "],_default:fe.htmlSerialize?[0,"",""]:[1,"X
                                  ","
                                  "]};Xe.optgroup=Xe.option,Xe.tbody=Xe.tfoot=Xe.colgroup=Xe.caption=Xe.thead,Xe.th=Xe.td;var Ue=/<|&#?\w+;/,Ve=/-1&&(h=p.split("."),p=h.shift(),h.sort()),a=p.indexOf(":")<0&&"on"+p,t=t[pe.expando]?t:new pe.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:pe.makeArray(n,[t]),l=pe.event.special[p]||{},i||!l.trigger||l.trigger.apply(r,n)!==!1)){if(!i&&!l.noBubble&&!pe.isWindow(r)){for(u=l.delegateType||p,Ke.test(u+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),c=s;c===(r.ownerDocument||re)&&d.push(c.defaultView||c.parentWindow||e)}for(f=0;(s=d[f++])&&!t.isPropagationStopped();)t.type=f>1?u:l.bindType||p,o=(pe._data(s,"events")||{})[t.type]&&pe._data(s,"handle"),o&&o.apply(s,n),o=a&&s[a],o&&o.apply&&He(s)&&(t.result=o.apply(s,n),t.result===!1&&t.preventDefault());if(t.type=p,!i&&!t.isDefaultPrevented()&&(!l._default||l._default.apply(d.pop(),n)===!1)&&He(r)&&a&&r[p]&&!pe.isWindow(r)){c=r[a],c&&(r[a]=null),pe.event.triggered=p;try{r[p]()}catch(g){}pe.event.triggered=void 0,c&&(r[a]=c)}return t.result}},dispatch:function(e){e=pe.event.fix(e);var t,n,r,i,o,a=[],s=ie.call(arguments),u=(pe._data(this,"events")||{})[e.type]||[],l=pe.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(a=pe.event.handlers.call(this,e,u),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,r=((pe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(r=[],n=0;n-1:pe.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&a.push({elem:u,handlers:r})}return s]","i"),tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,nt=/\s*$/g,at=p(re),st=at.appendChild(re.createElement("div"));pe.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1>")},clone:function(e,t,n){var r,i,o,a,s,u=pe.contains(e.ownerDocument,e);if(fe.html5Clone||pe.isXMLDoc(e)||!et.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(st.innerHTML=e.outerHTML,st.removeChild(o=st.firstChild)),!(fe.noCloneEvent&&fe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(r=h(o),s=h(e),a=0;null!=(i=s[a]);++a)r[a]&&k(i,r[a]);if(t)if(n)for(s=s||h(e),r=r||h(o),a=0;null!=(i=s[a]);a++)N(i,r[a]);else N(e,o);return r=h(o,"script"),r.length>0&&g(r,!u&&h(e,"script")),r=s=i=null,o},cleanData:function(e,t){for(var n,r,i,o,a=0,s=pe.expando,u=pe.cache,l=fe.attributes,c=pe.event.special;null!=(n=e[a]);a++)if((t||He(n))&&(i=n[s],o=i&&u[i])){if(o.events)for(r in o.events)c[r]?pe.event.remove(n,r):pe.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l||"undefined"==typeof n.removeAttribute?n[s]=void 0:n.removeAttribute(s),ne.push(i))}}}),pe.fn.extend({domManip:S,detach:function(e){return A(this,e,!0)},remove:function(e){return A(this,e)},text:function(e){return Pe(this,function(e){return void 0===e?pe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||re).createTextNode(e))},null,e,arguments.length)},append:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.appendChild(e)}})},prepend:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&pe.cleanData(h(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&pe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return pe.clone(this,e,t)})},html:function(e){return Pe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Ze,""):void 0;if("string"==typeof e&&!nt.test(e)&&(fe.htmlSerialize||!et.test(e))&&(fe.leadingWhitespace||!$e.test(e))&&!Xe[(We.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e);try{for(;nt",t=l.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",o=0===t[0].offsetHeight,o&&(t[0].style.display="",t[1].style.display="none",o=0===t[0].offsetHeight)),f.removeChild(u)}var n,r,i,o,a,s,u=re.createElement("div"),l=re.createElement("div");l.style&&(l.style.cssText="float:left;opacity:.5",fe.opacity="0.5"===l.style.opacity,fe.cssFloat=!!l.style.cssFloat,l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",fe.clearCloneStyle="content-box"===l.style.backgroundClip,u=re.createElement("div"),u.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",l.innerHTML="",u.appendChild(l),fe.boxSizing=""===l.style.boxSizing||""===l.style.MozBoxSizing||""===l.style.WebkitBoxSizing,pe.extend(fe,{reliableHiddenOffsets:function(){return null==n&&t(),o},boxSizingReliable:function(){return null==n&&t(),i},pixelMarginRight:function(){return null==n&&t(),r},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),a},reliableMarginLeft:function(){return null==n&&t(),s}}))}();var ht,gt,mt=/^(top|right|bottom|left)$/;e.getComputedStyle?(ht=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n.getPropertyValue(t)||n[t]:void 0,""!==a&&void 0!==a||pe.contains(e.ownerDocument,e)||(a=pe.style(e,t)),n&&!fe.pixelMarginRight()&&ft.test(a)&&ct.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o),void 0===a?a:a+""}):pt.currentStyle&&(ht=function(e){return e.currentStyle},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),ft.test(a)&&!mt.test(t)&&(r=s.left,i=e.runtimeStyle,o=i&&i.left,o&&(i.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"});var yt=/alpha\([^)]*\)/i,vt=/opacity\s*=\s*([^)]*)/i,xt=/^(none|table(?!-c[ea]).+)/,bt=new RegExp("^("+Fe+")(.*)$","i"),wt={position:"absolute",visibility:"hidden",display:"block"},Tt={letterSpacing:"0",fontWeight:"400"},Ct=["Webkit","O","Moz","ms"],Et=re.createElement("div").style;pe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=gt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":fe.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=pe.camelCase(t),u=e.style;if(t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];if(o=typeof n,"string"===o&&(i=Me.exec(n))&&i[1]&&(n=d(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(pe.cssNumber[s]?"":"px")),fe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,r)))))try{u[t]=n}catch(l){}}},css:function(e,t,n,r){var i,o,a,s=pe.camelCase(t);return t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=gt(e,t,r)),"normal"===o&&t in Tt&&(o=Tt[t]),""===n||n?(i=parseFloat(o),n===!0||isFinite(i)?i||0:o):o}}),pe.each(["height","width"],function(e,t){pe.cssHooks[t]={get:function(e,n,r){if(n)return xt.test(pe.css(e,"display"))&&0===e.offsetWidth?dt(e,wt,function(){return M(e,t,r)}):M(e,t,r)},set:function(e,n,r){var i=r&&ht(e);return _(e,n,r?F(e,t,r,fe.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,i),i):0)}}}),fe.opacity||(pe.cssHooks.opacity={get:function(e,t){return vt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=pe.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===pe.trim(o.replace(yt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=yt.test(o)?o.replace(yt,i):o+" "+i)}}),pe.cssHooks.marginRight=L(fe.reliableMarginRight,function(e,t){if(t)return dt(e,{display:"inline-block"},gt,[e,"marginRight"])}),pe.cssHooks.marginLeft=L(fe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(gt(e,"marginLeft"))||(pe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-dt(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px"}),pe.each({margin:"",padding:"",border:"Width"},function(e,t){pe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Oe[r]+t]=o[r]||o[r-2]||o[0];return i}},ct.test(e)||(pe.cssHooks[e+t].set=_)}),pe.fn.extend({css:function(e,t){return Pe(this,function(e,t,n){var r,i,o={},a=0;if(pe.isArray(t)){for(r=ht(e),i=t.length;a1)},show:function(){return q(this,!0)},hide:function(){return q(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Re(this)?pe(this).show():pe(this).hide()})}}),pe.Tween=O,O.prototype={constructor:O,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(pe.cssNumber[n]?"":"px")},cur:function(){var e=O.propHooks[this.prop];return e&&e.get?e.get(this):O.propHooks._default.get(this)},run:function(e){var t,n=O.propHooks[this.prop];return this.options.duration?this.pos=t=pe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=O.prototype.init,pe.fx.step={};var Nt,kt,St=/^(?:toggle|show|hide)$/,At=/queueHooks$/;pe.Animation=pe.extend($,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return d(n.elem,e,Me.exec(t),n),n}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(De);for(var n,r=0,i=e.length;r
                                  a",e=n.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),n.appendChild(t),e=n.getElementsByTagName("a")[0],e.style.cssText="top:1px",fe.getSetAttribute="t"!==n.className,fe.style=/top/.test(e.getAttribute("style")),fe.hrefNormalized="/a"===e.getAttribute("href"),fe.checkOn=!!t.value,fe.optSelected=i.selected,fe.enctype=!!re.createElement("form").enctype,r.disabled=!0,fe.optDisabled=!i.disabled,t=re.createElement("input"),t.setAttribute("value",""),fe.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),fe.radioValue="t"===t.value}();var Dt=/\r/g,jt=/[\x20\t\r\n\f]+/g;pe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=pe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,pe(this).val()):e,null==i?i="":"number"==typeof i?i+="":pe.isArray(i)&&(i=pe.map(i,function(e){return null==e?"":e+""})),t=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=pe.valHooks[i.type]||pe.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Dt,""):null==n?"":n)}}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:pe.trim(pe.text(e)).replace(jt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u-1)try{r.selected=n=!0}catch(s){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){if(pe.isArray(t))return e.checked=pe.inArray(pe(e).val(),t)>-1}},fe.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Lt,Ht,qt=pe.expr.attrHandle,_t=/^(?:checked|selected)$/i,Ft=fe.getSetAttribute,Mt=fe.input;pe.fn.extend({attr:function(e,t){return Pe(this,pe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?pe.prop(e,t,n):(1===o&&pe.isXMLDoc(e)||(t=t.toLowerCase(),i=pe.attrHooks[t]||(pe.expr.match.bool.test(t)?Ht:Lt)),void 0!==n?null===n?void pe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=pe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!fe.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(De);if(o&&1===e.nodeType)for(;n=o[i++];)r=pe.propFix[n]||n,pe.expr.match.bool.test(n)?Mt&&Ft||!_t.test(n)?e[r]=!1:e[pe.camelCase("default-"+n)]=e[r]=!1:pe.attr(e,n,""),e.removeAttribute(Ft?n:r)}}),Ht={set:function(e,t,n){return t===!1?pe.removeAttr(e,n):Mt&&Ft||!_t.test(n)?e.setAttribute(!Ft&&pe.propFix[n]||n,n):e[pe.camelCase("default-"+n)]=e[n]=!0,n}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=qt[t]||pe.find.attr;Mt&&Ft||!_t.test(t)?qt[t]=function(e,t,r){var i,o;return r||(o=qt[t],qt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,qt[t]=o),i}:qt[t]=function(e,t,n){if(!n)return e[pe.camelCase("default-"+t)]?t.toLowerCase():null}}),Mt&&Ft||(pe.attrHooks.value={set:function(e,t,n){return pe.nodeName(e,"input")?void(e.defaultValue=t):Lt&&Lt.set(e,t,n)}}),Ft||(Lt={set:function(e,t,n){var r=e.getAttributeNode(n);if(r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n))return t}},qt.id=qt.name=qt.coords=function(e,t,n){var r;if(!n)return(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},pe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:Lt.set},pe.attrHooks.contenteditable={set:function(e,t,n){Lt.set(e,""!==t&&t,n)}},pe.each(["width","height"],function(e,t){pe.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}})),fe.style||(pe.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Ot=/^(?:input|select|textarea|button|object)$/i,Rt=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return Pe(this,pe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=pe.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),pe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,i=pe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=pe.find.attr(e,"tabindex");return t?parseInt(t,10):Ot.test(e.nodeName)||Rt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),fe.hrefNormalized||pe.each(["href","src"],function(e,t){pe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),fe.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),fe.enctype||(pe.propFix.enctype="encoding");var Pt=/[\t\r\n\f]/g;pe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).addClass(e.call(this,t,z(this)))});if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):pe.isFunction(e)?this.each(function(n){pe(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=pe(this),o=e.match(De)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=z(this),t&&pe._data(this,"__className__",t),pe.attr(this,"class",t||e===!1?"":pe._data(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+z(n)+" ").replace(Pt," ").indexOf(t)>-1)return!0;return!1}}),pe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){pe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var Bt=e.location,Wt=pe.now(),It=/\?/,$t=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=pe.trim(t+"");return i&&!pe.trim(i.replace($t,function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")}))?Function("return "+i)():pe.error("Invalid JSON: "+t)},pe.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(r=new e.DOMParser,n=r.parseFromString(t,"text/xml")):(n=new e.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(i){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+t),n};var zt=/#.*$/,Xt=/([?&])_=[^&]*/,Ut=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Vt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Yt=/^(?:GET|HEAD)$/,Jt=/^\/\//,Gt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Kt={},Qt={},Zt="*/".concat("*"),en=Bt.href,tn=Gt.exec(en.toLowerCase())||[];pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:en,type:"GET",isLocal:Vt.test(tn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pe.parseJSON,"text xml":pe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?V(V(e,pe.ajaxSettings),t):V(pe.ajaxSettings,e)},ajaxPrefilter:X(Kt),ajaxTransport:X(Qt),ajax:function(t,n){function r(t,n,r,i){var o,f,v,x,w,C=n;2!==b&&(b=2,u&&e.clearTimeout(u),c=void 0,s=i||"",T.readyState=t>0?4:0,o=t>=200&&t<300||304===t,r&&(x=Y(d,T,r)),x=J(d,x,T,o),o?(d.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(pe.lastModified[a]=w),w=T.getResponseHeader("etag"),w&&(pe.etag[a]=w)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=x.state,f=x.data,v=x.error,o=!v)):(v=C,!t&&C||(C="error",t<0&&(t=0))),T.status=t,T.statusText=(n||C)+"",o?g.resolveWith(p,[f,C,T]):g.rejectWith(p,[T,C,v]),T.statusCode(y),y=void 0,l&&h.trigger(o?"ajaxSuccess":"ajaxError",[T,d,o?f:v]),m.fireWith(p,[T,C]),l&&(h.trigger("ajaxComplete",[T,d]),--pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,d=pe.ajaxSetup({},n),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?pe(p):pe.event,g=pe.Deferred(),m=pe.Callbacks("once memory"),y=d.statusCode||{},v={},x={},b=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!f)for(f={};t=Ut.exec(s);)f[t[1].toLowerCase()]=t[2];t=f[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)y[t]=[y[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return c&&c.abort(t),r(0,t),this}};if(g.promise(T).complete=m.add,T.success=T.done,T.error=T.fail,d.url=((t||d.url||en)+"").replace(zt,"").replace(Jt,tn[1]+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=pe.trim(d.dataType||"*").toLowerCase().match(De)||[""],null==d.crossDomain&&(i=Gt.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===tn[1]&&i[2]===tn[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(tn[3]||("http:"===tn[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=pe.param(d.data,d.traditional)),U(Kt,d,n,T),2===b)return T;l=pe.event&&d.global,l&&0===pe.active++&&pe.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Yt.test(d.type),a=d.url,d.hasContent||(d.data&&(a=d.url+=(It.test(a)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Xt.test(a)?a.replace(Xt,"$1_="+Wt++):a+(It.test(a)?"&":"?")+"_="+Wt++)),d.ifModified&&(pe.lastModified[a]&&T.setRequestHeader("If-Modified-Since",pe.lastModified[a]),pe.etag[a]&&T.setRequestHeader("If-None-Match",pe.etag[a])),(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&T.setRequestHeader("Content-Type",d.contentType),T.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Zt+"; q=0.01":""):d.accepts["*"]);for(o in d.headers)T.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(d.beforeSend.call(p,T,d)===!1||2===b))return T.abort();w="abort";for(o in{success:1,error:1,complete:1})T[o](d[o]);if(c=U(Qt,d,n,T)){if(T.readyState=1,l&&h.trigger("ajaxSend",[T,d]),2===b)return T;d.async&&d.timeout>0&&(u=e.setTimeout(function(){T.abort("timeout")},d.timeout));try{b=1,c.send(v,r)}catch(C){if(!(b<2))throw C;r(-1,C)}}else r(-1,"No Transport");return T},getJSON:function(e,t,n){return pe.get(e,t,n,"json")},getScript:function(e,t){return pe.get(e,void 0,t,"script")}}),pe.each(["get","post"],function(e,t){pe[t]=function(e,n,r,i){return pe.isFunction(n)&&(i=i||r,r=n,n=void 0),pe.ajax(pe.extend({url:e,type:t,dataType:i,data:n,success:r},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},pe.fn.extend({wrapAll:function(e){if(pe.isFunction(e))return this.each(function(t){pe(this).wrapAll(e.call(this,t))});if(this[0]){var t=pe(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return pe.isFunction(e)?this.each(function(t){pe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=pe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=pe.isFunction(e);return this.each(function(n){pe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){pe.nodeName(this,"body")||pe(this).replaceWith(this.childNodes)}).end()}}),pe.expr.filters.hidden=function(e){return fe.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:K(e)},pe.expr.filters.visible=function(e){return!pe.expr.filters.hidden(e)};var nn=/%20/g,rn=/\[\]$/,on=/\r?\n/g,an=/^(?:submit|button|image|reset|file)$/i,sn=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var n,r=[],i=function(e,t){t=pe.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=pe.ajaxSettings&&pe.ajaxSettings.traditional),pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){i(this.name,this.value)});else for(n in e)Q(n,e[n],t,i);return r.join("&").replace(nn,"+")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&sn.test(this.nodeName)&&!an.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=pe(this).val();return null==n?null:pe.isArray(n)?pe.map(n,function(e){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),pe.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return this.isLocal?ee():re.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||ee()}:Z;var un=0,ln={},cn=pe.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in ln)ln[e](void 0,!0)}),fe.cors=!!cn&&"withCredentials"in cn,cn=fe.ajax=!!cn,cn&&pe.ajaxTransport(function(t){if(!t.crossDomain||fe.cors){var n;return{send:function(r,i){var o,a=t.xhr(),s=++un;if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)void 0!==r[o]&&a.setRequestHeader(o,r[o]+"");a.send(t.hasContent&&t.data||null),n=function(e,r){var o,u,l;if(n&&(r||4===a.readyState))if(delete ln[s],n=void 0,a.onreadystatechange=pe.noop,r)4!==a.readyState&&a.abort();else{l={},o=a.status,"string"==typeof a.responseText&&(l.text=a.responseText);try{u=a.statusText}catch(c){u=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=l.text?200:404}l&&i(o,u,l,a.getAllResponseHeaders())},t.async?4===a.readyState?e.setTimeout(n):a.onreadystatechange=ln[s]=n:n()},abort:function(){n&&n(void 0,!0)}}}}),pe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),pe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=re.head||pe("head")[0]||re.documentElement;return{send:function(r,i){t=re.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var fn=[],dn=/(=)\?(?=&|$)|\?\?/;pe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=fn.pop()||pe.expando+"_"+Wt++;return this[e]=!0,e}}),pe.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=t.jsonp!==!1&&(dn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&dn.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=pe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(dn,"$1"+i):t.jsonp!==!1&&(t.url+=(It.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||pe.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?pe(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,fn.push(i)),a&&pe.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),pe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||re;var r=Te.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=y([e],t,i),i&&i.length&&pe(i).remove(),pe.merge([],r.childNodes))};var pn=pe.fn.load;return pe.fn.load=function(e,t,n){if("string"!=typeof e&&pn)return pn.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=pe.trim(e.slice(s,e.length)),e=e.slice(0,s)),pe.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&pe.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?pe("
                                  ").append(pe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},pe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){pe.fn[t]=function(e){return this.on(t,e)}}),pe.expr.filters.animated=function(e){return pe.grep(pe.timers,function(t){return e===t.elem}).length},pe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=pe.css(e,"position"),f=pe(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=pe.css(e,"top"),u=pe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&pe.inArray("auto",[o,u])>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),pe.isFunction(t)&&(t=t.call(e,n,pe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},pe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){pe.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;if(o)return t=o.documentElement,pe.contains(t,i)?("undefined"!=typeof i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=te(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===pe.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),pe.nodeName(e[0],"html")||(n=e.offset()),n.top+=pe.css(e[0],"borderTopWidth",!0),n.left+=pe.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-pe.css(r,"marginTop",!0),left:t.left-n.left-pe.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){ +for(var e=this.offsetParent;e&&!pe.nodeName(e,"html")&&"static"===pe.css(e,"position");)e=e.offsetParent;return e||pt})}}),pe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);pe.fn[e]=function(r){return Pe(this,function(e,r,i){var o=te(e);return void 0===i?o?t in o?o[t]:o.document.documentElement[r]:e[r]:void(o?o.scrollTo(n?pe(o).scrollLeft():i,n?i:pe(o).scrollTop()):e[r]=i)},e,r,arguments.length,null)}}),pe.each(["top","left"],function(e,t){pe.cssHooks[t]=L(fe.pixelPosition,function(e,n){if(n)return n=gt(e,t),ft.test(n)?pe(e).position()[t]+"px":n})}),pe.each({Height:"height",Width:"width"},function(e,t){pe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){pe.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||i===!0?"margin":"border");return Pe(this,function(t,n,r){var i;return pe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?pe.css(t,n,a):pe.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),pe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),pe.fn.size=function(){return this.length},pe.fn.andSelf=pe.fn.addBack,layui.define(function(e){layui.$=pe,e("jquery",pe)}),pe}); \ No newline at end of file diff --git a/public/static/xadmin/lib/layui/lay/modules/laydate.js b/public/static/xadmin/lib/layui/lay/modules/laydate.js new file mode 100644 index 00000000..ae0a591d --- /dev/null +++ b/public/static/xadmin/lib/layui/lay/modules/laydate.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;!function(){"use strict";var e=window.layui&&layui.define,t={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,n=t.length-1,a=n;a>0;a--)if("interactive"===t[a].readyState){e=t[a].src;break}return e||t[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),getStyle:function(e,t){var n=e.currentStyle?e.currentStyle:window.getComputedStyle(e,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](t)},link:function(e,a,i){if(n.path){var r=document.getElementsByTagName("head")[0],o=document.createElement("link");"string"==typeof a&&(i=a);var s=(i||e).replace(/\.|\//g,""),l="layuicss-"+s,d=0;o.rel="stylesheet",o.href=n.path+e,o.id=l,document.getElementById(l)||r.appendChild(o),"function"==typeof a&&!function c(){return++d>80?window.console&&console.error("laydate.css: Invalid"):void(1989===parseInt(t.getStyle(document.getElementById(l),"width"))?a():setTimeout(c,100))}()}}},n={v:"5.0.9",config:{},index:window.laydate&&window.laydate.v?1e5:0,path:t.getPath,set:function(e){var t=this;return t.config=w.extend({},t.config,e),t},ready:function(a){var i="laydate",r="",o=(e?"modules/laydate/":"theme/")+"default/laydate.css?v="+n.v+r;return e?layui.addcss(o,a,i):t.link(o,a,i),this}},a=function(){var e=this;return{hint:function(t){e.hint.call(e,t)},config:e.config}},i="laydate",r=".layui-laydate",o="layui-this",s="laydate-disabled",l="开始日期超出了结束日期
                                  建议重新选择",d=[100,2e5],c="layui-laydate-static",m="layui-laydate-list",u="laydate-selected",h="layui-laydate-hint",y="laydate-day-prev",f="laydate-day-next",p="layui-laydate-footer",g=".laydate-btns-confirm",v="laydate-time-text",D=".laydate-btns-time",T=function(e){var t=this;t.index=++n.index,t.config=w.extend({},t.config,n.config,e),n.ready(function(){t.init()})},w=function(e){return new C(e)},C=function(e){for(var t=0,n="object"==typeof e?[e]:(this.selector=e,document.querySelectorAll(e||null));t0)return n[0].getAttribute(e)}():n.each(function(n,a){a.setAttribute(e,t)})},C.prototype.removeAttr=function(e){return this.each(function(t,n){n.removeAttribute(e)})},C.prototype.html=function(e){return this.each(function(t,n){n.innerHTML=e})},C.prototype.val=function(e){return this.each(function(t,n){n.value=e})},C.prototype.append=function(e){return this.each(function(t,n){"object"==typeof e?n.appendChild(e):n.innerHTML=n.innerHTML+e})},C.prototype.remove=function(e){return this.each(function(t,n){e?n.removeChild(e):n.parentNode.removeChild(n)})},C.prototype.on=function(e,t){return this.each(function(n,a){a.attachEvent?a.attachEvent("on"+e,function(e){e.target=e.srcElement,t.call(a,e)}):a.addEventListener(e,t,!1)})},C.prototype.off=function(e,t){return this.each(function(n,a){a.detachEvent?a.detachEvent("on"+e,t):a.removeEventListener(e,t,!1)})},T.isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0},T.prototype.config={type:"date",range:!1,format:"yyyy-MM-dd",value:null,isInitValue:!0,min:"1900-1-1",max:"2099-12-31",trigger:"focus",show:!1,showBottom:!0,btns:["clear","now","confirm"],lang:"cn",theme:"default",position:null,calendar:!1,mark:{},zIndex:null,done:null,change:null},T.prototype.lang=function(){var e=this,t=e.config,n={cn:{weeks:["日","一","二","三","四","五","六"],time:["时","分","秒"],timeTips:"选择时间",startTime:"开始时间",endTime:"结束时间",dateTips:"返回日期",month:["一","二","三","四","五","六","七","八","九","十","十一","十二"],tools:{confirm:"确定",clear:"清空",now:"现在"}},en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],time:["Hours","Minutes","Seconds"],timeTips:"Select Time",startTime:"Start Time",endTime:"End Time",dateTips:"Select Date",month:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tools:{confirm:"Confirm",clear:"Clear",now:"Now"}}};return n[t.lang]||n.cn},T.prototype.init=function(){var e=this,t=e.config,n="yyyy|y|MM|M|dd|d|HH|H|mm|m|ss|s",a="static"===t.position,i={year:"yyyy",month:"yyyy-MM",date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss"};t.elem=w(t.elem),t.eventElem=w(t.eventElem),t.elem[0]&&(t.range===!0&&(t.range="-"),t.format===i.date&&(t.format=i[t.type]),e.format=t.format.match(new RegExp(n+"|.","g"))||[],e.EXP_IF="",e.EXP_SPLIT="",w.each(e.format,function(t,a){var i=new RegExp(n).test(a)?"\\d{"+function(){return new RegExp(n).test(e.format[0===t?t+1:t-1]||"")?/^yyyy|y$/.test(a)?4:a.length:/^yyyy$/.test(a)?"1,4":/^y$/.test(a)?"1,308":"1,2"}()+"}":"\\"+a;e.EXP_IF=e.EXP_IF+i,e.EXP_SPLIT=e.EXP_SPLIT+"("+i+")"}),e.EXP_IF=new RegExp("^"+(t.range?e.EXP_IF+"\\s\\"+t.range+"\\s"+e.EXP_IF:e.EXP_IF)+"$"),e.EXP_SPLIT=new RegExp("^"+e.EXP_SPLIT+"$",""),e.isInput(t.elem[0])||"focus"===t.trigger&&(t.trigger="click"),t.elem.attr("lay-key")||(t.elem.attr("lay-key",e.index),t.eventElem.attr("lay-key",e.index)),t.mark=w.extend({},t.calendar&&"cn"===t.lang?{"0-1-1":"元旦","0-2-14":"情人","0-3-8":"妇女","0-3-12":"植树","0-4-1":"愚人","0-5-1":"劳动","0-5-4":"青年","0-6-1":"儿童","0-9-10":"教师","0-9-18":"国耻","0-10-1":"国庆","0-12-25":"圣诞"}:{},t.mark),w.each(["min","max"],function(e,n){var a=[],i=[];if("number"==typeof t[n]){var r=t[n],o=(new Date).getTime(),s=864e5,l=new Date(r?r0)return!0;var a=w.elem("div",{"class":"layui-laydate-header"}),i=[function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-prev-y"});return e.innerHTML="",e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-prev-m"});return e.innerHTML="",e}(),function(){var e=w.elem("div",{"class":"laydate-set-ym"}),t=w.elem("span"),n=w.elem("span");return e.appendChild(t),e.appendChild(n),e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-next-m"});return e.innerHTML="",e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-next-y"});return e.innerHTML="",e}()],d=w.elem("div",{"class":"layui-laydate-content"}),c=w.elem("table"),m=w.elem("thead"),u=w.elem("tr");w.each(i,function(e,t){a.appendChild(t)}),m.appendChild(u),w.each(new Array(6),function(e){var t=c.insertRow(0);w.each(new Array(7),function(a){if(0===e){var i=w.elem("th");i.innerHTML=n.weeks[a],u.appendChild(i)}t.insertCell(a)})}),c.insertBefore(m,c.children[0]),d.appendChild(c),r[e]=w.elem("div",{"class":"layui-laydate-main laydate-main-list-"+e}),r[e].appendChild(a),r[e].appendChild(d),o.push(i),s.push(d),l.push(c)}),w(d).html(function(){var e=[],i=[];return"datetime"===t.type&&e.push(''+n.timeTips+""),w.each(t.btns,function(e,r){var o=n.tools[r]||"btn";t.range&&"now"===r||(a&&"clear"===r&&(o="cn"===t.lang?"重置":"Reset"),i.push(''+o+""))}),e.push('"),e.join("")}()),w.each(r,function(e,t){i.appendChild(t)}),t.showBottom&&i.appendChild(d),/^#/.test(t.theme)){var m=w.elem("style"),u=["#{{id}} .layui-laydate-header{background-color:{{theme}};}","#{{id}} .layui-this{background-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,e.elemID).replace(/{{theme}}/g,t.theme);"styleSheet"in m?(m.setAttribute("type","text/css"),m.styleSheet.cssText=u):m.innerHTML=u,w(i).addClass("laydate-theme-molv"),i.appendChild(m)}e.remove(T.thisElemDate),a?t.elem.append(i):(document.body.appendChild(i),e.position()),e.checkDate().calendar(),e.changeEvent(),T.thisElemDate=e.elemID,"function"==typeof t.ready&&t.ready(w.extend({},t.dateTime,{month:t.dateTime.month+1}))},T.prototype.remove=function(e){var t=this,n=(t.config,w("#"+(e||t.elemID)));return n.hasClass(c)||t.checkDate(function(){n.remove()}),t},T.prototype.position=function(){var e=this,t=e.config,n=e.bindElem||t.elem[0],a=n.getBoundingClientRect(),i=e.elem.offsetWidth,r=e.elem.offsetHeight,o=function(e){return e=e?"scrollLeft":"scrollTop",document.body[e]|document.documentElement[e]},s=function(e){return document.documentElement[e?"clientWidth":"clientHeight"]},l=5,d=a.left,c=a.bottom;d+i+l>s("width")&&(d=s("width")-i-l),c+r+l>s()&&(c=a.top>r?a.top-r:s()-r,c-=2*l),t.position&&(e.elem.style.position=t.position),e.elem.style.left=d+("fixed"===t.position?0:o(1))+"px",e.elem.style.top=c+("fixed"===t.position?0:o())+"px"},T.prototype.hint=function(e){var t=this,n=(t.config,w.elem("div",{"class":h}));t.elem&&(n.innerHTML=e||"",w(t.elem).find("."+h).remove(),t.elem.appendChild(n),clearTimeout(t.hinTimer),t.hinTimer=setTimeout(function(){w(t.elem).find("."+h).remove()},3e3))},T.prototype.getAsYM=function(e,t,n){return n?t--:t++,t<0&&(t=11,e--),t>11&&(t=0,e++),[e,t]},T.prototype.systemDate=function(e){var t=e||new Date;return{year:t.getFullYear(),month:t.getMonth(),date:t.getDate(),hours:e?e.getHours():0,minutes:e?e.getMinutes():0,seconds:e?e.getSeconds():0}},T.prototype.checkDate=function(e){var t,a,i=this,r=(new Date,i.config),o=r.dateTime=r.dateTime||i.systemDate(),s=i.bindElem||r.elem[0],l=(i.isInput(s)?"val":"html",i.isInput(s)?s.value:"static"===r.position?"":s.innerHTML),c=function(e){e.year>d[1]&&(e.year=d[1],a=!0),e.month>11&&(e.month=11,a=!0),e.hours>23&&(e.hours=0,a=!0),e.minutes>59&&(e.minutes=0,e.hours++,a=!0),e.seconds>59&&(e.seconds=0,e.minutes++,a=!0),t=n.getEndDate(e.month+1,e.year),e.date>t&&(e.date=t,a=!0)},m=function(e,t,n){var o=["startTime","endTime"];t=(t.match(i.EXP_SPLIT)||[]).slice(1),n=n||0,r.range&&(i[o[n]]=i[o[n]]||{}),w.each(i.format,function(s,l){var c=parseFloat(t[s]);t[s].length必须遵循下述格式:
                                  "+(r.range?r.format+" "+r.range+" "+r.format:r.format)+"
                                  已为你重置"),a=!0):l&&l.constructor===Date?r.dateTime=i.systemDate(l):(r.dateTime=i.systemDate(),delete i.startState,delete i.endState,delete i.startDate,delete i.endDate,delete i.startTime,delete i.endTime),c(o),a&&l&&i.setValue(r.range?i.endDate?i.parse():"":i.parse()),e&&e(),i)},T.prototype.mark=function(e,t){var n,a=this,i=a.config;return w.each(i.mark,function(e,a){var i=e.split("-");i[0]!=t[0]&&0!=i[0]||i[1]!=t[1]&&0!=i[1]||i[2]!=t[2]||(n=a||t[2])}),n&&e.html(''+n+""),a},T.prototype.limit=function(e,t,n,a){var i,r=this,o=r.config,l={},d=o[n>41?"endDate":"dateTime"],c=w.extend({},d,t||{});return w.each({now:c,min:o.min,max:o.max},function(e,t){l[e]=r.newDate(w.extend({year:t.year,month:t.month,date:t.date},function(){var e={};return w.each(a,function(n,a){e[a]=t[a]}),e}())).getTime()}),i=l.nowl.max,e&&e[i?"addClass":"removeClass"](s),i},T.prototype.calendar=function(e){var t,a,i,r=this,s=r.config,l=e||s.dateTime,c=new Date,m=r.lang(),u="date"!==s.type&&"datetime"!==s.type,h=e?1:0,y=w(r.table[h]).find("td"),f=w(r.elemHeader[h][2]).find("span");if(l.yeard[1]&&(l.year=d[1],r.hint("最高只能支持到公元"+d[1]+"年")),r.firstDate||(r.firstDate=w.extend({},l)),c.setFullYear(l.year,l.month,1),t=c.getDay(),a=n.getEndDate(l.month||12,l.year),i=n.getEndDate(l.month+1,l.year),w.each(y,function(e,n){var d=[l.year,l.month],c=0;n=w(n),n.removeAttr("class"),e=t&&e=n.firstDate.year&&(r.month=a.max.month,r.date=a.max.date),n.limit(w(i),r,t),M++}),w(u[f?0:1]).attr("lay-ym",M-8+"-"+T[1]).html(b+p+" - "+(M-1+p))}else if("month"===e)w.each(new Array(12),function(e){var i=w.elem("li",{"lay-ym":e}),s={year:T[0],month:e};e+1==T[1]&&w(i).addClass(o),i.innerHTML=r.month[e]+(f?"月":""),d.appendChild(i),T[0]=n.firstDate.year&&(s.date=a.max.date),n.limit(w(i),s,t)}),w(u[f?0:1]).attr("lay-ym",T[0]+"-"+T[1]).html(T[0]+p);else if("time"===e){var E=function(){w(d).find("ol").each(function(e,a){w(a).find("li").each(function(a,i){n.limit(w(i),[{hours:a},{hours:n[x].hours,minutes:a},{hours:n[x].hours,minutes:n[x].minutes,seconds:a}][e],t,[["hours"],["hours","minutes"],["hours","minutes","seconds"]][e])})}),a.range||n.limit(w(n.footer).find(g),n[x],0,["hours","minutes","seconds"])};a.range?n[x]||(n[x]={hours:0,minutes:0,seconds:0}):n[x]=i,w.each([24,60,60],function(e,t){var a=w.elem("li"),i=["

                                  "+r.time[e]+"

                                    "];w.each(new Array(t),function(t){i.push(""+w.digit(t,2)+"")}),a.innerHTML=i.join("")+"
                                  ",d.appendChild(a)}),E()}if(y&&h.removeChild(y),h.appendChild(d),"year"===e||"month"===e)w(n.elemMain[t]).addClass("laydate-ym-show"),w(d).find("li").on("click",function(){var r=0|w(this).attr("lay-ym");if(!w(this).hasClass(s)){if(0===t)i[e]=r,l&&(n.startDate[e]=r),n.limit(w(n.footer).find(g),null,0);else if(l)n.endDate[e]=r;else{var c="year"===e?n.getAsYM(r,T[1]-1,"sub"):n.getAsYM(T[0],r,"sub");w.extend(i,{year:c[0],month:c[1]})}"year"===a.type||"month"===a.type?(w(d).find("."+o).removeClass(o),w(this).addClass(o),"month"===a.type&&"year"===e&&(n.listYM[t][0]=r,l&&(n[["startDate","endDate"][t]].year=r),n.list("month",t))):(n.checkDate("limit").calendar(),n.closeList()),n.setBtnStatus(),a.range||n.done(null,"change"),w(n.footer).find(D).removeClass(s)}});else{var S=w.elem("span",{"class":v}),k=function(){w(d).find("ol").each(function(e){var t=this,a=w(t).find("li");t.scrollTop=30*(n[x][C[e]]-2),t.scrollTop<=0&&a.each(function(e,n){if(!w(this).hasClass(s))return t.scrollTop=30*(e-2),!0})})},H=w(c[2]).find("."+v);k(),S.innerHTML=a.range?[r.startTime,r.endTime][t]:r.timeTips,w(n.elemMain[t]).addClass("laydate-time-show"),H[0]&&H.remove(),c[2].appendChild(S),w(d).find("ol").each(function(e){var t=this;w(t).find("li").on("click",function(){var r=0|this.innerHTML;w(this).hasClass(s)||(a.range?n[x][C[e]]=r:i[C[e]]=r,w(t).find("."+o).removeClass(o),w(this).addClass(o),E(),k(),(n.endDate||"time"===a.type)&&n.done(null,"change"),n.setBtnStatus())})})}return n},T.prototype.listYM=[],T.prototype.closeList=function(){var e=this;e.config;w.each(e.elemCont,function(t,n){w(this).find("."+m).remove(),w(e.elemMain[t]).removeClass("laydate-ym-show laydate-time-show")}),w(e.elem).find("."+v).remove()},T.prototype.setBtnStatus=function(e,t,n){var a,i=this,r=i.config,o=w(i.footer).find(g),d=r.range&&"date"!==r.type&&"time"!==r.type;d&&(t=t||i.startDate,n=n||i.endDate,a=i.newDate(t).getTime()>i.newDate(n).getTime(),i.limit(null,t)||i.limit(null,n)?o.addClass(s):o[a?"addClass":"removeClass"](s),e&&a&&i.hint("string"==typeof e?l.replace(/日期/g,e):l))},T.prototype.parse=function(e,t){var n=this,a=n.config,i=t||(e?w.extend({},n.endDate,n.endTime):a.range?w.extend({},n.startDate,n.startTime):a.dateTime),r=n.format.concat();return w.each(r,function(e,t){/yyyy|y/.test(t)?r[e]=w.digit(i.year,t.length):/MM|M/.test(t)?r[e]=w.digit(i.month+1,t.length):/dd|d/.test(t)?r[e]=w.digit(i.date,t.length):/HH|H/.test(t)?r[e]=w.digit(i.hours,t.length):/mm|m/.test(t)?r[e]=w.digit(i.minutes,t.length):/ss|s/.test(t)&&(r[e]=w.digit(i.seconds,t.length))}),a.range&&!e?r.join("")+" "+a.range+" "+n.parse(1):r.join("")},T.prototype.newDate=function(e){return e=e||{},new Date(e.year||1,e.month||0,e.date||1,e.hours||0,e.minutes||0,e.seconds||0)},T.prototype.setValue=function(e){var t=this,n=t.config,a=t.bindElem||n.elem[0],i=t.isInput(a)?"val":"html";return"static"===n.position||w(a)[i](e||""),this},T.prototype.stampRange=function(){var e,t,n=this,a=n.config,i=w(n.elem).find("td");if(a.range&&!n.endDate&&w(n.footer).find(g).addClass(s),n.endDate)return e=n.newDate({year:n.startDate.year,month:n.startDate.month,date:n.startDate.date}).getTime(),t=n.newDate({year:n.endDate.year,month:n.endDate.month,date:n.endDate.date}).getTime(),e>t?n.hint(l):void w.each(i,function(a,i){var r=w(i).attr("lay-ymd").split("-"),s=n.newDate({year:r[0],month:r[1]-1,date:r[2]}).getTime();w(i).removeClass(u+" "+o),s!==e&&s!==t||w(i).addClass(w(i).hasClass(y)||w(i).hasClass(f)?u:o),s>e&&s','
                                  '+f+"
                                  ",'
                                  ','',"
                                  ","
                                  "].join(""));return l.ie&&l.ie<8?c.removeClass("layui-hide").addClass(o):(d[0]&&d.remove(),s.call(a,m,c[0],y),c.addClass("layui-hide").after(m),a.index)},c.prototype.getContent=function(t){var e=u(t);if(e[0])return d(e[0].document.body.innerHTML)},c.prototype.getText=function(t){var i=u(t);if(i[0])return e(i[0].document.body).text()},c.prototype.setContent=function(t,i,a){var l=u(t);l[0]&&(a?e(l[0].document.body).append(i):e(l[0].document.body).html(i),layedit.sync(t))},c.prototype.sync=function(t){var i=u(t);if(i[0]){var a=e("#"+i[1].attr("textarea"));a.val(d(i[0].document.body.innerHTML))}},c.prototype.getSelection=function(t){var e=u(t);if(e[0]){var i=m(e[0].document);return document.selection?i.text:i.toString()}};var s=function(t,i,a){var l=this,n=t.find("iframe");n.css({height:a.height}).on("load",function(){var o=n.contents(),r=n.prop("contentWindow"),c=o.find("head"),s=e([""].join("")),u=o.find("body");c.append(s),u.attr("contenteditable","true").css({"min-height":a.height}).html(i.value||""),y.apply(l,[r,n,i,a]),g.call(l,r,t,a)})},u=function(t){var i=e("#LAY_layedit_"+t),a=i.prop("contentWindow");return[a,i]},d=function(t){return 8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),t},y=function(t,a,n,o){var r=t.document,c=e(r.body);c.on("keydown",function(t){var e=t.keyCode;if(13===e){var a=m(r),l=p(a),n=l.parentNode;if("pre"===n.tagName.toLowerCase()){if(t.shiftKey)return;return i.msg("请暂时用shift+enter"),!1}r.execCommand("formatBlock",!1,"

                                  ")}}),e(n).parents("form").on("submit",function(){var t=c.html();8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),n.value=t}),c.on("paste",function(e){r.execCommand("formatBlock",!1,"

                                  "),setTimeout(function(){f.call(t,c),n.value=c.html()},100)})},f=function(t){var i=this;i.document;t.find("*[style]").each(function(){var t=this.style.textAlign;this.removeAttribute("style"),e(this).css({"text-align":t||""})}),t.find("table").addClass("layui-table"),t.find("script,link").remove()},m=function(t){return t.selection?t.selection.createRange():t.getSelection().getRangeAt(0)},p=function(t){return t.endContainer||t.parentElement().childNodes[0]},v=function(t,i,a){var l=this.document,n=document.createElement(t);for(var o in i)n.setAttribute(o,i[o]);if(n.removeAttribute("text"),l.selection){var r=a.text||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.pasteHTML(e(n).prop("outerHTML")),a.select()}else{var r=a.toString()||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.deleteContents(),a.insertNode(n)}},h=function(t,i){var a=this.document,l="layedit-tool-active",n=p(m(a)),o=function(e){return t.find(".layedit-tool-"+e)};i&&i[i.hasClass(l)?"removeClass":"addClass"](l),t.find(">i").removeClass(l),o("unlink").addClass(r),e(n).parents().each(function(){var t=this.tagName.toLowerCase(),e=this.style.textAlign;"b"!==t&&"strong"!==t||o("b").addClass(l),"i"!==t&&"em"!==t||o("i").addClass(l),"u"===t&&o("u").addClass(l),"strike"===t&&o("d").addClass(l),"p"===t&&("center"===e?o("center").addClass(l):"right"===e?o("right").addClass(l):o("left").addClass(l)),"a"===t&&(o("link").addClass(l),o("unlink").removeClass(r))})},g=function(t,a,l){var n=t.document,o=e(n.body),c={link:function(i){var a=p(i),l=e(a).parent();b.call(o,{href:l.attr("href"),target:l.attr("target")},function(e){var a=l[0];"A"===a.tagName?a.href=e.url:v.call(t,"a",{target:e.target,href:e.url,text:e.url},i)})},unlink:function(t){n.execCommand("unlink")},face:function(e){x.call(this,function(i){v.call(t,"img",{src:i.src,alt:i.alt},e)})},image:function(a){var n=this;layui.use("upload",function(o){var r=l.uploadImage||{};o.render({url:r.url,method:r.type,elem:e(n).find("input")[0],done:function(e){0==e.code?(e.data=e.data||{},v.call(t,"img",{src:e.data.src,alt:e.data.title},a)):i.msg(e.msg||"上传失败")}})})},code:function(e){k.call(o,function(i){v.call(t,"pre",{text:i.code,"lay-lang":i.lang},e)})},help:function(){i.open({type:2,title:"帮助",area:["600px","380px"],shadeClose:!0,shade:.1,skin:"layui-layer-msg",content:["http://www.layui.com/about/layedit/help.html","no"]})}},s=a.find(".layui-layedit-tool"),u=function(){var i=e(this),a=i.attr("layedit-event"),l=i.attr("lay-command");if(!i.hasClass(r)){o.focus();var u=m(n);u.commonAncestorContainer;l?(n.execCommand(l),/justifyLeft|justifyCenter|justifyRight/.test(l)&&n.execCommand("formatBlock",!1,"

                                  "),setTimeout(function(){o.focus()},10)):c[a]&&c[a].call(this,u),h.call(t,s,i)}},d=/image/;s.find(">i").on("mousedown",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)||u.call(this)}).on("click",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)&&u.call(this)}),o.on("click",function(){h.call(t,s),i.close(x.index)})},b=function(t,e){var l=this,n=i.open({type:1,id:"LAY_layedit_link",area:"350px",shade:.05,shadeClose:!0,moveType:1,title:"超链接",skin:"layui-layer-msg",content:['

                                    ','
                                  • ','','
                                    ','',"
                                    ","
                                  • ",'
                                  • ','','
                                    ','",'","
                                    ","
                                  • ",'
                                  • ','','',"
                                  • ","
                                  "].join(""),success:function(t,n){var o="submit(layedit-link-yes)";a.render("radio"),t.find(".layui-btn-primary").on("click",function(){i.close(n),l.focus()}),a.on(o,function(t){i.close(b.index),e&&e(t.field)})}});b.index=n},x=function(t){var a=function(){var t=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],e={};return layui.each(t,function(t,i){e[i]=layui.cache.dir+"images/face/"+t+".gif"}),e}();return x.hide=x.hide||function(t){"face"!==e(t.target).attr("layedit-event")&&i.close(x.index)},x.index=i.tips(function(){var t=[];return layui.each(a,function(e,i){t.push('
                                • '+e+'
                                • ')}),'
                                    '+t.join("")+"
                                  "}(),this,{tips:1,time:0,skin:"layui-box layui-util-face",maxWidth:500,success:function(l,n){l.css({marginTop:-4,marginLeft:-10}).find(".layui-clear>li").on("click",function(){t&&t({src:a[this.title],alt:this.title}),i.close(n)}),e(document).off("click",x.hide).on("click",x.hide)}})},k=function(t){var e=this,l=i.open({type:1,id:"LAY_layedit_code",area:"550px",shade:.05,shadeClose:!0,moveType:1,title:"插入代码",skin:"layui-layer-msg",content:['
                                    ','
                                  • ','','
                                    ','","
                                    ","
                                  • ",'
                                  • ','','
                                    ','',"
                                    ","
                                  • ",'
                                  • ','','',"
                                  • ","
                                  "].join(""),success:function(l,n){var o="submit(layedit-code-yes)";a.render("select"),l.find(".layui-btn-primary").on("click",function(){i.close(n),e.focus()}),a.on(o,function(e){i.close(k.index),t&&t(e.field)})}});k.index=l},C={html:'',strong:'',italic:'',underline:'',del:'',"|":'',left:'',center:'',right:'',link:'',unlink:'',face:'',image:'',code:'',help:''},w=new c;t(n,w)}); \ No newline at end of file diff --git a/public/static/xadmin/lib/layui/lay/modules/layer.js b/public/static/xadmin/lib/layui/lay/modules/layer.js new file mode 100644 index 00000000..c6d53784 --- /dev/null +++ b/public/static/xadmin/lib/layui/lay/modules/layer.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}return e||t[i].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(t,i){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(t,i,n){if(r.path){var a=document.getElementsByTagName("head")[0],s=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||t).replace(/\.|\//g,""),f="layuicss-"+l,c=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,document.getElementById(f)||a.appendChild(s),"function"==typeof i&&!function u(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(o.getStyle(document.getElementById(f),"width"))?i():setTimeout(u,100))}()}}},r={v:"3.1.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):o.link("theme/"+e.extend),this):this},ready:function(e){var t="layer",i="",n=(a?"modules/layer/":"theme/")+"default/layer.css?v="+r.v+i;return a?layui.addcss(n,e,t):o.link(n,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'
                                  '+(f?r.title[0]:r.title)+"
                                  ":"";return r.zIndex=s,t([r.shade?'
                                  ':"",'
                                  '+(e&&2!=r.type?"":u)+'
                                  '+(0==r.type&&r.icon!==-1?'':"")+(1==r.type&&e?"":r.content||"")+'
                                  '+function(){var e=c?'':"";return r.closeBtn&&(e+=''),e}()+""+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t'+r.btn[t]+"";return'
                                  '+e+"
                                  "}():"")+(r.resize?'':"")+"
                                  "],u,i('
                                  ')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}if(e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),i("#layui-layer-shade"+e.index).css({"background-color":t.shade[1]||"#000",opacity:t.shade[0]||t.shade}),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]){var u="layer-anim "+l.anim[t.anim];e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){var t=this,a=t.config,o=i("#"+l[0]+e);""===a.area[0]&&a.maxWidth>0&&(r.ie&&r.ie<8&&a.btn&&o.width(o.innerWidth()),o.outerWidth()>a.maxWidth&&o.width(a.maxWidth));var s=[o.innerWidth(),o.innerHeight()],f=o.find(l[1]).outerHeight()||0,c=o.find("."+l[6]).outerHeight()||0,u=function(e){e=o.find(e),e.height(s[1]-f-c-2*(0|parseFloat(e.css("padding-top"))))};switch(a.type){case 2:u("iframe");break;default:""===a.area[1]?a.maxHeight>0&&o.outerHeight()>a.maxHeight?(s[1]=a.maxHeight,u("."+l[5])):a.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return t},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;af&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("isOutAnim")&&t.addClass("layer-anim "+a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),r.ie&&r.ie<10||!t.data("isOutAnim")?f():setTimeout(function(){f()},200)}},r.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return''}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(t){s=t.find(".layui-layer-input"),s.val(e.value||"").focus(),"function"==typeof f&&f(t)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n="layui-this",a=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,a="";if(e>0)for(a=''+t[0].title+"";i"+t[i].title+"";return a}(),content:'
                                    '+function(){var e=t.length,i=1,a="";if(e>0)for(a='
                                  • '+(t[0].content||"no content")+"
                                  • ";i'+(t[i].content||"no content")+"";return a}()+"
                                  ",success:function(t){var o=t.find(".layui-layer-title").children(),r=t.find(".layui-layer-tabmain").children();o.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var a=i(this),o=a.index();a.addClass(n).siblings().removeClass(n),r.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)}),"function"==typeof a&&a(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext()}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]'+(u[d].alt||
                                  '+(u.length>1?'':"")+'
                                  '+(u[d].alt||"")+""+s.imgIndex+"/"+u.length+"
                                  ",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常
                                  是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.$),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window); \ No newline at end of file diff --git a/public/static/xadmin/lib/layui/lay/modules/laypage.js b/public/static/xadmin/lib/layui/lay/modules/laypage.js new file mode 100644 index 00000000..fd07fdae --- /dev/null +++ b/public/static/xadmin/lib/layui/lay/modules/laypage.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define(function(e){"use strict";var a=document,t="getElementById",n="getElementsByTagName",i="laypage",r="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config,t=a.groups="groups"in a?0|a.groups:5;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),t<0?t=1:t>a.pages&&(t=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var n=a.pages>t?Math.ceil((a.curr+(t>1?1:0))/(t>0?t:1)):1,i={prev:function(){return a.prev?''+a.prev+"":""}(),page:function(){var e=[];if(a.count<1)return"";n>1&&a.first!==!1&&0!==t&&e.push(''+(a.first||1)+"");var i=Math.floor((t-1)/2),r=n>1?a.curr-i:1,u=n>1?function(){var e=a.curr+(t-i-1);return e>a.pages?a.pages:e}():t;for(u-r2&&e.push('…');r<=u;r++)r===a.curr?e.push('"+r+""):e.push(''+r+"");return a.pages>t&&a.pages>u&&a.last!==!1&&(u+1…'),0!==t&&e.push(''+(a.last||a.pages)+"")),e.join("")}(),next:function(){return a.next?''+a.next+"":""}(),count:'共 '+a.count+" 条",limit:function(){var e=['"}(),refresh:['','',""].join(""),skip:function(){return['到第','','页',""].join("")}()};return['
                                  ',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"
                                  "].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;oi.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)}); \ No newline at end of file diff --git a/public/static/xadmin/lib/layui/lay/modules/laytpl.js b/public/static/xadmin/lib/layui/lay/modules/laytpl.js new file mode 100644 index 00000000..d482d4eb --- /dev/null +++ b/public/static/xadmin/lib/layui/lay/modules/laytpl.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)}); \ No newline at end of file diff --git a/public/static/xadmin/lib/layui/lay/modules/mobile.js b/public/static/xadmin/lib/layui/lay/modules/mobile.js new file mode 100644 index 00000000..35cfdf07 --- /dev/null +++ b/public/static/xadmin/lib/layui/lay/modules/mobile.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define(function(i){i("layui.mobile",layui.v)});layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)});layui.define(function(e){"use strict";var t=(window,document),i="querySelectorAll",n="getElementsByClassName",a=function(e){return t[i](e)},s={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},l={extend:function(e){var t=JSON.parse(JSON.stringify(s));for(var i in e)t[i]=e[i];return t},timer:{},end:{}};l.touch=function(e,t){e.addEventListener("click",function(e){t.call(this,e)},!1)};var o=0,r=["layui-m-layer"],d=function(e){var t=this;t.config=l.extend(e),t.view()};d.prototype.view=function(){var e=this,i=e.config,s=t.createElement("div");e.id=s.id=r[0]+o,s.setAttribute("class",r[0]+" "+r[0]+(i.type||0)),s.setAttribute("index",o);var l=function(){var e="object"==typeof i.title;return i.title?'

                                  '+(e?i.title[0]:i.title)+"

                                  ":""}(),d=function(){"string"==typeof i.btn&&(i.btn=[i.btn]);var e,t=(i.btn||[]).length;return 0!==t&&i.btn?(e=''+i.btn[0]+"",2===t&&(e=''+i.btn[1]+""+e),'
                                  '+e+"
                                  "):""}();if(i.fixed||(i.top=i.hasOwnProperty("top")?i.top:100,i.style=i.style||"",i.style+=" top:"+(t.body.scrollTop+i.top)+"px"),2===i.type&&(i.content='

                                  '+(i.content||"")+"

                                  "),i.skin&&(i.anim="up"),"msg"===i.skin&&(i.shade=!1),s.innerHTML=(i.shade?"
                                  ':"")+'
                                  "+l+'
                                  '+i.content+"
                                  "+d+"
                                  ",!i.type||2===i.type){var y=t[n](r[0]+i.type),u=y.length;u>=1&&c.close(y[0].getAttribute("index"))}document.body.appendChild(s);var m=e.elem=a("#"+e.id)[0];i.success&&i.success(m),e.index=o++,e.action(i,m)},d.prototype.action=function(e,t){var i=this;e.time&&(l.timer[i.index]=setTimeout(function(){c.close(i.index)},1e3*e.time));var a=function(){var t=this.getAttribute("type");0==t?(e.no&&e.no(),c.close(i.index)):e.yes?e.yes(i.index):c.close(i.index)};if(e.btn)for(var s=t[n]("layui-m-layerbtn")[0].children,o=s.length,r=0;r0&&e-1 in t)}function s(t){return A.call(t,function(t){return null!=t})}function u(t){return t.length>0?T.fn.concat.apply([],t):t}function c(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function l(t){return t in F?F[t]:F[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function f(t,e){return"number"!=typeof e||k[c(t)]?e:e+"px"}function h(t){var e,n;return $[t]||(e=L.createElement(t),L.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),$[t]=n),$[t]}function p(t){return"children"in t?D.call(t.children):T.map(t.childNodes,function(t){if(1==t.nodeType)return t})}function d(t,e){var n,r=t?t.length:0;for(n=0;n]*>/,R=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Z=/^(?:body|html)$/i,q=/([A-Z])/g,H=["val","css","html","text","data","width","height","offset"],I=["after","prepend","before","append"],V=L.createElement("table"),_=L.createElement("tr"),B={tr:L.createElement("tbody"),tbody:V,thead:V,tfoot:V,td:_,th:_,"*":L.createElement("div")},U=/complete|loaded|interactive/,X=/^[\w-]*$/,J={},W=J.toString,Y={},G=L.createElement("div"),K={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},Q=Array.isArray||function(t){return t instanceof Array};return Y.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,i=t.parentNode,o=!i;return o&&(i=G).appendChild(t),r=~Y.qsa(i,e).indexOf(t),o&&G.removeChild(t),r},C=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},N=function(t){return A.call(t,function(e,n){return t.indexOf(e)==n})},Y.fragment=function(t,e,n){var r,i,a;return R.test(t)&&(r=T(L.createElement(RegExp.$1))),r||(t.replace&&(t=t.replace(z,"<$1>")),e===E&&(e=M.test(t)&&RegExp.$1),e in B||(e="*"),a=B[e],a.innerHTML=""+t,r=T.each(D.call(a.childNodes),function(){a.removeChild(this)})),o(n)&&(i=T(r),T.each(n,function(t,e){H.indexOf(t)>-1?i[t](e):i.attr(t,e)})),r},Y.Z=function(t,e){return new d(t,e)},Y.isZ=function(t){return t instanceof Y.Z},Y.init=function(t,n){var r;if(!t)return Y.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&M.test(t))r=Y.fragment(t,RegExp.$1,n),t=null;else{if(n!==E)return T(n).find(t);r=Y.qsa(L,t)}else{if(e(t))return T(L).ready(t);if(Y.isZ(t))return t;if(Q(t))r=s(t);else if(i(t))r=[t],t=null;else if(M.test(t))r=Y.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==E)return T(n).find(t);r=Y.qsa(L,t)}}return Y.Z(r,t)},T=function(t,e){return Y.init(t,e)},T.extend=function(t){var e,n=D.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){m(t,n,e)}),t},Y.qsa=function(t,e){var n,r="#"==e[0],i=!r&&"."==e[0],o=r||i?e.slice(1):e,a=X.test(o);return t.getElementById&&a&&r?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:D.call(a&&!r&&t.getElementsByClassName?i?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},T.contains=L.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},T.type=t,T.isFunction=e,T.isWindow=n,T.isArray=Q,T.isPlainObject=o,T.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},T.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},T.inArray=function(t,e,n){return O.indexOf.call(e,t,n)},T.camelCase=C,T.trim=function(t){return null==t?"":String.prototype.trim.call(t)},T.uuid=0,T.support={},T.expr={},T.noop=function(){},T.map=function(t,e){var n,r,i,o=[];if(a(t))for(r=0;r=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return O.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return e(t)?this.not(this.not(t)):T(A.call(this,function(e){return Y.matches(e,t)}))},add:function(t,e){return T(N(this.concat(T(t,e))))},is:function(t){return this.length>0&&Y.matches(this[0],t)},not:function(t){var n=[];if(e(t)&&t.call!==E)this.each(function(e){t.call(this,e)||n.push(this)});else{var r="string"==typeof t?this.filter(t):a(t)&&e(t.item)?D.call(t):T(t);this.forEach(function(t){r.indexOf(t)<0&&n.push(t)})}return T(n)},has:function(t){return this.filter(function(){return i(t)?T.contains(this,t):T(this).find(t).size()})},eq:function(t){return t===-1?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!i(t)?t:T(t)},last:function(){var t=this[this.length-1];return t&&!i(t)?t:T(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?T(t).filter(function(){var t=this;return O.some.call(n,function(e){return T.contains(e,t)})}):1==this.length?T(Y.qsa(this[0],t)):this.map(function(){return Y.qsa(this,t)}):T()},closest:function(t,e){var n=[],i="object"==typeof t&&T(t);return this.each(function(o,a){for(;a&&!(i?i.indexOf(a)>=0:Y.matches(a,t));)a=a!==e&&!r(a)&&a.parentNode;a&&n.indexOf(a)<0&&n.push(a)}),T(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=T.map(n,function(t){if((t=t.parentNode)&&!r(t)&&e.indexOf(t)<0)return e.push(t),t});return v(e,t)},parent:function(t){return v(N(this.pluck("parentNode")),t)},children:function(t){return v(this.map(function(){return p(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||D.call(this.childNodes)})},siblings:function(t){return v(this.map(function(t,e){return A.call(p(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return T.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=h(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var n=e(t);if(this[0]&&!n)var r=T(t).get(0),i=r.parentNode||this.length>1;return this.each(function(e){T(this).wrapAll(n?t.call(this,e):i?r.cloneNode(!0):r)})},wrapAll:function(t){if(this[0]){T(this[0]).before(t=T(t));for(var e;(e=t.children()).length;)t=e.first();T(t).append(this)}return this},wrapInner:function(t){var n=e(t);return this.each(function(e){var r=T(this),i=r.contents(),o=n?t.call(this,e):t;i.length?i.wrapAll(o):r.append(o)})},unwrap:function(){return this.parent().each(function(){T(this).replaceWith(T(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=T(this);(t===E?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(t){return T(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return T(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;T(this).empty().append(g(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=g(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this.pluck("textContent").join(""):null},attr:function(t,e){var n;return"string"!=typeof t||1 in arguments?this.each(function(n){if(1===this.nodeType)if(i(t))for(j in t)y(this,j,t[j]);else y(this,t,g(this,e,n,this.getAttribute(t)))}):0 in this&&1==this[0].nodeType&&null!=(n=this[0].getAttribute(t))?n:E},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){y(this,t)},this)})},prop:function(t,e){return t=K[t]||t,1 in arguments?this.each(function(n){this[t]=g(this,e,n,this[t])}):this[0]&&this[0][t]},removeProp:function(t){return t=K[t]||t,this.each(function(){delete this[t]})},data:function(t,e){var n="data-"+t.replace(q,"-$1").toLowerCase(),r=1 in arguments?this.attr(n,e):this.attr(n);return null!==r?b(r):E},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each(function(e){this.value=g(this,t,e,this.value)})):this[0]&&(this[0].multiple?T(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var n=T(this),r=g(this,t,e,n.offset()),i=n.offsetParent().offset(),o={top:r.top-i.top,left:r.left-i.left};"static"==n.css("position")&&(o.position="relative"),n.css(o)});if(!this.length)return null;if(L.documentElement!==this[0]&&!T.contains(L.documentElement,this[0]))return{top:0,left:0};var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(e,n){if(arguments.length<2){var r=this[0];if("string"==typeof e){if(!r)return;return r.style[C(e)]||getComputedStyle(r,"").getPropertyValue(e)}if(Q(e)){if(!r)return;var i={},o=getComputedStyle(r,"");return T.each(e,function(t,e){i[e]=r.style[C(e)]||o.getPropertyValue(e)}),i}}var a="";if("string"==t(e))n||0===n?a=c(e)+":"+f(e,n):this.each(function(){this.style.removeProperty(c(e))});else for(j in e)e[j]||0===e[j]?a+=c(j)+":"+f(j,e[j])+";":this.each(function(){this.style.removeProperty(c(j))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf(T(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&O.some.call(this,function(t){return this.test(x(t))},l(t))},addClass:function(t){return t?this.each(function(e){if("className"in this){S=[];var n=x(this),r=g(this,t,e,n);r.split(/\s+/g).forEach(function(t){T(this).hasClass(t)||S.push(t)},this),S.length&&x(this,n+(n?" ":"")+S.join(" "))}}):this},removeClass:function(t){return this.each(function(e){if("className"in this){if(t===E)return x(this,"");S=x(this),g(this,t,e,S).split(/\s+/g).forEach(function(t){S=S.replace(l(t)," ")}),x(this,S.trim())}})},toggleClass:function(t,e){return t?this.each(function(n){var r=T(this),i=g(this,t,n,x(this));i.split(/\s+/g).forEach(function(t){(e===E?!r.hasClass(t):e)?r.addClass(t):r.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return t===E?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return t===E?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),r=Z.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(T(t).css("margin-top"))||0,n.left-=parseFloat(T(t).css("margin-left"))||0,r.top+=parseFloat(T(e[0]).css("border-top-width"))||0,r.left+=parseFloat(T(e[0]).css("border-left-width"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||L.body;t&&!Z.test(t.nodeName)&&"static"==T(t).css("position");)t=t.offsetParent;return t})}},T.fn.detach=T.fn.remove,["width","height"].forEach(function(t){var e=t.replace(/./,function(t){return t[0].toUpperCase()});T.fn[t]=function(i){var o,a=this[0];return i===E?n(a)?a["inner"+e]:r(a)?a.documentElement["scroll"+e]:(o=this.offset())&&o[t]:this.each(function(e){a=T(this),a.css(t,g(this,i,e,a[t]()))})}}),I.forEach(function(e,n){var r=n%2;T.fn[e]=function(){var e,i,o=T.map(arguments,function(n){var r=[];return e=t(n),"array"==e?(n.forEach(function(t){return t.nodeType!==E?r.push(t):T.zepto.isZ(t)?r=r.concat(t.get()):void(r=r.concat(Y.fragment(t)))}),r):"object"==e||null==n?n:Y.fragment(n)}),a=this.length>1;return o.length<1?this:this.each(function(t,e){i=r?e:e.parentNode,e=0==n?e.nextSibling:1==n?e.firstChild:2==n?e:null;var s=T.contains(L.documentElement,i);o.forEach(function(t){if(a)t=t.cloneNode(!0);else if(!i)return T(t).remove();i.insertBefore(t,e),s&&w(t,function(t){if(!(null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src)){var e=t.ownerDocument?t.ownerDocument.defaultView:window;e.eval.call(e,t.innerHTML)}})})})},T.fn[r?e+"To":"insert"+(n?"Before":"After")]=function(t){return T(t)[e](this),this}}),Y.Z.prototype=d.prototype=T.fn,Y.uniq=N,Y.deserializeValue=b,T.zepto=Y,T}();!function(t){function e(t){return t._zid||(t._zid=h++)}function n(t,n,o,a){if(n=r(n),n.ns)var s=i(n.ns);return(v[e(t)]||[]).filter(function(t){return t&&(!n.e||t.e==n.e)&&(!n.ns||s.test(t.ns))&&(!o||e(t.fn)===e(o))&&(!a||t.sel==a)})}function r(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function i(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function o(t,e){return t.del&&!y&&t.e in x||!!e}function a(t){return b[t]||y&&x[t]||t}function s(n,i,s,u,l,h,p){var d=e(n),m=v[d]||(v[d]=[]);i.split(/\s/).forEach(function(e){if("ready"==e)return t(document).ready(s);var i=r(e);i.fn=s,i.sel=l,i.e in b&&(s=function(e){var n=e.relatedTarget;if(!n||n!==this&&!t.contains(this,n))return i.fn.apply(this,arguments)}),i.del=h;var d=h||s;i.proxy=function(t){if(t=c(t),!t.isImmediatePropagationStopped()){t.data=u;var e=d.apply(n,t._args==f?[t]:[t].concat(t._args));return e===!1&&(t.preventDefault(),t.stopPropagation()),e}},i.i=m.length,m.push(i),"addEventListener"in n&&n.addEventListener(a(i.e),i.proxy,o(i,p))})}function u(t,r,i,s,u){var c=e(t);(r||"").split(/\s/).forEach(function(e){n(t,e,i,s).forEach(function(e){delete v[c][e.i],"removeEventListener"in t&&t.removeEventListener(a(e.e),e.proxy,o(e,u))})})}function c(e,n){return!n&&e.isDefaultPrevented||(n||(n=e),t.each(T,function(t,r){var i=n[t];e[t]=function(){return this[r]=w,i&&i.apply(n,arguments)},e[r]=E}),e.timeStamp||(e.timeStamp=Date.now()),(n.defaultPrevented!==f?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(e.isDefaultPrevented=w)),e}function l(t){var e,n={originalEvent:t};for(e in t)j.test(e)||t[e]===f||(n[e]=t[e]);return c(n,t)}var f,h=1,p=Array.prototype.slice,d=t.isFunction,m=function(t){return"string"==typeof t},v={},g={},y="onfocusin"in window,x={focus:"focusin",blur:"focusout"},b={mouseenter:"mouseover",mouseleave:"mouseout"};g.click=g.mousedown=g.mouseup=g.mousemove="MouseEvents",t.event={add:s,remove:u},t.proxy=function(n,r){var i=2 in arguments&&p.call(arguments,2);if(d(n)){var o=function(){return n.apply(r,i?i.concat(p.call(arguments)):arguments)};return o._zid=e(n),o}if(m(r))return i?(i.unshift(n[r],n),t.proxy.apply(null,i)):t.proxy(n[r],n);throw new TypeError("expected function")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var w=function(){return!0},E=function(){return!1},j=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,T={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,n,r,i,o){var a,c,h=this;return e&&!m(e)?(t.each(e,function(t,e){h.on(t,n,r,e,o)}),h):(m(n)||d(i)||i===!1||(i=r,r=n,n=f),i!==f&&r!==!1||(i=r,r=f),i===!1&&(i=E),h.each(function(f,h){o&&(a=function(t){return u(h,t.type,i),i.apply(this,arguments)}),n&&(c=function(e){var r,o=t(e.target).closest(n,h).get(0);if(o&&o!==h)return r=t.extend(l(e),{currentTarget:o,liveFired:h}),(a||i).apply(o,[r].concat(p.call(arguments,1)))}),s(h,e,i,r,n,c||a)}))},t.fn.off=function(e,n,r){var i=this;return e&&!m(e)?(t.each(e,function(t,e){i.off(t,n,e)}),i):(m(n)||d(r)||r===!1||(r=n,n=f),r===!1&&(r=E),i.each(function(){u(this,e,r,n)}))},t.fn.trigger=function(e,n){return e=m(e)||t.isPlainObject(e)?t.Event(e):c(e),e._args=n,this.each(function(){e.type in x&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,r){var i,o;return this.each(function(a,s){i=l(m(e)?t.Event(e):e),i._args=r,i.target=s,t.each(n(s,e.type||e),function(t,e){if(o=e.proxy(i),i.isImmediatePropagationStopped())return!1})}),o},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){m(t)||(e=t,t=e.type);var n=document.createEvent(g[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),c(n)}}(e),function(t){function e(e,n,r){var i=t.Event(n);return t(e).trigger(i,r),!i.isDefaultPrevented()}function n(t,n,r,i){if(t.global)return e(n||x,r,i)}function r(e){e.global&&0===t.active++&&n(e,null,"ajaxStart")}function i(e){e.global&&!--t.active&&n(e,null,"ajaxStop")}function o(t,e){var r=e.context;return e.beforeSend.call(r,t,e)!==!1&&n(e,r,"ajaxBeforeSend",[t,e])!==!1&&void n(e,r,"ajaxSend",[t,e])}function a(t,e,r,i){var o=r.context,a="success";r.success.call(o,t,a,e),i&&i.resolveWith(o,[t,a,e]),n(r,o,"ajaxSuccess",[e,r,t]),u(a,e,r)}function s(t,e,r,i,o){var a=i.context;i.error.call(a,r,e,t),o&&o.rejectWith(a,[r,e,t]),n(i,a,"ajaxError",[r,i,t||e]),u(e,r,i)}function u(t,e,r){var o=r.context;r.complete.call(o,e,t),n(r,o,"ajaxComplete",[e,r]),i(r)}function c(t,e,n){if(n.dataFilter==l)return t;var r=n.context;return n.dataFilter.call(r,t,e)}function l(){}function f(t){return t&&(t=t.split(";",2)[0]),t&&(t==T?"html":t==j?"json":w.test(t)?"script":E.test(t)&&"xml")||"text"}function h(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function p(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()&&"jsonp"!=e.dataType||(e.url=h(e.url,e.data),e.data=void 0)}function d(e,n,r,i){return t.isFunction(n)&&(i=r,r=n,n=void 0),t.isFunction(r)||(i=r,r=void 0),{url:e,data:n,success:r,dataType:i}}function m(e,n,r,i){var o,a=t.isArray(n),s=t.isPlainObject(n);t.each(n,function(n,u){o=t.type(u),i&&(n=r?i:i+"["+(s||"object"==o||"array"==o?n:"")+"]"),!i&&a?e.add(u.name,u.value):"array"==o||!r&&"object"==o?m(e,u,r,n):e.add(n,u)})}var v,g,y=+new Date,x=window.document,b=/)<[^<]*)*<\/script>/gi,w=/^(?:text|application)\/javascript/i,E=/^(?:text|application)\/xml/i,j="application/json",T="text/html",S=/^\s*$/,C=x.createElement("a");C.href=window.location.href,t.active=0,t.ajaxJSONP=function(e,n){if(!("type"in e))return t.ajax(e);var r,i,u=e.jsonpCallback,c=(t.isFunction(u)?u():u)||"Zepto"+y++,l=x.createElement("script"),f=window[c],h=function(e){t(l).triggerHandler("error",e||"abort")},p={abort:h};return n&&n.promise(p),t(l).on("load error",function(o,u){clearTimeout(i),t(l).off().remove(),"error"!=o.type&&r?a(r[0],p,e,n):s(null,u||"error",p,e,n),window[c]=f,r&&t.isFunction(f)&&f(r[0]),f=r=void 0}),o(p,e)===!1?(h("abort"),p):(window[c]=function(){r=arguments},l.src=e.url.replace(/\?(.+)=\?/,"?$1="+c),x.head.appendChild(l),e.timeout>0&&(i=setTimeout(function(){h("timeout")},e.timeout)),p)},t.ajaxSettings={type:"GET",beforeSend:l,success:l,error:l,complete:l,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:j,xml:"application/xml, text/xml",html:T,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:l},t.ajax=function(e){var n,i,u=t.extend({},e||{}),d=t.Deferred&&t.Deferred();for(v in t.ajaxSettings)void 0===u[v]&&(u[v]=t.ajaxSettings[v]);r(u),u.crossDomain||(n=x.createElement("a"),n.href=u.url,n.href=n.href,u.crossDomain=C.protocol+"//"+C.host!=n.protocol+"//"+n.host),u.url||(u.url=window.location.toString()),(i=u.url.indexOf("#"))>-1&&(u.url=u.url.slice(0,i)),p(u);var m=u.dataType,y=/\?.+=\?/.test(u.url);if(y&&(m="jsonp"),u.cache!==!1&&(e&&e.cache===!0||"script"!=m&&"jsonp"!=m)||(u.url=h(u.url,"_="+Date.now())),"jsonp"==m)return y||(u.url=h(u.url,u.jsonp?u.jsonp+"=?":u.jsonp===!1?"":"callback=?")),t.ajaxJSONP(u,d);var b,w=u.accepts[m],E={},j=function(t,e){E[t.toLowerCase()]=[t,e]},T=/^([\w-]+:)\/\//.test(u.url)?RegExp.$1:window.location.protocol,N=u.xhr(),O=N.setRequestHeader;if(d&&d.promise(N),u.crossDomain||j("X-Requested-With","XMLHttpRequest"),j("Accept",w||"*/*"),(w=u.mimeType||w)&&(w.indexOf(",")>-1&&(w=w.split(",",2)[0]),N.overrideMimeType&&N.overrideMimeType(w)),(u.contentType||u.contentType!==!1&&u.data&&"GET"!=u.type.toUpperCase())&&j("Content-Type",u.contentType||"application/x-www-form-urlencoded"),u.headers)for(g in u.headers)j(g,u.headers[g]);if(N.setRequestHeader=j,N.onreadystatechange=function(){if(4==N.readyState){N.onreadystatechange=l,clearTimeout(b);var e,n=!1;if(N.status>=200&&N.status<300||304==N.status||0==N.status&&"file:"==T){if(m=m||f(u.mimeType||N.getResponseHeader("content-type")),"arraybuffer"==N.responseType||"blob"==N.responseType)e=N.response;else{e=N.responseText;try{e=c(e,m,u),"script"==m?(0,eval)(e):"xml"==m?e=N.responseXML:"json"==m&&(e=S.test(e)?null:t.parseJSON(e))}catch(r){n=r}if(n)return s(n,"parsererror",N,u,d)}a(e,N,u,d)}else s(N.statusText||null,N.status?"error":"abort",N,u,d)}},o(N,u)===!1)return N.abort(),s(null,"abort",N,u,d),N;var P=!("async"in u)||u.async;if(N.open(u.type,u.url,P,u.username,u.password),u.xhrFields)for(g in u.xhrFields)N[g]=u.xhrFields[g];for(g in E)O.apply(N,E[g]);return u.timeout>0&&(b=setTimeout(function(){N.onreadystatechange=l,N.abort(),s(null,"timeout",N,u,d)},u.timeout)),N.send(u.data?u.data:null),N},t.get=function(){return t.ajax(d.apply(null,arguments))},t.post=function(){var e=d.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=d.apply(null,arguments);return e.dataType="json",t.ajax(e)},t.fn.load=function(e,n,r){if(!this.length)return this;var i,o=this,a=e.split(/\s/),s=d(e,n,r),u=s.success;return a.length>1&&(s.url=a[0],i=a[1]),s.success=function(e){o.html(i?t("
                                  ").html(e.replace(b,"")).find(i):e),u&&u.apply(o,arguments)},t.ajax(s),this};var N=encodeURIComponent;t.param=function(e,n){var r=[];return r.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(N(e)+"="+N(n))},m(r,e,n),r.join("&").replace(/%20/g,"+")}}(e),function(t){t.fn.serializeArray=function(){var e,n,r=[],i=function(t){return t.forEach?t.forEach(i):void r.push({name:e,value:t})};return this[0]&&t.each(this[0].elements,function(r,o){n=o.type,e=o.name,e&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||o.checked)&&i(t(o).val())}),r},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(e),function(){try{getComputedStyle(void 0)}catch(t){var e=getComputedStyle;window.getComputedStyle=function(t,n){try{return e(t,n)}catch(r){return null}}}}(),t("zepto",e)});layui.define(["layer-mobile","zepto"],function(e){"use strict";var t=layui.zepto,a=layui["layer-mobile"],i=(layui.device(),"layui-upload-enter"),n="layui-upload-iframe",r={icon:2,shift:6},o={file:"文件",video:"视频",audio:"音频"};a.msg=function(e){return a.open({content:e||"",skin:"msg",time:2})};var s=function(e){this.options=e};s.prototype.init=function(){var e=this,a=e.options,r=t("body"),s=t(a.elem||".layui-upload-file"),u=t('');return t("#"+n)[0]||r.append(u),s.each(function(r,s){s=t(s);var u='
                                  ',l=s.attr("lay-type")||a.type;a.unwrap||(u='
                                  '+u+''+(s.attr("lay-title")||a.title||"上传"+(o[l]||"图片"))+"
                                  "),u=t(u),a.unwrap||u.on("dragover",function(e){e.preventDefault(),t(this).addClass(i)}).on("dragleave",function(){t(this).removeClass(i)}).on("drop",function(){t(this).removeClass(i)}),s.parent("form").attr("target")===n&&(a.unwrap?s.unwrap():(s.parent().next().remove(),s.unwrap().unwrap())),s.wrap(u),s.off("change").on("change",function(){e.action(this,l)})})},s.prototype.action=function(e,i){var o=this,s=o.options,u=e.value,l=t(e),p=l.attr("lay-ext")||s.ext||"";if(u){switch(i){case"file":if(p&&!RegExp("\\w\\.("+p+")$","i").test(escape(u)))return a.msg("不支持该文件格式",r),e.value="";break;case"video":if(!RegExp("\\w\\.("+(p||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(u)))return a.msg("不支持该视频格式",r),e.value="";break;case"audio":if(!RegExp("\\w\\.("+(p||"mp3|wav|mid")+")$","i").test(escape(u)))return a.msg("不支持该音频格式",r),e.value="";break;default:if(!RegExp("\\w\\.("+(p||"jpg|png|gif|bmp|jpeg")+")$","i").test(escape(u)))return a.msg("不支持该图片格式",r),e.value=""}s.before&&s.before(e),l.parent().submit();var c=t("#"+n),f=setInterval(function(){var t;try{t=c.contents().find("body").text()}catch(i){a.msg("上传接口存在跨域",r),clearInterval(f)}if(t){clearInterval(f),c.contents().find("body").html("");try{t=JSON.parse(t)}catch(i){return t={},a.msg("请对上传接口返回JSON字符",r)}"function"==typeof s.success&&s.success(t,e)}},30);e.value=""}},e("upload-mobile",function(e){var t=new s(e=e||{});t.init()})});layui.define(function(i){i("layim-mobile",layui.v)});layui["layui.mobile"]||layui.config({base:layui.cache.dir+"lay/modules/mobile/"}).extend({"layer-mobile":"layer-mobile",zepto:"zepto","upload-mobile":"upload-mobile","layim-mobile":"layim-mobile"}),layui.define(["layer-mobile","zepto","layim-mobile"],function(l){l("mobile",{layer:layui["layer-mobile"],layim:layui["layim-mobile"]})}); \ No newline at end of file diff --git a/public/static/xadmin/lib/layui/lay/modules/rate.js b/public/static/xadmin/lib/layui/lay/modules/rate.js new file mode 100644 index 00000000..762fb3a9 --- /dev/null +++ b/public/static/xadmin/lib/layui/lay/modules/rate.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(e){"use strict";var a=layui.jquery,i={config:{},index:layui.rate?layui.rate.index+1e4:0,set:function(e){var i=this;return i.config=a.extend({},i.config,e),i},on:function(e,a){return layui.onevent.call(this,n,e,a)}},l=function(){var e=this,a=e.config;return{setvalue:function(a){e.setvalue.call(e,a)},config:a}},n="rate",t="layui-rate",o="layui-icon-rate",s="layui-icon-rate-solid",u="layui-icon-rate-half",r="layui-icon-rate-solid layui-icon-rate-half",c="layui-icon-rate-solid layui-icon-rate",f="layui-icon-rate layui-icon-rate-half",v=function(e){var l=this;l.index=++i.index,l.config=a.extend({},l.config,i.config,e),l.render()};v.prototype.config={length:5,text:!1,readonly:!1,half:!1,value:0,theme:""},v.prototype.render=function(){var e=this,i=e.config,l=i.theme?'style="color: '+i.theme+';"':"";i.elem=a(i.elem),parseInt(i.value)!==i.value&&(i.half||(i.value=Math.ceil(i.value)-i.value<.5?Math.ceil(i.value):Math.floor(i.value)));for(var n='
                                    ",u=1;u<=i.length;u++){var r='
                                  • ";i.half&&parseInt(i.value)!==i.value&&u==Math.ceil(i.value)?n=n+'
                                  • ":n+=r}n+="
                                  "+(i.text?''+i.value+"星":"")+"";var c=i.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),i.span=e.elemTemp.next("span"),i.setText&&i.setText(i.value),c.html(e.elemTemp),c.addClass("layui-inline"),i.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,i=a.config;i.value=e,a.render()},v.prototype.action=function(){var e=this,i=e.config,l=e.elemTemp,n=l.find("i").width();l.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(i.value=t,i.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(i.value=i.value-.5)}i.text&&l.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),v.on("mousemove",function(e){if(l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+t+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(u).removeClass(s)}}),v.on("mouseleave",function(){l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+Math.floor(i.value)+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half&&parseInt(i.value)!==i.value&&l.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(u).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},i.render=function(e){var a=new v(e);return l.call(a)},e(n,i)}); \ No newline at end of file diff --git a/public/static/xadmin/lib/layui/lay/modules/slider.js b/public/static/xadmin/lib/layui/lay/modules/slider.js new file mode 100644 index 00000000..446378d9 --- /dev/null +++ b/public/static/xadmin/lib/layui/lay/modules/slider.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(e){"use strict";var i=layui.jquery,t={config:{},index:layui.slider?layui.slider.index+1e4:0,set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,n,e,i)}},a=function(){var e=this,i=e.config;return{setValue:function(i,t){return e.slide("set",i,t||0)},config:i}},n="slider",l="layui-disabled",s="layui-slider",r="layui-slider-bar",o="layui-slider-wrap",u="layui-slider-wrap-btn",d="layui-slider-tips",v="layui-slider-input",c="layui-slider-input-txt",m="layui-slider-input-btn",p="layui-slider-hover",f=function(e){var a=this;a.index=++t.index,a.config=i.extend({},a.config,t.config,e),a.render()};f.prototype.config={type:"default",min:0,max:100,value:0,step:1,showstep:!1,tips:!0,input:!1,range:!1,height:200,disabled:!1,theme:"#009688"},f.prototype.render=function(){var e=this,t=e.config;if(t.step<1&&(t.step=1),t.maxt.min?a:t.min,t.value[1]=n>t.min?n:t.min,t.value[0]=t.value[0]>t.max?t.max:t.value[0],t.value[1]=t.value[1]>t.max?t.max:t.value[1];var r=Math.floor((t.value[0]-t.min)/(t.max-t.min)*100),v=Math.floor((t.value[1]-t.min)/(t.max-t.min)*100),m=v-r+"%";r+="%",v+="%"}else{"object"==typeof t.value&&(t.value=Math.min.apply(null,t.value)),t.valuet.max&&(t.value=t.max);var m=Math.floor((t.value-t.min)/(t.max-t.min)*100)+"%"}var p=t.disabled?"#c2c2c2":t.theme,f='
                                  '+(t.tips?'
                                  ':"")+'
                                  '+(t.range?'
                                  ':"")+"
                                  ",h=i(t.elem),y=h.next("."+s);if(y[0]&&y.remove(),e.elemTemp=i(f),t.range?(e.elemTemp.find("."+o).eq(0).data("value",t.value[0]),e.elemTemp.find("."+o).eq(1).data("value",t.value[1])):e.elemTemp.find("."+o).data("value",t.value),h.html(e.elemTemp),"vertical"===t.type&&e.elemTemp.height(t.height+"px"),t.showstep){for(var g=(t.max-t.min)/t.step,b="",x=1;x
                                  ')}e.elemTemp.append(b)}if(t.input&&!t.range){var w=i('
                                  ');h.css("position","relative"),h.append(w),h.find("."+c).children("input").val(t.value),"vertical"===t.type?w.css({left:0,top:-48}):e.elemTemp.css("margin-right",w.outerWidth()+15)}t.disabled?(e.elemTemp.addClass(l),e.elemTemp.find("."+u).addClass(l)):e.slide(),e.elemTemp.find("."+u).on("mouseover",function(){var a="vertical"===t.type?t.height:e.elemTemp[0].offsetWidth,n=e.elemTemp.find("."+o),l="vertical"===t.type?a-i(this).parent()[0].offsetTop-n.height():i(this).parent()[0].offsetLeft,s=l/a*100,r=i(this).parent().data("value"),u=t.setTips?t.setTips(r):r;e.elemTemp.find("."+d).html(u),"vertical"===t.type?e.elemTemp.find("."+d).css({bottom:s+"%","margin-bottom":"20px",display:"inline-block"}):e.elemTemp.find("."+d).css({left:s+"%",display:"inline-block"})}).on("mouseout",function(){e.elemTemp.find("."+d).css("display","none")})},f.prototype.slide=function(e,t,a){var n=this,l=n.config,s=n.elemTemp,f=function(){return"vertical"===l.type?l.height:s[0].offsetWidth},h=s.find("."+o),y=s.next("."+v),g=y.children("."+c).children("input").val(),b=100/((l.max-l.min)/Math.ceil(l.step)),x=function(e,i){e=Math.ceil(e)*b>100?Math.ceil(e)*b:Math.round(e)*b,e=e>100?100:e,h.eq(i).css("vertical"===l.type?"bottom":"left",e+"%");var t=T(h[0].offsetLeft),a=l.range?T(h[1].offsetLeft):0;"vertical"===l.type?(s.find("."+d).css({bottom:e+"%","margin-bottom":"20px"}),t=T(f()-h[0].offsetTop-h.height()),a=l.range?T(f()-h[1].offsetTop-h.height()):0):s.find("."+d).css("left",e+"%"),t=t>100?100:t,a=a>100?100:a;var n=Math.min(t,a),o=Math.abs(t-a);"vertical"===l.type?s.find("."+r).css({height:o+"%",bottom:n+"%"}):s.find("."+r).css({width:o+"%",left:n+"%"});var u=l.min+Math.round((l.max-l.min)*e/100);if(g=u,y.children("."+c).children("input").val(g),h.eq(i).data("value",u),u=l.setTips?l.setTips(u):u,s.find("."+d).html(u),l.range){var v=[h.eq(0).data("value"),h.eq(1).data("value")];v[0]>v[1]&&v.reverse()}l.change&&l.change(l.range?v:u)},T=function(e){var i=e/f()*100/b,t=Math.round(i)*b;return e==f()&&(t=Math.ceil(i)*b),t},w=i(['
                                  f()&&(r=f());var o=r/f()*100/b;x(o,e),t.addClass(p),s.find("."+d).show(),i.preventDefault()},o=function(){t.removeClass(p),s.find("."+d).hide()};M(r,o)})}),s.on("click",function(e){var t=i("."+u);if(!t.is(event.target)&&0===t.has(event.target).length&&t.length){var a,n="vertical"===l.type?f()-e.clientY+i(this).offset().top:e.clientX-i(this).offset().left;n<0&&(n=0),n>f()&&(n=f());var s=n/f()*100/b;a=l.range?"vertical"===l.type?Math.abs(n-parseInt(i(h[0]).css("bottom")))>Math.abs(n-parseInt(i(h[1]).css("bottom")))?1:0:Math.abs(n-h[0].offsetLeft)>Math.abs(n-h[1].offsetLeft)?1:0:0,x(s,a),e.preventDefault()}}),y.hover(function(){var e=i(this);e.children("."+m).fadeIn("fast")},function(){var e=i(this);e.children("."+m).fadeOut("fast")}),y.children("."+m).children("i").each(function(e){i(this).on("click",function(){g=1==e?g-l.stepl.max?l.max:Number(g)+l.step;var i=(g-l.min)/(l.max-l.min)*100/b;x(i,0)})});var q=function(){var e=this.value;e=isNaN(e)?0:e,e=el.max?l.max:e,this.value=e;var i=(e-l.min)/(l.max-l.min)*100/b;x(i,0)};y.children("."+c).children("input").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),q.call(this))}).on("change",q)},f.prototype.events=function(){var e=this;e.config},t.render=function(e){var i=new f(e);return a.call(i)},e(n,t)}); \ No newline at end of file diff --git a/public/static/xadmin/lib/layui/lay/modules/table.js b/public/static/xadmin/lib/layui/lay/modules/table.js new file mode 100644 index 00000000..e9217db6 --- /dev/null +++ b/public/static/xadmin/lib/layui/lay/modules/table.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define(["laytpl","laypage","layer","form","util"],function(e){"use strict";var t=layui.$,i=layui.laytpl,a=layui.laypage,l=layui.layer,n=layui.form,o=(layui.util,layui.hint()),r=layui.device(),d={config:{checkName:"LAY_CHECKED",indexName:"LAY_TABLE_INDEX"},cache:{},index:layui.table?layui.table.index+1e4:0,set:function(e){var i=this;return i.config=t.extend({},i.config,e),i},on:function(e,t){return layui.onevent.call(this,u,e,t)}},c=function(){var e=this,t=e.config,i=t.id||t.index;return i&&(c.that[i]=e,c.config[i]=t),{reload:function(t){e.reload.call(e,t)},setColsWidth:function(){e.setColsWidth.call(e)},resize:function(){e.resize.call(e)},config:t}},s=function(e){var t=c.config[e];return t||o.error("The ID option was not found in the table instance"),t||null},u="table",h=".layui-table",y="layui-hide",f="layui-none",p="layui-table-view",v=".layui-table-tool",m=".layui-table-box",g=".layui-table-init",b=".layui-table-header",x=".layui-table-body",k=".layui-table-main",C=".layui-table-fixed",w=".layui-table-fixed-l",T=".layui-table-fixed-r",A=".layui-table-total",L=".layui-table-page",S=".layui-table-sort",N="layui-table-edit",W="layui-table-hover",_=function(e){var t='{{#if(item2.colspan){}} colspan="{{item2.colspan}}"{{#} if(item2.rowspan){}} rowspan="{{item2.rowspan}}"{{#}}}';return e=e||{},['',"","{{# layui.each(d.data.cols, function(i1, item1){ }}","","{{# layui.each(item1, function(i2, item2){ }}",'{{# if(item2.fixed && item2.fixed !== "right"){ left = true; } }}','{{# if(item2.fixed === "right"){ right = true; } }}',function(){return e.fixed&&"right"!==e.fixed?'{{# if(item2.fixed && item2.fixed !== "right"){ }}':"right"===e.fixed?'{{# if(item2.fixed === "right"){ }}':""}(),"{{# var isSort = !(item2.colGroup) && item2.sort; }}",'",e.fixed?"{{# }; }}":"","{{# }); }}","","{{# }); }}","","
                                  ','
                                  ','{{# if(item2.type === "checkbox"){ }}','',"{{# } else { }}",'{{item2.title||""}}',"{{# if(isSort){ }}",'',"{{# } }}","{{# } }}","
                                  ","
                                  "].join("")},E=['',"","
                                  "].join(""),z=['
                                  ',"{{# if(d.data.toolbar){ }}",'
                                  ','
                                  ','
                                  ',"
                                  ","{{# } }}",'
                                  ',"{{# if(d.data.loading){ }}",'
                                  ','',"
                                  ","{{# } }}","{{# var left, right; }}",'
                                  ',_(),"
                                  ",'
                                  ',E,"
                                  ","{{# if(left){ }}",'
                                  ','
                                  ',_({fixed:!0}),"
                                  ",'
                                  ',E,"
                                  ","
                                  ","{{# }; }}","{{# if(right){ }}",'
                                  ','
                                  ',_({fixed:"right"}),'
                                  ',"
                                  ",'
                                  ',E,"
                                  ","
                                  ","{{# }; }}","
                                  ","{{# if(d.data.totalRow){ }}",'
                                  ','','',"
                                  ","
                                  ","{{# } }}","{{# if(d.data.page){ }}",'
                                  ','
                                  ',"
                                  ","{{# } }}","","
                                  "].join(""),H=t(window),R=t(document),F=function(e){var i=this;i.index=++d.index,i.config=t.extend({},i.config,d.config,e),i.render()};F.prototype.config={limit:10,loading:!0,cellMinWidth:60,defaultToolbar:["filter","exports","print"],autoSort:!0,text:{none:"无数据"}},F.prototype.render=function(){var e=this,a=e.config;if(a.elem=t(a.elem),a.where=a.where||{},a.id=a.id||a.elem.attr("id")||e.index,a.request=t.extend({pageName:"page",limitName:"limit"},a.request),a.response=t.extend({statusName:"code",statusCode:0,msgName:"msg",dataName:"data",countName:"count"},a.response),"object"==typeof a.page&&(a.limit=a.page.limit||a.limit,a.limits=a.page.limits||a.limits,e.page=a.page.curr=a.page.curr||1,delete a.page.elem,delete a.page.jump),!a.elem[0])return e;a.height&&/^full-\d+$/.test(a.height)&&(e.fullHeightGap=a.height.split("-")[1],a.height=H.height()-e.fullHeightGap),e.setInit();var l=a.elem,n=l.next("."+p),o=e.elem=t(i(z).render({VIEW_CLASS:p,data:a,index:e.index}));if(a.index=e.index,n[0]&&n.remove(),l.after(o),e.layTool=o.find(v),e.layBox=o.find(m),e.layHeader=o.find(b),e.layMain=o.find(k),e.layBody=o.find(x),e.layFixed=o.find(C),e.layFixLeft=o.find(w),e.layFixRight=o.find(T),e.layTotal=o.find(A),e.layPage=o.find(L),e.renderToolbar(),e.fullSize(),a.cols.length>1){var r=e.layFixed.find(b).find("th");r.height(e.layHeader.height()-1-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom")))}e.pullData(e.page),e.events()},F.prototype.initOpts=function(e){var t=this,i=(t.config,{checkbox:48,radio:48,space:15,numbers:40});e.checkbox&&(e.type="checkbox"),e.space&&(e.type="space"),e.type||(e.type="normal"),"normal"!==e.type&&(e.unresize=!0,e.width=e.width||i[e.type])},F.prototype.setInit=function(e){var t=this,i=t.config;return i.clientWidth=i.width||function(){var e=function(t){var a,l;t=t||i.elem.parent(),a=t.width();try{l="none"===t.css("display")}catch(n){}return!t[0]||a&&!l?a:e(t.parent())};return e()}(),"width"===e?i.clientWidth:void layui.each(i.cols,function(e,a){layui.each(a,function(l,n){if(!n)return void a.splice(l,1);if(n.key=e+"-"+l,n.hide=n.hide||!1,n.colGroup||n.colspan>1){var o=0;layui.each(i.cols[e+1],function(t,i){i.HAS_PARENT||o>1&&o==n.colspan||(i.HAS_PARENT=!0,i.parentKey=e+"-"+l,o+=parseInt(i.colspan>1?i.colspan:1))}),n.colGroup=!0}t.initOpts(n)})})},F.prototype.renderToolbar=function(){var e=this,a=e.config,l=['
                                  ','
                                  ','
                                  '].join(""),n=e.layTool.find(".layui-table-tool-temp");if("default"===a.toolbar)n.html(l);else if("string"==typeof a.toolbar){var o=t(a.toolbar).html()||"";o&&n.html(i(o).render(a))}var r={filter:{title:"筛选列",layEvent:"LAYTABLE_COLS",icon:"layui-icon-cols"},exports:{title:"导出",layEvent:"LAYTABLE_EXPORT",icon:"layui-icon-export"},print:{title:"打印",layEvent:"LAYTABLE_PRINT",icon:"layui-icon-print"}},d=[];"object"==typeof a.defaultToolbar&&layui.each(a.defaultToolbar,function(e,t){var i=r[t];i&&d.push('
                                  ')}),e.layTool.find(".layui-table-tool-self").html(d.join(""))},F.prototype.setParentCol=function(e,t){var i=this,a=i.config,l=i.layHeader.find('th[data-key="'+a.index+"-"+t+'"]'),n=parseInt(l.attr("colspan"))||0;if(l[0]){var o=t.split("-"),r=a.cols[o[0]][o[1]];e?n--:n++,l.attr("colspan",n),l[n<1?"addClass":"removeClass"](y),r.colspan=n,r.hide=n<1;var d=l.data("parentkey");d&&i.setParentCol(e,d)}},F.prototype.setColsPatch=function(){var e=this,t=e.config;layui.each(t.cols,function(t,i){layui.each(i,function(t,i){i.hide&&e.setParentCol(i.hide,i.parentKey)})})},F.prototype.setColsWidth=function(){var e=this,t=e.config,i=0,a=0,l=0,n=0,o=e.setInit("width");e.eachCols(function(e,t){t.hide||i++}),o=o-function(){return"line"===t.skin||"nob"===t.skin?2:i+1}()-e.getScrollWidth(e.layMain[0])-1;var r=function(e){layui.each(t.cols,function(i,r){layui.each(r,function(i,d){var c=0,s=d.minWidth||t.cellMinWidth;return d?void(d.colGroup||d.hide||(e?l&&ln&&a&&(l=(o-n)/a)};r(),r(!0),e.autoColNums=a,e.eachCols(function(i,a){var n=a.minWidth||t.cellMinWidth;a.colGroup||a.hide||(0===a.width?e.getCssRule(t.index+"-"+a.key,function(e){e.style.width=Math.floor(l>=n?l:n)+"px"}):/\d+%$/.test(a.width)&&e.getCssRule(t.index+"-"+a.key,function(e){e.style.width=Math.floor(parseFloat(a.width)/100*o)+"px"}))});var d=e.layMain.width()-e.getScrollWidth(e.layMain[0])-e.layMain.children("table").outerWidth();if(e.autoColNums&&d>=-i&&d<=i){var c=function(t){var i;return t=t||e.layHeader.eq(0).find("thead th:last-child"),i=t.data("field"),!i&&t.prev()[0]?c(t.prev()):t},s=c(),u=s.data("key");e.getCssRule(u,function(t){var i=t.style.width||s.outerWidth();t.style.width=parseFloat(i)+d+"px",e.layMain.height()-e.layMain.prop("clientHeight")>0&&(t.style.width=parseFloat(t.style.width)-1+"px")})}e.loading(!0)},F.prototype.resize=function(){var e=this;e.fullSize(),e.setColsWidth(),e.scrollPatch()},F.prototype.reload=function(e){var i=this;i.config.data&&i.config.data.constructor===Array&&delete i.config.data,i.config=t.extend({},i.config,e),i.render()},F.prototype.page=1,F.prototype.pullData=function(e){var i=this,a=i.config,l=a.request,n=a.response,o=function(){"object"==typeof a.initSort&&i.sort(a.initSort.field,a.initSort.type)};if(i.startTime=(new Date).getTime(),a.url){var r={};r[l.pageName]=e,r[l.limitName]=a.limit;var d=t.extend(r,a.where);a.contentType&&0==a.contentType.indexOf("application/json")&&(d=JSON.stringify(d)),t.ajax({type:a.method||"get",url:a.url,contentType:a.contentType,data:d,dataType:"json",headers:a.headers||{},success:function(t){"function"==typeof a.parseData&&(t=a.parseData(t)||t),t[n.statusName]!=n.statusCode?(i.renderForm(),i.layMain.html('
                                  '+(t[n.msgName]||"返回的数据不符合规范,正确的成功状态码 ("+n.statusName+") 应为:"+n.statusCode)+"
                                  ")):(i.renderData(t,e,t[n.countName]),o(),a.time=(new Date).getTime()-i.startTime+" ms"),i.setColsWidth(),"function"==typeof a.done&&a.done(t,e,t[n.countName])},error:function(e,t){i.layMain.html('
                                  数据接口请求异常:'+t+"
                                  "),i.renderForm(),i.setColsWidth()}})}else if(a.data&&a.data.constructor===Array){var c={},s=e*a.limit-a.limit;c[n.dataName]=a.data.concat().splice(s,a.limit),c[n.countName]=a.data.length,i.renderData(c,e,a.data.length),o(),i.setColsWidth(),"function"==typeof a.done&&a.done(c,e,c[n.countName])}},F.prototype.eachCols=function(e){var t=this;return d.eachCols(null,e,t.config.cols),t},F.prototype.renderData=function(e,n,o,r){var c=this,s=c.config,u=e[s.response.dataName]||[],h=[],p=[],v=[],m=function(){var e;return!r&&c.sortKey?c.sort(c.sortKey.field,c.sortKey.sort,!0):(layui.each(u,function(a,l){var o=[],u=[],f=[],m=a+s.limit*(n-1)+1;0!==l.length&&(r||(l[d.config.indexName]=a),c.eachCols(function(n,r){var c=r.field||n,h=s.index+"-"+r.key,p=l[c];if(void 0!==p&&null!==p||(p=""),!r.colGroup){var v=['','
                                  '+function(){var n=t.extend(!0,{LAY_INDEX:m},l),o=d.config.checkName;switch(r.type){case"checkbox":return'";case"radio":return n[o]&&(e=a),'';case"numbers":return m}return r.toolbar?i(t(r.toolbar).html()||"").render(n):r.templet?function(){return"function"==typeof r.templet?r.templet(n):i(t(r.templet).html()||String(p)).render(n)}():p}(),"
                                  "].join("");o.push(v),r.fixed&&"right"!==r.fixed&&u.push(v),"right"===r.fixed&&f.push(v)}}),h.push(''+o.join("")+""),p.push(''+u.join("")+""),v.push(''+f.join("")+""))}),c.layBody.scrollTop(0),c.layMain.find("."+f).remove(),c.layMain.find("tbody").html(h.join("")),c.layFixLeft.find("tbody").html(p.join("")),c.layFixRight.find("tbody").html(v.join("")),c.renderForm(),"number"==typeof e&&c.setThisRowChecked(e),c.syncCheckAll(),c.haveInit?c.scrollPatch():setTimeout(function(){c.scrollPatch()},50),c.haveInit=!0,l.close(c.tipsIndex),s.HAS_SET_COLS_PATCH||c.setColsPatch(),void(s.HAS_SET_COLS_PATCH=!0))};return c.key=s.id||s.index,d.cache[c.key]=u,c.layPage[0==o||0===u.length&&1==n?"addClass":"removeClass"](y),r?m():0===u.length?(c.renderForm(),c.layFixed.remove(),c.layMain.find("tbody").html(""),c.layMain.find("."+f).remove(),c.layMain.append('
                                  '+s.text.none+"
                                  ")):(m(),c.renderTotal(u),void(s.page&&(s.page=t.extend({elem:"layui-table-page"+s.index,count:o,limit:s.limit,limits:s.limits||[10,20,30,40,50,60,70,80,90],groups:3,layout:["prev","page","next","skip","count","limit"],prev:'',next:'',jump:function(e,t){t||(c.page=e.curr,s.limit=e.limit,c.loading(),c.pullData(e.curr))}},s.page),s.page.count=o,a.render(s.page))))},F.prototype.renderTotal=function(e){var t=this,i=t.config,a={};if(i.totalRow){layui.each(e,function(e,i){0!==i.length&&t.eachCols(function(e,t){var l=t.field||e,n=i[l];t.totalRow&&(a[l]=(a[l]||0)+(parseFloat(n)||0))})});var l=[];t.eachCols(function(e,t){var n=t.field||e,o=['','
                                  '+function(){var e=t.totalRowText||"";return t.totalRow?parseFloat(a[n]).toFixed(2)||e:e}(),"
                                  "].join("");l.push(o)}),t.layTotal.find("tbody").html(""+l.join("")+"")}},F.prototype.getColElem=function(e,t){var i=this,a=i.config;return e.eq(0).find(".laytable-cell-"+(a.index+"-"+t)+":eq(0)")},F.prototype.renderForm=function(e){n.render(e,"LAY-table-"+this.index)},F.prototype.setThisRowChecked=function(e){var t=this,i=(t.config,"layui-table-click"),a=t.layBody.find('tr[data-index="'+e+'"]');a.addClass(i).siblings("tr").removeClass(i)},F.prototype.sort=function(e,i,a,l){var n,r,c=this,s={},h=c.config,y=h.elem.attr("lay-filter"),f=d.cache[c.key];"string"==typeof e&&c.layHeader.find("th").each(function(i,a){var l=t(this),o=l.data("field");if(o===e)return e=l,n=o,!1});try{var n=n||e.data("field"),p=e.data("key");if(c.sortKey&&!a&&n===c.sortKey.field&&i===c.sortKey.sort)return;var v=c.layHeader.find("th .laytable-cell-"+p).find(S);c.layHeader.find("th").find(S).removeAttr("lay-sort"),v.attr("lay-sort",i||null),c.layFixed.find("th")}catch(m){return o.error("Table modules: Did not match to field")}c.sortKey={field:n,sort:i},h.autoSort&&("asc"===i?r=layui.sort(f,n):"desc"===i?r=layui.sort(f,n,!0):(r=layui.sort(f,d.config.indexName),delete c.sortKey)),s[h.response.dataName]=r||f,c.renderData(s,c.page,c.count,!0),l&&layui.event.call(e,u,"sort("+y+")",{field:n,type:i})},F.prototype.loading=function(e){var i=this,a=i.config;a.loading&&(e?(i.layInit&&i.layInit.remove(),delete i.layInit,i.layBox.find(g).remove()):(i.layInit=t(['
                                  ','',"
                                  "].join("")),i.layBox.append(i.layInit)))},F.prototype.setCheckData=function(e,t){var i=this,a=i.config,l=d.cache[i.key];l[e]&&l[e].constructor!==Array&&(l[e][a.checkName]=t)},F.prototype.syncCheckAll=function(){var e=this,t=e.config,i=e.layHeader.find('input[name="layTableCheckbox"]'),a=function(i){return e.eachCols(function(e,a){"checkbox"===a.type&&(a[t.checkName]=i)}),i};i[0]&&(d.checkStatus(e.key).isAll?(i[0].checked||(i.prop("checked",!0),e.renderForm("checkbox")),a(!0)):(i[0].checked&&(i.prop("checked",!1),e.renderForm("checkbox")),a(!1)))},F.prototype.getCssRule=function(e,t){var i=this,a=i.elem.find("style")[0],l=a.sheet||a.styleSheet||{},n=l.cssRules||l.rules;layui.each(n,function(i,a){if(a.selectorText===".laytable-cell-"+e)return t(a),!0})},F.prototype.fullSize=function(){var e,t=this,i=t.config,a=i.height;t.fullHeightGap&&(a=H.height()-t.fullHeightGap,a<135&&(a=135),t.elem.css("height",a)),a&&(e=parseFloat(a)-(t.layHeader.outerHeight()||38),i.toolbar&&(e-=t.layTool.outerHeight()||50),i.totalRow&&(e-=t.layTotal.outerHeight()||40),i.page&&(e=e-(t.layPage.outerHeight()||41)-2),t.layMain.css("height",e))},F.prototype.getScrollWidth=function(e){var t=0;return e?t=e.offsetWidth-e.clientWidth:(e=document.createElement("div"),e.style.width="100px",e.style.height="100px",e.style.overflowY="scroll",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e)),t},F.prototype.scrollPatch=function(){var e=this,i=e.layMain.children("table"),a=e.layMain.width()-e.layMain.prop("clientWidth"),l=e.layMain.height()-e.layMain.prop("clientHeight"),n=(e.getScrollWidth(e.layMain[0]),i.outerWidth()-e.layMain.width()),o=function(e){if(a&&l){if(e=e.eq(0),!e.find(".layui-table-patch")[0]){var i=t('
                                  ');i.find("div").css({width:a}),e.find("tr").append(i)}}else e.find(".layui-table-patch").remove()};o(e.layHeader),o(e.layTotal);var r=e.layMain.height(),d=r-l;e.layFixed.find(x).css("height",i.height()>=d?d:"auto"),e.layFixRight[n>0?"removeClass":"addClass"](y),e.layFixRight.css("right",a-1)},F.prototype.events=function(){var e,a=this,o=a.config,c=t("body"),s={},h=a.layHeader.find("th"),f=".layui-table-cell",p=o.elem.attr("lay-filter");a.layTool.on("click","*[lay-event]",function(e){var i=t(this),c=i.attr("lay-event"),s=function(e){var l=t(e.list),n=t('
                                    ');n.html(l),o.height&&n.css("max-height",o.height-(a.layTool.outerHeight()||50)),i.find(".layui-table-tool-panel")[0]||i.append(n),a.renderForm(),n.on("click",function(e){layui.stope(e)}),e.done&&e.done(n,l)};switch(layui.stope(e),R.trigger("table.tool.panel.remove"),l.close(a.tipsIndex),c){case"LAYTABLE_COLS":s({list:function(){var e=[];return a.eachCols(function(t,i){i.field&&"normal"==i.type&&e.push('
                                  • ')}),e.join("")}(),done:function(){n.on("checkbox(LAY_TABLE_TOOL_COLS)",function(e){var i=t(e.elem),l=this.checked,n=i.data("key"),r=i.data("parentkey");layui.each(o.cols,function(e,t){layui.each(t,function(t,i){if(e+"-"+t===n){var d=i.hide;i.hide=!l,a.elem.find('*[data-key="'+o.index+"-"+n+'"]')[l?"removeClass":"addClass"](y),d!=i.hide&&a.setParentCol(!l,r),a.resize()}})})})}});break;case"LAYTABLE_EXPORT":r.ie?l.tips("导出功能不支持 IE,请用 Chrome 等高级浏览器导出",this,{tips:3}):s({list:function(){return['
                                  • 导出到 Csv 文件
                                  • ','
                                  • 导出到 Excel 文件
                                  • '].join("")}(),done:function(e,i){i.on("click",function(){var e=t(this).data("type");d.exportFile(o.id,null,e)})}});break;case"LAYTABLE_PRINT":var h=window.open("打印窗口","_blank"),f=[""].join(""),v=t(a.layHeader.html());v.append(a.layMain.find("table").html()),v.find("th.layui-table-patch").remove(),v.find(".layui-table-col-special").remove(),h.document.write(f+v.prop("outerHTML")),h.document.close(),h.print(),h.close()}layui.event.call(this,u,"toolbar("+p+")",t.extend({event:c,config:o},{}))}),h.on("mousemove",function(e){var i=t(this),a=i.offset().left,l=e.clientX-a;i.data("unresize")||s.resizeStart||(s.allowResize=i.width()-l<=10,c.css("cursor",s.allowResize?"col-resize":""))}).on("mouseleave",function(){t(this);s.resizeStart||c.css("cursor","")}).on("mousedown",function(e){var i=t(this);if(s.allowResize){var l=i.data("key");e.preventDefault(),s.resizeStart=!0,s.offset=[e.clientX,e.clientY],a.getCssRule(l,function(e){var t=e.style.width||i.outerWidth();s.rule=e,s.ruleWidth=parseFloat(t),s.minWidth=i.data("minwidth")||o.cellMinWidth})}}),R.on("mousemove",function(t){if(s.resizeStart){if(t.preventDefault(),s.rule){var i=s.ruleWidth+t.clientX-s.offset[0];i');return n[0].value=i.data("content")||l.text(),i.find("."+N)[0]||i.append(n),n.focus(),void layui.stope(e)}}).on("mouseenter","td",function(){b.call(this)}).on("mouseleave","td",function(){b.call(this,"hide")});var g="layui-table-grid-down",b=function(e){var i=t(this),a=i.children(f);if(e)i.find(".layui-table-grid-down").remove();else if(a.prop("scrollWidth")>a.outerWidth()){if(a.find("."+g)[0])return;i.append('
                                    ')}};a.layBody.on("click","."+g,function(e){var i=t(this),n=i.parent(),d=n.children(f);a.tipsIndex=l.tips(['
                                    ',d.html(),"
                                    ",''].join(""),d[0],{tips:[3,""],time:-1,anim:-1,maxWidth:r.ios||r.android?300:a.elem.width()/2,isOutAnim:!1,skin:"layui-table-tips",success:function(e,t){e.find(".layui-table-tips-c").on("click",function(){l.close(t)})}}),layui.stope(e)}),a.layBody.on("click","*[lay-event]",function(){var e=t(this),i=e.parents("tr").eq(0).data("index");layui.event.call(this,u,"tool("+p+")",v.call(this,{event:e.attr("lay-event")})),a.setThisRowChecked(i)}),a.layMain.on("scroll",function(){var e=t(this),i=e.scrollLeft(),n=e.scrollTop();a.layHeader.scrollLeft(i),a.layTotal.scrollLeft(i),a.layFixed.find(x).scrollTop(n),l.close(a.tipsIndex)}),R.on("click",function(){R.trigger("table.remove.tool.panel")}),R.on("table.remove.tool.panel",function(){t(".layui-table-tool-panel").remove()}),H.on("resize",function(){a.resize()})},d.init=function(e,i){i=i||{};var a=this,l=t(e?'table[lay-filter="'+e+'"]':h+"[lay-data]"),n="Table element property lay-data configuration item has a syntax error: ";return l.each(function(){var a=t(this),l=a.attr("lay-data");try{l=new Function("return "+l)()}catch(r){o.error(n+l)}var c=[],s=t.extend({elem:this,cols:[],data:[],skin:a.attr("lay-skin"),size:a.attr("lay-size"),even:"string"==typeof a.attr("lay-even")},d.config,i,l);e&&a.hide(),a.find("thead>tr").each(function(e){s.cols[e]=[],t(this).children().each(function(i){var a=t(this),l=a.attr("lay-data");try{l=new Function("return "+l)()}catch(r){return o.error(n+l)}var d=t.extend({title:a.text(),colspan:a.attr("colspan")||0,rowspan:a.attr("rowspan")||0},l);d.colspan<2&&c.push(d),s.cols[e].push(d)})}),a.find("tbody>tr").each(function(e){var i=t(this),a={};i.children("td").each(function(e,i){var l=t(this),n=l.data("field");if(n)return a[n]=l.html()}),layui.each(c,function(e,t){var l=i.children("td").eq(e);a[t.field]=l.html()}),s.data[e]=a}),d.render(s)}),a},c.that={},c.config={},d.eachCols=function(e,i,a){var l=c.config[e]||{},n=[],o=0;a=t.extend(!0,[],a||l.cols),layui.each(a,function(e,t){layui.each(t,function(t,i){if(i.colGroup){var l=0;o++,i.CHILD_COLS=[],layui.each(a[e+1],function(e,t){t.PARENT_COL_INDEX||l>1&&l==i.colspan||(t.PARENT_COL_INDEX=o,i.CHILD_COLS.push(t),l+=parseInt(t.colspan>1?t.colspan:1))})}i.PARENT_COL_INDEX||n.push(i)})});var r=function(e){layui.each(e||n,function(e,t){return t.CHILD_COLS?r(t.CHILD_COLS):void("function"==typeof i&&i(e,t))})};r()},d.checkStatus=function(e){var t=0,i=0,a=[],l=d.cache[e]||[];return layui.each(l,function(e,l){return l.constructor===Array?void i++:void(l[d.config.checkName]&&(t++,a.push(d.clearCacheKey(l))))}),{data:a,isAll:!!l.length&&t===l.length-i}},d.exportFile=function(e,t,i){t=t||d.clearCacheKey(d.cache[e]),i=i||"csv";var a=c.config[e]||{},l={csv:"text/csv",xls:"application/vnd.ms-excel"}[i],n=document.createElement("a");return r.ie?o.error("IE_NOT_SUPPORT_EXPORTS"):(n.href="data:"+l+";charset=utf-8,\ufeff"+encodeURIComponent(function(){var i=[],a=[];return layui.each(t,function(t,l){var n=[];"object"==typeof e?(layui.each(e,function(e,a){0==t&&i.push(a||"")}),layui.each(d.clearCacheKey(l),function(e,t){n.push(t)})):d.eachCols(e,function(e,a){a.field&&"normal"==a.type&&!a.hide&&(0==t&&i.push(a.title||""),n.push(l[a.field]))}),a.push(n.join(","))}),i.join(",")+"\r\n"+a.join("\r\n")}()),n.download=(a.title||"table_"+(a.index||""))+"."+i,document.body.appendChild(n),n.click(),void document.body.removeChild(n))},d.resize=function(e){if(e){var t=s(e);if(!t)return;c.that[e].resize()}else layui.each(c.that,function(){this.resize()})},d.reload=function(e,i){i=i||{};var a=s(e);if(a)return i.data&&i.data.constructor===Array&&delete a.data,d.render(t.extend(!0,{},a,i))},d.render=function(e){var t=new F(e);return c.call(t)},d.clearCacheKey=function(e){return e=t.extend({},e),delete e[d.config.checkName],delete e[d.config.indexName],e},d.init(),e(u,d)}); \ No newline at end of file diff --git a/public/static/xadmin/lib/layui/lay/modules/tree.js b/public/static/xadmin/lib/layui/lay/modules/tree.js new file mode 100644 index 00000000..e8c053d3 --- /dev/null +++ b/public/static/xadmin/lib/layui/lay/modules/tree.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(e){"use strict";var o=layui.$,a=layui.hint(),i="layui-tree-enter",r=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};r.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},r.prototype.tree=function(e,a){var i=this,r=i.options,n=a||r.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o('
                                      '),s=o(["
                                    • ",function(){return l?''+(n.spread?t.arrow[1]:t.arrow[0])+"":""}(),function(){return r.check?''+("checkbox"===r.check?t.checkbox[0]:"radio"===r.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),"
                                    • "].join(""));l&&(s.append(c),i.tree(c,n.children)),e.append(s),"function"==typeof r.click&&i.click(s,n),i.spread(s,n),r.drag&&i.drag(s,n)})},r.prototype.click=function(e,o){var a=this,i=a.options;e.children("a").on("click",function(e){layui.stope(e),i.click(o)})},r.prototype.spread=function(e,o){var a=this,i=(a.options,e.children(".layui-tree-spread")),r=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),r.removeClass("layui-show"),i.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),r.addClass("layui-show"),i.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};r[0]&&(i.on("click",l),n.on("dblclick",l))},r.prototype.on=function(e){var a=this,r=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),r.drag&&o(document).on("mousemove",function(e){var i=a.move;if(i.from){var r=(i.to,o('
                                      '));e.preventDefault(),o("."+t)[0]||o("body").append(r);var n=o("."+t)[0]?o("."+t):r;n.addClass("layui-show").html(i.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(i),e.to&&e.to.elem.children("a").removeClass(i),a.move={},o("."+t).remove())})},r.prototype.move={},r.prototype.drag=function(e,a){var r=this,t=(r.options,e.children("a")),n=function(){var t=o(this),n=r.move;n.from&&(n.to={item:a,elem:e},t.addClass(i))};t.on("mousedown",function(){var o=r.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=r.move;a.from&&(delete a.to,e.removeClass(i))})},e("tree",function(e){var i=new r(e=e||{}),t=o(e.elem);return t[0]?void i.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})}); \ No newline at end of file diff --git a/public/static/xadmin/lib/layui/lay/modules/upload.js b/public/static/xadmin/lib/layui/lay/modules/upload.js new file mode 100644 index 00000000..404d534d --- /dev/null +++ b/public/static/xadmin/lib/layui/lay/modules/upload.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define("layer",function(e){"use strict";var i=layui.$,t=layui.layer,n=layui.hint(),a=layui.device(),o={config:{},set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,r,e,i)}},l=function(){var e=this;return{upload:function(i){e.upload.call(e,i)},config:e.config}},r="upload",u="layui-upload-file",c="layui-upload-form",f="layui-upload-iframe",s="layui-upload-choose",p=function(e){var t=this;t.config=i.extend({},t.config,o.config,e),t.render()};p.prototype.config={accept:"images",exts:"",auto:!0,bindAction:"",url:"",field:"file",method:"post",data:{},drag:!0,size:0,number:0,multiple:!1},p.prototype.render=function(e){var t=this,e=t.config;e.elem=i(e.elem),e.bindAction=i(e.bindAction),t.file(),t.events()},p.prototype.file=function(){var e=this,t=e.config,n=e.elemFile=i(['"].join("")),o=t.elem.next();(o.hasClass(u)||o.hasClass(c))&&o.remove(),a.ie&&a.ie<10&&t.elem.wrap('
                                      '),e.isFile()?(e.elemFile=t.elem,t.field=t.elem[0].name):t.elem.after(n),a.ie&&a.ie<10&&e.initIE()},p.prototype.initIE=function(){var e=this,t=e.config,n=i(''),a=i(['
                                      ',"
                                      "].join(""));i("#"+f)[0]||i("body").append(n),t.elem.next().hasClass(c)||(e.elemFile.wrap(a),t.elem.next("."+c).append(function(){var e=[];return layui.each(t.data,function(i,t){t="function"==typeof t?t():t,e.push('')}),e.join("")}()))},p.prototype.msg=function(e){return t.msg(e,{icon:2,shift:6})},p.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},p.prototype.preview=function(e){var i=this;window.FileReader&&layui.each(i.chooseFiles,function(i,t){var n=new FileReader;n.readAsDataURL(t),n.onload=function(){e&&e(i,t,this.result)}})},p.prototype.upload=function(e,t){var n,o=this,l=o.config,r=o.elemFile[0],u=function(){var t=0,n=0,a=e||o.files||o.chooseFiles||r.files,u=function(){l.multiple&&t+n===o.fileLength&&"function"==typeof l.allDone&&l.allDone({total:o.fileLength,successful:t,aborted:n})};layui.each(a,function(e,a){var r=new FormData;r.append(l.field,a),layui.each(l.data,function(e,i){i="function"==typeof i?i():i,r.append(e,i)}),i.ajax({url:l.url,type:"post",data:r,contentType:!1,processData:!1,dataType:"json",headers:l.headers||{},success:function(i){t++,d(e,i),u()},error:function(){n++,o.msg("请求上传接口出现异常"),m(e),u()}})})},c=function(){var e=i("#"+f);o.elemFile.parent().submit(),clearInterval(p.timer),p.timer=setInterval(function(){var i,t=e.contents().find("body");try{i=t.text()}catch(n){o.msg("获取上传后的响应信息出现异常"),clearInterval(p.timer),m()}i&&(clearInterval(p.timer),t.html(""),d(0,i))},30)},d=function(e,i){if(o.elemFile.next("."+s).remove(),r.value="","object"!=typeof i)try{i=JSON.parse(i)}catch(t){return i={},o.msg("请对上传接口返回有效JSON")}"function"==typeof l.done&&l.done(i,e||0,function(e){o.upload(e)})},m=function(e){l.auto&&(r.value=""),"function"==typeof l.error&&l.error(e||0,function(e){o.upload(e)})},h=l.exts,v=function(){var i=[];return layui.each(e||o.chooseFiles,function(e,t){i.push(t.name)}),i}(),g={preview:function(e){o.preview(e)},upload:function(e,i){var t={};t[e]=i,o.upload(t)},pushFile:function(){return o.files=o.files||{},layui.each(o.chooseFiles,function(e,i){o.files[e]=i}),o.files},resetFile:function(e,i,t){var n=new File([i],t);o.files=o.files||{},o.files[e]=n}},y=function(){if("choose"!==t&&!l.auto||(l.choose&&l.choose(g),"choose"!==t))return l.before&&l.before(g),a.ie?a.ie>9?u():c():void u()};if(v=0===v.length?r.value.match(/[^\/\\]+\..+/g)||[]||"":v,0!==v.length){switch(l.accept){case"file":if(h&&!RegExp("\\w\\.("+h+")$","i").test(escape(v)))return o.msg("选择的文件中包含不支持的格式"),r.value="";break;case"video":if(!RegExp("\\w\\.("+(h||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(v)))return o.msg("选择的视频中包含不支持的格式"),r.value="";break;case"audio":if(!RegExp("\\w\\.("+(h||"mp3|wav|mid")+")$","i").test(escape(v)))return o.msg("选择的音频中包含不支持的格式"),r.value="";break;default:if(layui.each(v,function(e,i){RegExp("\\w\\.("+(h||"jpg|png|gif|bmp|jpeg$")+")","i").test(escape(i))||(n=!0)}),n)return o.msg("选择的图片中包含不支持的格式"),r.value=""}if(o.fileLength=function(){var i=0,t=e||o.files||o.chooseFiles||r.files;return layui.each(t,function(){i++}),i}(),l.number&&o.fileLength>l.number)return o.msg("同时最多只能上传的数量为:"+l.number);if(l.size>0&&!(a.ie&&a.ie<10)){var F;if(layui.each(o.chooseFiles,function(e,i){if(i.size>1024*l.size){var t=l.size/1024;t=t>=1?t.toFixed(2)+"MB":l.size+"KB",r.value="",F=t}}),F)return o.msg("文件不能超过"+F)}y()}},p.prototype.events=function(){var e=this,t=e.config,o=function(i){e.chooseFiles={},layui.each(i,function(i,t){var n=(new Date).getTime();e.chooseFiles[n+"-"+i]=t})},l=function(i,n){var a=e.elemFile,o=i.length>1?i.length+"个文件":(i[0]||{}).name||a[0].value.match(/[^\/\\]+\..+/g)||[]||"";a.next().hasClass(s)&&a.next().remove(),e.upload(null,"choose"),e.isFile()||t.choose||a.after(''+o+"")};t.elem.off("upload.start").on("upload.start",function(){var a=i(this),o=a.attr("lay-data");if(o)try{o=new Function("return "+o)(),e.config=i.extend({},t,o)}catch(l){n.error("Upload element property lay-data configuration item has a syntax error: "+o)}e.config.item=a,e.elemFile[0].click()}),a.ie&&a.ie<10||t.elem.off("upload.over").on("upload.over",function(){var e=i(this);e.attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){var e=i(this);e.removeAttr("lay-over")}).off("upload.drop").on("upload.drop",function(n,a){var r=i(this),u=a.originalEvent.dataTransfer.files||[];r.removeAttr("lay-over"),o(u),t.auto?e.upload(u):l(u)}),e.elemFile.off("upload.change").on("upload.change",function(){var i=this.files||[];o(i),t.auto?e.upload():l(i)}),t.bindAction.off("upload.action").on("upload.action",function(){e.upload()}),t.elem.data("haveEvents")||(e.elemFile.on("change",function(){i(this).trigger("upload.change")}),t.elem.on("click",function(){e.isFile()||i(this).trigger("upload.start")}),t.drag&&t.elem.on("dragover",function(e){e.preventDefault(),i(this).trigger("upload.over")}).on("dragleave",function(e){i(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),i(this).trigger("upload.drop",e)}),t.bindAction.on("click",function(){i(this).trigger("upload.action")}),t.elem.data("haveEvents",!0))},o.render=function(e){var i=new p(e);return l.call(i)},e(r,o)}); \ No newline at end of file diff --git a/public/static/xadmin/lib/layui/lay/modules/util.js b/public/static/xadmin/lib/layui/lay/modules/util.js new file mode 100644 index 00000000..8d38508c --- /dev/null +++ b/public/static/xadmin/lib/layui/lay/modules/util.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(t){"use strict";var e=layui.$,i={fixbar:function(t){var i,a,n="layui-fixbar",r="layui-fixbar-top",o=e(document),l=e("body");t=e.extend({showHeight:200},t),t.bar1=t.bar1===!0?"":t.bar1,t.bar2=t.bar2===!0?"":t.bar2,t.bgcolor=t.bgcolor?"background-color:"+t.bgcolor:"";var c=[t.bar1,t.bar2,""],g=e(['
                                        ',t.bar1?'
                                      • '+c[0]+"
                                      • ":"",t.bar2?'
                                      • '+c[1]+"
                                      • ":"",'
                                      • '+c[2]+"
                                      • ","
                                      "].join("")),s=g.find("."+r),u=function(){var e=o.scrollTop();e>=t.showHeight?i||(s.show(),i=1):i&&(s.hide(),i=0)};e("."+n)[0]||("object"==typeof t.css&&g.css(t.css),l.append(g),u(),g.find("li").on("click",function(){var i=e(this),a=i.attr("lay-type");"top"===a&&e("html,body").animate({scrollTop:0},200),t.click&&t.click.call(this,a)}),o.on("scroll",function(){clearTimeout(a),a=setTimeout(function(){u()},100)}))},countdown:function(t,e,i){var a=this,n="function"==typeof e,r=new Date(t).getTime(),o=new Date(!e||n?(new Date).getTime():e).getTime(),l=r-o,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];n&&(i=e);var g=setTimeout(function(){a.countdown(t,o+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],e,g),l<=0&&clearTimeout(g),g},timeAgo:function(t,e){var i=this,a=[[],[]],n=(new Date).getTime()-new Date(t).getTime();return n>6912e5?(n=new Date(t),a[0][0]=i.digit(n.getFullYear(),4),a[0][1]=i.digit(n.getMonth()+1),a[0][2]=i.digit(n.getDate()),e||(a[1][0]=i.digit(n.getHours()),a[1][1]=i.digit(n.getMinutes()),a[1][2]=i.digit(n.getSeconds())),a[0].join("-")+" "+a[1].join(":")):n>=864e5?(n/1e3/60/60/24|0)+"天前":n>=36e5?(n/1e3/60/60|0)+"小时前":n>=12e4?(n/1e3/60|0)+"分钟前":n<0?"未来":"刚刚"},digit:function(t,e){var i="";t=String(t),e=e||2;for(var a=t.length;a/g,">").replace(/'/g,"'").replace(/"/g,""")}};!function(t,e,i){"$:nomunge";function a(){n=e[l](function(){r.each(function(){var e=t(this),i=e.width(),a=e.height(),n=t.data(this,g);(i!==n.w||a!==n.h)&&e.trigger(c,[n.w=i,n.h=a])}),a()},o[s])}var n,r=t([]),o=t.resize=t.extend(t.resize,{}),l="setTimeout",c="resize",g=c+"-special-event",s="delay",u="throttleWindow";o[s]=250,o[u]=!0,t.event.special[c]={setup:function(){if(!o[u]&&this[l])return!1;var e=t(this);r=r.add(e),t.data(this,g,{w:e.width(),h:e.height()}),1===r.length&&a()},teardown:function(){if(!o[u]&&this[l])return!1;var e=t(this);r=r.not(e),e.removeData(g),r.length||clearTimeout(n)},add:function(e){function a(e,a,r){var o=t(this),l=t.data(this,g)||{};l.w=a!==i?a:o.width(),l.h=r!==i?r:o.height(),n.apply(this,arguments)}if(!o[u]&&this[l])return!1;var n;return t.isFunction(e)?(n=e,a):(n=e.handler,void(e.handler=a))}}}(e,window),t("util",i)}); \ No newline at end of file diff --git a/public/static/xadmin/lib/layui/layui.all.js b/public/static/xadmin/lib/layui/layui.all.js new file mode 100644 index 00000000..5cd59739 --- /dev/null +++ b/public/static/xadmin/lib/layui/layui.all.js @@ -0,0 +1,5 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;!function(e){"use strict";var t=document,o={modules:{},status:{},timeout:10,event:{}},n=function(){this.v="2.4.5"},r=function(){var e=t.currentScript?t.currentScript.src:function(){for(var e,o=t.scripts,n=o.length-1,r=n;r>0;r--)if("interactive"===o[r].readyState){e=o[r].src;break}return e||o[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),i=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},a="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),u={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",tree:"modules/tree",table:"modules/table",element:"modules/element",rate:"modules/rate",colorpicker:"modules/colorpicker",slider:"modules/slider",carousel:"modules/carousel",flow:"modules/flow",util:"modules/util",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"../layui.all"};n.prototype.cache=o,n.prototype.define=function(e,t){var n=this,r="function"==typeof e,i=function(){var e=function(e,t){layui[e]=t,o.status[e]=!0};return"function"==typeof t&&t(function(n,r){e(n,r),o.callback[n]=function(){t(e)}}),this};return r&&(t=e,e=[]),layui["layui.all"]||!layui["layui.all"]&&layui["layui.mobile"]?i.call(n):(n.use(e,i),n)},n.prototype.use=function(e,n,l){function s(e,t){var n="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||n.test((e.currentTarget||e.srcElement).readyState))&&(o.modules[f]=t,d.removeChild(v),function r(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void(o.status[f]?c():setTimeout(r,4))}())}function c(){l.push(layui[f]),e.length>1?y.use(e.slice(1),n,l):"function"==typeof n&&n.apply(layui,l)}var y=this,p=o.dir=o.dir?o.dir:r,d=t.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(y.each(e,function(t,o){"jquery"===o&&e.splice(t,1)}),layui.jquery=layui.$=jQuery);var f=e[0],m=0;if(l=l||[],o.host=o.host||(p.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&u[f]||!layui["layui.all"]&&layui["layui.mobile"]&&u[f])return c(),y;if(o.modules[f])!function g(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void("string"==typeof o.modules[f]&&o.status[f]?c():setTimeout(g,4))}();else{var v=t.createElement("script"),h=(u[f]?p+"lay/":/^\{\/\}/.test(y.modules[f])?"":o.base||"")+(y.modules[f]||f)+".js";h=h.replace(/^\{\/\}/,""),v.async=!0,v.charset="utf-8",v.src=h+function(){var e=o.version===!0?o.v||(new Date).getTime():o.version||"";return e?"?v="+e:""}(),d.appendChild(v),!v.attachEvent||v.attachEvent.toString&&v.attachEvent.toString().indexOf("[native code")<0||a?v.addEventListener("load",function(e){s(e,h)},!1):v.attachEvent("onreadystatechange",function(e){s(e,h)}),o.modules[f]=h}return y},n.prototype.getStyle=function(t,o){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](o)},n.prototype.link=function(e,n,r){var a=this,u=t.createElement("link"),l=t.getElementsByTagName("head")[0];"string"==typeof n&&(r=n);var s=(r||e).replace(/\.|\//g,""),c=u.id="layuicss-"+s,y=0;return u.rel="stylesheet",u.href=e+(o.debug?"?v="+(new Date).getTime():""),u.media="all",t.getElementById(c)||l.appendChild(u),"function"!=typeof n?a:(function p(){return++y>1e3*o.timeout/100?i(e+" timeout"):void(1989===parseInt(a.getStyle(t.getElementById(c),"width"))?function(){n()}():setTimeout(p,100))}(),a)},o.callback={},n.prototype.factory=function(e){if(layui[e])return"function"==typeof o.callback[e]?o.callback[e]:null},n.prototype.addcss=function(e,t,n){return layui.link(o.dir+"css/"+e,t,n)},n.prototype.img=function(e,t,o){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,"function"==typeof t&&t(n)},void(n.onerror=function(e){n.onerror=null,"function"==typeof o&&o(e)}))},n.prototype.config=function(e){e=e||{};for(var t in e)o[t]=e[t];return this},n.prototype.modules=function(){var e={};for(var t in u)e[t]=u[t];return e}(),n.prototype.extend=function(e){var t=this;e=e||{};for(var o in e)t[o]||t.modules[o]?i("模块名 "+o+" 已被占用"):t.modules[o]=e[o];return t},n.prototype.router=function(e){var t=this,e=e||location.hash,o={path:[],search:{},hash:(e.match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)?(e=e.replace(/^#\//,""),o.href="/"+e,e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],t.each(e,function(e,t){/^\w+=/.test(t)?function(){t=t.split("="),o.search[t[0]]=t[1]}():o.path.push(t)}),o):o},n.prototype.data=function(t,o,n){if(t=t||"layui",n=n||localStorage,e.JSON&&e.JSON.parse){if(null===o)return delete n[t];o="object"==typeof o?o:{key:o};try{var r=JSON.parse(n[t])}catch(i){var r={}}return"value"in o&&(r[o.key]=o.value),o.remove&&delete r[o.key],n[t]=JSON.stringify(r),o.key?r[o.key]:r}},n.prototype.sessionData=function(e,t){return this.data(e,t,sessionStorage)},n.prototype.device=function(t){var o=navigator.userAgent.toLowerCase(),n=function(e){var t=new RegExp(e+"/([^\\s\\_\\-]+)");return e=(o.match(t)||[])[1],e||!1},r={os:function(){return/windows/.test(o)?"windows":/linux/.test(o)?"linux":/iphone|ipod|ipad|ios/.test(o)?"ios":/mac/.test(o)?"mac":void 0}(),ie:function(){return!!(e.ActiveXObject||"ActiveXObject"in e)&&((o.match(/msie\s(\d+)/)||[])[1]||"11")}(),weixin:n("micromessenger")};return t&&!r[t]&&(r[t]=n(t)),r.android=/android/.test(o),r.ios="ios"===r.os,r},n.prototype.hint=function(){return{error:i}},n.prototype.each=function(e,t){var o,n=this;if("function"!=typeof t)return n;if(e=e||[],e.constructor===Object){for(o in e)if(t.call(e[o],o,e[o]))break}else for(o=0;oi?1:r/g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)});layui.define(function(e){"use strict";var a=document,t="getElementById",n="getElementsByTagName",i="laypage",r="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config,t=a.groups="groups"in a?0|a.groups:5;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),t<0?t=1:t>a.pages&&(t=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var n=a.pages>t?Math.ceil((a.curr+(t>1?1:0))/(t>0?t:1)):1,i={prev:function(){return a.prev?''+a.prev+"":""}(),page:function(){var e=[];if(a.count<1)return"";n>1&&a.first!==!1&&0!==t&&e.push(''+(a.first||1)+"");var i=Math.floor((t-1)/2),r=n>1?a.curr-i:1,u=n>1?function(){var e=a.curr+(t-i-1);return e>a.pages?a.pages:e}():t;for(u-r2&&e.push('…');r<=u;r++)r===a.curr?e.push('"+r+""):e.push(''+r+"");return a.pages>t&&a.pages>u&&a.last!==!1&&(u+1…'),0!==t&&e.push(''+(a.last||a.pages)+"")),e.join("")}(),next:function(){return a.next?''+a.next+"":""}(),count:'共 '+a.count+" 条",limit:function(){var e=['"}(),refresh:['','',""].join(""),skip:function(){return['到第','','页',""].join("")}()};return['
                                      ',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"
                                      "].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;oi.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)});!function(){"use strict";var e=window.layui&&layui.define,t={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,n=t.length-1,a=n;a>0;a--)if("interactive"===t[a].readyState){e=t[a].src;break}return e||t[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),getStyle:function(e,t){var n=e.currentStyle?e.currentStyle:window.getComputedStyle(e,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](t)},link:function(e,a,i){if(n.path){var r=document.getElementsByTagName("head")[0],o=document.createElement("link");"string"==typeof a&&(i=a);var s=(i||e).replace(/\.|\//g,""),l="layuicss-"+s,d=0;o.rel="stylesheet",o.href=n.path+e,o.id=l,document.getElementById(l)||r.appendChild(o),"function"==typeof a&&!function c(){return++d>80?window.console&&console.error("laydate.css: Invalid"):void(1989===parseInt(t.getStyle(document.getElementById(l),"width"))?a():setTimeout(c,100))}()}}},n={v:"5.0.9",config:{},index:window.laydate&&window.laydate.v?1e5:0,path:t.getPath,set:function(e){var t=this;return t.config=w.extend({},t.config,e),t},ready:function(a){var i="laydate",r="",o=(e?"modules/laydate/":"theme/")+"default/laydate.css?v="+n.v+r;return e?layui.addcss(o,a,i):t.link(o,a,i),this}},a=function(){var e=this;return{hint:function(t){e.hint.call(e,t)},config:e.config}},i="laydate",r=".layui-laydate",o="layui-this",s="laydate-disabled",l="开始日期超出了结束日期
                                      建议重新选择",d=[100,2e5],c="layui-laydate-static",m="layui-laydate-list",u="laydate-selected",h="layui-laydate-hint",y="laydate-day-prev",f="laydate-day-next",p="layui-laydate-footer",g=".laydate-btns-confirm",v="laydate-time-text",D=".laydate-btns-time",T=function(e){var t=this;t.index=++n.index,t.config=w.extend({},t.config,n.config,e),n.ready(function(){t.init()})},w=function(e){return new C(e)},C=function(e){for(var t=0,n="object"==typeof e?[e]:(this.selector=e,document.querySelectorAll(e||null));t0)return n[0].getAttribute(e)}():n.each(function(n,a){a.setAttribute(e,t)})},C.prototype.removeAttr=function(e){return this.each(function(t,n){n.removeAttribute(e)})},C.prototype.html=function(e){return this.each(function(t,n){n.innerHTML=e})},C.prototype.val=function(e){return this.each(function(t,n){n.value=e})},C.prototype.append=function(e){return this.each(function(t,n){"object"==typeof e?n.appendChild(e):n.innerHTML=n.innerHTML+e})},C.prototype.remove=function(e){return this.each(function(t,n){e?n.removeChild(e):n.parentNode.removeChild(n)})},C.prototype.on=function(e,t){return this.each(function(n,a){a.attachEvent?a.attachEvent("on"+e,function(e){e.target=e.srcElement,t.call(a,e)}):a.addEventListener(e,t,!1)})},C.prototype.off=function(e,t){return this.each(function(n,a){a.detachEvent?a.detachEvent("on"+e,t):a.removeEventListener(e,t,!1)})},T.isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0},T.prototype.config={type:"date",range:!1,format:"yyyy-MM-dd",value:null,isInitValue:!0,min:"1900-1-1",max:"2099-12-31",trigger:"focus",show:!1,showBottom:!0,btns:["clear","now","confirm"],lang:"cn",theme:"default",position:null,calendar:!1,mark:{},zIndex:null,done:null,change:null},T.prototype.lang=function(){var e=this,t=e.config,n={cn:{weeks:["日","一","二","三","四","五","六"],time:["时","分","秒"],timeTips:"选择时间",startTime:"开始时间",endTime:"结束时间",dateTips:"返回日期",month:["一","二","三","四","五","六","七","八","九","十","十一","十二"],tools:{confirm:"确定",clear:"清空",now:"现在"}},en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],time:["Hours","Minutes","Seconds"],timeTips:"Select Time",startTime:"Start Time",endTime:"End Time",dateTips:"Select Date",month:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tools:{confirm:"Confirm",clear:"Clear",now:"Now"}}};return n[t.lang]||n.cn},T.prototype.init=function(){var e=this,t=e.config,n="yyyy|y|MM|M|dd|d|HH|H|mm|m|ss|s",a="static"===t.position,i={year:"yyyy",month:"yyyy-MM",date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss"};t.elem=w(t.elem),t.eventElem=w(t.eventElem),t.elem[0]&&(t.range===!0&&(t.range="-"),t.format===i.date&&(t.format=i[t.type]),e.format=t.format.match(new RegExp(n+"|.","g"))||[],e.EXP_IF="",e.EXP_SPLIT="",w.each(e.format,function(t,a){var i=new RegExp(n).test(a)?"\\d{"+function(){return new RegExp(n).test(e.format[0===t?t+1:t-1]||"")?/^yyyy|y$/.test(a)?4:a.length:/^yyyy$/.test(a)?"1,4":/^y$/.test(a)?"1,308":"1,2"}()+"}":"\\"+a;e.EXP_IF=e.EXP_IF+i,e.EXP_SPLIT=e.EXP_SPLIT+"("+i+")"}),e.EXP_IF=new RegExp("^"+(t.range?e.EXP_IF+"\\s\\"+t.range+"\\s"+e.EXP_IF:e.EXP_IF)+"$"),e.EXP_SPLIT=new RegExp("^"+e.EXP_SPLIT+"$",""),e.isInput(t.elem[0])||"focus"===t.trigger&&(t.trigger="click"),t.elem.attr("lay-key")||(t.elem.attr("lay-key",e.index),t.eventElem.attr("lay-key",e.index)),t.mark=w.extend({},t.calendar&&"cn"===t.lang?{"0-1-1":"元旦","0-2-14":"情人","0-3-8":"妇女","0-3-12":"植树","0-4-1":"愚人","0-5-1":"劳动","0-5-4":"青年","0-6-1":"儿童","0-9-10":"教师","0-9-18":"国耻","0-10-1":"国庆","0-12-25":"圣诞"}:{},t.mark),w.each(["min","max"],function(e,n){var a=[],i=[];if("number"==typeof t[n]){var r=t[n],o=(new Date).getTime(),s=864e5,l=new Date(r?r0)return!0;var a=w.elem("div",{"class":"layui-laydate-header"}),i=[function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-prev-y"});return e.innerHTML="",e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-prev-m"});return e.innerHTML="",e}(),function(){var e=w.elem("div",{"class":"laydate-set-ym"}),t=w.elem("span"),n=w.elem("span");return e.appendChild(t),e.appendChild(n),e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-next-m"});return e.innerHTML="",e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-next-y"});return e.innerHTML="",e}()],d=w.elem("div",{"class":"layui-laydate-content"}),c=w.elem("table"),m=w.elem("thead"),u=w.elem("tr");w.each(i,function(e,t){a.appendChild(t)}),m.appendChild(u),w.each(new Array(6),function(e){var t=c.insertRow(0);w.each(new Array(7),function(a){if(0===e){var i=w.elem("th");i.innerHTML=n.weeks[a],u.appendChild(i)}t.insertCell(a)})}),c.insertBefore(m,c.children[0]),d.appendChild(c),r[e]=w.elem("div",{"class":"layui-laydate-main laydate-main-list-"+e}),r[e].appendChild(a),r[e].appendChild(d),o.push(i),s.push(d),l.push(c)}),w(d).html(function(){var e=[],i=[];return"datetime"===t.type&&e.push(''+n.timeTips+""),w.each(t.btns,function(e,r){var o=n.tools[r]||"btn";t.range&&"now"===r||(a&&"clear"===r&&(o="cn"===t.lang?"重置":"Reset"),i.push(''+o+""))}),e.push('"),e.join("")}()),w.each(r,function(e,t){i.appendChild(t)}),t.showBottom&&i.appendChild(d),/^#/.test(t.theme)){var m=w.elem("style"),u=["#{{id}} .layui-laydate-header{background-color:{{theme}};}","#{{id}} .layui-this{background-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,e.elemID).replace(/{{theme}}/g,t.theme);"styleSheet"in m?(m.setAttribute("type","text/css"),m.styleSheet.cssText=u):m.innerHTML=u,w(i).addClass("laydate-theme-molv"),i.appendChild(m)}e.remove(T.thisElemDate),a?t.elem.append(i):(document.body.appendChild(i),e.position()),e.checkDate().calendar(),e.changeEvent(),T.thisElemDate=e.elemID,"function"==typeof t.ready&&t.ready(w.extend({},t.dateTime,{month:t.dateTime.month+1}))},T.prototype.remove=function(e){var t=this,n=(t.config,w("#"+(e||t.elemID)));return n.hasClass(c)||t.checkDate(function(){n.remove()}),t},T.prototype.position=function(){var e=this,t=e.config,n=e.bindElem||t.elem[0],a=n.getBoundingClientRect(),i=e.elem.offsetWidth,r=e.elem.offsetHeight,o=function(e){return e=e?"scrollLeft":"scrollTop",document.body[e]|document.documentElement[e]},s=function(e){return document.documentElement[e?"clientWidth":"clientHeight"]},l=5,d=a.left,c=a.bottom;d+i+l>s("width")&&(d=s("width")-i-l),c+r+l>s()&&(c=a.top>r?a.top-r:s()-r,c-=2*l),t.position&&(e.elem.style.position=t.position),e.elem.style.left=d+("fixed"===t.position?0:o(1))+"px",e.elem.style.top=c+("fixed"===t.position?0:o())+"px"},T.prototype.hint=function(e){var t=this,n=(t.config,w.elem("div",{"class":h}));t.elem&&(n.innerHTML=e||"",w(t.elem).find("."+h).remove(),t.elem.appendChild(n),clearTimeout(t.hinTimer),t.hinTimer=setTimeout(function(){w(t.elem).find("."+h).remove()},3e3))},T.prototype.getAsYM=function(e,t,n){return n?t--:t++,t<0&&(t=11,e--),t>11&&(t=0,e++),[e,t]},T.prototype.systemDate=function(e){var t=e||new Date;return{year:t.getFullYear(),month:t.getMonth(),date:t.getDate(),hours:e?e.getHours():0,minutes:e?e.getMinutes():0,seconds:e?e.getSeconds():0}},T.prototype.checkDate=function(e){var t,a,i=this,r=(new Date,i.config),o=r.dateTime=r.dateTime||i.systemDate(),s=i.bindElem||r.elem[0],l=(i.isInput(s)?"val":"html",i.isInput(s)?s.value:"static"===r.position?"":s.innerHTML),c=function(e){e.year>d[1]&&(e.year=d[1],a=!0),e.month>11&&(e.month=11,a=!0),e.hours>23&&(e.hours=0,a=!0),e.minutes>59&&(e.minutes=0,e.hours++,a=!0),e.seconds>59&&(e.seconds=0,e.minutes++,a=!0),t=n.getEndDate(e.month+1,e.year),e.date>t&&(e.date=t,a=!0)},m=function(e,t,n){var o=["startTime","endTime"];t=(t.match(i.EXP_SPLIT)||[]).slice(1),n=n||0,r.range&&(i[o[n]]=i[o[n]]||{}),w.each(i.format,function(s,l){var c=parseFloat(t[s]);t[s].length必须遵循下述格式:
                                      "+(r.range?r.format+" "+r.range+" "+r.format:r.format)+"
                                      已为你重置"),a=!0):l&&l.constructor===Date?r.dateTime=i.systemDate(l):(r.dateTime=i.systemDate(),delete i.startState,delete i.endState,delete i.startDate,delete i.endDate,delete i.startTime,delete i.endTime),c(o),a&&l&&i.setValue(r.range?i.endDate?i.parse():"":i.parse()),e&&e(),i)},T.prototype.mark=function(e,t){var n,a=this,i=a.config;return w.each(i.mark,function(e,a){var i=e.split("-");i[0]!=t[0]&&0!=i[0]||i[1]!=t[1]&&0!=i[1]||i[2]!=t[2]||(n=a||t[2])}),n&&e.html(''+n+""),a},T.prototype.limit=function(e,t,n,a){var i,r=this,o=r.config,l={},d=o[n>41?"endDate":"dateTime"],c=w.extend({},d,t||{});return w.each({now:c,min:o.min,max:o.max},function(e,t){l[e]=r.newDate(w.extend({year:t.year,month:t.month,date:t.date},function(){var e={};return w.each(a,function(n,a){e[a]=t[a]}),e}())).getTime()}),i=l.nowl.max,e&&e[i?"addClass":"removeClass"](s),i},T.prototype.calendar=function(e){var t,a,i,r=this,s=r.config,l=e||s.dateTime,c=new Date,m=r.lang(),u="date"!==s.type&&"datetime"!==s.type,h=e?1:0,y=w(r.table[h]).find("td"),f=w(r.elemHeader[h][2]).find("span");if(l.yeard[1]&&(l.year=d[1],r.hint("最高只能支持到公元"+d[1]+"年")),r.firstDate||(r.firstDate=w.extend({},l)),c.setFullYear(l.year,l.month,1),t=c.getDay(),a=n.getEndDate(l.month||12,l.year),i=n.getEndDate(l.month+1,l.year),w.each(y,function(e,n){var d=[l.year,l.month],c=0;n=w(n),n.removeAttr("class"),e=t&&e=n.firstDate.year&&(r.month=a.max.month,r.date=a.max.date),n.limit(w(i),r,t),M++}),w(u[f?0:1]).attr("lay-ym",M-8+"-"+T[1]).html(b+p+" - "+(M-1+p))}else if("month"===e)w.each(new Array(12),function(e){var i=w.elem("li",{"lay-ym":e}),s={year:T[0],month:e};e+1==T[1]&&w(i).addClass(o),i.innerHTML=r.month[e]+(f?"月":""),d.appendChild(i),T[0]=n.firstDate.year&&(s.date=a.max.date),n.limit(w(i),s,t)}),w(u[f?0:1]).attr("lay-ym",T[0]+"-"+T[1]).html(T[0]+p);else if("time"===e){var E=function(){w(d).find("ol").each(function(e,a){w(a).find("li").each(function(a,i){n.limit(w(i),[{hours:a},{hours:n[x].hours,minutes:a},{hours:n[x].hours,minutes:n[x].minutes,seconds:a}][e],t,[["hours"],["hours","minutes"],["hours","minutes","seconds"]][e])})}),a.range||n.limit(w(n.footer).find(g),n[x],0,["hours","minutes","seconds"])};a.range?n[x]||(n[x]={hours:0,minutes:0,seconds:0}):n[x]=i,w.each([24,60,60],function(e,t){var a=w.elem("li"),i=["

                                      "+r.time[e]+"

                                        "];w.each(new Array(t),function(t){i.push(""+w.digit(t,2)+"")}),a.innerHTML=i.join("")+"
                                      ",d.appendChild(a)}),E()}if(y&&h.removeChild(y),h.appendChild(d),"year"===e||"month"===e)w(n.elemMain[t]).addClass("laydate-ym-show"),w(d).find("li").on("click",function(){var r=0|w(this).attr("lay-ym");if(!w(this).hasClass(s)){if(0===t)i[e]=r,l&&(n.startDate[e]=r),n.limit(w(n.footer).find(g),null,0);else if(l)n.endDate[e]=r;else{var c="year"===e?n.getAsYM(r,T[1]-1,"sub"):n.getAsYM(T[0],r,"sub");w.extend(i,{year:c[0],month:c[1]})}"year"===a.type||"month"===a.type?(w(d).find("."+o).removeClass(o),w(this).addClass(o),"month"===a.type&&"year"===e&&(n.listYM[t][0]=r,l&&(n[["startDate","endDate"][t]].year=r),n.list("month",t))):(n.checkDate("limit").calendar(),n.closeList()),n.setBtnStatus(),a.range||n.done(null,"change"),w(n.footer).find(D).removeClass(s)}});else{var S=w.elem("span",{"class":v}),k=function(){w(d).find("ol").each(function(e){var t=this,a=w(t).find("li");t.scrollTop=30*(n[x][C[e]]-2),t.scrollTop<=0&&a.each(function(e,n){if(!w(this).hasClass(s))return t.scrollTop=30*(e-2),!0})})},H=w(c[2]).find("."+v);k(),S.innerHTML=a.range?[r.startTime,r.endTime][t]:r.timeTips,w(n.elemMain[t]).addClass("laydate-time-show"),H[0]&&H.remove(),c[2].appendChild(S),w(d).find("ol").each(function(e){var t=this;w(t).find("li").on("click",function(){var r=0|this.innerHTML;w(this).hasClass(s)||(a.range?n[x][C[e]]=r:i[C[e]]=r,w(t).find("."+o).removeClass(o),w(this).addClass(o),E(),k(),(n.endDate||"time"===a.type)&&n.done(null,"change"),n.setBtnStatus())})})}return n},T.prototype.listYM=[],T.prototype.closeList=function(){var e=this;e.config;w.each(e.elemCont,function(t,n){w(this).find("."+m).remove(),w(e.elemMain[t]).removeClass("laydate-ym-show laydate-time-show")}),w(e.elem).find("."+v).remove()},T.prototype.setBtnStatus=function(e,t,n){var a,i=this,r=i.config,o=w(i.footer).find(g),d=r.range&&"date"!==r.type&&"time"!==r.type;d&&(t=t||i.startDate,n=n||i.endDate,a=i.newDate(t).getTime()>i.newDate(n).getTime(),i.limit(null,t)||i.limit(null,n)?o.addClass(s):o[a?"addClass":"removeClass"](s),e&&a&&i.hint("string"==typeof e?l.replace(/日期/g,e):l))},T.prototype.parse=function(e,t){var n=this,a=n.config,i=t||(e?w.extend({},n.endDate,n.endTime):a.range?w.extend({},n.startDate,n.startTime):a.dateTime),r=n.format.concat();return w.each(r,function(e,t){/yyyy|y/.test(t)?r[e]=w.digit(i.year,t.length):/MM|M/.test(t)?r[e]=w.digit(i.month+1,t.length):/dd|d/.test(t)?r[e]=w.digit(i.date,t.length):/HH|H/.test(t)?r[e]=w.digit(i.hours,t.length):/mm|m/.test(t)?r[e]=w.digit(i.minutes,t.length):/ss|s/.test(t)&&(r[e]=w.digit(i.seconds,t.length))}),a.range&&!e?r.join("")+" "+a.range+" "+n.parse(1):r.join("")},T.prototype.newDate=function(e){return e=e||{},new Date(e.year||1,e.month||0,e.date||1,e.hours||0,e.minutes||0,e.seconds||0)},T.prototype.setValue=function(e){var t=this,n=t.config,a=t.bindElem||n.elem[0],i=t.isInput(a)?"val":"html";return"static"===n.position||w(a)[i](e||""),this},T.prototype.stampRange=function(){var e,t,n=this,a=n.config,i=w(n.elem).find("td");if(a.range&&!n.endDate&&w(n.footer).find(g).addClass(s),n.endDate)return e=n.newDate({year:n.startDate.year,month:n.startDate.month,date:n.startDate.date}).getTime(),t=n.newDate({year:n.endDate.year,month:n.endDate.month,date:n.endDate.date}).getTime(),e>t?n.hint(l):void w.each(i,function(a,i){var r=w(i).attr("lay-ymd").split("-"),s=n.newDate({year:r[0],month:r[1]-1,date:r[2]}).getTime();w(i).removeClass(u+" "+o),s!==e&&s!==t||w(i).addClass(w(i).hasClass(y)||w(i).hasClass(f)?u:o),s>e&&s0&&t-1 in e)}function r(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Ce.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function i(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t={};return pe.each(e.match(De)||[],function(e,n){t[n]=!0}),t}function a(){re.addEventListener?(re.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(re.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(re.addEventListener||"load"===e.event.type||"complete"===re.readyState)&&(a(),pe.ready())}function u(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(_e,"-$1").toLowerCase();if(n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:qe.test(n)?pe.parseJSON(n):n)}catch(i){}pe.data(e,t,n)}else n=void 0}return n}function l(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(He(e)){var i,o,a=pe.expando,s=e.nodeType,u=s?pe.cache:e,l=s?e[a]:e[a]&&a;if(l&&u[l]&&(r||u[l].data)||void 0!==n||"string"!=typeof t)return l||(l=s?e[a]=ne.pop()||pe.guid++:a),u[l]||(u[l]=s?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(r?u[l]=pe.extend(u[l],t):u[l].data=pe.extend(u[l].data,t)),o=u[l],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[pe.camelCase(t)]=n),"string"==typeof t?(i=o[t],null==i&&(i=o[pe.camelCase(t)])):i=o,i}}function f(e,t,n){if(He(e)){var r,i,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in r?t=[t]:(t=pe.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!l(r):!pe.isEmptyObject(r))return}(n||(delete a[s].data,l(a[s])))&&(o?pe.cleanData([e],!0):fe.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function d(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return pe.css(e,t,"")},u=s(),l=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==l&&+u)&&Me.exec(pe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do o=o||".5",c/=o,pe.style(e,t,c+l);while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function p(e){var t=ze.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,r,i=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||pe.nodeName(r,t)?o.push(r):pe.merge(o,h(r,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function g(e,t){for(var n,r=0;null!=(n=e[r]);r++)pe._data(n,"globalEval",!t||pe._data(t[r],"globalEval"))}function m(e){Be.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t,n,r,i){for(var o,a,s,u,l,c,f,d=e.length,y=p(t),v=[],x=0;x"!==f[1]||Ve.test(a)?0:u:u.firstChild,o=a&&a.childNodes.length;o--;)pe.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(pe.merge(v,u.childNodes),u.textContent="";u.firstChild;)u.removeChild(u.firstChild);u=y.lastChild}else v.push(t.createTextNode(a));for(u&&y.removeChild(u),fe.appendChecked||pe.grep(h(v,"input"),m),x=0;a=v[x++];)if(r&&pe.inArray(a,r)>-1)i&&i.push(a);else if(s=pe.contains(a.ownerDocument,a),u=h(y.appendChild(a),"script"),s&&g(u),n)for(o=0;a=u[o++];)Ie.test(a.type||"")&&n.push(a);return u=null,y}function v(){return!0}function x(){return!1}function b(){try{return re.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=x;else if(!i)return e;return 1===o&&(a=i,i=function(e){return pe().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,i,r,n)})}function T(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function C(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function E(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function N(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,r,i,o=pe._data(e),a=pe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;r1&&"string"==typeof p&&!fe.checkClone&&rt.test(p))return e.each(function(i){var o=e.eq(i);g&&(t[0]=p.call(this,i,o.html())),S(o,t,n,r)});if(f&&(l=y(t,e[0].ownerDocument,!1,e,r),i=l.firstChild,1===l.childNodes.length&&(l=i),i||r)){for(s=pe.map(h(l,"script"),C),a=s.length;c")).appendTo(t.documentElement),t=(ut[0].contentWindow||ut[0].contentDocument).document,t.write(),t.close(),n=D(e,t),ut.detach()),lt[e]=n),n}function L(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function H(e){if(e in Et)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=Ct.length;n--;)if(e=Ct[n]+t,e in Et)return e}function q(e,t){for(var n,r,i,o=[],a=0,s=e.length;a=0&&n=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==pe.type(e)||e.nodeType||pe.isWindow(e))return!1;try{if(e.constructor&&!ce.call(e,"constructor")&&!ce.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(!fe.ownFirst)for(t in e)return ce.call(e,t);for(t in e);return void 0===t||ce.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ue[le.call(e)]||"object":typeof e},globalEval:function(t){t&&pe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ge,"ms-").replace(me,ye)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,i=0;if(n(e))for(r=e.length;iT.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[P]=!0,e}function i(e){var t=H.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)T.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||V)-(~e.sourceIndex||V);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function d(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var i=0,o=n.length;i-1&&(r[l]=!(a[l]=f))}}else x=m(x===a?x.splice(h,x.length):x),o?o(null,a,x,u):Q.apply(a,x)})}function v(e){for(var t,n,r,i=e.length,o=T.relative[e[0].type],a=o||T.relative[" "],s=o?1:0,u=p(function(e){return e===t},a,!0),l=p(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s1&&h(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,h="0",g=r&&[],y=[],v=A,x=r||o&&T.find.TAG("*",l),b=W+=null==v?1:Math.random()||.1,w=x.length;for(l&&(A=a===H||a||l);h!==w&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===H||(L(c),s=!_);d=e[f++];)if(d(c,a||H,s)){u.push(c);break}l&&(W=b)}i&&((c=!d&&c)&&p--,r&&g.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(g,y,a,s);if(r){if(p>0)for(;h--;)g[h]||y[h]||(y[h]=G.call(u));y=m(y)}Q.apply(u,y),l&&!r&&y.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(W=b,A=v),g};return i?r(a):a}var b,w,T,C,E,N,k,S,A,D,j,L,H,q,_,F,M,O,R,P="sizzle"+1*new Date,B=e.document,W=0,I=0,$=n(),z=n(),X=n(),U=function(e,t){return e===t&&(j=!0),0},V=1<<31,Y={}.hasOwnProperty,J=[],G=J.pop,K=J.push,Q=J.push,Z=J.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),de=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,xe=/'|\\/g,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Te=function(){L()};try{Q.apply(J=Z.call(B.childNodes),B.childNodes),J[B.childNodes.length].nodeType}catch(Ce){Q={apply:J.length?function(e,t){K.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}w=t.support={},E=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},L=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:B;return r!==H&&9===r.nodeType&&r.documentElement?(H=r,q=H.documentElement,_=!E(H),(n=H.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Te,!1):n.attachEvent&&n.attachEvent("onunload",Te)),w.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=i(function(e){return e.appendChild(H.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=me.test(H.getElementsByClassName),w.getById=i(function(e){return q.appendChild(e).id=P,!H.getElementsByName||!H.getElementsByName(P).length}),w.getById?(T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&_){var n=t.getElementById(e);return n?[n]:[]}},T.filter.ID=function(e){var t=e.replace(be,we);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(be,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},T.find.CLASS=w.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&_)return t.getElementsByClassName(e)},M=[],F=[],(w.qsa=me.test(H.querySelectorAll))&&(i(function(e){q.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||F.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+P+"-]").length||F.push("~="),e.querySelectorAll(":checked").length||F.push(":checked"),e.querySelectorAll("a#"+P+"+*").length||F.push(".#.+[+~]")}),i(function(e){var t=H.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&F.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||F.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),F.push(",.*:")})),(w.matchesSelector=me.test(O=q.matches||q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&i(function(e){w.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),M.push("!=",oe)}),F=F.length&&new RegExp(F.join("|")),M=M.length&&new RegExp(M.join("|")),t=me.test(q.compareDocumentPosition),R=t||me.test(q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return j=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===H||e.ownerDocument===B&&R(B,e)?-1:t===H||t.ownerDocument===B&&R(B,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return j=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===H?-1:t===H?1:i?-1:o?1:D?ee(D,e)-ee(D,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===B?-1:u[r]===B?1:0},H):H},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==H&&L(e),n=n.replace(ce,"='$1']"),w.matchesSelector&&_&&!X[n+" "]&&(!M||!M.test(n))&&(!F||!F.test(n)))try{var r=O.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,H,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==H&&L(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==H&&L(e);var n=T.attrHandle[t.toLowerCase()],r=n&&Y.call(T.attrHandle,t.toLowerCase())?n(e,t,!_):void 0;return void 0!==r?r:w.attributes||!_?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(j=!w.detectDuplicates,D=!w.sortStable&&e.slice(0),e.sort(U),j){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return D=null,e},C=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=C(t);return n},T=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,we),e[3]=(e[3]||e[4]||e[5]||"").replace(be,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=N(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s,x=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(d=m,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}), +l=c[e]||[],p=l[0]===W&&l[1],x=p&&l[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[W,p,x];break}}else if(v&&(d=t,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===W&&l[1],x=p),x===!1)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==y:1!==d.nodeType)||!++x||(v&&(f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[W,x]),d!==t)););return x-=i,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[P]?o(n):o.length>1?(i=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=ee(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=k(e.replace(se,"$1"));return i[P]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(be,we),function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,we).toLowerCase(),function(t){var n;do if(n=_?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(a=o[0]).type&&w.getById&&9===t.nodeType&&_&&T.relative[o[1].type]){if(t=(T.find.ID(a.matches[0].replace(be,we),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!T.relative[s=a.type]);)if((u=T.find[s])&&(r=u(a.matches[0].replace(be,we),ve.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return Q.apply(n,r),n;break}}return(l||k(e,f))(r,t,!_,n,!t||ve.test(e)&&c(t.parentNode)||t),n},w.sortStable=P.split("").sort(U).join("")===P,w.detectDuplicates=!!j,L(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(H.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);pe.find=ve,pe.expr=ve.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=ve.uniqueSort,pe.text=ve.getText,pe.isXMLDoc=ve.isXML,pe.contains=ve.contains;var xe=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&pe(e).is(n))break;r.push(e)}return r},be=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},we=pe.expr.match.needsContext,Te=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Ce=/^.[^:#\[\.,]*$/;pe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?pe.find.matchesSelector(r,e)?[r]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;t1?pe.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&we.test(e)?pe(e):e||[],!1).length}});var Ee,Ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ke=pe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ee,"string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Ne.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:re,!0)),Te.test(r[1])&&pe.isPlainObject(t))for(r in t)pe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(i=re.getElementById(r[2]),i&&i.parentNode){if(i.id!==r[2])return Ee.find(e);this.length=1,this[0]=i}return this.context=re,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):pe.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(pe):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),pe.makeArray(e,this))};ke.prototype=pe.fn,Ee=pe(re);var Se=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t,n=pe(e,this),r=n.length;return this.filter(function(){for(t=0;t-1:1===n.nodeType&&pe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?pe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?pe.inArray(this[0],pe(e)):pe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return xe(e,"parentNode")},parentsUntil:function(e,t,n){return xe(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return xe(e,"nextSibling")},prevAll:function(e){return xe(e,"previousSibling")},nextUntil:function(e,t,n){return xe(e,"nextSibling",n)},prevUntil:function(e,t,n){return xe(e,"previousSibling",n)},siblings:function(e){return be((e.parentNode||{}).firstChild,e)},children:function(e){return be(e.firstChild)},contents:function(e){return pe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:pe.merge([],e.childNodes)}},function(e,t){pe.fn[e]=function(n,r){var i=pe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=pe.filter(r,i)),this.length>1&&(Ae[e]||(i=pe.uniqueSort(i)),Se.test(e)&&(i=i.reverse())),this.pushStack(i)}});var De=/\S+/g;pe.Callbacks=function(e){e="string"==typeof e?o(e):pe.extend({},e);var t,n,r,i,a=[],s=[],u=-1,l=function(){for(i=e.once,r=t=!0;s.length;u=-1)for(n=s.shift();++u-1;)a.splice(n,1),n<=u&&u--}),this},has:function(e){return e?pe.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=!0,n||c.disable(),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},pe.extend({Deferred:function(e){var t=[["resolve","done",pe.Callbacks("once memory"),"resolved"],["reject","fail",pe.Callbacks("once memory"),"rejected"],["notify","progress",pe.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return pe.Deferred(function(n){pe.each(t,function(t,o){var a=pe.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?pe.extend(e,r):r}},i={};return r.pipe=r.then,pe.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=ie.call(arguments),a=o.length,s=1!==a||e&&pe.isFunction(e.promise)?a:0,u=1===s?e:pe.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?ie.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);i0||(je.resolveWith(re,[pe]),pe.fn.triggerHandler&&(pe(re).triggerHandler("ready"),pe(re).off("ready"))))}}),pe.ready.promise=function(t){if(!je)if(je=pe.Deferred(),"complete"===re.readyState||"loading"!==re.readyState&&!re.documentElement.doScroll)e.setTimeout(pe.ready);else if(re.addEventListener)re.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s);else{re.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&re.documentElement}catch(r){}n&&n.doScroll&&!function i(){if(!pe.isReady){try{n.doScroll("left")}catch(t){return e.setTimeout(i,50)}a(),pe.ready()}}()}return je.promise(t)},pe.ready.promise();var Le;for(Le in pe(fe))break;fe.ownFirst="0"===Le,fe.inlineBlockNeedsLayout=!1,pe(function(){var e,t,n,r;n=re.getElementsByTagName("body")[0],n&&n.style&&(t=re.createElement("div"),r=re.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",fe.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=re.createElement("div");fe.deleteExpando=!0;try{delete e.test}catch(t){fe.deleteExpando=!1}e=null}();var He=function(e){var t=pe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||t!==!0&&e.getAttribute("classid")===t)},qe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,_e=/([A-Z])/g;pe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?pe.cache[e[pe.expando]]:e[pe.expando],!!e&&!l(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return f(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return f(e,t,!0)}}),pe.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=pe.data(o),1===o.nodeType&&!pe._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=pe.camelCase(r.slice(5)),u(o,r,i[r])));pe._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){pe.data(this,e)}):arguments.length>1?this.each(function(){pe.data(this,e,t)}):o?u(o,e,pe.data(o,e)):void 0},removeData:function(e){return this.each(function(){pe.removeData(this,e)})}}),pe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=pe._data(e,t),n&&(!r||pe.isArray(n)?r=pe._data(e,t,pe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=pe.queue(e,t),r=n.length,i=n.shift(),o=pe._queueHooks(e,t),a=function(){pe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return pe._data(e,n)||pe._data(e,n,{empty:pe.Callbacks("once memory").add(function(){pe._removeData(e,t+"queue"),pe._removeData(e,n)})})}}),pe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length
                                      a",fe.leadingWhitespace=3===e.firstChild.nodeType,fe.tbody=!e.getElementsByTagName("tbody").length,fe.htmlSerialize=!!e.getElementsByTagName("link").length,fe.html5Clone="<:nav>"!==re.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,t.appendChild(n),fe.appendChecked=n.checked,e.innerHTML="",fe.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,t.appendChild(e),n=re.createElement("input"),n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),fe.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.noCloneEvent=!!e.addEventListener,e[pe.expando]=1,fe.attributes=!e.getAttribute(pe.expando)}();var Xe={option:[1,""],legend:[1,"
                                      ","
                                      "],area:[1,"",""],param:[1,"",""],thead:[1,"","
                                      "],tr:[2,"","
                                      "],col:[2,"","
                                      "],td:[3,"","
                                      "],_default:fe.htmlSerialize?[0,"",""]:[1,"X
                                      ","
                                      "]};Xe.optgroup=Xe.option,Xe.tbody=Xe.tfoot=Xe.colgroup=Xe.caption=Xe.thead,Xe.th=Xe.td;var Ue=/<|&#?\w+;/,Ve=/-1&&(h=p.split("."),p=h.shift(),h.sort()),a=p.indexOf(":")<0&&"on"+p,t=t[pe.expando]?t:new pe.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:pe.makeArray(n,[t]),l=pe.event.special[p]||{},i||!l.trigger||l.trigger.apply(r,n)!==!1)){if(!i&&!l.noBubble&&!pe.isWindow(r)){for(u=l.delegateType||p,Ke.test(u+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),c=s;c===(r.ownerDocument||re)&&d.push(c.defaultView||c.parentWindow||e)}for(f=0;(s=d[f++])&&!t.isPropagationStopped();)t.type=f>1?u:l.bindType||p,o=(pe._data(s,"events")||{})[t.type]&&pe._data(s,"handle"),o&&o.apply(s,n),o=a&&s[a],o&&o.apply&&He(s)&&(t.result=o.apply(s,n),t.result===!1&&t.preventDefault());if(t.type=p,!i&&!t.isDefaultPrevented()&&(!l._default||l._default.apply(d.pop(),n)===!1)&&He(r)&&a&&r[p]&&!pe.isWindow(r)){c=r[a],c&&(r[a]=null),pe.event.triggered=p;try{r[p]()}catch(g){}pe.event.triggered=void 0,c&&(r[a]=c)}return t.result}},dispatch:function(e){e=pe.event.fix(e);var t,n,r,i,o,a=[],s=ie.call(arguments),u=(pe._data(this,"events")||{})[e.type]||[],l=pe.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(a=pe.event.handlers.call(this,e,u),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,r=((pe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(r=[],n=0;n-1:pe.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&a.push({elem:u,handlers:r})}return s]","i"),tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,nt=/\s*$/g,at=p(re),st=at.appendChild(re.createElement("div"));pe.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1>")},clone:function(e,t,n){var r,i,o,a,s,u=pe.contains(e.ownerDocument,e);if(fe.html5Clone||pe.isXMLDoc(e)||!et.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(st.innerHTML=e.outerHTML,st.removeChild(o=st.firstChild)),!(fe.noCloneEvent&&fe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(r=h(o),s=h(e),a=0;null!=(i=s[a]);++a)r[a]&&k(i,r[a]);if(t)if(n)for(s=s||h(e),r=r||h(o),a=0;null!=(i=s[a]);a++)N(i,r[a]);else N(e,o);return r=h(o,"script"),r.length>0&&g(r,!u&&h(e,"script")),r=s=i=null,o},cleanData:function(e,t){for(var n,r,i,o,a=0,s=pe.expando,u=pe.cache,l=fe.attributes,c=pe.event.special;null!=(n=e[a]);a++)if((t||He(n))&&(i=n[s],o=i&&u[i])){if(o.events)for(r in o.events)c[r]?pe.event.remove(n,r):pe.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l||"undefined"==typeof n.removeAttribute?n[s]=void 0:n.removeAttribute(s),ne.push(i))}}}),pe.fn.extend({domManip:S,detach:function(e){return A(this,e,!0)},remove:function(e){return A(this,e)},text:function(e){return Pe(this,function(e){return void 0===e?pe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||re).createTextNode(e))},null,e,arguments.length)},append:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.appendChild(e)}})},prepend:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&pe.cleanData(h(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&pe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return pe.clone(this,e,t)})},html:function(e){return Pe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Ze,""):void 0;if("string"==typeof e&&!nt.test(e)&&(fe.htmlSerialize||!et.test(e))&&(fe.leadingWhitespace||!$e.test(e))&&!Xe[(We.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e);try{for(;nt",t=l.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",o=0===t[0].offsetHeight,o&&(t[0].style.display="",t[1].style.display="none",o=0===t[0].offsetHeight)),f.removeChild(u)}var n,r,i,o,a,s,u=re.createElement("div"),l=re.createElement("div");l.style&&(l.style.cssText="float:left;opacity:.5",fe.opacity="0.5"===l.style.opacity,fe.cssFloat=!!l.style.cssFloat,l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",fe.clearCloneStyle="content-box"===l.style.backgroundClip,u=re.createElement("div"),u.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",l.innerHTML="",u.appendChild(l),fe.boxSizing=""===l.style.boxSizing||""===l.style.MozBoxSizing||""===l.style.WebkitBoxSizing,pe.extend(fe,{reliableHiddenOffsets:function(){return null==n&&t(),o},boxSizingReliable:function(){return null==n&&t(),i},pixelMarginRight:function(){return null==n&&t(),r},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),a},reliableMarginLeft:function(){return null==n&&t(),s}}))}();var ht,gt,mt=/^(top|right|bottom|left)$/;e.getComputedStyle?(ht=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n.getPropertyValue(t)||n[t]:void 0,""!==a&&void 0!==a||pe.contains(e.ownerDocument,e)||(a=pe.style(e,t)),n&&!fe.pixelMarginRight()&&ft.test(a)&&ct.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o),void 0===a?a:a+""}):pt.currentStyle&&(ht=function(e){return e.currentStyle},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),ft.test(a)&&!mt.test(t)&&(r=s.left,i=e.runtimeStyle,o=i&&i.left,o&&(i.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"});var yt=/alpha\([^)]*\)/i,vt=/opacity\s*=\s*([^)]*)/i,xt=/^(none|table(?!-c[ea]).+)/,bt=new RegExp("^("+Fe+")(.*)$","i"),wt={position:"absolute",visibility:"hidden",display:"block"},Tt={letterSpacing:"0",fontWeight:"400"},Ct=["Webkit","O","Moz","ms"],Et=re.createElement("div").style;pe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=gt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":fe.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=pe.camelCase(t),u=e.style;if(t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];if(o=typeof n,"string"===o&&(i=Me.exec(n))&&i[1]&&(n=d(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(pe.cssNumber[s]?"":"px")),fe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,r)))))try{u[t]=n}catch(l){}}},css:function(e,t,n,r){var i,o,a,s=pe.camelCase(t);return t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=gt(e,t,r)),"normal"===o&&t in Tt&&(o=Tt[t]),""===n||n?(i=parseFloat(o),n===!0||isFinite(i)?i||0:o):o}}),pe.each(["height","width"],function(e,t){pe.cssHooks[t]={get:function(e,n,r){if(n)return xt.test(pe.css(e,"display"))&&0===e.offsetWidth?dt(e,wt,function(){return M(e,t,r)}):M(e,t,r)},set:function(e,n,r){var i=r&&ht(e);return _(e,n,r?F(e,t,r,fe.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,i),i):0)}}}),fe.opacity||(pe.cssHooks.opacity={get:function(e,t){return vt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=pe.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===pe.trim(o.replace(yt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=yt.test(o)?o.replace(yt,i):o+" "+i)}}),pe.cssHooks.marginRight=L(fe.reliableMarginRight,function(e,t){if(t)return dt(e,{display:"inline-block"},gt,[e,"marginRight"])}),pe.cssHooks.marginLeft=L(fe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(gt(e,"marginLeft"))||(pe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-dt(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px"}),pe.each({margin:"",padding:"",border:"Width"},function(e,t){pe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Oe[r]+t]=o[r]||o[r-2]||o[0];return i}},ct.test(e)||(pe.cssHooks[e+t].set=_)}),pe.fn.extend({css:function(e,t){return Pe(this,function(e,t,n){var r,i,o={},a=0;if(pe.isArray(t)){for(r=ht(e),i=t.length;a1)},show:function(){return q(this,!0)},hide:function(){return q(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Re(this)?pe(this).show():pe(this).hide()})}}),pe.Tween=O,O.prototype={constructor:O,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(pe.cssNumber[n]?"":"px")},cur:function(){var e=O.propHooks[this.prop];return e&&e.get?e.get(this):O.propHooks._default.get(this)},run:function(e){var t,n=O.propHooks[this.prop];return this.options.duration?this.pos=t=pe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=O.prototype.init,pe.fx.step={};var Nt,kt,St=/^(?:toggle|show|hide)$/,At=/queueHooks$/;pe.Animation=pe.extend($,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return d(n.elem,e,Me.exec(t),n),n}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(De);for(var n,r=0,i=e.length;r
                                      a",e=n.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),n.appendChild(t),e=n.getElementsByTagName("a")[0],e.style.cssText="top:1px",fe.getSetAttribute="t"!==n.className,fe.style=/top/.test(e.getAttribute("style")),fe.hrefNormalized="/a"===e.getAttribute("href"),fe.checkOn=!!t.value,fe.optSelected=i.selected,fe.enctype=!!re.createElement("form").enctype,r.disabled=!0,fe.optDisabled=!i.disabled,t=re.createElement("input"),t.setAttribute("value",""),fe.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),fe.radioValue="t"===t.value}();var Dt=/\r/g,jt=/[\x20\t\r\n\f]+/g;pe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=pe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,pe(this).val()):e,null==i?i="":"number"==typeof i?i+="":pe.isArray(i)&&(i=pe.map(i,function(e){return null==e?"":e+""})),t=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=pe.valHooks[i.type]||pe.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Dt,""):null==n?"":n)}}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:pe.trim(pe.text(e)).replace(jt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u-1)try{r.selected=n=!0}catch(s){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){if(pe.isArray(t))return e.checked=pe.inArray(pe(e).val(),t)>-1}},fe.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Lt,Ht,qt=pe.expr.attrHandle,_t=/^(?:checked|selected)$/i,Ft=fe.getSetAttribute,Mt=fe.input;pe.fn.extend({attr:function(e,t){return Pe(this,pe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?pe.prop(e,t,n):(1===o&&pe.isXMLDoc(e)||(t=t.toLowerCase(),i=pe.attrHooks[t]||(pe.expr.match.bool.test(t)?Ht:Lt)),void 0!==n?null===n?void pe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=pe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!fe.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(De);if(o&&1===e.nodeType)for(;n=o[i++];)r=pe.propFix[n]||n,pe.expr.match.bool.test(n)?Mt&&Ft||!_t.test(n)?e[r]=!1:e[pe.camelCase("default-"+n)]=e[r]=!1:pe.attr(e,n,""),e.removeAttribute(Ft?n:r)}}),Ht={set:function(e,t,n){return t===!1?pe.removeAttr(e,n):Mt&&Ft||!_t.test(n)?e.setAttribute(!Ft&&pe.propFix[n]||n,n):e[pe.camelCase("default-"+n)]=e[n]=!0,n}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=qt[t]||pe.find.attr;Mt&&Ft||!_t.test(t)?qt[t]=function(e,t,r){var i,o;return r||(o=qt[t],qt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,qt[t]=o),i}:qt[t]=function(e,t,n){if(!n)return e[pe.camelCase("default-"+t)]?t.toLowerCase():null}}),Mt&&Ft||(pe.attrHooks.value={set:function(e,t,n){return pe.nodeName(e,"input")?void(e.defaultValue=t):Lt&&Lt.set(e,t,n)}}),Ft||(Lt={set:function(e,t,n){var r=e.getAttributeNode(n);if(r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n))return t}},qt.id=qt.name=qt.coords=function(e,t,n){var r;if(!n)return(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},pe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:Lt.set},pe.attrHooks.contenteditable={set:function(e,t,n){Lt.set(e,""!==t&&t,n)}},pe.each(["width","height"],function(e,t){pe.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}})),fe.style||(pe.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Ot=/^(?:input|select|textarea|button|object)$/i,Rt=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return Pe(this,pe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=pe.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),pe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,i=pe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=pe.find.attr(e,"tabindex");return t?parseInt(t,10):Ot.test(e.nodeName)||Rt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),fe.hrefNormalized||pe.each(["href","src"],function(e,t){pe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),fe.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),fe.enctype||(pe.propFix.enctype="encoding");var Pt=/[\t\r\n\f]/g;pe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).addClass(e.call(this,t,z(this)))});if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):pe.isFunction(e)?this.each(function(n){pe(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=pe(this),o=e.match(De)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=z(this),t&&pe._data(this,"__className__",t),pe.attr(this,"class",t||e===!1?"":pe._data(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+z(n)+" ").replace(Pt," ").indexOf(t)>-1)return!0;return!1}}),pe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){pe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var Bt=e.location,Wt=pe.now(),It=/\?/,$t=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=pe.trim(t+"");return i&&!pe.trim(i.replace($t,function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")}))?Function("return "+i)():pe.error("Invalid JSON: "+t)},pe.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(r=new e.DOMParser,n=r.parseFromString(t,"text/xml")):(n=new e.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(i){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+t),n};var zt=/#.*$/,Xt=/([?&])_=[^&]*/,Ut=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Vt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Yt=/^(?:GET|HEAD)$/,Jt=/^\/\//,Gt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Kt={},Qt={},Zt="*/".concat("*"),en=Bt.href,tn=Gt.exec(en.toLowerCase())||[];pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:en,type:"GET",isLocal:Vt.test(tn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pe.parseJSON,"text xml":pe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?V(V(e,pe.ajaxSettings),t):V(pe.ajaxSettings,e)},ajaxPrefilter:X(Kt),ajaxTransport:X(Qt),ajax:function(t,n){function r(t,n,r,i){var o,f,v,x,w,C=n;2!==b&&(b=2,u&&e.clearTimeout(u),c=void 0,s=i||"",T.readyState=t>0?4:0,o=t>=200&&t<300||304===t,r&&(x=Y(d,T,r)),x=J(d,x,T,o),o?(d.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(pe.lastModified[a]=w),w=T.getResponseHeader("etag"),w&&(pe.etag[a]=w)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=x.state,f=x.data,v=x.error,o=!v)):(v=C,!t&&C||(C="error",t<0&&(t=0))),T.status=t,T.statusText=(n||C)+"",o?g.resolveWith(p,[f,C,T]):g.rejectWith(p,[T,C,v]),T.statusCode(y),y=void 0,l&&h.trigger(o?"ajaxSuccess":"ajaxError",[T,d,o?f:v]),m.fireWith(p,[T,C]),l&&(h.trigger("ajaxComplete",[T,d]),--pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,d=pe.ajaxSetup({},n),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?pe(p):pe.event,g=pe.Deferred(),m=pe.Callbacks("once memory"),y=d.statusCode||{},v={},x={},b=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!f)for(f={};t=Ut.exec(s);)f[t[1].toLowerCase()]=t[2];t=f[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)y[t]=[y[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return c&&c.abort(t),r(0,t),this}};if(g.promise(T).complete=m.add,T.success=T.done,T.error=T.fail,d.url=((t||d.url||en)+"").replace(zt,"").replace(Jt,tn[1]+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=pe.trim(d.dataType||"*").toLowerCase().match(De)||[""],null==d.crossDomain&&(i=Gt.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===tn[1]&&i[2]===tn[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(tn[3]||("http:"===tn[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=pe.param(d.data,d.traditional)),U(Kt,d,n,T),2===b)return T;l=pe.event&&d.global,l&&0===pe.active++&&pe.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Yt.test(d.type),a=d.url,d.hasContent||(d.data&&(a=d.url+=(It.test(a)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Xt.test(a)?a.replace(Xt,"$1_="+Wt++):a+(It.test(a)?"&":"?")+"_="+Wt++)),d.ifModified&&(pe.lastModified[a]&&T.setRequestHeader("If-Modified-Since",pe.lastModified[a]),pe.etag[a]&&T.setRequestHeader("If-None-Match",pe.etag[a])),(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&T.setRequestHeader("Content-Type",d.contentType),T.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Zt+"; q=0.01":""):d.accepts["*"]);for(o in d.headers)T.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(d.beforeSend.call(p,T,d)===!1||2===b))return T.abort();w="abort";for(o in{success:1,error:1,complete:1})T[o](d[o]);if(c=U(Qt,d,n,T)){if(T.readyState=1,l&&h.trigger("ajaxSend",[T,d]),2===b)return T;d.async&&d.timeout>0&&(u=e.setTimeout(function(){T.abort("timeout")},d.timeout));try{b=1,c.send(v,r)}catch(C){if(!(b<2))throw C;r(-1,C)}}else r(-1,"No Transport");return T},getJSON:function(e,t,n){return pe.get(e,t,n,"json")},getScript:function(e,t){return pe.get(e,void 0,t,"script")}}),pe.each(["get","post"],function(e,t){pe[t]=function(e,n,r,i){return pe.isFunction(n)&&(i=i||r,r=n,n=void 0),pe.ajax(pe.extend({url:e,type:t,dataType:i,data:n,success:r},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},pe.fn.extend({wrapAll:function(e){if(pe.isFunction(e))return this.each(function(t){pe(this).wrapAll(e.call(this,t))});if(this[0]){var t=pe(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return pe.isFunction(e)?this.each(function(t){pe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=pe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=pe.isFunction(e);return this.each(function(n){pe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){pe.nodeName(this,"body")||pe(this).replaceWith(this.childNodes)}).end()}}),pe.expr.filters.hidden=function(e){return fe.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:K(e)},pe.expr.filters.visible=function(e){return!pe.expr.filters.hidden(e)};var nn=/%20/g,rn=/\[\]$/,on=/\r?\n/g,an=/^(?:submit|button|image|reset|file)$/i,sn=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var n,r=[],i=function(e,t){t=pe.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=pe.ajaxSettings&&pe.ajaxSettings.traditional),pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){i(this.name,this.value)});else for(n in e)Q(n,e[n],t,i);return r.join("&").replace(nn,"+")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&sn.test(this.nodeName)&&!an.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=pe(this).val();return null==n?null:pe.isArray(n)?pe.map(n,function(e){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),pe.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return this.isLocal?ee():re.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||ee()}:Z;var un=0,ln={},cn=pe.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in ln)ln[e](void 0,!0)}),fe.cors=!!cn&&"withCredentials"in cn,cn=fe.ajax=!!cn,cn&&pe.ajaxTransport(function(t){if(!t.crossDomain||fe.cors){var n;return{send:function(r,i){var o,a=t.xhr(),s=++un;if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)void 0!==r[o]&&a.setRequestHeader(o,r[o]+"");a.send(t.hasContent&&t.data||null),n=function(e,r){var o,u,l;if(n&&(r||4===a.readyState))if(delete ln[s],n=void 0,a.onreadystatechange=pe.noop,r)4!==a.readyState&&a.abort();else{l={},o=a.status,"string"==typeof a.responseText&&(l.text=a.responseText);try{u=a.statusText}catch(c){u=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=l.text?200:404}l&&i(o,u,l,a.getAllResponseHeaders())},t.async?4===a.readyState?e.setTimeout(n):a.onreadystatechange=ln[s]=n:n()},abort:function(){n&&n(void 0,!0)}}}}),pe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),pe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=re.head||pe("head")[0]||re.documentElement;return{send:function(r,i){t=re.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var fn=[],dn=/(=)\?(?=&|$)|\?\?/;pe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=fn.pop()||pe.expando+"_"+Wt++;return this[e]=!0,e}}),pe.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=t.jsonp!==!1&&(dn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&dn.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=pe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(dn,"$1"+i):t.jsonp!==!1&&(t.url+=(It.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||pe.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?pe(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,fn.push(i)),a&&pe.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),pe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||re;var r=Te.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=y([e],t,i),i&&i.length&&pe(i).remove(),pe.merge([],r.childNodes))};var pn=pe.fn.load;return pe.fn.load=function(e,t,n){if("string"!=typeof e&&pn)return pn.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=pe.trim(e.slice(s,e.length)),e=e.slice(0,s)),pe.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&pe.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?pe("
                                      ").append(pe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},pe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){pe.fn[t]=function(e){return this.on(t,e)}}),pe.expr.filters.animated=function(e){return pe.grep(pe.timers,function(t){return e===t.elem}).length},pe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=pe.css(e,"position"),f=pe(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=pe.css(e,"top"),u=pe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&pe.inArray("auto",[o,u])>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),pe.isFunction(t)&&(t=t.call(e,n,pe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},pe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){pe.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;if(o)return t=o.documentElement,pe.contains(t,i)?("undefined"!=typeof i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=te(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===pe.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),pe.nodeName(e[0],"html")||(n=e.offset()),n.top+=pe.css(e[0],"borderTopWidth",!0),n.left+=pe.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-pe.css(r,"marginTop",!0),left:t.left-n.left-pe.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){ +for(var e=this.offsetParent;e&&!pe.nodeName(e,"html")&&"static"===pe.css(e,"position");)e=e.offsetParent;return e||pt})}}),pe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);pe.fn[e]=function(r){return Pe(this,function(e,r,i){var o=te(e);return void 0===i?o?t in o?o[t]:o.document.documentElement[r]:e[r]:void(o?o.scrollTo(n?pe(o).scrollLeft():i,n?i:pe(o).scrollTop()):e[r]=i)},e,r,arguments.length,null)}}),pe.each(["top","left"],function(e,t){pe.cssHooks[t]=L(fe.pixelPosition,function(e,n){if(n)return n=gt(e,t),ft.test(n)?pe(e).position()[t]+"px":n})}),pe.each({Height:"height",Width:"width"},function(e,t){pe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){pe.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||i===!0?"margin":"border");return Pe(this,function(t,n,r){var i;return pe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?pe.css(t,n,a):pe.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),pe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),pe.fn.size=function(){return this.length},pe.fn.andSelf=pe.fn.addBack,layui.define(function(e){layui.$=pe,e("jquery",pe)}),pe});!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}return e||t[i].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(t,i){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(t,i,n){if(r.path){var a=document.getElementsByTagName("head")[0],s=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||t).replace(/\.|\//g,""),f="layuicss-"+l,c=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,document.getElementById(f)||a.appendChild(s),"function"==typeof i&&!function u(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(o.getStyle(document.getElementById(f),"width"))?i():setTimeout(u,100))}()}}},r={v:"3.1.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):o.link("theme/"+e.extend),this):this},ready:function(e){var t="layer",i="",n=(a?"modules/layer/":"theme/")+"default/layer.css?v="+r.v+i;return a?layui.addcss(n,e,t):o.link(n,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'
                                      '+(f?r.title[0]:r.title)+"
                                      ":"";return r.zIndex=s,t([r.shade?'
                                      ':"",'
                                      '+(e&&2!=r.type?"":u)+'
                                      '+(0==r.type&&r.icon!==-1?'':"")+(1==r.type&&e?"":r.content||"")+'
                                      '+function(){var e=c?'':"";return r.closeBtn&&(e+=''),e}()+""+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t'+r.btn[t]+"";return'
                                      '+e+"
                                      "}():"")+(r.resize?'':"")+"
                                      "],u,i('
                                      ')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}if(e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),i("#layui-layer-shade"+e.index).css({"background-color":t.shade[1]||"#000",opacity:t.shade[0]||t.shade}),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]){var u="layer-anim "+l.anim[t.anim];e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){var t=this,a=t.config,o=i("#"+l[0]+e);""===a.area[0]&&a.maxWidth>0&&(r.ie&&r.ie<8&&a.btn&&o.width(o.innerWidth()),o.outerWidth()>a.maxWidth&&o.width(a.maxWidth));var s=[o.innerWidth(),o.innerHeight()],f=o.find(l[1]).outerHeight()||0,c=o.find("."+l[6]).outerHeight()||0,u=function(e){e=o.find(e),e.height(s[1]-f-c-2*(0|parseFloat(e.css("padding-top"))))};switch(a.type){case 2:u("iframe");break;default:""===a.area[1]?a.maxHeight>0&&o.outerHeight()>a.maxHeight?(s[1]=a.maxHeight,u("."+l[5])):a.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return t},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;af&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("isOutAnim")&&t.addClass("layer-anim "+a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),r.ie&&r.ie<10||!t.data("isOutAnim")?f():setTimeout(function(){f()},200)}},r.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return''}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(t){s=t.find(".layui-layer-input"),s.val(e.value||"").focus(),"function"==typeof f&&f(t)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n="layui-this",a=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,a="";if(e>0)for(a=''+t[0].title+"";i"+t[i].title+"";return a}(),content:'
                                        '+function(){var e=t.length,i=1,a="";if(e>0)for(a='
                                      • '+(t[0].content||"no content")+"
                                      • ";i'+(t[i].content||"no content")+"";return a}()+"
                                      ",success:function(t){var o=t.find(".layui-layer-title").children(),r=t.find(".layui-layer-tabmain").children();o.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var a=i(this),o=a.index();a.addClass(n).siblings().removeClass(n),r.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)}),"function"==typeof a&&a(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext()}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]'+(u[d].alt||
                                      '+(u.length>1?'':"")+'
                                      '+(u[d].alt||"")+""+s.imgIndex+"/"+u.length+"
                                      ",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常
                                      是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.$),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window);layui.define("jquery",function(t){"use strict";var a=layui.$,i=(layui.hint(),layui.device()),e="element",l="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(t){var i=this;return a.extend(!0,i.config,t),i},s.prototype.on=function(t,a){return layui.onevent.call(this,e,t,a)},s.prototype.tabAdd=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.children(".layui-tab-bar"),o=l.children(".layui-tab-content"),r='
                                    • "+(i.title||"unnaming")+"
                                    • ";return s[0]?s.before(r):n.append(r),o.append('
                                      '+(i.content||"")+"
                                      "),f.hideTabMore(!0),f.tabAuto(),this},s.prototype.tabDelete=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabDelete(null,s),this},s.prototype.tabChange=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabClick.call(s[0],null,null,s),this},s.prototype.tab=function(t){t=t||{},b.on("click",t.headerElem,function(i){var e=a(this).index();f.tabClick.call(this,i,e,null,t)})},s.prototype.progress=function(t,i){var e="layui-progress",l=a("."+e+"[lay-filter="+t+"]"),n=l.find("."+e+"-bar"),s=n.find("."+e+"-text");return n.css("width",i),s.text(i),this};var o=".layui-nav",r="layui-nav-item",c="layui-nav-bar",u="layui-nav-tree",d="layui-nav-child",y="layui-nav-more",h="layui-anim layui-anim-upbit",f={tabClick:function(t,i,s,o){o=o||{};var r=s||a(this),i=i||r.parent().children("li").index(r),c=o.headerElem?r.parent():r.parents(".layui-tab").eq(0),u=o.bodyElem?a(o.bodyElem):c.children(".layui-tab-content").children(".layui-tab-item"),d=r.find("a"),y=c.attr("lay-filter");"javascript:;"!==d.attr("href")&&"_blank"===d.attr("target")||(r.addClass(l).siblings().removeClass(l),u.eq(i).addClass(n).siblings().removeClass(n)),layui.event.call(this,e,"tab("+y+")",{elem:c,index:i})},tabDelete:function(t,i){var n=i||a(this).parent(),s=n.index(),o=n.parents(".layui-tab").eq(0),r=o.children(".layui-tab-content").children(".layui-tab-item"),c=o.attr("lay-filter");n.hasClass(l)&&(n.next()[0]?f.tabClick.call(n.next()[0],null,s+1):n.prev()[0]&&f.tabClick.call(n.prev()[0],null,s-1)),n.remove(),r.eq(s).remove(),setTimeout(function(){f.tabAuto()},50),layui.event.call(this,e,"tabDelete("+c+")",{elem:o,index:s})},tabAuto:function(){var t="layui-tab-more",e="layui-tab-bar",l="layui-tab-close",n=this;a(".layui-tab").each(function(){var s=a(this),o=s.children(".layui-tab-title"),r=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),c=a('');if(n===window&&8!=i.ie&&f.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var t=a(this);if(!t.find("."+l)[0]){var i=a('ဆ');i.on("click",f.tabDelete),t.append(i)}}),"string"!=typeof s.attr("lay-unauto"))if(o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+e)[0])return;o.append(c),s.attr("overflow",""),c.on("click",function(a){o[this.title?"removeClass":"addClass"](t),this.title=this.title?"":"收缩"})}else o.find("."+e).remove(),s.removeAttr("overflow")})},hideTabMore:function(t){var i=a(".layui-tab-title");t!==!0&&"tabmore"===a(t.target).attr("lay-stope")||(i.removeClass("layui-tab-more"),i.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var t=a(this),i=t.parents(o),n=i.attr("lay-filter"),s=t.parent(),c=t.siblings("."+d),y="string"==typeof s.attr("lay-unselect");"javascript:;"!==t.attr("href")&&"_blank"===t.attr("target")||y||c[0]||(i.find("."+l).removeClass(l),s.addClass(l)),i.hasClass(u)&&(c.removeClass(h),c[0]&&(s["none"===c.css("display")?"addClass":"removeClass"](r+"ed"),"all"===i.attr("lay-shrink")&&s.siblings().removeClass(r+"ed"))),layui.event.call(this,e,"nav("+n+")",t)},collapse:function(){var t=a(this),i=t.find(".layui-colla-icon"),l=t.siblings(".layui-colla-content"),s=t.parents(".layui-collapse").eq(0),o=s.attr("lay-filter"),r="none"===l.css("display");if("string"==typeof s.attr("lay-accordion")){var c=s.children(".layui-colla-item").children("."+n);c.siblings(".layui-colla-title").children(".layui-colla-icon").html(""),c.removeClass(n)}l[r?"addClass":"removeClass"](n),i.html(r?"":""),layui.event.call(this,e,"collapse("+o+")",{title:t,content:l,show:r})}};s.prototype.init=function(t,e){var l=function(){return e?'[lay-filter="'+e+'"]':""}(),s={tab:function(){f.tabAuto.call({})},nav:function(){var t=200,e={},s={},p={},b=function(l,o,r){var c=a(this),f=c.find("."+d);o.hasClass(u)?l.css({top:c.position().top,height:c.children("a").outerHeight(),opacity:1}):(f.addClass(h),l.css({left:c.position().left+parseFloat(c.css("marginLeft")),top:c.position().top+c.height()-l.height()}),e[r]=setTimeout(function(){l.css({width:c.width(),opacity:1})},i.ie&&i.ie<10?0:t),clearTimeout(p[r]),"block"===f.css("display")&&clearTimeout(s[r]),s[r]=setTimeout(function(){f.addClass(n),c.find("."+y).addClass(y+"d")},300))};a(o+l).each(function(i){var l=a(this),o=a(''),h=l.find("."+r);l.find("."+c)[0]||(l.append(o),h.on("mouseenter",function(){b.call(this,o,l,i)}).on("mouseleave",function(){l.hasClass(u)||(clearTimeout(s[i]),s[i]=setTimeout(function(){l.find("."+d).removeClass(n),l.find("."+y).removeClass(y+"d")},300))}),l.on("mouseleave",function(){clearTimeout(e[i]),p[i]=setTimeout(function(){l.hasClass(u)?o.css({height:0,top:o.position().top+o.height()/2,opacity:0}):o.css({width:0,left:o.position().left+o.width()/2,opacity:0})},t)})),h.find("a").each(function(){var t=a(this),i=(t.parent(),t.siblings("."+d));i[0]&&!t.children("."+y)[0]&&t.append(''),t.off("click",f.clickThis).on("click",f.clickThis)})})},breadcrumb:function(){var t=".layui-breadcrumb";a(t+l).each(function(){var t=a(this),i="lay-separator",e=t.attr(i)||"/",l=t.find("a");l.next("span["+i+"]")[0]||(l.each(function(t){t!==l.length-1&&a(this).after(""+e+"")}),t.css("visibility","visible"))})},progress:function(){var t="layui-progress";a("."+t+l).each(function(){var i=a(this),e=i.find(".layui-progress-bar"),l=e.attr("lay-percent");e.css("width",function(){return/^.+\/.+$/.test(l)?100*new Function("return "+l)()+"%":l}()),i.attr("lay-showPercent")&&setTimeout(function(){e.html(''+l+"")},350)})},collapse:function(){var t="layui-collapse";a("."+t+l).each(function(){var t=a(this).find(".layui-colla-item");t.each(function(){var t=a(this),i=t.find(".layui-colla-title"),e=t.find(".layui-colla-content"),l="none"===e.css("display");i.find(".layui-colla-icon").remove(),i.append(''+(l?"":"")+""),i.off("click",f.collapse).on("click",f.collapse)})})}};return s[t]?s[t]():layui.each(s,function(t,a){a()})},s.prototype.render=s.prototype.init;var p=new s,b=a(document);p.render();var v=".layui-tab-title li";b.on("click",v,f.tabClick),b.on("click",f.hideTabMore),a(window).on("resize",f.tabAuto),t(e,p)});layui.define("layer",function(e){"use strict";var i=layui.$,t=layui.layer,n=layui.hint(),a=layui.device(),o={config:{},set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,r,e,i)}},l=function(){var e=this;return{upload:function(i){e.upload.call(e,i)},config:e.config}},r="upload",u="layui-upload-file",c="layui-upload-form",f="layui-upload-iframe",s="layui-upload-choose",p=function(e){var t=this;t.config=i.extend({},t.config,o.config,e),t.render()};p.prototype.config={accept:"images",exts:"",auto:!0,bindAction:"",url:"",field:"file",method:"post",data:{},drag:!0,size:0,number:0,multiple:!1},p.prototype.render=function(e){var t=this,e=t.config;e.elem=i(e.elem),e.bindAction=i(e.bindAction),t.file(),t.events()},p.prototype.file=function(){var e=this,t=e.config,n=e.elemFile=i(['"].join("")),o=t.elem.next();(o.hasClass(u)||o.hasClass(c))&&o.remove(),a.ie&&a.ie<10&&t.elem.wrap('
                                      '),e.isFile()?(e.elemFile=t.elem,t.field=t.elem[0].name):t.elem.after(n),a.ie&&a.ie<10&&e.initIE()},p.prototype.initIE=function(){var e=this,t=e.config,n=i(''),a=i(['
                                      ',"
                                      "].join(""));i("#"+f)[0]||i("body").append(n),t.elem.next().hasClass(c)||(e.elemFile.wrap(a),t.elem.next("."+c).append(function(){var e=[];return layui.each(t.data,function(i,t){t="function"==typeof t?t():t,e.push('')}),e.join("")}()))},p.prototype.msg=function(e){return t.msg(e,{icon:2,shift:6})},p.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},p.prototype.preview=function(e){var i=this;window.FileReader&&layui.each(i.chooseFiles,function(i,t){var n=new FileReader;n.readAsDataURL(t),n.onload=function(){e&&e(i,t,this.result)}})},p.prototype.upload=function(e,t){var n,o=this,l=o.config,r=o.elemFile[0],u=function(){var t=0,n=0,a=e||o.files||o.chooseFiles||r.files,u=function(){l.multiple&&t+n===o.fileLength&&"function"==typeof l.allDone&&l.allDone({total:o.fileLength,successful:t,aborted:n})};layui.each(a,function(e,a){var r=new FormData;r.append(l.field,a),layui.each(l.data,function(e,i){i="function"==typeof i?i():i,r.append(e,i)}),i.ajax({url:l.url,type:"post",data:r,contentType:!1,processData:!1,dataType:"json",headers:l.headers||{},success:function(i){t++,d(e,i),u()},error:function(){n++,o.msg("请求上传接口出现异常"),m(e),u()}})})},c=function(){var e=i("#"+f);o.elemFile.parent().submit(),clearInterval(p.timer),p.timer=setInterval(function(){var i,t=e.contents().find("body");try{i=t.text()}catch(n){o.msg("获取上传后的响应信息出现异常"),clearInterval(p.timer),m()}i&&(clearInterval(p.timer),t.html(""),d(0,i))},30)},d=function(e,i){if(o.elemFile.next("."+s).remove(),r.value="","object"!=typeof i)try{i=JSON.parse(i)}catch(t){return i={},o.msg("请对上传接口返回有效JSON")}"function"==typeof l.done&&l.done(i,e||0,function(e){o.upload(e)})},m=function(e){l.auto&&(r.value=""),"function"==typeof l.error&&l.error(e||0,function(e){o.upload(e)})},h=l.exts,v=function(){var i=[];return layui.each(e||o.chooseFiles,function(e,t){i.push(t.name)}),i}(),g={preview:function(e){o.preview(e)},upload:function(e,i){var t={};t[e]=i,o.upload(t)},pushFile:function(){return o.files=o.files||{},layui.each(o.chooseFiles,function(e,i){o.files[e]=i}),o.files},resetFile:function(e,i,t){var n=new File([i],t);o.files=o.files||{},o.files[e]=n}},y=function(){if("choose"!==t&&!l.auto||(l.choose&&l.choose(g),"choose"!==t))return l.before&&l.before(g),a.ie?a.ie>9?u():c():void u()};if(v=0===v.length?r.value.match(/[^\/\\]+\..+/g)||[]||"":v,0!==v.length){switch(l.accept){case"file":if(h&&!RegExp("\\w\\.("+h+")$","i").test(escape(v)))return o.msg("选择的文件中包含不支持的格式"),r.value="";break;case"video":if(!RegExp("\\w\\.("+(h||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(v)))return o.msg("选择的视频中包含不支持的格式"),r.value="";break;case"audio":if(!RegExp("\\w\\.("+(h||"mp3|wav|mid")+")$","i").test(escape(v)))return o.msg("选择的音频中包含不支持的格式"),r.value="";break;default:if(layui.each(v,function(e,i){RegExp("\\w\\.("+(h||"jpg|png|gif|bmp|jpeg$")+")","i").test(escape(i))||(n=!0)}),n)return o.msg("选择的图片中包含不支持的格式"),r.value=""}if(o.fileLength=function(){var i=0,t=e||o.files||o.chooseFiles||r.files;return layui.each(t,function(){i++}),i}(),l.number&&o.fileLength>l.number)return o.msg("同时最多只能上传的数量为:"+l.number);if(l.size>0&&!(a.ie&&a.ie<10)){var F;if(layui.each(o.chooseFiles,function(e,i){if(i.size>1024*l.size){var t=l.size/1024;t=t>=1?t.toFixed(2)+"MB":l.size+"KB",r.value="",F=t}}),F)return o.msg("文件不能超过"+F)}y()}},p.prototype.events=function(){var e=this,t=e.config,o=function(i){e.chooseFiles={},layui.each(i,function(i,t){var n=(new Date).getTime();e.chooseFiles[n+"-"+i]=t})},l=function(i,n){var a=e.elemFile,o=i.length>1?i.length+"个文件":(i[0]||{}).name||a[0].value.match(/[^\/\\]+\..+/g)||[]||"";a.next().hasClass(s)&&a.next().remove(),e.upload(null,"choose"),e.isFile()||t.choose||a.after(''+o+"")};t.elem.off("upload.start").on("upload.start",function(){var a=i(this),o=a.attr("lay-data");if(o)try{o=new Function("return "+o)(),e.config=i.extend({},t,o)}catch(l){n.error("Upload element property lay-data configuration item has a syntax error: "+o)}e.config.item=a,e.elemFile[0].click()}),a.ie&&a.ie<10||t.elem.off("upload.over").on("upload.over",function(){var e=i(this);e.attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){var e=i(this);e.removeAttr("lay-over")}).off("upload.drop").on("upload.drop",function(n,a){var r=i(this),u=a.originalEvent.dataTransfer.files||[];r.removeAttr("lay-over"),o(u),t.auto?e.upload(u):l(u)}),e.elemFile.off("upload.change").on("upload.change",function(){var i=this.files||[];o(i),t.auto?e.upload():l(i)}),t.bindAction.off("upload.action").on("upload.action",function(){e.upload()}),t.elem.data("haveEvents")||(e.elemFile.on("change",function(){i(this).trigger("upload.change")}),t.elem.on("click",function(){e.isFile()||i(this).trigger("upload.start")}),t.drag&&t.elem.on("dragover",function(e){e.preventDefault(),i(this).trigger("upload.over")}).on("dragleave",function(e){i(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),i(this).trigger("upload.drop",e)}),t.bindAction.on("click",function(){i(this).trigger("upload.action")}),t.elem.data("haveEvents",!0))},o.render=function(e){var i=new p(e);return l.call(i)},e(r,o)});layui.define("jquery",function(e){"use strict";var i=layui.jquery,t={config:{},index:layui.slider?layui.slider.index+1e4:0,set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,n,e,i)}},a=function(){var e=this,i=e.config;return{setValue:function(i,t){return e.slide("set",i,t||0)},config:i}},n="slider",l="layui-disabled",s="layui-slider",r="layui-slider-bar",o="layui-slider-wrap",u="layui-slider-wrap-btn",d="layui-slider-tips",v="layui-slider-input",c="layui-slider-input-txt",m="layui-slider-input-btn",p="layui-slider-hover",f=function(e){var a=this;a.index=++t.index,a.config=i.extend({},a.config,t.config,e),a.render()};f.prototype.config={type:"default",min:0,max:100,value:0,step:1,showstep:!1,tips:!0,input:!1,range:!1,height:200,disabled:!1,theme:"#009688"},f.prototype.render=function(){var e=this,t=e.config;if(t.step<1&&(t.step=1),t.maxt.min?a:t.min,t.value[1]=n>t.min?n:t.min,t.value[0]=t.value[0]>t.max?t.max:t.value[0],t.value[1]=t.value[1]>t.max?t.max:t.value[1];var r=Math.floor((t.value[0]-t.min)/(t.max-t.min)*100),v=Math.floor((t.value[1]-t.min)/(t.max-t.min)*100),m=v-r+"%";r+="%",v+="%"}else{"object"==typeof t.value&&(t.value=Math.min.apply(null,t.value)),t.valuet.max&&(t.value=t.max);var m=Math.floor((t.value-t.min)/(t.max-t.min)*100)+"%"}var p=t.disabled?"#c2c2c2":t.theme,f='
                                      '+(t.tips?'
                                      ':"")+'
                                      '+(t.range?'
                                      ':"")+"
                                      ",h=i(t.elem),y=h.next("."+s);if(y[0]&&y.remove(),e.elemTemp=i(f),t.range?(e.elemTemp.find("."+o).eq(0).data("value",t.value[0]),e.elemTemp.find("."+o).eq(1).data("value",t.value[1])):e.elemTemp.find("."+o).data("value",t.value),h.html(e.elemTemp),"vertical"===t.type&&e.elemTemp.height(t.height+"px"),t.showstep){for(var g=(t.max-t.min)/t.step,b="",x=1;x
                                      ')}e.elemTemp.append(b)}if(t.input&&!t.range){var w=i('
                                      ');h.css("position","relative"),h.append(w),h.find("."+c).children("input").val(t.value),"vertical"===t.type?w.css({left:0,top:-48}):e.elemTemp.css("margin-right",w.outerWidth()+15)}t.disabled?(e.elemTemp.addClass(l),e.elemTemp.find("."+u).addClass(l)):e.slide(),e.elemTemp.find("."+u).on("mouseover",function(){var a="vertical"===t.type?t.height:e.elemTemp[0].offsetWidth,n=e.elemTemp.find("."+o),l="vertical"===t.type?a-i(this).parent()[0].offsetTop-n.height():i(this).parent()[0].offsetLeft,s=l/a*100,r=i(this).parent().data("value"),u=t.setTips?t.setTips(r):r;e.elemTemp.find("."+d).html(u),"vertical"===t.type?e.elemTemp.find("."+d).css({bottom:s+"%","margin-bottom":"20px",display:"inline-block"}):e.elemTemp.find("."+d).css({left:s+"%",display:"inline-block"})}).on("mouseout",function(){e.elemTemp.find("."+d).css("display","none")})},f.prototype.slide=function(e,t,a){var n=this,l=n.config,s=n.elemTemp,f=function(){return"vertical"===l.type?l.height:s[0].offsetWidth},h=s.find("."+o),y=s.next("."+v),g=y.children("."+c).children("input").val(),b=100/((l.max-l.min)/Math.ceil(l.step)),x=function(e,i){e=Math.ceil(e)*b>100?Math.ceil(e)*b:Math.round(e)*b,e=e>100?100:e,h.eq(i).css("vertical"===l.type?"bottom":"left",e+"%");var t=T(h[0].offsetLeft),a=l.range?T(h[1].offsetLeft):0;"vertical"===l.type?(s.find("."+d).css({bottom:e+"%","margin-bottom":"20px"}),t=T(f()-h[0].offsetTop-h.height()),a=l.range?T(f()-h[1].offsetTop-h.height()):0):s.find("."+d).css("left",e+"%"),t=t>100?100:t,a=a>100?100:a;var n=Math.min(t,a),o=Math.abs(t-a);"vertical"===l.type?s.find("."+r).css({height:o+"%",bottom:n+"%"}):s.find("."+r).css({width:o+"%",left:n+"%"});var u=l.min+Math.round((l.max-l.min)*e/100);if(g=u,y.children("."+c).children("input").val(g),h.eq(i).data("value",u),u=l.setTips?l.setTips(u):u,s.find("."+d).html(u),l.range){var v=[h.eq(0).data("value"),h.eq(1).data("value")];v[0]>v[1]&&v.reverse()}l.change&&l.change(l.range?v:u)},T=function(e){var i=e/f()*100/b,t=Math.round(i)*b;return e==f()&&(t=Math.ceil(i)*b),t},w=i(['
                                      f()&&(r=f());var o=r/f()*100/b;x(o,e),t.addClass(p),s.find("."+d).show(),i.preventDefault()},o=function(){t.removeClass(p),s.find("."+d).hide()};M(r,o)})}),s.on("click",function(e){var t=i("."+u);if(!t.is(event.target)&&0===t.has(event.target).length&&t.length){var a,n="vertical"===l.type?f()-e.clientY+i(this).offset().top:e.clientX-i(this).offset().left;n<0&&(n=0),n>f()&&(n=f());var s=n/f()*100/b;a=l.range?"vertical"===l.type?Math.abs(n-parseInt(i(h[0]).css("bottom")))>Math.abs(n-parseInt(i(h[1]).css("bottom")))?1:0:Math.abs(n-h[0].offsetLeft)>Math.abs(n-h[1].offsetLeft)?1:0:0,x(s,a),e.preventDefault()}}),y.hover(function(){var e=i(this);e.children("."+m).fadeIn("fast")},function(){var e=i(this);e.children("."+m).fadeOut("fast")}),y.children("."+m).children("i").each(function(e){i(this).on("click",function(){g=1==e?g-l.stepl.max?l.max:Number(g)+l.step;var i=(g-l.min)/(l.max-l.min)*100/b;x(i,0)})});var q=function(){var e=this.value;e=isNaN(e)?0:e,e=el.max?l.max:e,this.value=e;var i=(e-l.min)/(l.max-l.min)*100/b;x(i,0)};y.children("."+c).children("input").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),q.call(this))}).on("change",q)},f.prototype.events=function(){var e=this;e.config},t.render=function(e){var i=new f(e);return a.call(i)},e(n,t)});layui.define("jquery",function(e){"use strict";var i=layui.jquery,o={config:{},index:layui.colorpicker?layui.colorpicker.index+1e4:0,set:function(e){var o=this;return o.config=i.extend({},o.config,e),o},on:function(e,i){return layui.onevent.call(this,"colorpicker",e,i)}},r=function(){var e=this,i=e.config;return{config:i}},t="colorpicker",n="layui-show",l="layui-colorpicker",c=".layui-colorpicker-main",a="layui-icon-down",s="layui-icon-close",f="layui-colorpicker-trigger-span",d="layui-colorpicker-trigger-i",u="layui-colorpicker-side",p="layui-colorpicker-side-slider",g="layui-colorpicker-basis",v="layui-colorpicker-alpha-bgcolor",h="layui-colorpicker-alpha-slider",m="layui-colorpicker-basis-cursor",b="layui-colorpicker-main-input",k=function(e){var i={h:0,s:0,b:0},o=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b),t=r-o;return i.b=r,i.s=0!=r?255*t/r:0,0!=i.s?e.r==r?i.h=(e.g-e.b)/t:e.g==r?i.h=2+(e.b-e.r)/t:i.h=4+(e.r-e.g)/t:i.h=-1,r==o&&(i.h=0),i.h*=60,i.h<0&&(i.h+=360),i.s*=100/255,i.b*=100/255,i},y=function(e){var e=e.indexOf("#")>-1?e.substring(1):e;if(3==e.length){var i=e.split("");e=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]}e=parseInt(e,16);var o={r:e>>16,g:(65280&e)>>8,b:255&e};return k(o)},x=function(e){var i={},o=e.h,r=255*e.s/100,t=255*e.b/100;if(0==r)i.r=i.g=i.b=t;else{var n=t,l=(255-r)*t/255,c=(n-l)*(o%60)/60;360==o&&(o=0),o<60?(i.r=n,i.b=l,i.g=l+c):o<120?(i.g=n,i.b=l,i.r=n-c):o<180?(i.g=n,i.r=l,i.b=l+c):o<240?(i.b=n,i.r=l,i.g=n-c):o<300?(i.b=n,i.g=l,i.r=l+c):o<360?(i.r=n,i.g=l,i.b=n-c):(i.r=0,i.g=0,i.b=0)}return{r:Math.round(i.r),g:Math.round(i.g),b:Math.round(i.b)}},C=function(e){var o=x(e),r=[o.r.toString(16),o.g.toString(16),o.b.toString(16)];return i.each(r,function(e,i){1==i.length&&(r[e]="0"+i)}),r.join("")},P=function(e){var i=/[0-9]{1,3}/g,o=e.match(i)||[];return{r:o[0],g:o[1],b:o[2]}},B=i(window),w=i(document),D=function(e){var r=this;r.index=++o.index,r.config=i.extend({},r.config,o.config,e),r.render()};D.prototype.config={color:"",size:null,alpha:!1,format:"hex",predefine:!1,colors:["#009688","#5FB878","#1E9FFF","#FF5722","#FFB800","#01AAED","#999","#c00","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","rgb(0, 186, 189)","rgb(255, 120, 0)","rgb(250, 212, 0)","#393D49","rgba(0,0,0,.5)","rgba(255, 69, 0, 0.68)","rgba(144, 240, 144, 0.5)","rgba(31, 147, 255, 0.73)"]},D.prototype.render=function(){var e=this,o=e.config,r=i(['
                                      ',"",'3&&(o.alpha&&"rgb"==o.format||(e="#"+C(k(P(o.color))))),"background: "+e):e}()+'">','',"","","
                                      "].join("")),t=i(o.elem);o.size&&r.addClass("layui-colorpicker-"+o.size),t.addClass("layui-inline").html(e.elemColorBox=r),e.color=e.elemColorBox.find("."+f)[0].style.background,e.events()},D.prototype.renderPicker=function(){var e=this,o=e.config,r=e.elemColorBox[0],t=e.elemPicker=i(['
                                      ','
                                      ','
                                      ','
                                      ','
                                      ','
                                      ',"
                                      ",'
                                      ','
                                      ',"
                                      ","
                                      ",'
                                      ','
                                      ','
                                      ',"
                                      ","
                                      ",function(){if(o.predefine){var e=['
                                      '];return layui.each(o.colors,function(i,o){e.push(['
                                      ','
                                      ',"
                                      "].join(""))}),e.push("
                                      "),e.join("")}return""}(),'
                                      ','
                                      ','',"
                                      ",'
                                      ','','',"","
                                      "].join(""));e.elemColorBox.find("."+f)[0];i(c)[0]&&i(c).data("index")==e.index?e.removePicker(D.thisElemInd):(e.removePicker(D.thisElemInd),i("body").append(t)),D.thisElemInd=e.index,D.thisColor=r.style.background,e.position(),e.pickerEvents()},D.prototype.removePicker=function(e){var o=this;o.config;return i("#layui-colorpicker"+(e||o.index)).remove(),o},D.prototype.position=function(){var e=this,i=e.config,o=e.bindElem||e.elemColorBox[0],r=e.elemPicker[0],t=o.getBoundingClientRect(),n=r.offsetWidth,l=r.offsetHeight,c=function(e){return e=e?"scrollLeft":"scrollTop",document.body[e]|document.documentElement[e]},a=function(e){return document.documentElement[e?"clientWidth":"clientHeight"]},s=5,f=t.left,d=t.bottom;f-=(n-o.offsetWidth)/2,d+=s,f+n+s>a("width")?f=a("width")-n-s:fa()&&(d=t.top>l?t.top-l:a()-l,d-=2*s),i.position&&(r.style.position=i.position),r.style.left=f+("fixed"===i.position?0:c(1))+"px",r.style.top=d+("fixed"===i.position?0:c())+"px"},D.prototype.val=function(){var e=this,i=(e.config,e.elemColorBox.find("."+f)),o=e.elemPicker.find("."+b),r=i[0],t=r.style.backgroundColor;if(t){var n=k(P(t)),l=i.attr("lay-type");if(e.select(n.h,n.s,n.b),"torgb"===l&&o.find("input").val(t),"rgba"===l){var c=P(t);if(3==(t.match(/[0-9]{1,3}/g)||[]).length)o.find("input").val("rgba("+c.r+", "+c.g+", "+c.b+", 1)"),e.elemPicker.find("."+h).css("left",280);else{o.find("input").val(t);var a=280*t.slice(t.lastIndexOf(",")+1,t.length-1);e.elemPicker.find("."+h).css("left",a)}e.elemPicker.find("."+v)[0].style.background="linear-gradient(to right, rgba("+c.r+", "+c.g+", "+c.b+", 0), rgb("+c.r+", "+c.g+", "+c.b+"))"}}else e.select(0,100,100),o.find("input").val(""),e.elemPicker.find("."+v)[0].style.background="",e.elemPicker.find("."+h).css("left",280)},D.prototype.side=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f),t=r.attr("lay-type"),n=e.elemPicker.find("."+u),l=e.elemPicker.find("."+p),c=e.elemPicker.find("."+g),y=e.elemPicker.find("."+m),C=e.elemPicker.find("."+v),w=e.elemPicker.find("."+h),D=l[0].offsetTop/180*360,E=100-(y[0].offsetTop+3)/180*100,H=(y[0].offsetLeft+3)/260*100,W=Math.round(w[0].offsetLeft/280*100)/100,j=e.elemColorBox.find("."+d),F=e.elemPicker.find(".layui-colorpicker-pre").children("div"),L=function(i,n,l,c){e.select(i,n,l);var f=x({h:i,s:n,b:l});if(j.addClass(a).removeClass(s),r[0].style.background="rgb("+f.r+", "+f.g+", "+f.b+")","torgb"===t&&e.elemPicker.find("."+b).find("input").val("rgb("+f.r+", "+f.g+", "+f.b+")"),"rgba"===t){var d=0;d=280*c,w.css("left",d),e.elemPicker.find("."+b).find("input").val("rgba("+f.r+", "+f.g+", "+f.b+", "+c+")"),r[0].style.background="rgba("+f.r+", "+f.g+", "+f.b+", "+c+")",C[0].style.background="linear-gradient(to right, rgba("+f.r+", "+f.g+", "+f.b+", 0), rgb("+f.r+", "+f.g+", "+f.b+"))"}o.change&&o.change(e.elemPicker.find("."+b).find("input").val())},M=i(['
                                      t&&(r=t);var l=r/180*360;D=l,L(l,H,E,W),e.preventDefault()};Y(r),e.preventDefault()}),n.on("click",function(e){var o=e.clientY-i(this).offset().top;o<0&&(o=0),o>this.offsetHeight&&(o=this.offsetHeight);var r=o/180*360;D=r,L(r,H,E,W),e.preventDefault()}),y.on("mousedown",function(e){var i=this.offsetTop,o=this.offsetLeft,r=e.clientY,t=e.clientX,n=function(e){var n=i+(e.clientY-r),l=o+(e.clientX-t),a=c[0].offsetHeight-3,s=c[0].offsetWidth-3;n<-3&&(n=-3),n>a&&(n=a),l<-3&&(l=-3),l>s&&(l=s);var f=(l+3)/260*100,d=100-(n+3)/180*100;E=d,H=f,L(D,f,d,W),e.preventDefault()};layui.stope(e),Y(n),e.preventDefault()}),c.on("mousedown",function(e){var o=e.clientY-i(this).offset().top-3+B.scrollTop(),r=e.clientX-i(this).offset().left-3+B.scrollLeft();o<-3&&(o=-3),o>this.offsetHeight-3&&(o=this.offsetHeight-3),r<-3&&(r=-3),r>this.offsetWidth-3&&(r=this.offsetWidth-3);var t=(r+3)/260*100,n=100-(o+3)/180*100;E=n,H=t,L(D,t,n,W),e.preventDefault(),y.trigger(e,"mousedown")}),w.on("mousedown",function(e){var i=this.offsetLeft,o=e.clientX,r=function(e){var r=i+(e.clientX-o),t=C[0].offsetWidth;r<0&&(r=0),r>t&&(r=t);var n=Math.round(r/280*100)/100;W=n,L(D,H,E,n),e.preventDefault()};Y(r),e.preventDefault()}),C.on("click",function(e){var o=e.clientX-i(this).offset().left;o<0&&(o=0),o>this.offsetWidth&&(o=this.offsetWidth);var r=Math.round(o/280*100)/100;W=r,L(D,H,E,r),e.preventDefault()}),F.each(function(){i(this).on("click",function(){i(this).parent(".layui-colorpicker-pre").addClass("selected").siblings().removeClass("selected");var e,o=this.style.backgroundColor,r=k(P(o)),t=o.slice(o.lastIndexOf(",")+1,o.length-1);D=r.h,H=r.s,E=r.b,3==(o.match(/[0-9]{1,3}/g)||[]).length&&(t=1),W=t,e=280*t,L(r.h,r.s,r.b,t)})})},D.prototype.select=function(e,i,o,r){var t=this,n=(t.config,C({h:e,s:100,b:100})),l=C({h:e,s:i,b:o}),c=e/360*180,a=180-o/100*180-3,s=i/100*260-3;t.elemPicker.find("."+p).css("top",c),t.elemPicker.find("."+g)[0].style.background="#"+n,t.elemPicker.find("."+m).css({top:a,left:s}),"change"!==r&&t.elemPicker.find("."+b).find("input").val("#"+l)},D.prototype.pickerEvents=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f),t=e.elemPicker.find("."+b+" input"),n={clear:function(i){r[0].style.background="",e.elemColorBox.find("."+d).removeClass(a).addClass(s),e.color="",o.done&&o.done(""),e.removePicker()},confirm:function(i,n){var l=t.val(),c=l,f={};if(l.indexOf(",")>-1){if(f=k(P(l)),e.select(f.h,f.s,f.b),r[0].style.background=c="#"+C(f),(l.match(/[0-9]{1,3}/g)||[]).length>3&&"rgba"===r.attr("lay-type")){var u=280*l.slice(l.lastIndexOf(",")+1,l.length-1);e.elemPicker.find("."+h).css("left",u),r[0].style.background=l,c=l}}else f=y(l),r[0].style.background=c="#"+C(f),e.elemColorBox.find("."+d).removeClass(s).addClass(a);return"change"===n?(e.select(f.h,f.s,f.b,n),void(o.change&&o.change(c))):(e.color=l,o.done&&o.done(l),void e.removePicker())}};e.elemPicker.on("click","*[colorpicker-events]",function(){var e=i(this),o=e.attr("colorpicker-events");n[o]&&n[o].call(this,e)}),t.on("keyup",function(e){var o=i(this);n.confirm.call(this,o,13===e.keyCode?null:"change")})},D.prototype.events=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f);e.elemColorBox.on("click",function(){e.renderPicker(),i(c)[0]&&(e.val(),e.side())}),o.elem[0]&&!e.elemColorBox[0].eventHandler&&(w.on("click",function(o){if(!i(o.target).hasClass(l)&&!i(o.target).parents("."+l)[0]&&!i(o.target).hasClass(c.replace(/\./g,""))&&!i(o.target).parents(c)[0]&&e.elemPicker){if(e.color){var t=k(P(e.color));e.select(t.h,t.s,t.b)}else e.elemColorBox.find("."+d).removeClass(a).addClass(s);r[0].style.background=e.color||"",e.removePicker()}}),B.on("resize",function(){return!(!e.elemPicker||!i(c)[0])&&void e.position()}),e.elemColorBox[0].eventHandler=!0)},o.render=function(e){var i=new D(e);return r.call(i)},e(t,o)});layui.define("layer",function(e){"use strict";var t=layui.$,i=layui.layer,a=layui.hint(),n=layui.device(),l="form",r=".layui-form",s="layui-this",o="layui-hide",c="layui-disabled",u=function(){this.config={verify:{required:[/[\S]+/,"必填项不能为空"],phone:[/^1\d{10}$/,"请输入正确的手机号"],email:[/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,"邮箱格式不正确"],url:[/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/,"链接格式不正确"],number:function(e){if(!e||isNaN(e))return"只能填写数字"},date:[/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/,"日期格式不正确"],identity:[/(^\d{15}$)|(^\d{17}(x|X|\d)$)/,"请输入正确的身份证号"]}}};u.prototype.set=function(e){var i=this;return t.extend(!0,i.config,e),i},u.prototype.verify=function(e){var i=this;return t.extend(!0,i.config.verify,e),i},u.prototype.on=function(e,t){return layui.onevent.call(this,l,e,t)},u.prototype.val=function(e,i){var a=t(r+'[lay-filter="'+e+'"]');a.each(function(e,a){var n=t(this);layui.each(i,function(e,t){var i,a=n.find('[name="'+e+'"]');a[0]&&(i=a[0].type,"checkbox"===i?a[0].checked=t:"radio"===i?a.each(function(){this.value===t&&(this.checked=!0)}):a.val(t))})}),f.render(null,e)},u.prototype.render=function(e,i){var n=this,u=t(r+function(){return i?'[lay-filter="'+i+'"]':""}()),d={select:function(){var e,i="请选择",a="layui-form-select",n="layui-select-title",r="layui-select-none",d="",f=u.find("select"),v=function(i,l){t(i.target).parent().hasClass(n)&&!l||(t("."+a).removeClass(a+"ed "+a+"up"),e&&d&&e.val(d)),e=null},y=function(i,u,f){var y,p=t(this),m=i.find("."+n),k=m.find("input"),x=i.find("dl"),g=x.children("dd"),b=this.selectedIndex;if(!u){var C=function(){var e=i.offset().top+i.outerHeight()+5-h.scrollTop(),t=x.outerHeight();b=p[0].selectedIndex,i.addClass(a+"ed"),g.removeClass(o),y=null,g.eq(b).addClass(s).siblings().removeClass(s),e+t>h.height()&&e>=t&&i.addClass(a+"up"),$()},w=function(e){i.removeClass(a+"ed "+a+"up"),k.blur(),y=null,e||T(k.val(),function(e){var i=p[0].selectedIndex;e&&(d=t(p[0].options[i]).html(),0===i&&d===k.attr("placeholder")&&(d=""),k.val(d||""))})},$=function(){var e=x.children("dd."+s);if(e[0]){var t=e.position().top,i=x.height(),a=e.height();t>i&&x.scrollTop(t+x.scrollTop()-i+a-5),t<0&&x.scrollTop(t+x.scrollTop()-5)}};m.on("click",function(e){i.hasClass(a+"ed")?w():(v(e,!0),C()),x.find("."+r).remove()}),m.find(".layui-edge").on("click",function(){k.focus()}),k.on("keyup",function(e){var t=e.keyCode;9===t&&C()}).on("keydown",function(e){var t=e.keyCode;9===t&&w();var i=function(t,a){var n,l;e.preventDefault();var r=function(){var e=x.children("dd."+s);if(x.children("dd."+o)[0]&&"next"===t){var i=x.children("dd:not(."+o+",."+c+")"),n=i.eq(0).index();if(n>=0&&n无匹配项

                                      '):x.find("."+r).remove()},"keyup"),""===t&&x.find("."+r).remove(),void $())};f&&k.on("keyup",j).on("blur",function(i){var a=p[0].selectedIndex;e=k,d=t(p[0].options[a]).html(),0===a&&d===k.attr("placeholder")&&(d=""),setTimeout(function(){T(k.val(),function(e){d||k.val("")},"blur")},200)}),g.on("click",function(){var e=t(this),a=e.attr("lay-value"),n=p.attr("lay-filter");return!e.hasClass(c)&&(e.hasClass("layui-select-tips")?k.val(""):(k.val(e.text()),e.addClass(s)),e.siblings().removeClass(s),p.val(a).removeClass("layui-form-danger"),layui.event.call(this,l,"select("+n+")",{elem:p[0],value:a,othis:i}),w(!0),!1)}),i.find("dl>dt").on("click",function(e){return!1}),t(document).off("click",v).on("click",v)}};f.each(function(e,l){var r=t(this),o=r.next("."+a),u=this.disabled,d=l.value,f=t(l.options[l.selectedIndex]),v=l.options[0];if("string"==typeof r.attr("lay-ignore"))return r.show();var h="string"==typeof r.attr("lay-search"),p=v?v.value?i:v.innerHTML||i:i,m=t(['
                                      ','
                                      ','','
                                      ','
                                      ',function(e){var t=[];return layui.each(e,function(e,a){0!==e||a.value?"optgroup"===a.tagName.toLowerCase()?t.push("
                                      "+a.label+"
                                      "):t.push('
                                      '+a.innerHTML+"
                                      "):t.push('
                                      '+(a.innerHTML||i)+"
                                      ")}),0===t.length&&t.push('
                                      没有选项
                                      '),t.join("")}(r.find("*"))+"
                                      ","
                                      "].join(""));o[0]&&o.remove(),r.after(m),y.call(this,m,u,h)})},checkbox:function(){var e={checkbox:["layui-form-checkbox","layui-form-checked","checkbox"],_switch:["layui-form-switch","layui-form-onswitch","switch"]},i=u.find("input[type=checkbox]"),a=function(e,i){var a=t(this);e.on("click",function(){var t=a.attr("lay-filter"),n=(a.attr("lay-text")||"").split("|");a[0].disabled||(a[0].checked?(a[0].checked=!1,e.removeClass(i[1]).find("em").text(n[1])):(a[0].checked=!0,e.addClass(i[1]).find("em").text(n[0])),layui.event.call(a[0],l,i[2]+"("+t+")",{elem:a[0],value:a[0].value,othis:e}))})};i.each(function(i,n){var l=t(this),r=l.attr("lay-skin"),s=(l.attr("lay-text")||"").split("|"),o=this.disabled;"switch"===r&&(r="_"+r);var u=e[r]||e.checkbox;if("string"==typeof l.attr("lay-ignore"))return l.show();var d=l.next("."+u[0]),f=t(['
                                      ",function(){var e=n.title.replace(/\s/g,""),t={checkbox:[e?""+n.title+"":"",''].join(""),_switch:""+((n.checked?s[0]:s[1])||"")+""};return t[r]||t.checkbox}(),"
                                      "].join(""));d[0]&&d.remove(),l.after(f),a.call(this,f,u)})},radio:function(){var e="layui-form-radio",i=["",""],a=u.find("input[type=radio]"),n=function(a){var n=t(this),s="layui-anim-scaleSpring";a.on("click",function(){var o=n[0].name,c=n.parents(r),u=n.attr("lay-filter"),d=c.find("input[name="+o.replace(/(\.|#|\[|\])/g,"\\$1")+"]");n[0].disabled||(layui.each(d,function(){var a=t(this).next("."+e);this.checked=!1,a.removeClass(e+"ed"),a.find(".layui-icon").removeClass(s).html(i[1])}),n[0].checked=!0,a.addClass(e+"ed"),a.find(".layui-icon").addClass(s).html(i[0]),layui.event.call(n[0],l,"radio("+u+")",{elem:n[0],value:n[0].value,othis:a}))})};a.each(function(a,l){var r=t(this),s=r.next("."+e),o=this.disabled;if("string"==typeof r.attr("lay-ignore"))return r.show();s[0]&&s.remove();var u=t(['
                                      ',''+i[l.checked?0:1]+"","
                                      "+function(){var e=l.title||"";return"string"==typeof r.next().attr("lay-radio")&&(e=r.next().html(),r.next().remove()),e}()+"
                                      ","
                                      "].join(""));r.after(u),n.call(this,u)})}};return e?d[e]?d[e]():a.error("不支持的"+e+"表单渲染"):layui.each(d,function(e,t){t()}),n};var d=function(){var e=t(this),a=f.config.verify,s=null,o="layui-form-danger",c={},u=e.parents(r),d=u.find("*[lay-verify]"),v=e.parents("form")[0],h=u.find("input,select,textarea"),y=e.attr("lay-filter");if(layui.each(d,function(e,l){var r=t(this),c=r.attr("lay-verify").split("|"),u=r.attr("lay-verType"),d=r.val();if(r.removeClass(o),layui.each(c,function(e,t){var c,f="",v="function"==typeof a[t];if(a[t]){var c=v?f=a[t](d,l):!a[t][0].test(d);if(f=f||a[t][1],c)return"tips"===u?i.tips(f,function(){return"string"==typeof r.attr("lay-ignore")||"select"!==l.tagName.toLowerCase()&&!/^checkbox|radio$/.test(l.type)?r:r.next()}(),{tips:1}):"alert"===u?i.alert(f,{title:"提示",shadeClose:!0}):i.msg(f,{icon:5,shift:6}),n.android||n.ios||l.focus(),r.addClass(o),s=!0}}),s)return s}),s)return!1;var p={};return layui.each(h,function(e,t){if(t.name=(t.name||"").replace(/^\s*|\s*&/,""),t.name){if(/^.*\[\]$/.test(t.name)){var i=t.name.match(/^(.*)\[\]$/g)[0];p[i]=0|p[i],t.name=t.name.replace(/^(.*)\[\]$/,"$1["+p[i]++ +"]")}/^checkbox|radio$/.test(t.type)&&!t.checked||(c[t.name]=t.value)}}),layui.event.call(this,l,"submit("+y+")",{elem:this,form:v,field:c})},f=new u,v=t(document),h=t(window);f.render(),v.on("reset",r,function(){var e=t(this).attr("lay-filter");setTimeout(function(){f.render(null,e)},50)}),v.on("submit",r,d).on("click","*[lay-submit]",d),e(l,f)});layui.define("jquery",function(e){"use strict";var o=layui.$,a=layui.hint(),i="layui-tree-enter",r=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};r.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},r.prototype.tree=function(e,a){var i=this,r=i.options,n=a||r.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o('
                                        '),s=o(["
                                      • ",function(){return l?''+(n.spread?t.arrow[1]:t.arrow[0])+"":""}(),function(){return r.check?''+("checkbox"===r.check?t.checkbox[0]:"radio"===r.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),"
                                      • "].join(""));l&&(s.append(c),i.tree(c,n.children)),e.append(s),"function"==typeof r.click&&i.click(s,n),i.spread(s,n),r.drag&&i.drag(s,n)})},r.prototype.click=function(e,o){var a=this,i=a.options;e.children("a").on("click",function(e){layui.stope(e),i.click(o)})},r.prototype.spread=function(e,o){var a=this,i=(a.options,e.children(".layui-tree-spread")),r=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),r.removeClass("layui-show"),i.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),r.addClass("layui-show"),i.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};r[0]&&(i.on("click",l),n.on("dblclick",l))},r.prototype.on=function(e){var a=this,r=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),r.drag&&o(document).on("mousemove",function(e){var i=a.move;if(i.from){var r=(i.to,o('
                                        '));e.preventDefault(),o("."+t)[0]||o("body").append(r);var n=o("."+t)[0]?o("."+t):r;n.addClass("layui-show").html(i.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(i),e.to&&e.to.elem.children("a").removeClass(i),a.move={},o("."+t).remove())})},r.prototype.move={},r.prototype.drag=function(e,a){var r=this,t=(r.options,e.children("a")),n=function(){var t=o(this),n=r.move;n.from&&(n.to={item:a,elem:e},t.addClass(i))};t.on("mousedown",function(){var o=r.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=r.move;a.from&&(delete a.to,e.removeClass(i))})},e("tree",function(e){var i=new r(e=e||{}),t=o(e.elem);return t[0]?void i.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})});layui.define(["laytpl","laypage","layer","form","util"],function(e){"use strict";var t=layui.$,i=layui.laytpl,a=layui.laypage,l=layui.layer,n=layui.form,o=(layui.util,layui.hint()),r=layui.device(),d={config:{checkName:"LAY_CHECKED",indexName:"LAY_TABLE_INDEX"},cache:{},index:layui.table?layui.table.index+1e4:0,set:function(e){var i=this;return i.config=t.extend({},i.config,e),i},on:function(e,t){return layui.onevent.call(this,u,e,t)}},c=function(){var e=this,t=e.config,i=t.id||t.index;return i&&(c.that[i]=e,c.config[i]=t),{reload:function(t){e.reload.call(e,t)},setColsWidth:function(){e.setColsWidth.call(e)},resize:function(){e.resize.call(e)},config:t}},s=function(e){var t=c.config[e];return t||o.error("The ID option was not found in the table instance"),t||null},u="table",h=".layui-table",y="layui-hide",f="layui-none",p="layui-table-view",v=".layui-table-tool",m=".layui-table-box",g=".layui-table-init",b=".layui-table-header",x=".layui-table-body",k=".layui-table-main",C=".layui-table-fixed",w=".layui-table-fixed-l",T=".layui-table-fixed-r",A=".layui-table-total",L=".layui-table-page",S=".layui-table-sort",N="layui-table-edit",W="layui-table-hover",_=function(e){var t='{{#if(item2.colspan){}} colspan="{{item2.colspan}}"{{#} if(item2.rowspan){}} rowspan="{{item2.rowspan}}"{{#}}}';return e=e||{},['',"","{{# layui.each(d.data.cols, function(i1, item1){ }}","","{{# layui.each(item1, function(i2, item2){ }}",'{{# if(item2.fixed && item2.fixed !== "right"){ left = true; } }}','{{# if(item2.fixed === "right"){ right = true; } }}',function(){return e.fixed&&"right"!==e.fixed?'{{# if(item2.fixed && item2.fixed !== "right"){ }}':"right"===e.fixed?'{{# if(item2.fixed === "right"){ }}':""}(),"{{# var isSort = !(item2.colGroup) && item2.sort; }}",'",e.fixed?"{{# }; }}":"","{{# }); }}","","{{# }); }}","","
                                        ','
                                        ','{{# if(item2.type === "checkbox"){ }}','',"{{# } else { }}",'{{item2.title||""}}',"{{# if(isSort){ }}",'',"{{# } }}","{{# } }}","
                                        ","
                                        "].join("")},E=['',"","
                                        "].join(""),z=['
                                        ',"{{# if(d.data.toolbar){ }}",'
                                        ','
                                        ','
                                        ',"
                                        ","{{# } }}",'
                                        ',"{{# if(d.data.loading){ }}",'
                                        ','',"
                                        ","{{# } }}","{{# var left, right; }}",'
                                        ',_(),"
                                        ",'
                                        ',E,"
                                        ","{{# if(left){ }}",'
                                        ','
                                        ',_({fixed:!0}),"
                                        ",'
                                        ',E,"
                                        ","
                                        ","{{# }; }}","{{# if(right){ }}",'
                                        ','
                                        ',_({fixed:"right"}),'
                                        ',"
                                        ",'
                                        ',E,"
                                        ","
                                        ","{{# }; }}","
                                        ","{{# if(d.data.totalRow){ }}",'
                                        ','','',"
                                        ","
                                        ","{{# } }}","{{# if(d.data.page){ }}",'
                                        ','
                                        ',"
                                        ","{{# } }}","","
                                        "].join(""),H=t(window),R=t(document),F=function(e){var i=this;i.index=++d.index,i.config=t.extend({},i.config,d.config,e),i.render()};F.prototype.config={limit:10,loading:!0,cellMinWidth:60,defaultToolbar:["filter","exports","print"],autoSort:!0,text:{none:"无数据"}},F.prototype.render=function(){var e=this,a=e.config;if(a.elem=t(a.elem),a.where=a.where||{},a.id=a.id||a.elem.attr("id")||e.index,a.request=t.extend({pageName:"page",limitName:"limit"},a.request),a.response=t.extend({statusName:"code",statusCode:0,msgName:"msg",dataName:"data",countName:"count"},a.response),"object"==typeof a.page&&(a.limit=a.page.limit||a.limit,a.limits=a.page.limits||a.limits,e.page=a.page.curr=a.page.curr||1,delete a.page.elem,delete a.page.jump),!a.elem[0])return e;a.height&&/^full-\d+$/.test(a.height)&&(e.fullHeightGap=a.height.split("-")[1],a.height=H.height()-e.fullHeightGap),e.setInit();var l=a.elem,n=l.next("."+p),o=e.elem=t(i(z).render({VIEW_CLASS:p,data:a,index:e.index}));if(a.index=e.index,n[0]&&n.remove(),l.after(o),e.layTool=o.find(v),e.layBox=o.find(m),e.layHeader=o.find(b),e.layMain=o.find(k),e.layBody=o.find(x),e.layFixed=o.find(C),e.layFixLeft=o.find(w),e.layFixRight=o.find(T),e.layTotal=o.find(A),e.layPage=o.find(L),e.renderToolbar(),e.fullSize(),a.cols.length>1){var r=e.layFixed.find(b).find("th");r.height(e.layHeader.height()-1-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom")))}e.pullData(e.page),e.events()},F.prototype.initOpts=function(e){var t=this,i=(t.config,{checkbox:48,radio:48,space:15,numbers:40});e.checkbox&&(e.type="checkbox"),e.space&&(e.type="space"),e.type||(e.type="normal"),"normal"!==e.type&&(e.unresize=!0,e.width=e.width||i[e.type])},F.prototype.setInit=function(e){var t=this,i=t.config;return i.clientWidth=i.width||function(){var e=function(t){var a,l;t=t||i.elem.parent(),a=t.width();try{l="none"===t.css("display")}catch(n){}return!t[0]||a&&!l?a:e(t.parent())};return e()}(),"width"===e?i.clientWidth:void layui.each(i.cols,function(e,a){layui.each(a,function(l,n){if(!n)return void a.splice(l,1);if(n.key=e+"-"+l,n.hide=n.hide||!1,n.colGroup||n.colspan>1){var o=0;layui.each(i.cols[e+1],function(t,i){i.HAS_PARENT||o>1&&o==n.colspan||(i.HAS_PARENT=!0,i.parentKey=e+"-"+l,o+=parseInt(i.colspan>1?i.colspan:1))}),n.colGroup=!0}t.initOpts(n)})})},F.prototype.renderToolbar=function(){var e=this,a=e.config,l=['
                                        ','
                                        ','
                                        '].join(""),n=e.layTool.find(".layui-table-tool-temp");if("default"===a.toolbar)n.html(l);else if("string"==typeof a.toolbar){var o=t(a.toolbar).html()||"";o&&n.html(i(o).render(a))}var r={filter:{title:"筛选列",layEvent:"LAYTABLE_COLS",icon:"layui-icon-cols"},exports:{title:"导出",layEvent:"LAYTABLE_EXPORT",icon:"layui-icon-export"},print:{title:"打印",layEvent:"LAYTABLE_PRINT",icon:"layui-icon-print"}},d=[];"object"==typeof a.defaultToolbar&&layui.each(a.defaultToolbar,function(e,t){var i=r[t];i&&d.push('
                                        ')}),e.layTool.find(".layui-table-tool-self").html(d.join(""))},F.prototype.setParentCol=function(e,t){var i=this,a=i.config,l=i.layHeader.find('th[data-key="'+a.index+"-"+t+'"]'),n=parseInt(l.attr("colspan"))||0;if(l[0]){var o=t.split("-"),r=a.cols[o[0]][o[1]];e?n--:n++,l.attr("colspan",n),l[n<1?"addClass":"removeClass"](y),r.colspan=n,r.hide=n<1;var d=l.data("parentkey");d&&i.setParentCol(e,d)}},F.prototype.setColsPatch=function(){var e=this,t=e.config;layui.each(t.cols,function(t,i){layui.each(i,function(t,i){i.hide&&e.setParentCol(i.hide,i.parentKey)})})},F.prototype.setColsWidth=function(){var e=this,t=e.config,i=0,a=0,l=0,n=0,o=e.setInit("width");e.eachCols(function(e,t){t.hide||i++}),o=o-function(){return"line"===t.skin||"nob"===t.skin?2:i+1}()-e.getScrollWidth(e.layMain[0])-1;var r=function(e){layui.each(t.cols,function(i,r){layui.each(r,function(i,d){var c=0,s=d.minWidth||t.cellMinWidth;return d?void(d.colGroup||d.hide||(e?l&&ln&&a&&(l=(o-n)/a)};r(),r(!0),e.autoColNums=a,e.eachCols(function(i,a){var n=a.minWidth||t.cellMinWidth;a.colGroup||a.hide||(0===a.width?e.getCssRule(t.index+"-"+a.key,function(e){e.style.width=Math.floor(l>=n?l:n)+"px"}):/\d+%$/.test(a.width)&&e.getCssRule(t.index+"-"+a.key,function(e){e.style.width=Math.floor(parseFloat(a.width)/100*o)+"px"}))});var d=e.layMain.width()-e.getScrollWidth(e.layMain[0])-e.layMain.children("table").outerWidth();if(e.autoColNums&&d>=-i&&d<=i){var c=function(t){var i;return t=t||e.layHeader.eq(0).find("thead th:last-child"),i=t.data("field"),!i&&t.prev()[0]?c(t.prev()):t},s=c(),u=s.data("key");e.getCssRule(u,function(t){var i=t.style.width||s.outerWidth();t.style.width=parseFloat(i)+d+"px",e.layMain.height()-e.layMain.prop("clientHeight")>0&&(t.style.width=parseFloat(t.style.width)-1+"px")})}e.loading(!0)},F.prototype.resize=function(){var e=this;e.fullSize(),e.setColsWidth(),e.scrollPatch()},F.prototype.reload=function(e){var i=this;i.config.data&&i.config.data.constructor===Array&&delete i.config.data,i.config=t.extend({},i.config,e),i.render()},F.prototype.page=1,F.prototype.pullData=function(e){var i=this,a=i.config,l=a.request,n=a.response,o=function(){"object"==typeof a.initSort&&i.sort(a.initSort.field,a.initSort.type)};if(i.startTime=(new Date).getTime(),a.url){var r={};r[l.pageName]=e,r[l.limitName]=a.limit;var d=t.extend(r,a.where);a.contentType&&0==a.contentType.indexOf("application/json")&&(d=JSON.stringify(d)),t.ajax({type:a.method||"get",url:a.url,contentType:a.contentType,data:d,dataType:"json",headers:a.headers||{},success:function(t){"function"==typeof a.parseData&&(t=a.parseData(t)||t),t[n.statusName]!=n.statusCode?(i.renderForm(),i.layMain.html('
                                        '+(t[n.msgName]||"返回的数据不符合规范,正确的成功状态码 ("+n.statusName+") 应为:"+n.statusCode)+"
                                        ")):(i.renderData(t,e,t[n.countName]),o(),a.time=(new Date).getTime()-i.startTime+" ms"),i.setColsWidth(),"function"==typeof a.done&&a.done(t,e,t[n.countName])},error:function(e,t){i.layMain.html('
                                        数据接口请求异常:'+t+"
                                        "),i.renderForm(),i.setColsWidth()}})}else if(a.data&&a.data.constructor===Array){var c={},s=e*a.limit-a.limit;c[n.dataName]=a.data.concat().splice(s,a.limit),c[n.countName]=a.data.length,i.renderData(c,e,a.data.length),o(),i.setColsWidth(),"function"==typeof a.done&&a.done(c,e,c[n.countName])}},F.prototype.eachCols=function(e){var t=this;return d.eachCols(null,e,t.config.cols),t},F.prototype.renderData=function(e,n,o,r){var c=this,s=c.config,u=e[s.response.dataName]||[],h=[],p=[],v=[],m=function(){var e;return!r&&c.sortKey?c.sort(c.sortKey.field,c.sortKey.sort,!0):(layui.each(u,function(a,l){var o=[],u=[],f=[],m=a+s.limit*(n-1)+1;0!==l.length&&(r||(l[d.config.indexName]=a),c.eachCols(function(n,r){var c=r.field||n,h=s.index+"-"+r.key,p=l[c];if(void 0!==p&&null!==p||(p=""),!r.colGroup){var v=['','
                                        '+function(){var n=t.extend(!0,{LAY_INDEX:m},l),o=d.config.checkName;switch(r.type){case"checkbox":return'";case"radio":return n[o]&&(e=a),'';case"numbers":return m}return r.toolbar?i(t(r.toolbar).html()||"").render(n):r.templet?function(){return"function"==typeof r.templet?r.templet(n):i(t(r.templet).html()||String(p)).render(n)}():p}(),"
                                        "].join("");o.push(v),r.fixed&&"right"!==r.fixed&&u.push(v),"right"===r.fixed&&f.push(v)}}),h.push(''+o.join("")+""),p.push(''+u.join("")+""),v.push(''+f.join("")+""))}),c.layBody.scrollTop(0),c.layMain.find("."+f).remove(),c.layMain.find("tbody").html(h.join("")),c.layFixLeft.find("tbody").html(p.join("")),c.layFixRight.find("tbody").html(v.join("")),c.renderForm(),"number"==typeof e&&c.setThisRowChecked(e),c.syncCheckAll(),c.haveInit?c.scrollPatch():setTimeout(function(){c.scrollPatch()},50),c.haveInit=!0,l.close(c.tipsIndex),s.HAS_SET_COLS_PATCH||c.setColsPatch(),void(s.HAS_SET_COLS_PATCH=!0))};return c.key=s.id||s.index,d.cache[c.key]=u,c.layPage[0==o||0===u.length&&1==n?"addClass":"removeClass"](y),r?m():0===u.length?(c.renderForm(),c.layFixed.remove(),c.layMain.find("tbody").html(""),c.layMain.find("."+f).remove(),c.layMain.append('
                                        '+s.text.none+"
                                        ")):(m(),c.renderTotal(u),void(s.page&&(s.page=t.extend({elem:"layui-table-page"+s.index,count:o,limit:s.limit,limits:s.limits||[10,20,30,40,50,60,70,80,90],groups:3,layout:["prev","page","next","skip","count","limit"],prev:'',next:'',jump:function(e,t){t||(c.page=e.curr,s.limit=e.limit,c.loading(),c.pullData(e.curr))}},s.page),s.page.count=o,a.render(s.page))))},F.prototype.renderTotal=function(e){var t=this,i=t.config,a={};if(i.totalRow){layui.each(e,function(e,i){0!==i.length&&t.eachCols(function(e,t){var l=t.field||e,n=i[l];t.totalRow&&(a[l]=(a[l]||0)+(parseFloat(n)||0))})});var l=[];t.eachCols(function(e,t){var n=t.field||e,o=['','
                                        '+function(){var e=t.totalRowText||"";return t.totalRow?parseFloat(a[n]).toFixed(2)||e:e}(),"
                                        "].join("");l.push(o)}),t.layTotal.find("tbody").html(""+l.join("")+"")}},F.prototype.getColElem=function(e,t){var i=this,a=i.config;return e.eq(0).find(".laytable-cell-"+(a.index+"-"+t)+":eq(0)")},F.prototype.renderForm=function(e){n.render(e,"LAY-table-"+this.index)},F.prototype.setThisRowChecked=function(e){var t=this,i=(t.config,"layui-table-click"),a=t.layBody.find('tr[data-index="'+e+'"]');a.addClass(i).siblings("tr").removeClass(i)},F.prototype.sort=function(e,i,a,l){var n,r,c=this,s={},h=c.config,y=h.elem.attr("lay-filter"),f=d.cache[c.key];"string"==typeof e&&c.layHeader.find("th").each(function(i,a){var l=t(this),o=l.data("field");if(o===e)return e=l,n=o,!1});try{var n=n||e.data("field"),p=e.data("key");if(c.sortKey&&!a&&n===c.sortKey.field&&i===c.sortKey.sort)return;var v=c.layHeader.find("th .laytable-cell-"+p).find(S);c.layHeader.find("th").find(S).removeAttr("lay-sort"),v.attr("lay-sort",i||null),c.layFixed.find("th")}catch(m){return o.error("Table modules: Did not match to field")}c.sortKey={field:n,sort:i},h.autoSort&&("asc"===i?r=layui.sort(f,n):"desc"===i?r=layui.sort(f,n,!0):(r=layui.sort(f,d.config.indexName),delete c.sortKey)),s[h.response.dataName]=r||f,c.renderData(s,c.page,c.count,!0),l&&layui.event.call(e,u,"sort("+y+")",{field:n,type:i})},F.prototype.loading=function(e){var i=this,a=i.config;a.loading&&(e?(i.layInit&&i.layInit.remove(),delete i.layInit,i.layBox.find(g).remove()):(i.layInit=t(['
                                        ','',"
                                        "].join("")),i.layBox.append(i.layInit)))},F.prototype.setCheckData=function(e,t){var i=this,a=i.config,l=d.cache[i.key];l[e]&&l[e].constructor!==Array&&(l[e][a.checkName]=t)},F.prototype.syncCheckAll=function(){var e=this,t=e.config,i=e.layHeader.find('input[name="layTableCheckbox"]'),a=function(i){return e.eachCols(function(e,a){"checkbox"===a.type&&(a[t.checkName]=i)}),i};i[0]&&(d.checkStatus(e.key).isAll?(i[0].checked||(i.prop("checked",!0),e.renderForm("checkbox")),a(!0)):(i[0].checked&&(i.prop("checked",!1),e.renderForm("checkbox")),a(!1)))},F.prototype.getCssRule=function(e,t){var i=this,a=i.elem.find("style")[0],l=a.sheet||a.styleSheet||{},n=l.cssRules||l.rules;layui.each(n,function(i,a){if(a.selectorText===".laytable-cell-"+e)return t(a),!0})},F.prototype.fullSize=function(){var e,t=this,i=t.config,a=i.height;t.fullHeightGap&&(a=H.height()-t.fullHeightGap,a<135&&(a=135),t.elem.css("height",a)),a&&(e=parseFloat(a)-(t.layHeader.outerHeight()||38),i.toolbar&&(e-=t.layTool.outerHeight()||50),i.totalRow&&(e-=t.layTotal.outerHeight()||40),i.page&&(e=e-(t.layPage.outerHeight()||41)-2),t.layMain.css("height",e))},F.prototype.getScrollWidth=function(e){var t=0;return e?t=e.offsetWidth-e.clientWidth:(e=document.createElement("div"),e.style.width="100px",e.style.height="100px",e.style.overflowY="scroll",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e)),t},F.prototype.scrollPatch=function(){var e=this,i=e.layMain.children("table"),a=e.layMain.width()-e.layMain.prop("clientWidth"),l=e.layMain.height()-e.layMain.prop("clientHeight"),n=(e.getScrollWidth(e.layMain[0]),i.outerWidth()-e.layMain.width()),o=function(e){if(a&&l){if(e=e.eq(0),!e.find(".layui-table-patch")[0]){var i=t('
                                        ');i.find("div").css({width:a}),e.find("tr").append(i)}}else e.find(".layui-table-patch").remove()};o(e.layHeader),o(e.layTotal);var r=e.layMain.height(),d=r-l;e.layFixed.find(x).css("height",i.height()>=d?d:"auto"),e.layFixRight[n>0?"removeClass":"addClass"](y),e.layFixRight.css("right",a-1)},F.prototype.events=function(){var e,a=this,o=a.config,c=t("body"),s={},h=a.layHeader.find("th"),f=".layui-table-cell",p=o.elem.attr("lay-filter");a.layTool.on("click","*[lay-event]",function(e){var i=t(this),c=i.attr("lay-event"),s=function(e){var l=t(e.list),n=t('
                                          ');n.html(l),o.height&&n.css("max-height",o.height-(a.layTool.outerHeight()||50)),i.find(".layui-table-tool-panel")[0]||i.append(n),a.renderForm(),n.on("click",function(e){layui.stope(e)}),e.done&&e.done(n,l)};switch(layui.stope(e),R.trigger("table.tool.panel.remove"),l.close(a.tipsIndex),c){case"LAYTABLE_COLS":s({list:function(){var e=[];return a.eachCols(function(t,i){i.field&&"normal"==i.type&&e.push('
                                        • ')}),e.join("")}(),done:function(){n.on("checkbox(LAY_TABLE_TOOL_COLS)",function(e){var i=t(e.elem),l=this.checked,n=i.data("key"),r=i.data("parentkey");layui.each(o.cols,function(e,t){layui.each(t,function(t,i){if(e+"-"+t===n){var d=i.hide;i.hide=!l,a.elem.find('*[data-key="'+o.index+"-"+n+'"]')[l?"removeClass":"addClass"](y),d!=i.hide&&a.setParentCol(!l,r),a.resize()}})})})}});break;case"LAYTABLE_EXPORT":r.ie?l.tips("导出功能不支持 IE,请用 Chrome 等高级浏览器导出",this,{tips:3}):s({list:function(){return['
                                        • 导出到 Csv 文件
                                        • ','
                                        • 导出到 Excel 文件
                                        • '].join("")}(),done:function(e,i){i.on("click",function(){var e=t(this).data("type");d.exportFile(o.id,null,e)})}});break;case"LAYTABLE_PRINT":var h=window.open("打印窗口","_blank"),f=[""].join(""),v=t(a.layHeader.html());v.append(a.layMain.find("table").html()),v.find("th.layui-table-patch").remove(),v.find(".layui-table-col-special").remove(),h.document.write(f+v.prop("outerHTML")),h.document.close(),h.print(),h.close()}layui.event.call(this,u,"toolbar("+p+")",t.extend({event:c,config:o},{}))}),h.on("mousemove",function(e){var i=t(this),a=i.offset().left,l=e.clientX-a;i.data("unresize")||s.resizeStart||(s.allowResize=i.width()-l<=10,c.css("cursor",s.allowResize?"col-resize":""))}).on("mouseleave",function(){t(this);s.resizeStart||c.css("cursor","")}).on("mousedown",function(e){var i=t(this);if(s.allowResize){var l=i.data("key");e.preventDefault(),s.resizeStart=!0,s.offset=[e.clientX,e.clientY],a.getCssRule(l,function(e){var t=e.style.width||i.outerWidth();s.rule=e,s.ruleWidth=parseFloat(t),s.minWidth=i.data("minwidth")||o.cellMinWidth})}}),R.on("mousemove",function(t){if(s.resizeStart){if(t.preventDefault(),s.rule){var i=s.ruleWidth+t.clientX-s.offset[0];i');return n[0].value=i.data("content")||l.text(),i.find("."+N)[0]||i.append(n),n.focus(),void layui.stope(e)}}).on("mouseenter","td",function(){b.call(this)}).on("mouseleave","td",function(){b.call(this,"hide")});var g="layui-table-grid-down",b=function(e){var i=t(this),a=i.children(f);if(e)i.find(".layui-table-grid-down").remove();else if(a.prop("scrollWidth")>a.outerWidth()){if(a.find("."+g)[0])return;i.append('
                                          ')}};a.layBody.on("click","."+g,function(e){var i=t(this),n=i.parent(),d=n.children(f);a.tipsIndex=l.tips(['
                                          ',d.html(),"
                                          ",''].join(""),d[0],{tips:[3,""],time:-1,anim:-1,maxWidth:r.ios||r.android?300:a.elem.width()/2,isOutAnim:!1,skin:"layui-table-tips",success:function(e,t){e.find(".layui-table-tips-c").on("click",function(){l.close(t)})}}),layui.stope(e)}),a.layBody.on("click","*[lay-event]",function(){var e=t(this),i=e.parents("tr").eq(0).data("index");layui.event.call(this,u,"tool("+p+")",v.call(this,{event:e.attr("lay-event")})),a.setThisRowChecked(i)}),a.layMain.on("scroll",function(){var e=t(this),i=e.scrollLeft(),n=e.scrollTop();a.layHeader.scrollLeft(i),a.layTotal.scrollLeft(i),a.layFixed.find(x).scrollTop(n),l.close(a.tipsIndex)}),R.on("click",function(){R.trigger("table.remove.tool.panel")}),R.on("table.remove.tool.panel",function(){t(".layui-table-tool-panel").remove()}),H.on("resize",function(){a.resize()})},d.init=function(e,i){i=i||{};var a=this,l=t(e?'table[lay-filter="'+e+'"]':h+"[lay-data]"),n="Table element property lay-data configuration item has a syntax error: ";return l.each(function(){var a=t(this),l=a.attr("lay-data");try{l=new Function("return "+l)()}catch(r){o.error(n+l)}var c=[],s=t.extend({elem:this,cols:[],data:[],skin:a.attr("lay-skin"),size:a.attr("lay-size"),even:"string"==typeof a.attr("lay-even")},d.config,i,l);e&&a.hide(),a.find("thead>tr").each(function(e){s.cols[e]=[],t(this).children().each(function(i){var a=t(this),l=a.attr("lay-data");try{l=new Function("return "+l)()}catch(r){return o.error(n+l)}var d=t.extend({title:a.text(),colspan:a.attr("colspan")||0,rowspan:a.attr("rowspan")||0},l);d.colspan<2&&c.push(d),s.cols[e].push(d)})}),a.find("tbody>tr").each(function(e){var i=t(this),a={};i.children("td").each(function(e,i){var l=t(this),n=l.data("field");if(n)return a[n]=l.html()}),layui.each(c,function(e,t){var l=i.children("td").eq(e);a[t.field]=l.html()}),s.data[e]=a}),d.render(s)}),a},c.that={},c.config={},d.eachCols=function(e,i,a){var l=c.config[e]||{},n=[],o=0;a=t.extend(!0,[],a||l.cols),layui.each(a,function(e,t){layui.each(t,function(t,i){if(i.colGroup){var l=0;o++,i.CHILD_COLS=[],layui.each(a[e+1],function(e,t){t.PARENT_COL_INDEX||l>1&&l==i.colspan||(t.PARENT_COL_INDEX=o,i.CHILD_COLS.push(t),l+=parseInt(t.colspan>1?t.colspan:1))})}i.PARENT_COL_INDEX||n.push(i)})});var r=function(e){layui.each(e||n,function(e,t){return t.CHILD_COLS?r(t.CHILD_COLS):void("function"==typeof i&&i(e,t))})};r()},d.checkStatus=function(e){var t=0,i=0,a=[],l=d.cache[e]||[];return layui.each(l,function(e,l){return l.constructor===Array?void i++:void(l[d.config.checkName]&&(t++,a.push(d.clearCacheKey(l))))}),{data:a,isAll:!!l.length&&t===l.length-i}},d.exportFile=function(e,t,i){t=t||d.clearCacheKey(d.cache[e]),i=i||"csv";var a=c.config[e]||{},l={csv:"text/csv",xls:"application/vnd.ms-excel"}[i],n=document.createElement("a");return r.ie?o.error("IE_NOT_SUPPORT_EXPORTS"):(n.href="data:"+l+";charset=utf-8,\ufeff"+encodeURIComponent(function(){var i=[],a=[];return layui.each(t,function(t,l){var n=[];"object"==typeof e?(layui.each(e,function(e,a){0==t&&i.push(a||"")}),layui.each(d.clearCacheKey(l),function(e,t){n.push(t)})):d.eachCols(e,function(e,a){a.field&&"normal"==a.type&&!a.hide&&(0==t&&i.push(a.title||""),n.push(l[a.field]))}),a.push(n.join(","))}),i.join(",")+"\r\n"+a.join("\r\n")}()),n.download=(a.title||"table_"+(a.index||""))+"."+i,document.body.appendChild(n),n.click(),void document.body.removeChild(n))},d.resize=function(e){if(e){var t=s(e);if(!t)return;c.that[e].resize()}else layui.each(c.that,function(){this.resize()})},d.reload=function(e,i){i=i||{};var a=s(e);if(a)return i.data&&i.data.constructor===Array&&delete a.data,d.render(t.extend(!0,{},a,i))},d.render=function(e){var t=new F(e);return c.call(t)},d.clearCacheKey=function(e){return e=t.extend({},e),delete e[d.config.checkName],delete e[d.config.indexName],e},d.init(),e(u,d)});layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
                                            ',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("")}),i.join("")}(),"
                                          "].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a",u=1;u<=i.length;u++){var r='
                                        • ";i.half&&parseInt(i.value)!==i.value&&u==Math.ceil(i.value)?n=n+'
                                        • ":n+=r}n+=""+(i.text?''+i.value+"星":"")+"";var c=i.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),i.span=e.elemTemp.next("span"),i.setText&&i.setText(i.value),c.html(e.elemTemp),c.addClass("layui-inline"),i.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,i=a.config;i.value=e,a.render()},v.prototype.action=function(){var e=this,i=e.config,l=e.elemTemp,n=l.find("i").width();l.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(i.value=t,i.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(i.value=i.value-.5)}i.text&&l.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),v.on("mousemove",function(e){if(l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+t+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(u).removeClass(s)}}),v.on("mouseleave",function(){l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+Math.floor(i.value)+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half&&parseInt(i.value)!==i.value&&l.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(u).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},i.render=function(e){var a=new v(e);return l.call(a)},e(n,i)});layui.define("jquery",function(t){"use strict";var e=layui.$,i={fixbar:function(t){var i,a,n="layui-fixbar",r="layui-fixbar-top",o=e(document),l=e("body");t=e.extend({showHeight:200},t),t.bar1=t.bar1===!0?"":t.bar1,t.bar2=t.bar2===!0?"":t.bar2,t.bgcolor=t.bgcolor?"background-color:"+t.bgcolor:"";var c=[t.bar1,t.bar2,""],g=e(['
                                            ',t.bar1?'
                                          • '+c[0]+"
                                          • ":"",t.bar2?'
                                          • '+c[1]+"
                                          • ":"",'
                                          • '+c[2]+"
                                          • ","
                                          "].join("")),s=g.find("."+r),u=function(){var e=o.scrollTop();e>=t.showHeight?i||(s.show(),i=1):i&&(s.hide(),i=0)};e("."+n)[0]||("object"==typeof t.css&&g.css(t.css),l.append(g),u(),g.find("li").on("click",function(){var i=e(this),a=i.attr("lay-type");"top"===a&&e("html,body").animate({scrollTop:0},200),t.click&&t.click.call(this,a)}),o.on("scroll",function(){clearTimeout(a),a=setTimeout(function(){u()},100)}))},countdown:function(t,e,i){var a=this,n="function"==typeof e,r=new Date(t).getTime(),o=new Date(!e||n?(new Date).getTime():e).getTime(),l=r-o,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];n&&(i=e);var g=setTimeout(function(){a.countdown(t,o+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],e,g),l<=0&&clearTimeout(g),g},timeAgo:function(t,e){var i=this,a=[[],[]],n=(new Date).getTime()-new Date(t).getTime();return n>6912e5?(n=new Date(t),a[0][0]=i.digit(n.getFullYear(),4),a[0][1]=i.digit(n.getMonth()+1),a[0][2]=i.digit(n.getDate()),e||(a[1][0]=i.digit(n.getHours()),a[1][1]=i.digit(n.getMinutes()),a[1][2]=i.digit(n.getSeconds())),a[0].join("-")+" "+a[1].join(":")):n>=864e5?(n/1e3/60/60/24|0)+"天前":n>=36e5?(n/1e3/60/60|0)+"小时前":n>=12e4?(n/1e3/60|0)+"分钟前":n<0?"未来":"刚刚"},digit:function(t,e){var i="";t=String(t),e=e||2;for(var a=t.length;a/g,">").replace(/'/g,"'").replace(/"/g,""")}};!function(t,e,i){"$:nomunge";function a(){n=e[l](function(){r.each(function(){var e=t(this),i=e.width(),a=e.height(),n=t.data(this,g);(i!==n.w||a!==n.h)&&e.trigger(c,[n.w=i,n.h=a])}),a()},o[s])}var n,r=t([]),o=t.resize=t.extend(t.resize,{}),l="setTimeout",c="resize",g=c+"-special-event",s="delay",u="throttleWindow";o[s]=250,o[u]=!0,t.event.special[c]={setup:function(){if(!o[u]&&this[l])return!1;var e=t(this);r=r.add(e),t.data(this,g,{w:e.width(),h:e.height()}),1===r.length&&a()},teardown:function(){if(!o[u]&&this[l])return!1;var e=t(this);r=r.not(e),e.removeData(g),r.length||clearTimeout(n)},add:function(e){function a(e,a,r){var o=t(this),l=t.data(this,g)||{};l.w=a!==i?a:o.width(),l.h=r!==i?r:o.height(),n.apply(this,arguments)}if(!o[u]&&this[l])return!1;var n;return t.isFunction(e)?(n=e,a):(n=e.handler,void(e.handler=a))}}}(e,window),t("util",i)});layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)});layui.define(["layer","form"],function(t){"use strict";var e=layui.$,i=layui.layer,a=layui.form,l=(layui.hint(),layui.device()),n="layedit",o="layui-show",r="layui-disabled",c=function(){var t=this;t.index=0,t.config={tool:["strong","italic","underline","del","|","left","center","right","|","link","unlink","face","image"],hideTool:[],height:280}};c.prototype.set=function(t){var i=this;return e.extend(!0,i.config,t),i},c.prototype.on=function(t,e){return layui.onevent(n,t,e)},c.prototype.build=function(t,i){i=i||{};var a=this,n=a.config,r="layui-layedit",c=e("string"==typeof t?"#"+t:t),u="LAY_layedit_"+ ++a.index,d=c.next("."+r),y=e.extend({},n,i),f=function(){var t=[],e={};return layui.each(y.hideTool,function(t,i){e[i]=!0}),layui.each(y.tool,function(i,a){C[a]&&!e[a]&&t.push(C[a])}),t.join("")}(),m=e(['
                                          ','
                                          '+f+"
                                          ",'
                                          ','',"
                                          ","
                                          "].join(""));return l.ie&&l.ie<8?c.removeClass("layui-hide").addClass(o):(d[0]&&d.remove(),s.call(a,m,c[0],y),c.addClass("layui-hide").after(m),a.index)},c.prototype.getContent=function(t){var e=u(t);if(e[0])return d(e[0].document.body.innerHTML)},c.prototype.getText=function(t){var i=u(t);if(i[0])return e(i[0].document.body).text()},c.prototype.setContent=function(t,i,a){var l=u(t);l[0]&&(a?e(l[0].document.body).append(i):e(l[0].document.body).html(i),layedit.sync(t))},c.prototype.sync=function(t){var i=u(t);if(i[0]){var a=e("#"+i[1].attr("textarea"));a.val(d(i[0].document.body.innerHTML))}},c.prototype.getSelection=function(t){var e=u(t);if(e[0]){var i=m(e[0].document);return document.selection?i.text:i.toString()}};var s=function(t,i,a){var l=this,n=t.find("iframe");n.css({height:a.height}).on("load",function(){var o=n.contents(),r=n.prop("contentWindow"),c=o.find("head"),s=e([""].join("")),u=o.find("body");c.append(s),u.attr("contenteditable","true").css({"min-height":a.height}).html(i.value||""),y.apply(l,[r,n,i,a]),g.call(l,r,t,a)})},u=function(t){var i=e("#LAY_layedit_"+t),a=i.prop("contentWindow");return[a,i]},d=function(t){return 8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),t},y=function(t,a,n,o){var r=t.document,c=e(r.body);c.on("keydown",function(t){var e=t.keyCode;if(13===e){var a=m(r),l=p(a),n=l.parentNode;if("pre"===n.tagName.toLowerCase()){if(t.shiftKey)return;return i.msg("请暂时用shift+enter"),!1}r.execCommand("formatBlock",!1,"

                                          ")}}),e(n).parents("form").on("submit",function(){var t=c.html();8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),n.value=t}),c.on("paste",function(e){r.execCommand("formatBlock",!1,"

                                          "),setTimeout(function(){f.call(t,c),n.value=c.html()},100)})},f=function(t){var i=this;i.document;t.find("*[style]").each(function(){var t=this.style.textAlign;this.removeAttribute("style"),e(this).css({"text-align":t||""})}),t.find("table").addClass("layui-table"),t.find("script,link").remove()},m=function(t){return t.selection?t.selection.createRange():t.getSelection().getRangeAt(0)},p=function(t){return t.endContainer||t.parentElement().childNodes[0]},v=function(t,i,a){var l=this.document,n=document.createElement(t);for(var o in i)n.setAttribute(o,i[o]);if(n.removeAttribute("text"),l.selection){var r=a.text||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.pasteHTML(e(n).prop("outerHTML")),a.select()}else{var r=a.toString()||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.deleteContents(),a.insertNode(n)}},h=function(t,i){var a=this.document,l="layedit-tool-active",n=p(m(a)),o=function(e){return t.find(".layedit-tool-"+e)};i&&i[i.hasClass(l)?"removeClass":"addClass"](l),t.find(">i").removeClass(l),o("unlink").addClass(r),e(n).parents().each(function(){var t=this.tagName.toLowerCase(),e=this.style.textAlign;"b"!==t&&"strong"!==t||o("b").addClass(l),"i"!==t&&"em"!==t||o("i").addClass(l),"u"===t&&o("u").addClass(l),"strike"===t&&o("d").addClass(l),"p"===t&&("center"===e?o("center").addClass(l):"right"===e?o("right").addClass(l):o("left").addClass(l)),"a"===t&&(o("link").addClass(l),o("unlink").removeClass(r))})},g=function(t,a,l){var n=t.document,o=e(n.body),c={link:function(i){var a=p(i),l=e(a).parent();b.call(o,{href:l.attr("href"),target:l.attr("target")},function(e){var a=l[0];"A"===a.tagName?a.href=e.url:v.call(t,"a",{target:e.target,href:e.url,text:e.url},i)})},unlink:function(t){n.execCommand("unlink")},face:function(e){x.call(this,function(i){v.call(t,"img",{src:i.src,alt:i.alt},e)})},image:function(a){var n=this;layui.use("upload",function(o){var r=l.uploadImage||{};o.render({url:r.url,method:r.type,elem:e(n).find("input")[0],done:function(e){0==e.code?(e.data=e.data||{},v.call(t,"img",{src:e.data.src,alt:e.data.title},a)):i.msg(e.msg||"上传失败")}})})},code:function(e){k.call(o,function(i){v.call(t,"pre",{text:i.code,"lay-lang":i.lang},e)})},help:function(){i.open({type:2,title:"帮助",area:["600px","380px"],shadeClose:!0,shade:.1,skin:"layui-layer-msg",content:["http://www.layui.com/about/layedit/help.html","no"]})}},s=a.find(".layui-layedit-tool"),u=function(){var i=e(this),a=i.attr("layedit-event"),l=i.attr("lay-command");if(!i.hasClass(r)){o.focus();var u=m(n);u.commonAncestorContainer;l?(n.execCommand(l),/justifyLeft|justifyCenter|justifyRight/.test(l)&&n.execCommand("formatBlock",!1,"

                                          "),setTimeout(function(){o.focus()},10)):c[a]&&c[a].call(this,u),h.call(t,s,i)}},d=/image/;s.find(">i").on("mousedown",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)||u.call(this)}).on("click",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)&&u.call(this)}),o.on("click",function(){h.call(t,s),i.close(x.index)})},b=function(t,e){var l=this,n=i.open({type:1,id:"LAY_layedit_link",area:"350px",shade:.05,shadeClose:!0,moveType:1,title:"超链接",skin:"layui-layer-msg",content:['

                                            ','
                                          • ','','
                                            ','',"
                                            ","
                                          • ",'
                                          • ','','
                                            ','",'","
                                            ","
                                          • ",'
                                          • ','','',"
                                          • ","
                                          "].join(""),success:function(t,n){var o="submit(layedit-link-yes)";a.render("radio"),t.find(".layui-btn-primary").on("click",function(){i.close(n),l.focus()}),a.on(o,function(t){i.close(b.index),e&&e(t.field)})}});b.index=n},x=function(t){var a=function(){var t=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],e={};return layui.each(t,function(t,i){e[i]=layui.cache.dir+"images/face/"+t+".gif"}),e}();return x.hide=x.hide||function(t){"face"!==e(t.target).attr("layedit-event")&&i.close(x.index)},x.index=i.tips(function(){var t=[];return layui.each(a,function(e,i){t.push('
                                        • '+e+'
                                        • ')}),'
                                            '+t.join("")+"
                                          "}(),this,{tips:1,time:0,skin:"layui-box layui-util-face",maxWidth:500,success:function(l,n){l.css({marginTop:-4,marginLeft:-10}).find(".layui-clear>li").on("click",function(){t&&t({src:a[this.title],alt:this.title}),i.close(n)}),e(document).off("click",x.hide).on("click",x.hide)}})},k=function(t){var e=this,l=i.open({type:1,id:"LAY_layedit_code",area:"550px",shade:.05,shadeClose:!0,moveType:1,title:"插入代码",skin:"layui-layer-msg",content:['
                                            ','
                                          • ','','
                                            ','","
                                            ","
                                          • ",'
                                          • ','','
                                            ','',"
                                            ","
                                          • ",'
                                          • ','','',"
                                          • ","
                                          "].join(""),success:function(l,n){var o="submit(layedit-code-yes)";a.render("select"),l.find(".layui-btn-primary").on("click",function(){i.close(n),e.focus()}),a.on(o,function(e){i.close(k.index),t&&t(e.field)})}});k.index=l},C={html:'',strong:'',italic:'',underline:'',del:'',"|":'',left:'',center:'',right:'',link:'',unlink:'',face:'',image:'',code:'',help:''},w=new c;t(n,w)});layui.define("jquery",function(e){"use strict";var a=layui.$,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
                                          1. '+o.replace(/[\r\t\n]+/g,"
                                          2. ")+"
                                          "),c.find(">.layui-code-h3")[0]||c.prepend('

                                          '+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

                                          ");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); \ No newline at end of file diff --git a/public/static/xadmin/lib/layui/layui.js b/public/static/xadmin/lib/layui/layui.js new file mode 100644 index 00000000..3cd51c21 --- /dev/null +++ b/public/static/xadmin/lib/layui/layui.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;!function(e){"use strict";var t=document,o={modules:{},status:{},timeout:10,event:{}},n=function(){this.v="2.4.5"},r=function(){var e=t.currentScript?t.currentScript.src:function(){for(var e,o=t.scripts,n=o.length-1,r=n;r>0;r--)if("interactive"===o[r].readyState){e=o[r].src;break}return e||o[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),i=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},a="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),u={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",tree:"modules/tree",table:"modules/table",element:"modules/element",rate:"modules/rate",colorpicker:"modules/colorpicker",slider:"modules/slider",carousel:"modules/carousel",flow:"modules/flow",util:"modules/util",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"../layui.all"};n.prototype.cache=o,n.prototype.define=function(e,t){var n=this,r="function"==typeof e,i=function(){var e=function(e,t){layui[e]=t,o.status[e]=!0};return"function"==typeof t&&t(function(n,r){e(n,r),o.callback[n]=function(){t(e)}}),this};return r&&(t=e,e=[]),layui["layui.all"]||!layui["layui.all"]&&layui["layui.mobile"]?i.call(n):(n.use(e,i),n)},n.prototype.use=function(e,n,l){function s(e,t){var n="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||n.test((e.currentTarget||e.srcElement).readyState))&&(o.modules[f]=t,d.removeChild(v),function r(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void(o.status[f]?c():setTimeout(r,4))}())}function c(){l.push(layui[f]),e.length>1?y.use(e.slice(1),n,l):"function"==typeof n&&n.apply(layui,l)}var y=this,p=o.dir=o.dir?o.dir:r,d=t.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(y.each(e,function(t,o){"jquery"===o&&e.splice(t,1)}),layui.jquery=layui.$=jQuery);var f=e[0],m=0;if(l=l||[],o.host=o.host||(p.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&u[f]||!layui["layui.all"]&&layui["layui.mobile"]&&u[f])return c(),y;if(o.modules[f])!function g(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void("string"==typeof o.modules[f]&&o.status[f]?c():setTimeout(g,4))}();else{var v=t.createElement("script"),h=(u[f]?p+"lay/":/^\{\/\}/.test(y.modules[f])?"":o.base||"")+(y.modules[f]||f)+".js";h=h.replace(/^\{\/\}/,""),v.async=!0,v.charset="utf-8",v.src=h+function(){var e=o.version===!0?o.v||(new Date).getTime():o.version||"";return e?"?v="+e:""}(),d.appendChild(v),!v.attachEvent||v.attachEvent.toString&&v.attachEvent.toString().indexOf("[native code")<0||a?v.addEventListener("load",function(e){s(e,h)},!1):v.attachEvent("onreadystatechange",function(e){s(e,h)}),o.modules[f]=h}return y},n.prototype.getStyle=function(t,o){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](o)},n.prototype.link=function(e,n,r){var a=this,u=t.createElement("link"),l=t.getElementsByTagName("head")[0];"string"==typeof n&&(r=n);var s=(r||e).replace(/\.|\//g,""),c=u.id="layuicss-"+s,y=0;return u.rel="stylesheet",u.href=e+(o.debug?"?v="+(new Date).getTime():""),u.media="all",t.getElementById(c)||l.appendChild(u),"function"!=typeof n?a:(function p(){return++y>1e3*o.timeout/100?i(e+" timeout"):void(1989===parseInt(a.getStyle(t.getElementById(c),"width"))?function(){n()}():setTimeout(p,100))}(),a)},o.callback={},n.prototype.factory=function(e){if(layui[e])return"function"==typeof o.callback[e]?o.callback[e]:null},n.prototype.addcss=function(e,t,n){return layui.link(o.dir+"css/"+e,t,n)},n.prototype.img=function(e,t,o){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,"function"==typeof t&&t(n)},void(n.onerror=function(e){n.onerror=null,"function"==typeof o&&o(e)}))},n.prototype.config=function(e){e=e||{};for(var t in e)o[t]=e[t];return this},n.prototype.modules=function(){var e={};for(var t in u)e[t]=u[t];return e}(),n.prototype.extend=function(e){var t=this;e=e||{};for(var o in e)t[o]||t.modules[o]?i("模块名 "+o+" 已被占用"):t.modules[o]=e[o];return t},n.prototype.router=function(e){var t=this,e=e||location.hash,o={path:[],search:{},hash:(e.match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)?(e=e.replace(/^#\//,""),o.href="/"+e,e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],t.each(e,function(e,t){/^\w+=/.test(t)?function(){t=t.split("="),o.search[t[0]]=t[1]}():o.path.push(t)}),o):o},n.prototype.data=function(t,o,n){if(t=t||"layui",n=n||localStorage,e.JSON&&e.JSON.parse){if(null===o)return delete n[t];o="object"==typeof o?o:{key:o};try{var r=JSON.parse(n[t])}catch(i){var r={}}return"value"in o&&(r[o.key]=o.value),o.remove&&delete r[o.key],n[t]=JSON.stringify(r),o.key?r[o.key]:r}},n.prototype.sessionData=function(e,t){return this.data(e,t,sessionStorage)},n.prototype.device=function(t){var o=navigator.userAgent.toLowerCase(),n=function(e){var t=new RegExp(e+"/([^\\s\\_\\-]+)");return e=(o.match(t)||[])[1],e||!1},r={os:function(){return/windows/.test(o)?"windows":/linux/.test(o)?"linux":/iphone|ipod|ipad|ios/.test(o)?"ios":/mac/.test(o)?"mac":void 0}(),ie:function(){return!!(e.ActiveXObject||"ActiveXObject"in e)&&((o.match(/msie\s(\d+)/)||[])[1]||"11")}(),weixin:n("micromessenger")};return t&&!r[t]&&(r[t]=n(t)),r.android=/android/.test(o),r.ios="ios"===r.os,r},n.prototype.hint=function(){return{error:i}},n.prototype.each=function(e,t){var o,n=this;if("function"!=typeof t)return n;if(e=e||[],e.constructor===Object){for(o in e)if(t.call(e[o],o,e[o]))break}else for(o=0;oi?1:r + + + + 后台登录-X-admin2.1 + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/static/xadmin/member-add.html b/public/static/xadmin/member-add.html new file mode 100644 index 00000000..e45266d8 --- /dev/null +++ b/public/static/xadmin/member-add.html @@ -0,0 +1,123 @@ + + + + + + 欢迎页面-X-admin2.1 + + + + + + + + + + + + + + +
                                          +
                                          +
                                          + +
                                          + +
                                          +
                                          + *将会成为您唯一的登入名 +
                                          +
                                          +
                                          + +
                                          + +
                                          +
                                          +
                                          + +
                                          + +
                                          +
                                          + 6到16个字符 +
                                          +
                                          +
                                          + +
                                          + +
                                          +
                                          +
                                          + + +
                                          +
                                          +
                                          + + + + + \ No newline at end of file diff --git a/public/static/xadmin/member-del.html b/public/static/xadmin/member-del.html new file mode 100644 index 00000000..64d44276 --- /dev/null +++ b/public/static/xadmin/member-del.html @@ -0,0 +1,172 @@ + + + + + + 欢迎页面-X-admin2.1 + + + + + + + + + + + + + + + +
                                          +
                                          +
                                          + + + + +
                                          +
                                          + + + 共有数据:88 条 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                          +
                                          +
                                          ID用户名性别手机邮箱地址加入时间状态操作
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + + 已删除 + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + + 已删除 + + + + + + + + +
                                          +
                                          +
                                          + + 1 + 2 + 3 + 489 + +
                                          +
                                          + +
                                          + + + + + \ No newline at end of file diff --git a/public/static/xadmin/member-edit.html b/public/static/xadmin/member-edit.html new file mode 100644 index 00000000..240dd10e --- /dev/null +++ b/public/static/xadmin/member-edit.html @@ -0,0 +1,122 @@ + + + + + + 欢迎页面-X-admin2.1 + + + + + + + + + + + + + + +
                                          +
                                          +
                                          + +
                                          + +
                                          +
                                          + *将会成为您唯一的登入名 +
                                          +
                                          +
                                          + +
                                          + +
                                          +
                                          +
                                          + +
                                          + +
                                          +
                                          + 6到16个字符 +
                                          +
                                          +
                                          + +
                                          + +
                                          +
                                          +
                                          + + +
                                          +
                                          +
                                          + + + + + \ No newline at end of file diff --git a/public/static/xadmin/member-list.html b/public/static/xadmin/member-list.html new file mode 100644 index 00000000..407f4817 --- /dev/null +++ b/public/static/xadmin/member-list.html @@ -0,0 +1,1490 @@ + + + + 欢迎页面-X-admin2.1 + + + + + + + + + + + + + + + +
                                          +
                                          +
                                          + + + + +
                                          +
                                          + + + + 共有数据:88 条 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                          +
                                          +
                                          ID用户名性别手机邮箱地址加入时间状态操作
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          1小明男13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 + 已启用 + + + + + + + + + + + + +
                                          +
                                          +
                                          + + 1 + 2 + 3 + 489 + +
                                          +
                                          + +
                                          + + + + + \ No newline at end of file diff --git a/public/static/xadmin/member-list1.html b/public/static/xadmin/member-list1.html new file mode 100644 index 00000000..f1be3e34 --- /dev/null +++ b/public/static/xadmin/member-list1.html @@ -0,0 +1,125 @@ + + + + + + 欢迎页面-X-admin2.1 + + + + + + + + + + + + + + + +
                                          +
                                          +
                                          + + + + +
                                          +
                                          + + + + + + + + + + + + +
                                          IDID用户名邮箱性别城市积分
                                          + +
                                          + + + + + + + + \ No newline at end of file diff --git a/public/static/xadmin/member-password.html b/public/static/xadmin/member-password.html new file mode 100644 index 00000000..150d1f97 --- /dev/null +++ b/public/static/xadmin/member-password.html @@ -0,0 +1,103 @@ + + + + + + 欢迎页面-X-admin2.1 + + + + + + + + + + + + + + +
                                          +
                                          +
                                          + +
                                          + +
                                          +
                                          +
                                          + +
                                          + +
                                          +
                                          +
                                          + +
                                          + +
                                          +
                                          + 6到16个字符 +
                                          +
                                          +
                                          + +
                                          + +
                                          +
                                          +
                                          + + +
                                          +
                                          +
                                          + + + + + \ No newline at end of file diff --git a/public/static/xadmin/order-add.html b/public/static/xadmin/order-add.html new file mode 100644 index 00000000..b0e51c92 --- /dev/null +++ b/public/static/xadmin/order-add.html @@ -0,0 +1,185 @@ + + + + + + 欢迎页面-X-admin2.1 + + + + + + + + + + + + + + +
                                          +
                                          +
                                          + +
                                          + +
                                          +
                                          +
                                          + +
                                          + +
                                          +
                                          +
                                          + +
                                          + +
                                          +
                                          +
                                          + +
                                          + +
                                          +
                                          +
                                          + +
                                          + +
                                          +
                                          +
                                          + +
                                          + +
                                          +
                                          +
                                          + +
                                          + +
                                          +
                                          + * +
                                          +
                                          +
                                          + +
                                          + + + + + + + + + + + + + + + + + +
                                          haier海尔 BC-93TMPF 93升单门冰箱0.019841删除
                                          haier海尔 BC-93TMPF 93升单门冰箱0.019841删除
                                          +
                                          +
                                          +
                                          + +
                                          + +
                                          +
                                          +
                                          + + +
                                          +
                                          +
                                          + + + + + \ No newline at end of file diff --git a/public/static/xadmin/order-list.html b/public/static/xadmin/order-list.html new file mode 100644 index 00000000..9bedb4f4 --- /dev/null +++ b/public/static/xadmin/order-list.html @@ -0,0 +1,200 @@ + + + + + + 欢迎页面-X-admin2.1 + + + + + + + + + + + + + + + +
                                          +
                                          +
                                          + + +
                                          + +
                                          +
                                          + +
                                          +
                                          + +
                                          + + +
                                          +
                                          + + + + 共有数据:88 条 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                          +
                                          +
                                          订单编号收货人总金额应付金额订单状态支付状态发货状态支付方式配送方式下单时间操作
                                          +
                                          +
                                          2017009171822298053老王:189251391947829.107854.10待确认未支付未发货其他方式申通物流2017-08-17 18:22 + + + + + + +
                                          +
                                          +
                                          + + 1 + 2 + 3 + 489 + +
                                          +
                                          + +
                                          + + + + + \ No newline at end of file diff --git a/public/static/xadmin/role-add.html b/public/static/xadmin/role-add.html new file mode 100644 index 00000000..1793914c --- /dev/null +++ b/public/static/xadmin/role-add.html @@ -0,0 +1,147 @@ + + + + + + 欢迎页面-X-admin2.1 + + + + + + + + + + + + + + +
                                          +
                                          +
                                          + +
                                          + +
                                          +
                                          +
                                          + + + + + + + + + + + + +
                                          + + +
                                          + + + + + + + + + +
                                          +
                                          + + + +
                                          + + + + + +
                                          +
                                          +
                                          +
                                          + +
                                          + +
                                          +
                                          +
                                          + +
                                          +
                                          +
                                          + + + + + \ No newline at end of file diff --git a/public/static/xadmin/unicode.html b/public/static/xadmin/unicode.html new file mode 100644 index 00000000..409b3a43 --- /dev/null +++ b/public/static/xadmin/unicode.html @@ -0,0 +1,1311 @@ + + + + + IconFont + + + + + + +
                                          +

                                          IconFont 图标

                                          +
                                            + +
                                          • + +
                                            all
                                            +
                                            &#xe696;
                                            +
                                          • + +
                                          • + +
                                            back
                                            +
                                            &#xe697;
                                            +
                                          • + +
                                          • + +
                                            cart
                                            +
                                            &#xe698;
                                            +
                                          • + +
                                          • + +
                                            Category
                                            +
                                            &#xe699;
                                            +
                                          • + +
                                          • + +
                                            close
                                            +
                                            &#xe69a;
                                            +
                                          • + +
                                          • + +
                                            comments
                                            +
                                            &#xe69b;
                                            +
                                          • + +
                                          • + +
                                            cry
                                            +
                                            &#xe69c;
                                            +
                                          • + +
                                          • + +
                                            delete
                                            +
                                            &#xe69d;
                                            +
                                          • + +
                                          • + +
                                            edit
                                            +
                                            &#xe69e;
                                            +
                                          • + +
                                          • + +
                                            email
                                            +
                                            &#xe69f;
                                            +
                                          • + +
                                          • + +
                                            favorite
                                            +
                                            &#xe6a0;
                                            +
                                          • + +
                                          • + +
                                            form
                                            +
                                            &#xe6a2;
                                            +
                                          • + +
                                          • + +
                                            help
                                            +
                                            &#xe6a3;
                                            +
                                          • + +
                                          • + +
                                            information
                                            +
                                            &#xe6a4;
                                            +
                                          • + +
                                          • + +
                                            less
                                            +
                                            &#xe6a5;
                                            +
                                          • + +
                                          • + +
                                            more_unfold
                                            +
                                            &#xe6a6;
                                            +
                                          • + +
                                          • + +
                                            more
                                            +
                                            &#xe6a7;
                                            +
                                          • + +
                                          • + +
                                            pic
                                            +
                                            &#xe6a8;
                                            +
                                          • + +
                                          • + +
                                            QRCode
                                            +
                                            &#xe6a9;
                                            +
                                          • + +
                                          • + +
                                            refresh
                                            +
                                            &#xe6aa;
                                            +
                                          • + +
                                          • + +
                                            RFQ
                                            +
                                            &#xe6ab;
                                            +
                                          • + +
                                          • + +
                                            search
                                            +
                                            &#xe6ac;
                                            +
                                          • + +
                                          • + +
                                            selected
                                            +
                                            &#xe6ad;
                                            +
                                          • + +
                                          • + +
                                            set
                                            +
                                            &#xe6ae;
                                            +
                                          • + +
                                          • + +
                                            Smile
                                            +
                                            &#xe6af;
                                            +
                                          • + +
                                          • + +
                                            success
                                            +
                                            &#xe6b1;
                                            +
                                          • + +
                                          • + +
                                            survey
                                            +
                                            &#xe6b2;
                                            +
                                          • + +
                                          • + +
                                            training
                                            +
                                            &#xe6b3;
                                            +
                                          • + +
                                          • + +
                                            ViewGallery
                                            +
                                            &#xe6b4;
                                            +
                                          • + +
                                          • + +
                                            Viewlist
                                            +
                                            &#xe6b5;
                                            +
                                          • + +
                                          • + +
                                            warning
                                            +
                                            &#xe6b6;
                                            +
                                          • + +
                                          • + +
                                            wrong
                                            +
                                            &#xe6b7;
                                            +
                                          • + +
                                          • + +
                                            account
                                            +
                                            &#xe6b8;
                                            +
                                          • + +
                                          • + +
                                            add
                                            +
                                            &#xe6b9;
                                            +
                                          • + +
                                          • + +
                                            atm
                                            +
                                            &#xe6ba;
                                            +
                                          • + +
                                          • + +
                                            clock
                                            +
                                            &#xe6bb;
                                            +
                                          • + +
                                          • + +
                                            remind
                                            +
                                            &#xe6bc;
                                            +
                                          • + +
                                          • + +
                                            calendar
                                            +
                                            &#xe6bf;
                                            +
                                          • + +
                                          • + +
                                            attachment
                                            +
                                            &#xe6c0;
                                            +
                                          • + +
                                          • + +
                                            discount
                                            +
                                            &#xe6c5;
                                            +
                                          • + +
                                          • + +
                                            service
                                            +
                                            &#xe6c7;
                                            +
                                          • + +
                                          • + +
                                            print
                                            +
                                            &#xe6c9;
                                            +
                                          • + +
                                          • + +
                                            box
                                            +
                                            &#xe6cb;
                                            +
                                          • + +
                                          • + +
                                            process
                                            +
                                            &#xe6ce;
                                            +
                                          • + +
                                          • + +
                                            beauty
                                            +
                                            &#xe6d2;
                                            +
                                          • + +
                                          • + +
                                            electrical
                                            +
                                            &#xe6d4;
                                            +
                                          • + +
                                          • + +
                                            home
                                            +
                                            &#xe6d7;
                                            +
                                          • + +
                                          • + +
                                            electronics
                                            +
                                            &#xe6da;
                                            +
                                          • + +
                                          • + +
                                            gifts
                                            +
                                            &#xe6db;
                                            +
                                          • + +
                                          • + +
                                            lights
                                            +
                                            &#xe6de;
                                            +
                                          • + +
                                          • + +
                                            sports
                                            +
                                            &#xe6e0;
                                            +
                                          • + +
                                          • + +
                                            toys
                                            +
                                            &#xe6e1;
                                            +
                                          • + +
                                          • + +
                                            auto
                                            +
                                            &#xe6e3;
                                            +
                                          • + +
                                          • + +
                                            jewelry
                                            +
                                            &#xe6e4;
                                            +
                                          • + +
                                          • + +
                                            trade-assurance
                                            +
                                            &#xe6e5;
                                            +
                                          • + +
                                          • + +
                                            browse
                                            +
                                            &#xe6e6;
                                            +
                                          • + +
                                          • + +
                                            rfq-qm
                                            +
                                            &#xe6e7;
                                            +
                                          • + +
                                          • + +
                                            rfq-quantity
                                            +
                                            &#xe6e8;
                                            +
                                          • + +
                                          • + +
                                            atm-away
                                            +
                                            &#xe6e9;
                                            +
                                          • + +
                                          • + +
                                            rfq
                                            +
                                            &#xe6eb;
                                            +
                                          • + +
                                          • + +
                                            scanning
                                            +
                                            &#xe6ec;
                                            +
                                          • + +
                                          • + +
                                            compare
                                            +
                                            &#xe6ee;
                                            +
                                          • + +
                                          • + +
                                            filter
                                            +
                                            &#xe6f1;
                                            +
                                          • + +
                                          • + +
                                            pin
                                            +
                                            &#xe6f2;
                                            +
                                          • + +
                                          • + +
                                            history
                                            +
                                            &#xe6f3;
                                            +
                                          • + +
                                          • + +
                                            product-features
                                            +
                                            &#xe6f4;
                                            +
                                          • + +
                                          • + +
                                            supplier-features
                                            +
                                            &#xe6f5;
                                            +
                                          • + +
                                          • + +
                                            similar-product
                                            +
                                            &#xe6f6;
                                            +
                                          • + +
                                          • + +
                                            link
                                            +
                                            &#xe6f7;
                                            +
                                          • + +
                                          • + +
                                            cut
                                            +
                                            &#xe6f8;
                                            +
                                          • + +
                                          • + +
                                            nav-list
                                            +
                                            &#xe6fa;
                                            +
                                          • + +
                                          • + +
                                            image-text
                                            +
                                            &#xe6fb;
                                            +
                                          • + +
                                          • + +
                                            text
                                            +
                                            &#xe6fc;
                                            +
                                          • + +
                                          • + +
                                            move
                                            +
                                            &#xe6fd;
                                            +
                                          • + +
                                          • + +
                                            subtract
                                            +
                                            &#xe6fe;
                                            +
                                          • + +
                                          • + +
                                            dollar
                                            +
                                            &#xe702;
                                            +
                                          • + +
                                          • + +
                                            raw
                                            +
                                            &#xe704;
                                            +
                                          • + +
                                          • + +
                                            office
                                            +
                                            &#xe705;
                                            +
                                          • + +
                                          • + +
                                            agriculture
                                            +
                                            &#xe707;
                                            +
                                          • + +
                                          • + +
                                            machinery
                                            +
                                            &#xe709;
                                            +
                                          • + +
                                          • + +
                                            assessed-Badge
                                            +
                                            &#xe70a;
                                            +
                                          • + +
                                          • + +
                                            personal-center
                                            +
                                            &#xe70b;
                                            +
                                          • + +
                                          • + +
                                            integral
                                            +
                                            &#xe70c;
                                            +
                                          • + +
                                          • + +
                                            operation
                                            +
                                            &#xe70e;
                                            +
                                          • + +
                                          • + +
                                            remind
                                            +
                                            &#xe713;
                                            +
                                          • + +
                                          • + +
                                            download
                                            +
                                            &#xe714;
                                            +
                                          • + +
                                          • + +
                                            map
                                            +
                                            &#xe715;
                                            +
                                          • + +
                                          • + +
                                            bad
                                            +
                                            &#xe716;
                                            +
                                          • + +
                                          • + +
                                            good
                                            +
                                            &#xe717;
                                            +
                                          • + +
                                          • + +
                                            skip
                                            +
                                            &#xe718;
                                            +
                                          • + +
                                          • + +
                                            play
                                            +
                                            &#xe719;
                                            +
                                          • + +
                                          • + +
                                            stop
                                            +
                                            &#xe71a;
                                            +
                                          • + +
                                          • + +
                                            compass
                                            +
                                            &#xe71b;
                                            +
                                          • + +
                                          • + +
                                            security
                                            +
                                            &#xe71c;
                                            +
                                          • + +
                                          • + +
                                            share
                                            +
                                            &#xe71d;
                                            +
                                          • + +
                                          • + +
                                            store
                                            +
                                            &#xe722;
                                            +
                                          • + +
                                          • + +
                                            manage-order
                                            +
                                            &#xe723;
                                            +
                                          • + +
                                          • + +
                                            rejected-order
                                            +
                                            &#xe724;
                                            +
                                          • + +
                                          • + +
                                            phone
                                            +
                                            &#xe725;
                                            +
                                          • + +
                                          • + +
                                            bussiness-man
                                            +
                                            &#xe726;
                                            +
                                          • + +
                                          • + +
                                            shoes
                                            +
                                            &#xe728;
                                            +
                                          • + +
                                          • + +
                                            Mobile-phone
                                            +
                                            &#xe72a;
                                            +
                                          • + +
                                          • + +
                                            email-filling
                                            +
                                            &#xe72d;
                                            +
                                          • + +
                                          • + +
                                            favorites-filling
                                            +
                                            &#xe730;
                                            +
                                          • + +
                                          • + +
                                            account-filling
                                            +
                                            &#xe732;
                                            +
                                          • + +
                                          • + +
                                            credit-level
                                            +
                                            &#xe735;
                                            +
                                          • + +
                                          • + +
                                            credit-level-filling
                                            +
                                            &#xe736;
                                            +
                                          • + +
                                          • + +
                                            exl
                                            +
                                            &#xe73f;
                                            +
                                          • + +
                                          • + +
                                            pdf
                                            +
                                            &#xe740;
                                            +
                                          • + +
                                          • + +
                                            zip
                                            +
                                            &#xe741;
                                            +
                                          • + +
                                          • + +
                                            sorting
                                            +
                                            &#xe743;
                                            +
                                          • + +
                                          • + +
                                            copy
                                            +
                                            &#xe744;
                                            +
                                          • + +
                                          • + +
                                            save
                                            +
                                            &#xe747;
                                            +
                                          • + +
                                          • + +
                                            inquiry-template
                                            +
                                            &#xe749;
                                            +
                                          • + +
                                          • + +
                                            template-default
                                            +
                                            &#xe74a;
                                            +
                                          • + +
                                          • + +
                                            libra
                                            +
                                            &#xe74c;
                                            +
                                          • + +
                                          • + +
                                            survey
                                            +
                                            &#xe74e;
                                            +
                                          • + +
                                          • + +
                                            ship
                                            +
                                            &#xe74f;
                                            +
                                          • + +
                                          • + +
                                            bussiness-card
                                            +
                                            &#xe753;
                                            +
                                          • + +
                                          • + +
                                            hot
                                            +
                                            &#xe756;
                                            +
                                          • + +
                                          • + +
                                            data
                                            +
                                            &#xe757;
                                            +
                                          • + +
                                          • + +
                                            trade
                                            +
                                            &#xe758;
                                            +
                                          • + +
                                          • + +
                                            onepage
                                            +
                                            &#xe75a;
                                            +
                                          • + +
                                          • + +
                                            signboard
                                            +
                                            &#xe75c;
                                            +
                                          • + +
                                          • + +
                                            shuffling-banner
                                            +
                                            &#xe75e;
                                            +
                                          • + +
                                          • + +
                                            component
                                            +
                                            &#xe75f;
                                            +
                                          • + +
                                          • + +
                                            component-filling
                                            +
                                            &#xe760;
                                            +
                                          • + +
                                          • + +
                                            color
                                            +
                                            &#xe761;
                                            +
                                          • + +
                                          • + +
                                            color-filling
                                            +
                                            &#xe7cd;
                                            +
                                          • + +
                                          • + +
                                            favorites
                                            +
                                            &#xe7ce;
                                            +
                                          • + +
                                          • + +
                                            pic-filling
                                            +
                                            &#xe802;
                                            +
                                          • + +
                                          • + +
                                            RFQ
                                            +
                                            &#xe803;
                                            +
                                          • + +
                                          • + +
                                            RFQ-filling
                                            +
                                            &#xe804;
                                            +
                                          • + +
                                          • + +
                                            original-image
                                            +
                                            &#xe806;
                                            +
                                          • + +
                                          • + +
                                            logistic
                                            +
                                            &#xe811;
                                            +
                                          • + +
                                          • + +
                                            Calculator
                                            +
                                            &#xe812;
                                            +
                                          • + +
                                          • + +
                                            video
                                            +
                                            &#xe820;
                                            +
                                          • + +
                                          • + +
                                            earth
                                            +
                                            &#xe828;
                                            +
                                          • + +
                                          • + +
                                            task-management
                                            +
                                            &#xe829;
                                            +
                                          • + +
                                          • + +
                                            trust
                                            +
                                            &#xe82a;
                                            +
                                          • + +
                                          • + +
                                            password
                                            +
                                            &#xe82b;
                                            +
                                          • + +
                                          • + +
                                            3column
                                            +
                                            &#xe839;
                                            +
                                          • + +
                                          • + +
                                            apparel
                                            +
                                            &#xe83a;
                                            +
                                          • + +
                                          • + +
                                            bags
                                            +
                                            &#xe83b;
                                            +
                                          • + +
                                          • + +
                                            folder
                                            +
                                            &#xe83c;
                                            +
                                          • + +
                                          • + +
                                            4column
                                            +
                                            &#xe83d;
                                            +
                                          • + +
                                          • + +
                                            code
                                            +
                                            &#xe842;
                                            +
                                          • + +
                                          • + +
                                            RFQ-filling
                                            +
                                            &#xe843;
                                            +
                                          • + +
                                          +

                                          unicode引用

                                          +
                                          + +

                                          unicode是字体在网页端最原始的应用方式,特点是:

                                          +
                                            +
                                          • 兼容性最好,支持ie6+,及所有现代浏览器。
                                          • +
                                          • 支持按字体的方式去动态调整图标大小,颜色等等。
                                          • +
                                          • 但是因为是字体,所以不支持多色。只能使用平台里单色的图标,就算项目里有多色图标也会自动去色。
                                          • +
                                          +
                                          +

                                          注意:新版iconfont支持多色图标,这些多色图标在unicode模式下将不能使用,如果有需求建议使用symbol的引用方式

                                          +
                                          + +

                                          挑选相应图标并获取字体编码,应用于页面

                                          +
                                          <i class="iconfont">&#x33;</i>
                                          + +
                                          +

                                          "iconfont"是你项目下的font-family。可以通过编辑项目查看,默认是"iconfont"。

                                          +
                                          +
                                          + + + + diff --git a/public/static/xadmin/user.json b/public/static/xadmin/user.json new file mode 100644 index 00000000..d5c0f2a6 --- /dev/null +++ b/public/static/xadmin/user.json @@ -0,0 +1,95 @@ +{ + "code": 0 + ,"msg": "" + ,"count": 3000000 + ,"data": [{ + "id": "10001" + ,"username": "杜甫" + ,"email": "xianxin@layui.com" + ,"sex": "男" + ,"city": "浙江杭州" + ,"sign": "点击此处,显示更多。当内容超出时,点击单元格会自动显示更多内容。" + ,"experience": "116" + ,"ip": "192.168.0.8" + ,"logins": "108" + ,"joinTime": "2016-10-14" + }, { + "id": "10002" + ,"username": "李白" + ,"email": "xianxin@layui.com" + ,"sex": "男" + ,"city": "浙江杭州" + ,"sign": "君不见,黄河之水天上来,奔流到海不复回。 君不见,高堂明镜悲白发,朝如青丝暮成雪。 人生得意须尽欢,莫使金樽空对月。 天生我材必有用,千金散尽还复来。 烹羊宰牛且为乐,会须一饮三百杯。 岑夫子,丹丘生,将进酒,杯莫停。 与君歌一曲,请君为我倾耳听。(倾耳听 一作:侧耳听) 钟鼓馔玉不足贵,但愿长醉不复醒。(不足贵 一作:何足贵;不复醒 一作:不愿醒/不用醒) 古来圣贤皆寂寞,惟有饮者留其名。(古来 一作:自古;惟 通:唯) 陈王昔时宴平乐,斗酒十千恣欢谑。 主人何为言少钱,径须沽取对君酌。 五花马,千金裘,呼儿将出换美酒,与尔同销万古愁。" + ,"experience": "12" + ,"ip": "192.168.0.8" + ,"logins": "106" + ,"joinTime": "2016-10-14" + ,"LAY_CHECKED": true + }, { + "id": "10003" + ,"username": "王勃" + ,"email": "xianxin@layui.com" + ,"sex": "男" + ,"city": "浙江杭州" + ,"sign": "人生恰似一场修行" + ,"experience": "65" + ,"ip": "192.168.0.8" + ,"logins": "106" + ,"joinTime": "2016-10-14" + }, { + "id": "10004" + ,"username": "李清照" + ,"email": "xianxin@layui.com" + ,"sex": "女" + ,"city": "浙江杭州" + ,"sign": "人生恰似一场修行" + ,"experience": "666" + ,"ip": "192.168.0.8" + ,"logins": "106" + ,"joinTime": "2016-10-14" + }, { + "id": "10005" + ,"username": "冰心" + ,"email": "xianxin@layui.com" + ,"sex": "女" + ,"city": "浙江杭州" + ,"sign": "人生恰似一场修行" + ,"experience": "86" + ,"ip": "192.168.0.8" + ,"logins": "106" + ,"joinTime": "2016-10-14" + }, { + "id": "10006" + ,"username": "贤心" + ,"email": "xianxin@layui.com" + ,"sex": "男" + ,"city": "浙江杭州" + ,"sign": "人生恰似一场修行" + ,"experience": "12" + ,"ip": "192.168.0.8" + ,"logins": "106" + ,"joinTime": "2016-10-14" + }, { + "id": "10007" + ,"username": "贤心" + ,"email": "xianxin@layui.com" + ,"sex": "男" + ,"city": "浙江杭州" + ,"sign": "人生恰似一场修行" + ,"experience": "16" + ,"ip": "192.168.0.8" + ,"logins": "106" + ,"joinTime": "2016-10-14" + }, { + "id": "10008" + ,"username": "贤心" + ,"email": "xianxin@layui.com" + ,"sex": "男" + ,"city": "浙江杭州" + ,"sign": "人生恰似一场修行" + ,"experience": "106" + ,"ip": "192.168.0.8" + ,"logins": "106" + ,"joinTime": "2016-10-14" + }] +} \ No newline at end of file diff --git a/public/static/xadmin/welcome.html b/public/static/xadmin/welcome.html new file mode 100644 index 00000000..d8d6e738 --- /dev/null +++ b/public/static/xadmin/welcome.html @@ -0,0 +1,166 @@ + + + + + 欢迎页面-X-admin2.1 + + + + + + + +
                                          +
                                          欢迎管理员: + test!当前时间:2018-04-25 20:50:53 在tab打开 +
                                          +
                                          + 数据统计 + +
                                          +
                                          + 系统通知 +
                                          + + + + + + + + + +
                                          + 新版x-admin 2.0上线了 +
                                          + 交流qq群:(519492808) +
                                          +
                                          +
                                          +
                                          + 系统信息 +
                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                          xxx版本1.0.180420
                                          服务器地址x.xuebingsi.com
                                          操作系统WINNT
                                          运行环境Apache/2.4.23 (Win32) OpenSSL/1.0.2j mod_fcgid/2.3.9
                                          PHP版本5.6.27
                                          PHP运行方式cgi-fcgi
                                          MYSQL版本5.5.53
                                          ThinkPHP5.0.18
                                          上传附件限制2M
                                          执行时间限制30s
                                          剩余空间86015.2M
                                          +
                                          +
                                          +
                                          + 开发团队 +
                                          + + + + + + + + + + +
                                          版权所有xuebingsi(xuebingsi) + 访问官网
                                          开发者马志斌(113664000@qq.com)
                                          +
                                          +
                                          +
                                          感谢layui,百度Echarts,jquery,本系统由x-admin提供技术支持。
                                          +
                                          + + + \ No newline at end of file