5.0.211版本
|
@ -3,7 +3,7 @@ upload-path: classpath:/../upload/
|
||||||
#上传文件的后缀名的白名单(安全测评需要)
|
#上传文件的后缀名的白名单(安全测评需要)
|
||||||
upload:
|
upload:
|
||||||
url: /*
|
url: /*
|
||||||
exts: xls,xlsx,doc,docx,pdf,pcx,svg,jpg,jpeg,bmp,gif,png,swf,tiff,pm,xml,json,groovy,js,html,zip,rar,7z,lic
|
exts: csv,json,txt,xls,xlsx,xlc,doc,docx,wps,wdb,pptx,pdf,pcx,svg,jpg,jpeg,bmp,gif,png,swf,tiff,pm,xml,groovy,js,css,htm,html,zip,rar,7z,lic,mp3,mp4,3gpp,mpeg,mpg,au
|
||||||
spring:
|
spring:
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
|
|
|
@ -66,10 +66,34 @@
|
||||||
"help": "获取当前登录用户角色code"
|
"help": "获取当前登录用户角色code"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "cxt.getCode()",
|
"name": "cxt.getCode(strformat)",
|
||||||
"help": "获取业务单据的单号; 参数说明: strformat= DH[yyyyMMdd][d3] => DH20201113001,DH20201113002...",
|
"help": "获取业务单据的单号; 参数说明: strformat= 生成单好的格式字符串 <br/> 例子:cxt.getCode(\"DH[yyyyMMdd][d3]t\", \"\")=> DH20201113001,DH20201113002... ",
|
||||||
"temp": "cxt.getCode(strformat)"
|
"temp": "cxt.getCode(strformat)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "cxt.getCode(String format, String orgId)",
|
||||||
|
"help": "获取业务单据的单号; 参数说明: strformat= 生成单好的格式字符串 <br/> orgId= 机构的RWID <br/> 例子:cxt.getCode(\"DH[yyyyMMdd][d3]t\", \"9C876276D8884BFF94DF343E2A4EED7D\")=> DH20201113001,DH20201113002... ",
|
||||||
|
"temp": "cxt.getCode(String format, String orgId)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "cxt.exeCmd(String cmd)",
|
||||||
|
"help": "执行命令行; 参数说明: cmd=命令行字符串 <br/>例子: cxt.exeCmd(\"copy d:\\1\\*.* d:\\1\\123\")",
|
||||||
|
"temp": "cxt.exeCmd(String cmd)",
|
||||||
|
"helpurl":""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "cxt.exeCmd(String cmd, String path, String dir, String charSet, Integer timeOut)",
|
||||||
|
"help": "执行命令行; 参数说明: cmd=命令行字符串 <br/> path=在命令行的path内增加路径 <br/> dir=命令的目录 <br/> charSet=字符集(GBK,UTF-8) <br/> timeOut=命令的执行超时秒数 <br/>返回值: 执行成功返回true 否则有问题会抛出异常 <br/>例子: cxt.exeCmd(\"copy d:\\1\\*.* d:\\1\\123\",\"d:/\",\"e:/\" ,\"GBK\",30)",
|
||||||
|
"temp": "cxt.exeCmd(String cmd, String path, String dir, String charSet, Integer timeOut)",
|
||||||
|
"helpurl":""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "cxt.exeCmd(String cmd, String charSet, Integer timeOut)",
|
||||||
|
"help": "执行命令行; 参数说明: cmd=命令行字符串 <br/> path=在命令行的path内增加路径 <br/> dir=命令的目录 <br/> charSet=字符集(GBK,UTF-8) <br/>返回值: 执行成功返回true 否则有问题会抛出异常 <br/>例子: cxt.exeCmd(\"copy d:\\1\\*.* d:\\1\\123\" ,\"GBK\",30)",
|
||||||
|
"temp": "cxt.exeCmd(String cmd, String charSet, Integer timeOut)",
|
||||||
|
"helpurl":""
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -232,11 +256,11 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "cxt.exceTotalSql()",
|
"name": "cxt.exceTotalSql()",
|
||||||
"help": "<div><strong>定义</strong>:Integer exceTotalSql(String sql)</div> <div><strong>描述:</strong>执行统计数量sql,并返回统计总数。</div> <div class=\"code\"><strong>示例:</strong>Integer ret = cxt.exceTotalSql(\"select count(1) from core_user\");</div>"
|
"help": "<div><strong>定义</strong>:Integer exceTotalSql(String sql)</div> <div><strong>描述:</strong>执行统计数量sql,并返回统计总数。数据行记录不存在时返回: null</div> <div class=\"code\"><strong>示例:</strong>Integer ret = cxt.exceTotalSql(\"select count(1) from core_user\");</div>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "cxt.exceSelectIntSql()",
|
"name": "cxt.exceSelectIntSql()",
|
||||||
"help": "<div><strong>定义</strong>:Integer exceSelectIntSql(String sql)</div> <div><strong>描述:</strong>执行返回一个整数值的sql,并返回一个整数值。</div> <div class=\"code\"><strong>示例:</strong>Integer ret = cxt.exceSelectIntSql(\"SELECT ISPASSED FROM CORE_USER WHERE ZANGHM='admin'\");</div>"
|
"help": "<div><strong>定义</strong>:Integer exceSelectIntSql(String sql)</div> <div><strong>描述:</strong>执行返回一个整数值的sql,并返回一个整数值。数据行记录不存在时返回: null</div> <div class=\"code\"><strong>示例:</strong>Integer ret = cxt.exceSelectIntSql(\"SELECT ISPASSED FROM CORE_USER WHERE ZHANGHM='admin'\");</div>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "cxt.getDbType()",
|
"name": "cxt.getDbType()",
|
||||||
|
@ -521,7 +545,7 @@
|
||||||
"temp": "for( int i=0 ; i< 100 ; i++) { \r\n\r\n }"
|
"temp": "for( int i=0 ; i< 100 ; i++) { \r\n\r\n }"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "while语句",
|
"name": "for in 语句",
|
||||||
"help": "for-in语句用于遍历一组值。",
|
"help": "for-in语句用于遍历一组值。",
|
||||||
"temp": "for( int i in array) { { \r\n\r\n }"
|
"temp": "for( int i in array) { { \r\n\r\n }"
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="16.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cdcdcd" d="M511.372 64.548c-247.628 0-448.369 200.319-448.369 447.426S263.744 959.4 511.372 959.4s448.369-200.32 448.369-447.426S758.999 64.548 511.372 64.548z m-0.203 823.564c-207.318 0-375.382-167.71-375.382-374.592s168.064-374.592 375.382-374.592 375.382 167.71 375.382 374.592-168.064 374.592-375.382 374.592zM720.065 463.455L512.233 256.026l-0.069-0.073-0.002 0.002-0.003-0.002-0.04 0.04-0.041-0.04-211.101 210.698 45.19 45.137 134.14-133.884-0.047 389.898h64.013l0.047-389.511 130.555 130.302z" /></svg>
|
After Width: | Height: | Size: 778 B |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="16.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cdcdcd" d="M866.304 793.6h-60.416v-51.2h60.416c16.384 0 29.696-13.312 29.696-29.696V157.696a29.696 29.696 0 0 0-29.696-29.696H311.296a29.696 29.696 0 0 0-29.696 29.696v60.416h-51.2V157.696c0-44.544 36.352-80.896 80.896-80.896h554.496c44.544 0 80.896 36.352 80.896 80.896v554.496c0.512 45.056-35.84 81.408-80.384 81.408zM763.904 896h-55.296v-51.2h55.296c16.384 0 29.696-13.312 29.696-29.696V260.096a29.696 29.696 0 0 0-29.696-29.696H208.896a29.696 29.696 0 0 0-29.696 29.696v55.296h-51.2V260.096c0-44.544 36.352-80.896 80.896-80.896h554.496c44.544 0 80.896 36.352 80.896 80.896v554.496c0.512 45.056-35.84 81.408-80.384 81.408zM661.504 998.4H106.496c-44.544 0-80.896-36.352-80.896-80.896V362.496c0-44.544 36.352-80.896 80.896-80.896h554.496c44.544 0 80.896 36.352 80.896 80.896v554.496c0.512 45.056-35.84 81.408-80.384 81.408zM106.496 332.8a29.696 29.696 0 0 0-29.696 29.696v554.496c0 16.384 13.312 29.696 29.696 29.696h554.496c16.384 0 29.696-13.312 29.696-29.696V362.496a29.696 29.696 0 0 0-29.696-29.696H106.496z" /></svg>
|
After Width: | Height: | Size: 1.3 KiB |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="16.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cdcdcd" d="M921.6 637.672727l-93.090909-9.309091c0-13.963636 4.654545-23.272727 4.654545-37.236363 0-130.327273-74.472727-246.690909-195.490909-293.236364l37.236364-83.781818c153.6 65.163636 251.345455 214.109091 251.345454 381.672727 0 4.654545 0 23.272727-4.654545 41.890909zM102.4 637.672727c0-18.618182-4.654545-32.581818-4.654545-51.2 0-167.563636 97.745455-316.509091 251.345454-381.672727l37.236364 83.781818c-116.363636 51.2-195.490909 167.563636-195.490909 293.236364 0 13.963636 0 27.927273 4.654545 37.236363l-93.090909 18.618182zM512 1000.727273c-88.436364 0-176.872727-27.927273-246.690909-83.781818l55.854545-74.472728c111.709091 83.781818 274.618182 83.781818 386.327273 0l55.854546 74.472728c-74.472727 55.854545-162.909091 83.781818-251.345455 83.781818z" /><path fill="#cdcdcd" d="M512 409.6C404.945455 409.6 316.509091 325.818182 316.509091 218.763636S404.945455 23.272727 512 23.272727s195.490909 88.436364 195.490909 195.490909-88.436364 190.836364-195.490909 190.836364z m0-293.236364c-55.854545 0-102.4 46.545455-102.4 102.4 0 55.854545 46.545455 102.4 102.4 102.4 55.854545 0 102.4-46.545455 102.4-102.4 0-55.854545-46.545455-102.4-102.4-102.4zM828.509091 963.490909c-32.581818 0-65.163636-9.309091-97.745455-27.927273-93.090909-51.2-125.672727-172.218182-69.818181-265.309091s172.218182-125.672727 265.30909-69.818181c46.545455 27.927273 79.127273 69.818182 88.436364 116.363636s4.654545 102.4-18.618182 148.945455c-27.927273 46.545455-69.818182 79.127273-116.363636 88.436363-13.963636 4.654545-32.581818 9.309091-51.2 9.309091z m0-293.236364c-32.581818 0-69.818182 18.618182-88.436364 51.2-27.927273 46.545455-9.309091 111.709091 37.236364 134.981819 23.272727 13.963636 51.2 18.618182 74.472727 9.309091 27.927273-4.654545 46.545455-23.272727 60.509091-46.545455 13.963636-23.272727 18.618182-51.2 9.309091-74.472727-4.654545-27.927273-23.272727-46.545455-46.545455-60.509091-9.309091-9.309091-27.927273-13.963636-46.545454-13.963637zM195.490909 963.490909c-65.163636 0-130.327273-32.581818-167.563636-97.745454-51.2-93.090909-23.272727-209.454545 69.818182-265.309091 93.090909-51.2 209.454545-23.272727 265.30909 69.818181 51.2 93.090909 23.272727 209.454545-69.818181 265.309091-32.581818 18.618182-65.163636 27.927273-97.745455 27.927273z m-51.2-279.272727c-46.545455 27.927273-65.163636 88.436364-37.236364 134.981818s88.436364 65.163636 134.981819 37.236364c46.545455-27.927273 65.163636-88.436364 37.236363-134.981819-27.927273-51.2-88.436364-65.163636-134.981818-37.236363z" /></svg>
|
After Width: | Height: | Size: 2.7 KiB |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="16.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cdcdcd" d="M353.28 535.893333a213.333333 213.333333 0 1 0-213.333333-213.333333 213.333333 213.333333 0 0 0 213.333333 213.333333z m0-372.053333a157.866667 157.866667 0 1 1-155.306667 157.44 156.586667 156.586667 0 0 1 155.306667-157.44z m454.4 377.6a153.173333 153.173333 0 1 0-103.68 5.546667 235.52 235.52 0 0 0-122.88 85.333333A331.52 331.52 0 0 0 21.333333 872.96v44.373333H682.666667v-26.88-17.493333a341.333333 341.333333 0 0 0-5.12-59.306667h321.706666v-27.306666a111.786667 111.786667 0 0 0 0-11.946667 236.8 236.8 0 0 0-191.573333-232.96z m-156.586667-142.933333a97.28 97.28 0 1 1 97.28 98.133333 98.133333 98.133333 0 0 1-97.28-98.133333zM77.653333 860.16a275.626667 275.626667 0 0 1 550.4 0z m585.813334-103.68a334.506667 334.506667 0 0 0-42.666667-81.493333 178.346667 178.346667 0 0 1 325.973333 81.493333z" /></svg>
|
After Width: | Height: | Size: 1.1 KiB |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="16.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cdcdcd" d="M783.148434 784.064141a439.008074 439.008074 0 1 0-542.82382 0l-69.026427 119.277665a80.484814 80.484814 0 0 0 69.026427 120.658194H782.320117a80.484814 80.484814 0 0 0 69.716691-120.658194z m-630.487382-345.132134a358.937419 358.937419 0 1 1 590.175949 274.725178 367.910855 367.910855 0 0 1-66.541476 44.453019 358.247155 358.247155 0 0 1-329.118002 0 367.910855 367.910855 0 0 1-66.541476-44.453019 358.937419 358.937419 0 0 1-127.974995-274.172967z m629.659065 505.273444H240.876826a0.96637 0.96637 0 0 1 0-0.96637L307.418301 827.826895a437.903651 437.903651 0 0 0 408.912552 0l66.817581 115.688291a1.104423 1.104423 0 0 1-0.828317 0.690265zM424.349068 625.027253a205.422646 205.422646 0 1 0-64.608736-47.90434 203.627959 203.627959 0 0 0 64.608736 47.90434z m87.387456-310.756973a125.351991 125.351991 0 0 1 125.351991 125.213938 125.628097 125.628097 0 0 1-125.351991 125.351991 122.038722 122.038722 0 0 1-47.214076-9.387594 125.213938 125.213938 0 0 1 47.214076-241.178335z" /></svg>
|
After Width: | Height: | Size: 1.2 KiB |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="16.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cdcdcd" d="M512 1024H64a32 32 0 0 1-32-32V32A32 32 0 0 1 64 0h832a32 32 0 0 1 32 32v448a32 32 0 0 1-64 0V64h-768v896H512a32 32 0 0 1 0 64zM704 320H256a32 32 0 0 1-32-32A32 32 0 0 1 256 256h448a32 32 0 0 1 32 32 32 32 0 0 1-32 32zM448 704H256a32 32 0 0 1 0-64h192a32 32 0 0 1 0 64zM704 512H256a32 32 0 0 1 0-64h448a32 32 0 0 1 0 64zM800 1024a32 32 0 0 1-32-32v-320a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32zM960 864h-320a32 32 0 0 1 0-64h320a32 32 0 0 1 0 64z" /></svg>
|
After Width: | Height: | Size: 734 B |
|
@ -0,0 +1,2 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1655960276361" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8858" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
|
||||||
|
</style></defs><path d="M917.333333 874.666667h-810.666666a42.666667 42.666667 0 0 0 0 85.333333h810.666666a42.666667 42.666667 0 0 0 0-85.333333zM279.466667 810.666667h465.066666a213.333333 213.333333 0 0 0 213.333334-213.333334V277.333333a213.333333 213.333333 0 0 0-213.333334-213.333333H279.466667a213.333333 213.333333 0 0 0-213.333334 213.333333V597.333333a213.333333 213.333333 0 0 0 213.333334 213.333334z m-128-533.333334a128 128 0 0 1 128-128h465.066666a128 128 0 0 1 128 128V597.333333a128 128 0 0 1-128 128H279.466667a128 128 0 0 1-128-128z" fill="#bfbfbf" p-id="8859"></path><path d="M284.16 654.506667a42.666667 42.666667 0 0 0 23.04 6.826666A42.666667 42.666667 0 0 0 341.333333 640a200.533333 200.533333 0 0 1 336.64 0 42.666667 42.666667 0 1 0 70.826667-47.786667 285.866667 285.866667 0 0 0-145.493333-110.933333 158.72 158.72 0 1 0-183.466667 0A285.44 285.44 0 0 0 271.36 597.333333a42.666667 42.666667 0 0 0 12.8 57.173334zM512 277.333333a73.813333 73.813333 0 1 1-73.386667 73.386667A73.386667 73.386667 0 0 1 512 277.333333z" fill="#bfbfbf" p-id="8860"></path></svg>
|
After Width: | Height: | Size: 1.7 KiB |
|
@ -0,0 +1,2 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1655960584294" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11114" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
|
||||||
|
</style></defs><path d="M336.1 696.6H929v141.5H336.1V696.6z m0-244.3H929v146.2H336.1V452.3z m0-243.2H929v135.6H336.1V209.1z m-237 491.8h118.4v141.5H99.1V700.9z m0-248.6h118.4v146.2H99.1V452.3z m0-243.3h118.4v135.6H99.1V209z" fill="#bfbfbf" p-id="11115"></path></svg>
|
After Width: | Height: | Size: 933 B |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="16.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cdcdcd" d="M512 85.333333c235.637333 0 426.666667 191.029333 426.666667 426.666667S747.637333 938.666667 512 938.666667 85.333333 747.637333 85.333333 512 276.362667 85.333333 512 85.333333z m0 586.666667a32 32 0 1 0 0 64 32 32 0 0 0 0-64z m-2.517333-373.333333c-48.416 0-92.746667 24.16-118.613334 63.413333a137.088 137.088 0 0 0-15.978666 33.237333 32 32 0 0 0 60.906666 19.690667c2.016-6.24 4.885333-12.202667 8.522667-17.717333C458.4 375.914667 482.709333 362.666667 509.482667 362.666667 552.277333 362.666667 586.666667 396.266667 586.666667 437.333333s-34.4 74.666667-77.194667 74.666667a32 32 0 0 0-32 32v64a32 32 0 0 0 64 0v-35.584C603.946667 558.197333 650.666667 503.232 650.666667 437.333333c0-76.757333-63.381333-138.666667-141.194667-138.666666z" /></svg>
|
After Width: | Height: | Size: 1.0 KiB |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="16.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cdcdcd" d="M933.875 371.184v196.301c0 13.775-10.331 27.551-27.551 27.551h-27.551v203.189c0 17.219-17.219 34.439-34.439 34.439h-154.975v-48.214h134.311c6.887 0 13.775-3.444 13.775-10.331v-179.081h-199.745v268.622c0 17.22-13.775 27.551-27.551 27.551h-196.301c-13.775 0-27.551-10.331-27.551-27.551v-268.622h-199.745v179.081c0 6.887 6.887 10.331 13.775 10.331h137.755v48.214h-158.419c-17.219 0-34.439-17.22-34.439-34.439v-203.189h-27.551c-13.775 0-27.551-13.775-27.551-27.551v-196.301c0-13.775 13.775-27.551 27.551-27.551h27.551v-161.862c0-20.665 17.22-34.439 34.439-34.439h158.419v44.77h-137.755c-6.887 0-13.775 6.887-13.775 10.331v141.199h199.745v-268.622c0-13.775 13.775-27.551 27.551-27.551h196.301c13.775 0 27.551 13.775 27.551 27.551v268.622h199.745v-141.199c0-3.444-6.887-10.331-13.775-10.331h-134.311v-44.77h154.975c17.22 0 34.439 13.775 34.439 34.439v161.862h27.551c17.22 0 27.551 13.775 27.551 27.551zM637.701 381.515v175.638h254.847c3.444 0 6.887-3.444 6.887-6.887v-161.862c0-3.444-3.444-6.887-6.887-6.887h-254.847zM386.299 557.153v-175.638h-254.847c-3.444 0-6.887 3.444-6.887 6.887v161.862c0 3.444 3.444 6.887 6.887 6.887h254.847zM431.069 81.898h161.862c3.444 0 6.889 3.444 6.889 6.887v761.097c0 3.444-3.444 6.887-6.889 6.887h-161.862c-3.444 0-6.889-3.444-6.889-6.887v-761.097c0-3.444 3.444-6.887 6.889-6.887z" /></svg>
|
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 34 KiB |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="16.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cdcdcd" d="M958.69952 1024H46.25408C20.77696 1024 0 1000.51968 0 971.4176v-897.024C0 33.34144 29.30688 0.03072 65.42336 0.03072H297.6768a43.34592 43.34592 0 0 1 33.51552 16.44544l147.90656 177.27488a44.17536 44.17536 0 0 0 33.51552 16.44544h445.96224c36.11648 0 65.42336 33.32096 65.42336 74.36288v665.23136c0.12288 40.88832-29.184 74.20928-65.30048 74.20928z" /></svg>
|
After Width: | Height: | Size: 638 B |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="16.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cdcdcd" d="M234.9 64C105.1 64 0 169.1 0 298.9l0 426.3c0 5.5 0.2 11 0.6 16.5 0 0.1 0 0.2 0 0.2 0.1 1.8 0.3 3.6 0.4 5.4 0 0.1 0 0.3 0 0.4 0.2 1.7 0.4 3.5 0.6 5.2 0 0.2 0 0.4 0.1 0.6 0.2 1.7 0.4 3.4 0.7 5.1 0 0.2 0.1 0.5 0.1 0.7 0.2 1.7 0.5 3.3 0.8 4.9 0 0.3 0.1 0.5 0.1 0.8 0.3 1.6 0.6 3.2 0.9 4.8 0.1 0.3 0.1 0.6 0.2 0.8 0.3 1.6 0.6 3.2 1 4.7 0.1 0.3 0.1 0.6 0.2 0.9 0.3 1.6 0.7 3.1 1.1 4.6 0.1 0.3 0.1 0.6 0.2 0.9 0.4 1.5 0.8 3 1.2 4.6 0.1 0.3 0.2 0.6 0.3 0.9 0.4 1.5 0.8 3 1.3 4.5 0.1 0.3 0.2 0.6 0.3 1 0.4 1.5 0.9 3 1.4 4.4 0.1 0.3 0.2 0.6 0.3 1 0.5 1.5 1 2.9 1.5 4.4 0.1 0.3 0.2 0.6 0.3 1 0.5 1.4 1 2.9 1.6 4.3 0.1 0.3 0.2 0.6 0.4 1 0.5 1.4 1.1 2.8 1.7 4.3 0.1 0.3 0.3 0.6 0.4 0.9 0.6 1.4 1.2 2.8 1.8 4.2 0.1 0.3 0.3 0.6 0.4 0.9 0.6 1.4 1.2 2.8 1.9 4.2 0.1 0.3 0.3 0.6 0.4 0.9 0.6 1.4 1.3 2.8 2 4.2 0.1 0.3 0.3 0.6 0.4 0.8 0.7 1.4 1.4 2.8 2.1 4.1 0.1 0.3 0.3 0.5 0.4 0.8 0.7 1.4 1.5 2.8 2.2 4.1 0.1 0.2 0.3 0.5 0.4 0.7 0.8 1.4 1.6 2.8 2.3 4.1 0.1 0.2 0.2 0.4 0.4 0.6 0.8 1.4 1.6 2.8 2.5 4.2 0.1 0.2 0.2 0.3 0.3 0.5 0.9 1.4 1.8 2.8 2.7 4.2 0.1 0.1 0.1 0.2 0.2 0.3 0.9 1.5 1.9 2.9 2.9 4.3 0 0 0 0 0 0.1 9.2 13.5 19.8 26.1 31.6 37.4 0.1 0.1 0.1 0.1 0.2 0.2 1.1 1.1 2.2 2.1 3.4 3.1 0.2 0.2 0.5 0.4 0.7 0.7 1 0.9 2.1 1.9 3.1 2.8 0.3 0.3 0.7 0.6 1 0.9 1 0.9 2 1.7 3 2.5 0.4 0.4 0.8 0.7 1.3 1.1 1 0.8 1.9 1.6 2.9 2.4 0.5 0.4 1 0.8 1.4 1.2 0.9 0.7 1.9 1.5 2.8 2.2 0.5 0.4 1.1 0.8 1.6 1.2 0.9 0.7 1.8 1.4 2.8 2 0.6 0.4 1.1 0.8 1.7 1.3 0.9 0.6 1.8 1.3 2.7 1.9 0.6 0.4 1.2 0.9 1.8 1.3 0.9 0.6 1.8 1.2 2.7 1.8 0.6 0.4 1.3 0.9 1.9 1.3 0.9 0.6 1.8 1.1 2.7 1.7 0.7 0.4 1.4 0.9 2 1.3 0.9 0.5 1.8 1.1 2.7 1.6 0.7 0.4 1.4 0.8 2.1 1.3 0.9 0.5 1.8 1 2.7 1.5 0.7 0.4 1.5 0.8 2.2 1.2 0.9 0.5 1.8 1 2.7 1.5 0.8 0.4 1.5 0.8 2.3 1.2 0.9 0.5 1.8 0.9 2.7 1.4 0.8 0.4 1.6 0.8 2.3 1.2 0.9 0.4 1.8 0.9 2.7 1.3 0.8 0.4 1.6 0.8 2.4 1.1 0.9 0.4 1.8 0.8 2.7 1.2 0.8 0.4 1.6 0.7 2.5 1.1 0.9 0.4 1.8 0.8 2.7 1.1 0.8 0.4 1.7 0.7 2.5 1 0.9 0.4 1.8 0.7 2.7 1.1 0.9 0.3 1.7 0.7 2.6 1 0.9 0.3 1.8 0.7 2.7 1 0.9 0.3 1.8 0.6 2.6 0.9 0.9 0.3 1.8 0.6 2.7 0.9 0.9 0.3 1.8 0.6 2.7 0.9 0.9 0.3 1.8 0.6 2.7 0.9 0.9 0.3 1.8 0.6 2.8 0.8 0.9 0.3 1.8 0.5 2.7 0.8 0.9 0.3 1.9 0.5 2.8 0.8 0.9 0.2 1.8 0.5 2.7 0.7 1 0.2 1.9 0.5 2.9 0.7 0.9 0.2 1.8 0.4 2.7 0.6 1 0.2 1.9 0.4 2.9 0.6 0.9 0.2 1.8 0.4 2.7 0.6 1 0.2 2 0.4 3 0.6 0.9 0.2 1.8 0.3 2.7 0.5 1 0.2 2 0.3 3 0.5 0.9 0.1 1.8 0.3 2.7 0.4 1 0.2 2.1 0.3 3.1 0.4 0.9 0.1 1.8 0.2 2.7 0.4 1.1 0.1 2.1 0.2 3.2 0.4 0.9 0.1 1.7 0.2 2.6 0.3 1.1 0.1 2.2 0.2 3.3 0.3 0.8 0.1 1.7 0.2 2.5 0.2 1.2 0.1 2.4 0.2 3.5 0.2 0.8 0 1.6 0.1 2.4 0.1 1.3 0.1 2.7 0.1 4 0.2 0.7 0 1.3 0.1 2 0.1 2 0 4 0.1 6 0.1L1024 960.2 1024 512 1024 64 234.9 64zM960 896 234.9 896c-1.4 0-2.8 0-4.2-0.1-0.8 0-1.6-0.1-2.4-0.1-0.6 0-1.2 0-1.8-0.1-1.1-0.1-2.2-0.1-3.3-0.2-0.3 0-0.5 0-0.8 0-1.3-0.1-2.7-0.2-4-0.3 0 0-0.1 0-0.1 0-38.1-3.6-73.7-19.9-101.7-46.7C85.5 818.7 67 778.8 64.4 736c0 0 0 0 0 0 2.7-42.8 21.2-82.7 52.3-112.5 31.9-30.6 73.9-47.5 118.2-47.5L960 576 960 896zM234.9 512c-67.3 0-128 28.3-170.9 73.7L64 298.9c0-45.6 17.8-88.5 50-120.8 32.3-32.3 75.2-50 120.8-50L960 128.1l0 384L234.9 512.1z" /></svg>
|
After Width: | Height: | Size: 3.3 KiB |
|
@ -0,0 +1,2 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1655960845738" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="16428" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
|
||||||
|
</style></defs><path d="M521.644581 99.902439c84.917073 0 149.853659 64.936585 149.853659 149.853659s-64.936585 149.853659-149.853659 149.853658-149.853659-64.936585-149.853658-149.853658 69.931707-149.853659 149.853658-149.853659m0-99.902439c-139.863415 0-249.756098 109.892683-249.756097 249.756098s109.892683 249.756098 249.756097 249.756097 249.756098-109.892683 249.756098-249.756097-109.892683-249.756098-249.756098-249.756098zM406.756777 1024H147.010435c-74.926829 0-134.868293-59.941463-134.868293-139.863415V799.219512c0-124.878049 99.902439-224.780488 224.780488-224.780488H711.459216c29.970732 0 49.95122 19.980488 49.951219 49.95122s-19.980488 49.95122-49.951219 49.951219H236.92263C166.990923 674.341463 112.044581 734.282927 112.044581 799.219512v89.912195c0 19.980488 14.985366 39.960976 34.965854 39.960976h259.746342c29.970732 0 49.95122 19.980488 49.951219 49.951219s-19.980488 44.956098-49.951219 44.956098z" p-id="16429" fill="#bfbfbf"></path><path d="M996.181167 729.287805c-19.980488-19.980488-49.95122-19.980488-69.931707 0l-174.829269 174.829268-109.892683-104.897561c-19.980488-19.980488-49.95122-19.980488-69.931707 0-19.980488 19.980488-19.980488 49.95122 0 69.931708l139.863415 139.863414s4.995122 4.995122 9.990244 4.995122 4.995122 4.995122 9.990243 4.995122h39.960976c4.995122 0 4.995122-4.995122 9.990244-4.995122s4.995122-4.995122 9.990244-4.995122l209.795122-209.795122c14.985366-19.980488 14.985366-49.95122-4.995122-69.931707z" p-id="16430" fill="#bfbfbf"></path></svg>
|
After Width: | Height: | Size: 2.1 KiB |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="16.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cdcdcd" d="M109.227 157.952c0-20.866 16.902-37.779 37.778-37.779H412.29c20.865 0 37.778 16.903 37.778 37.779v265.284c0 20.866-16.902 37.779-37.778 37.779H147.005c-20.865 0-37.778-16.903-37.778-37.779V157.952z m570.532-50.937c14.752-14.753 38.662-14.763 53.425 0L920.774 294.6c14.749 14.753 14.756 38.667 0 53.426L733.184 535.61c-14.752 14.76-38.663 14.766-53.425 0L492.172 348.027c-14.752-14.753-14.763-38.666 0-53.426l187.587-187.586zM542.88 605.255c0-20.862 16.9-37.775 37.78-37.775h265.28c20.866 0 37.779 16.9 37.779 37.776v265.287c0 20.863-16.9 37.776-37.779 37.776H580.66c-20.867 0-37.78-16.903-37.78-37.776V605.256z m-433.653 0c0-20.862 16.902-37.775 37.778-37.775H412.29c20.865 0 37.778 16.9 37.778 37.776v265.287c0 20.863-16.902 37.776-37.778 37.776H147.005c-20.865 0-37.778-16.903-37.778-37.776V605.256z" /></svg>
|
After Width: | Height: | Size: 1.1 KiB |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="16.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cdcdcd" d="M537.216 1003.776h-427.52c-27.072 0-52.8-11.456-70.592-31.296a76.352 76.352 0 0 1-19.904-58.88l-0.192-60.16a32 32 0 0 1 64 0v63.872c-0.384 5.44 0.576 8.832 3.968 12.608a30.656 30.656 0 0 0 22.72 9.856h427.52a32 32 0 0 1 0 64zM50.752 934.144a32 32 0 0 1-32-32v-60.032a457.536 457.536 0 0 1 277.952-421.12 32.192 32.192 0 0 1 42.048 16.832 32.128 32.128 0 0 1-16.896 42.112 393.408 393.408 0 0 0-239.104 362.24v60.032a32 32 0 0 1-32 31.936zM460.736 514.496a247.36 247.36 0 0 1-247.104-247.104A247.424 247.424 0 0 1 460.736 20.224a247.424 247.424 0 0 1 247.168 247.168 247.36 247.36 0 0 1-247.168 247.104z m0-430.272a183.36 183.36 0 0 0-183.104 183.168 183.296 183.296 0 0 0 183.104 183.104 183.36 183.36 0 0 0 183.168-183.104 183.36 183.36 0 0 0-183.168-183.168zM778.56 829.376c-42.944 0-77.888-34.944-77.888-77.888s34.944-77.888 77.888-77.888 77.888 34.944 77.888 77.888-34.944 77.888-77.888 77.888z m0-110.976a33.216 33.216 0 1 0 0.064 66.368 33.216 33.216 0 0 0-0.064-66.368zM834.56 960.384a22.4 22.4 0 0 1-22.144-19.2 35.2 35.2 0 0 0-34.56-30.208c-17.152 0-32 12.864-34.624 30.016a22.272 22.272 0 0 1-28.736 17.984 217.536 217.536 0 0 1-84.352-49.344 22.4 22.4 0 0 1 1.28-33.728 35.136 35.136 0 0 0 8.32-44.864 35.84 35.84 0 0 0-42.88-15.04 22.4 22.4 0 0 1-29.76-15.936c-3.712-16.448-5.632-32.768-5.632-48.64s1.92-32.192 5.632-48.64a22.144 22.144 0 0 1 11.2-14.72 22.528 22.528 0 0 1 18.496-1.216 34.944 34.944 0 1 0 34.56-59.968 22.336 22.336 0 0 1-8.192-16.64 21.248 21.248 0 0 1 6.976-16.96 217.472 217.472 0 0 1 84.352-49.28 22.4 22.4 0 0 1 28.672 18.048 35.328 35.328 0 0 0 34.624 29.952 35.2 35.2 0 0 0 34.56-30.208 22.4 22.4 0 0 1 28.608-18.304 217.6 217.6 0 0 1 85.248 49.088 22.336 22.336 0 0 1-1.472 34.048 34.88 34.88 0 0 0-8.896 45.056 35.84 35.84 0 0 0 43.776 14.784 22.592 22.592 0 0 1 30.208 15.552 214.336 214.336 0 0 1 0 98.816 22.592 22.592 0 0 1-30.336 15.552 35.456 35.456 0 0 0-43.648 14.72 35.008 35.008 0 0 0 8.96 45.184 22.4 22.4 0 0 1 1.408 34.048 218.368 218.368 0 0 1-85.312 49.024 19.584 19.584 0 0 1-6.336 1.024z m-56.768-94.144c30.144 0 57.024 17.216 70.592 42.752 10.624-4.736 20.864-10.624 30.528-17.536a79.232 79.232 0 0 1-1.728-82.56 81.024 81.024 0 0 1 72.832-39.744 164.16 164.16 0 0 0 0-35.264 81.28 81.28 0 0 1-72.768-39.68 80.128 80.128 0 0 1 1.792-82.496 166.336 166.336 0 0 0-30.656-17.664c-13.504 25.6-40.448 42.816-70.592 42.816-29.824 0-56.64-17.024-70.336-42.304a179.072 179.072 0 0 0-30.336 17.792c15.104 24.384 16.256 55.68 1.28 81.792-14.528 25.216-43.008 42.432-71.296 39.872a147.776 147.776 0 0 0 0 35.008 83.84 83.84 0 0 1 71.296 39.744c15.04 26.24 13.888 57.536-1.216 81.92 9.472 6.976 19.648 12.928 30.336 17.792 13.696-25.216 40.512-42.24 70.272-42.24z" /></svg>
|
After Width: | Height: | Size: 2.9 KiB |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="16.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cdcdcd" d="M544.42 555.25a2.06 2.06 0 0 1-0.31-4c62.6-19.26 109.26-93.81 109.26-182.84 0-103.65-63.24-187.68-141.26-187.68s-141.26 84-141.26 187.68c0 89 46.66 163.58 109.26 182.84a2.06 2.06 0 0 1-0.31 4C342.71 576 235.36 726.91 229.56 912.7a15.55 15.55 0 0 0 15.73 15.84h533.64a15.55 15.55 0 0 0 15.73-15.84c-5.8-185.79-113.15-336.7-250.24-357.45zM688.39 351.36c0 88.86-28.45 153.6-69.69 184a10.61 10.61 0 0 0 3.67 18.82c109.45 30.2 179.33 165.4 198.52 274.29a10.91 10.91 0 0 0 10.81 9h117.7a10.83 10.83 0 0 0 11-10.9c-3.51-176.53-92.07-321.75-217-356.09a10.57 10.57 0 0 1-2.73-19.48c48.59-28.79 78.27-96.13 78.27-173.79 0-103.65-73.28-176.77-151.3-176.77-34.13 0-65.44 16.09-89.86 42.88a10.6 10.6 0 0 0 2.77 16.58c58.61 31.44 107.84 103.52 107.84 191.46zM335.32 351.36c0 88.62 28.29 153.24 69.34 183.72a10.83 10.83 0 0 1-3.75 19.2C291.73 584.69 222 719.65 202.82 828.39a11.07 11.07 0 0 1-11 9H74.53a11 11 0 0 1-11.18-11.12c3.57-176.15 91.84-321.09 216.43-355.71a10.84 10.84 0 0 0 2.74-19.85c-48.29-29-77.75-96.1-77.75-173.48 0-103.65 73.28-176.77 151.29-176.77 34.06 0 65.3 16 89.69 42.69a10.8 10.8 0 0 1-2.81 16.89c-58.52 31.48-107.62 103.49-107.62 191.32z" /></svg>
|
After Width: | Height: | Size: 1.4 KiB |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="16.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cdcdcd" d="M370.901333 144.853333c-27.434667 0-49.621333 22.229333-49.621333 49.621334v61.738666c0 27.392 22.186667 49.621333 49.621333 49.621334h282.197334c27.434667 0 49.621333-22.186667 49.621333-49.621334V194.474667c0-27.392-22.186667-49.621333-49.578667-49.621334H370.858667zM261.717333 194.474667A109.141333 109.141333 0 0 1 370.901333 85.333333h282.197334a109.141333 109.141333 0 0 1 109.184 109.141334v61.738666a109.141333 109.141333 0 0 1-109.184 109.141334h-111.36v116.906666h133.418666a109.141333 109.141333 0 0 1 109.141334 109.098667v67.285333h45.226666A109.141333 109.141333 0 0 1 938.666667 767.786667v61.738666A109.141333 109.141333 0 0 1 829.525333 938.666667h-149.930666a109.141333 109.141333 0 0 1-109.184-109.141334v-61.738666a109.141333 109.141333 0 0 1 109.184-109.141334h45.226666V591.36c0-27.434667-22.229333-49.621333-49.664-49.621333H348.842667c-27.392 0-49.621333 22.186667-49.621334 49.578666v67.285334h45.226667a109.141333 109.141333 0 0 1 109.098667 109.141333v61.738667A109.141333 109.141333 0 0 1 344.405333 938.666667H194.474667A109.141333 109.141333 0 0 1 85.333333 829.525333v-61.738666a109.141333 109.141333 0 0 1 109.141334-109.141334h45.226666V591.36a109.141333 109.141333 0 0 1 109.141334-109.184h133.376V365.354667h-111.36a109.141333 109.141333 0 0 1-109.141334-109.141334V194.474667zM194.474667 718.165333c-27.392 0-49.621333 22.186667-49.621334 49.621334v61.738666c0 27.392 22.229333 49.621333 49.621334 49.621334h149.930666c27.434667 0 49.621333-22.186667 49.621334-49.621334v-61.738666c0-27.392-22.186667-49.621333-49.621334-49.621334H194.474667z m485.12 0c-27.434667 0-49.621333 22.186667-49.621334 49.621334v61.738666c0 27.392 22.186667 49.621333 49.621334 49.621334h149.930666c27.392 0 49.621333-22.186667 49.621334-49.621334v-61.738666c0-27.392-22.186667-49.621333-49.621334-49.621334h-149.930666z" /></svg>
|
After Width: | Height: | Size: 2.1 KiB |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="16.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cdcdcd" d="M597.312 853.312v85.376h85.376c47.104 0 85.312 38.208 85.312 85.312H256c0-47.104 38.208-85.312 85.312-85.312h85.376v-85.376H128a128 128 0 0 1-128-128V128a128 128 0 0 1 128-128h768a128 128 0 0 1 128 128v597.312a128 128 0 0 1-128 128H597.312z m-448-768a64 64 0 0 0-64 64v469.376a64 64 0 0 0 64 64h725.376a64 64 0 0 0 64-64V149.312a64 64 0 0 0-64-64H149.312zM512 810.688a42.688 42.688 0 1 0 0-85.376 42.688 42.688 0 0 0 0 85.376zM384 341.312h85.312v256H384v-256zM213.312 426.688h85.376v170.624H213.312V426.688zM554.688 256H640v341.312H554.688V256z m170.624-85.312h85.376v426.624h-85.376V170.688z" /></svg>
|
After Width: | Height: | Size: 882 B |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="15.44px" viewBox="0 0 1061 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cdcdcd" d="M447.122 467.332L49.24 268.162A33.501 33.501 0 0 0 0.136 300.745v441.02a33.042 33.042 0 0 0 16.062 27.994l396.965 248.275a33.96 33.96 0 0 0 17.438 5.507 33.042 33.042 0 0 0 33.043-33.042V497.162a33.042 33.042 0 0 0-16.522-29.83z m598.889-203.76a33.042 33.042 0 0 0-31.666 0l-463.507 203.76a33.042 33.042 0 0 0-19.733 30.289v493.337a33.042 33.042 0 0 0 49.563 28.453l463.048-265.255a33.042 33.042 0 0 0 16.521-28.453V291.566a33.042 33.042 0 0 0-14.226-27.994z m-54.611-84.9a33.042 33.042 0 0 0-22.487-29.83L550.838 1.53a32.583 32.583 0 0 0-19.733 0L83.659 158.021a33.042 33.042 0 0 0-4.13 61.036l397.882 199.17a33.501 33.501 0 0 0 14.685 3.213 33.96 33.96 0 0 0 13.31 0L969.37 215.845a33.042 33.042 0 0 0 22.029-37.173z" /></svg>
|
After Width: | Height: | Size: 1008 B |
|
@ -0,0 +1,2 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1655960055895" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5653" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
|
||||||
|
</style></defs><path d="M870.4 12.8H153.6A140.902 140.902 0 0 0 12.8 153.6v716.8a140.902 140.902 0 0 0 140.8 140.8h504.32a38.4 38.4 0 0 0 0-76.8H153.6c-35.277 0-64-28.723-64-64V153.6c0-35.277 28.723-64 64-64h716.8c35.277 0 64 28.723 64 64v716.8c0 35.277-28.723 64-64 64h-11.469a38.4 38.4 0 0 0 0 76.8H870.4a140.902 140.902 0 0 0 140.8-140.8V153.6A140.902 140.902 0 0 0 870.4 12.8z" p-id="5654" fill="#bfbfbf"></path><path d="M243.558 294.4h389.888a38.4 38.4 0 0 0 0-76.8H243.558a38.4 38.4 0 0 0 0 76.8z m486.4 179.2H242.842a38.4 38.4 0 0 0 0 76.8h487.116a38.4 38.4 0 0 0 0-76.8z m-486.4 256a38.4 38.4 0 0 0 0 76.8h192.973a38.4 38.4 0 0 0 0-76.8H243.558z m541.543-512h-3.943c-21.196 0-36.403 17.203-36.403 38.4s19.2 38.4 40.397 38.4a38.4 38.4 0 1 0-0.051-76.8z" p-id="5655" fill="#bfbfbf"></path></svg>
|
After Width: | Height: | Size: 1.4 KiB |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="16.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cdcdcd" d="M875.34894404 486.97469352H708.9248709v-43.49544871c0-17.04342891-13.80440609-30.84783577-30.84783578-30.847835h-18.50870115v0.23135816H363.35199227v-0.23135816h-18.50870193c-17.04342891 0-30.84783577 13.80440609-30.84783498 30.847835v43.41832933H181.2726423c-8.48315514 0-15.42391789-6.94076273-15.42391788-15.4239179v-215.93484961c0-8.48315514 6.94076273-15.42391789 15.42391788-15.42391789h132.64569289v43.18696962c0 11.1823407 5.93820837 20.97652854 14.88408062 26.37489964 4.62717568 2.8534251 10.17978555 4.47293612 15.96375516 4.47293612h333.23374476c8.02043726 0 15.26967833-3.00766387 20.74516883-8.02043726 0.69407604-0.69407604 1.46527224-1.38815287 2.0822289-2.0822289 5.01277339-5.4754905 8.02043726-12.72473233 8.02043727-20.7451696V147.34002327c0-17.04342891-13.80440609-30.84783577-30.847835-30.84783577h-18.50870192v0.23135894h-296.13922154v-0.23135894h-18.50870193c-17.04342891 0-30.84783577 13.80440609-30.84783498 30.84783577v43.41832856H147.34002327c-17.04342891 0-30.84783577 13.80440609-30.84783577 30.84783576v283.87720709c0 17.04342891 13.80440609 30.84783577 30.84783577 30.84783576h166.65543209v43.18696961c0 17.04342891 13.80440609 30.84783577 30.84783499 30.84783578h333.23374478c17.04342891 0 30.84783577-13.80440609 30.84783577-30.84783578v-43.10985023H841.416325c8.48315514 0 15.42391789 6.94076273 15.42391711 15.4239179v215.93484961c0 8.48315514-6.94076273 15.42391789-15.42391711 15.42391788H708.9248709v-43.5725681c0-17.04342891-13.80440609-30.84783577-30.84783578-30.84783577h-18.50870115v0.23135894H363.35199227v-0.23135894h-18.50870193c-17.04342891 0-30.84783577 13.80440609-30.84783498 30.84783577v135.96183586c0 17.04342891 13.80440609 30.84783577 30.84783498 30.847835h333.23374478c4.78141446 0 9.33146996-1.07967453 13.34168899-3.00766387 0.92543497-0.46271788 1.77375057-0.92543497 2.62206616-1.3881521 0.38559772-0.23135894 0.8483156-0.53983726 1.23391332-0.7711962 2.46782662-1.69663118 4.70429506-3.70173992 6.55516502-5.93820836 1.2339133-1.54239164 2.39070723-3.16190343 3.3161422-4.935654 0.46271788-0.8483156 0.92543497-1.77375057 1.31103269-2.69918557 1.54239164-3.70173992 2.39070723-7.71195893 2.39070723-12.03065552v-43.03273082H875.34894404c17.04342891 0 30.84783577-13.80440609 30.84783576-30.84783577V517.89964868c0-17.04342891-13.80440609-30.92495515-30.84783577-30.92495516zM363.35199227 181.50400124c0-8.48315514 6.94076273-15.42391789 15.4239179-15.42391787h265.36850592c8.48315514 0 15.42391789 6.94076273 15.42391788 15.42391788v67.86523807c0 8.48315514-6.94076273 15.42391789-15.42391788 15.42391789H378.77591017c-8.48315514 0-15.42391789-6.94076273-15.4239179-15.42391789v-9.25435058h0.07711939v-49.35653691h-0.07711939v-9.25435058z m296.2163417 364.08157978c0 8.48315514-6.94076273 15.42391789-15.42391788 15.42391788H378.77591017c-8.48315514 0-15.42391789-6.94076273-15.4239179-15.42391788v-9.25435058h0.07711939v-49.35653692h-0.07711939v-9.25435058c0-8.48315514 6.94076273-15.42391789 15.42391789-15.42391789h265.36850593c8.48315514 0 15.42391789 6.94076273 15.42391788 15.42391789v9.33146996h-0.30847833v49.35653693h0.30847833v9.17723119z m0 296.06210214c0 8.48315514-6.94076273 15.42391789-15.42391788 15.4239179H378.77591017c-8.48315514 0-15.42391789-6.94076273-15.4239179-15.4239179v-67.86523807c0-8.48315514 6.94076273-15.42391789 15.42391789-15.42391788h265.36850593c8.48315514 0 15.42391789 6.94076273 15.42391788 15.42391788v9.40859012h-0.30847833v49.35653693h0.30847833v9.10011102z" /></svg>
|
After Width: | Height: | Size: 3.7 KiB |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="16.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cdcdcd" d="M841.922298 89.128417L549.846066 5.419971a138.510378 138.510378 0 0 0-76.481818 0L181.890235 89.128417A120.443807 120.443807 0 0 0 90.352941 204.754472v425.16664A408.304506 408.304506 0 0 0 511.906266 1023.772361a408.304506 408.304506 0 0 0 421.553326-393.851249V204.754472a120.443807 120.443807 0 0 0-91.537294-115.626055zM198.752368 146.941445l291.474013-83.708446a78.288475 78.288475 0 0 1 42.757552 0l292.076232 83.708446a60.221904 60.221904 0 0 1 48.177523 60.221903v46.973085a151.156978 151.156978 0 0 0-46.370866-23.486542L556.470475 143.93035a149.350321 149.350321 0 0 0-88.526198 0l-271.600785 84.310665a151.156978 151.156978 0 0 0-45.768647 23.486542V204.754472a60.221904 60.221904 0 0 1 48.177523-57.813027z m674.48532 481.775229A348.684822 348.684822 0 0 1 511.906266 963.550458a348.684822 348.684822 0 0 1-361.331421-333.629346V374.58024a90.332855 90.332855 0 0 1 63.835218-89.128417l270.998566-83.708446a88.526198 88.526198 0 0 1 52.995275 0l270.998566 83.708446A90.332855 90.332855 0 0 1 873.237688 372.171364v120.443807zM699.196387 402.884535l-219.809949 274.611881-156.576949-156.57695a30.110952 30.110952 0 0 0-42.757551 42.757552l180.66571 180.66571a30.110952 30.110952 0 0 0 16.862133 6.022191 30.110952 30.110952 0 0 0 12.044381 0h3.613314l6.022191-3.613314 240.887614-301.109518a30.110952 30.110952 0 0 0-46.973085-37.337581z" /></svg>
|
After Width: | Height: | Size: 1.6 KiB |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="16.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cdcdcd" d="M874.24 1013.76H143.36a94.72 94.72 0 0 1-94.72-94.72V188.16a94.72 94.72 0 0 1 94.72-94.72h730.88a95.36 95.36 0 0 1 94.72 94.72v730.88a94.72 94.72 0 0 1-94.72 94.72zM143.36 156.8a31.36 31.36 0 0 0-32 31.36v730.88a32 32 0 0 0 32 32h730.88a32 32 0 0 0 31.36-32V188.16a31.36 31.36 0 0 0-31.36-31.36zM926.08 399.36h-832a32 32 0 0 1 0-64h832a32 32 0 1 1 0 64zM339.84 273.28a31.36 31.36 0 0 1-31.36-32V39.04a31.36 31.36 0 0 1 31.36-32 32 32 0 0 1 32 32v202.24a32 32 0 0 1-32 32zM677.12 273.28a31.36 31.36 0 0 1-31.36-32V39.04a31.36 31.36 0 1 1 64 0v202.24a31.36 31.36 0 0 1-32.64 32zM444.16 841.6a33.92 33.92 0 0 1-23.04-9.6l-128-138.24a32 32 0 1 1 46.08-43.52L448 768l280.32-279.68a30.72 30.72 0 0 1 44.8 0 31.36 31.36 0 0 1 0 44.16L466.56 832a32 32 0 0 1-22.4 9.6z" /></svg>
|
After Width: | Height: | Size: 1.0 KiB |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="13.72px" viewBox="0 0 1194 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cdcdcd" d="M909.956851 955.335277H284.212245c-49.558017 0-90.159767-40.601749-90.159767-90.159767V164.795335c0-49.558017 40.601749-90.159767 90.159767-90.159766h625.744606c49.558017 0 90.159767 40.601749 90.159767 90.159766v700.380175c0 49.558017-40.601749 90.159767-90.159767 90.159767zM284.212245 140.314869c-13.732945 0-24.480466 10.747522-24.480467 24.480466v700.380175c0 13.732945 10.747522 24.480466 24.480467 24.480467h625.744606c13.732945 0 24.480466-10.747522 24.480467-24.480467V164.795335c0-13.732945-10.747522-24.480466-24.480467-24.480466H284.212245zM909.956851 976.233236H284.212245c-61.499708 0-111.057726-49.558017-111.057726-111.057726V164.795335C173.154519 103.892711 222.712536 53.737609 284.212245 53.737609h625.744606c61.499708 0 111.057726 49.558017 111.057726 111.057726v700.380175c0 60.902624-49.558017 111.057726-111.057726 111.057726zM284.212245 95.533528C245.998834 95.533528 214.950437 126.581924 214.950437 164.795335v700.380175c0 38.213411 31.048397 69.261808 69.261808 69.261808h625.744606c38.213411 0 69.261808-31.048397 69.261808-69.261808V164.795335c0-38.213411-31.048397-69.261808-69.261808-69.261807H284.212245z m625.744606 815.020408H284.212245c-25.077551 0-45.378426-20.300875-45.378426-45.378426V164.795335c0-25.077551 20.300875-45.378426 45.378426-45.378425h625.744606c25.077551 0 45.378426 20.300875 45.378426 45.378425v700.380175c0 25.077551-20.300875 45.378426-45.378426 45.378426zM284.212245 161.212828c-1.791254 0-3.582507 1.791254-3.582507 3.582507v700.380175c0 1.791254 1.791254 3.582507 3.582507 3.582507h625.744606c1.791254 0 3.582507-1.791254 3.582508-3.582507V164.795335c0-1.791254-1.791254-3.582507-3.582508-3.582507H284.212245zM850.248397 453.784257H752.326531c-8.359184 0-15.524198-7.165015-15.524199-15.524199V340.338192c0-8.359184 7.165015-15.524198 15.524199-15.524198h97.921866c8.359184 0 15.524198 7.165015 15.524198 15.524198v97.921866c0 8.359184-7.165015 15.524198-15.524198 15.524199zM850.248397 639.477551H752.326531c-8.359184 0-15.524198-7.165015-15.524199-15.524198V526.031487c0-8.359184 7.165015-15.524198 15.524199-15.524198h97.921866c8.359184 0 15.524198 7.165015 15.524198 15.524198v97.921866c0 8.359184-7.165015 15.524198-15.524198 15.524198zM850.248397 825.170845H752.326531c-8.359184 0-15.524198-7.165015-15.524199-15.524198v-97.921866c0-8.359184 7.165015-15.524198 15.524199-15.524198h97.921866c8.359184 0 15.524198 7.165015 15.524198 15.524198v97.921866c0 8.956268-7.165015 15.524198-15.524198 15.524198zM493.191837 712.321866v97.921866c0 8.359184-7.165015 15.524198-15.524199 15.524198H379.745773c-8.359184 0-15.524198-7.165015-15.524199-15.524198v-97.921866c0-8.359184 7.165015-15.524198 15.524199-15.524198H477.667638c8.956268 0.597085 15.524198 7.165015 15.524199 15.524198zM679.482216 712.321866v97.921866c0 8.359184-7.165015 15.524198-15.524199 15.524198H565.439067c-8.359184 0-15.524198-7.165015-15.524198-15.524198v-97.921866c0-8.359184 7.165015-15.524198 15.524198-15.524198h97.921866c8.956268 0.597085 16.121283 7.165015 16.121283 15.524198zM865.17551 712.321866v97.921866c0 8.359184-7.165015 15.524198-15.524198 15.524198h-97.921866c-8.359184 0-15.524198-7.165015-15.524198-15.524198v-97.921866c0-8.359184 7.165015-15.524198 15.524198-15.524198h97.921866c8.359184 0.597085 15.524198 7.165015 15.524198 15.524198z" /></svg>
|
After Width: | Height: | Size: 3.5 KiB |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="16.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cdcdcd" d="M541.269333 184.448a42.666667 42.666667 0 0 0-44.586666-0.170667l-286.208 174.08 2.944 495.104h298.794666a42.453333 42.453333 0 0 1 0 84.864H170.666667c-23.936 0-39.509333-18.005333-39.509334-42.154666L128.426667 407.466667l-16.810667 10.197333a42.666667 42.666667 0 1 1-44.458667-72.234667l430.208-253.866666a43.093333 43.093333 0 0 1 44.629334 0l417.792 254.165333-0.469334 0.682667a42.666667 42.666667 0 1 1-49.92 68.394666v104.021334a42.666667 42.666667 0 0 1-42.88 42.666666h-1.365333a42.666667 42.666667 0 0 1-42.496-42.666666V359.253333l-44.714667-28.074666 0.256-0.256-236.885333-146.474667z m-113.536 242.176h174.890667a42.666667 42.666667 0 1 1 0 85.376h-174.933333a42.666667 42.666667 0 0 1 0-85.376z m523.349334 248.234667s-0.512 0.938667 30.250666 50.346666c-80.085333 71.082667-0.469333 137.258667-0.469333 137.258667s-0.512 0.426667-30.506667 49.92C844.928 883.328 825.386667 981.333333 825.386667 981.333333h-62.208c-30.72-106.581333-124.458667-67.541333-124.458667-67.541333l-32.938667-52.266667c84.906667-77.653333 0-134.826667 0-134.912 0 0 1.066667-1.578667 32.426667-52.010666 108.458667 29.098667 125.44-69.205333 125.44-69.205334h61.482667c19.797333 98.133333 125.952 69.461333 125.952 69.461334z m-158.037334 187.733333c39.637333 0 71.765333-31.018667 71.765334-69.248 0-38.186667-32.128-69.205333-71.765334-69.205333-39.594667 0-71.722667 31.018667-71.722666 69.205333 0 38.229333 32.128 69.248 71.722666 69.248z" /></svg>
|
After Width: | Height: | Size: 1.7 KiB |
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="16.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cdcdcd" d="M843.776 972.8c-32.768 0-66.56-12.288-91.136-37.888L570.368 752.64c-139.264 63.488-301.056 34.816-410.624-74.752C44.032 563.2 18.432 390.144 94.208 246.784c4.096-8.192 13.312-14.336 22.528-16.384 9.216-1.024 19.456 2.048 26.624 8.192l203.776 203.776c26.624 26.624 69.632 26.624 96.256 0 26.624-26.624 26.624-69.632 0-96.256L239.616 143.36c-7.168-7.168-10.24-16.384-8.192-26.624s7.168-18.432 16.384-22.528c143.36-75.776 316.416-50.176 431.104 64.512C788.48 268.288 817.152 431.104 753.664 569.344l112.64 112.64c12.288 12.288 12.288 31.744 0 43.008-12.288 12.288-31.744 12.288-43.008 0L694.272 598.016c-9.216-9.216-11.264-24.576-5.12-35.84 63.488-118.784 41.984-263.168-54.272-359.424-84.992-84.992-209.92-111.616-320.512-71.68l173.056 173.056c50.176 50.176 50.176 132.096 0 183.296-50.176 50.176-132.096 50.176-183.296 0L131.072 314.368c-40.96 110.592-14.336 234.496 71.68 320.512 95.232 95.232 239.616 116.736 359.424 54.272 12.288-6.144 26.624-4.096 35.84 5.12l197.632 197.632c26.624 26.624 69.632 26.624 96.256 0 26.624-26.624 26.624-69.632 0-96.256-12.288-12.288-12.288-31.744 0-43.008 12.288-12.288 31.744-12.288 43.008 0 50.176 50.176 50.176 132.096 0 183.296-25.6 24.576-58.368 36.864-91.136 36.864z" /></svg>
|
After Width: | Height: | Size: 1.5 KiB |
|
@ -170,8 +170,10 @@ layui.define(function (exports) {
|
||||||
else {
|
else {
|
||||||
$iframe = $(APP_BODY).find('iframe[src="' + url + '"]');
|
$iframe = $(APP_BODY).find('iframe[src="' + url + '"]');
|
||||||
}
|
}
|
||||||
$iframe && !$iframe.attr('loaded') && ($('.layadmin-tabsbody-shade').show()) && $iframe.load(function () {
|
$iframe && !$iframe.attr('loaded') && $iframe.load(function () {
|
||||||
// $('.layadmin-tabsbody-shade').fadeOut('600');
|
if (url.indexOf('http:') != -1 || url.indexOf('https:') != -1) {
|
||||||
|
$('.layadmin-tabsbody-shade').fadeOut('600');
|
||||||
|
}
|
||||||
$iframe.attr('loaded', 'true')
|
$iframe.attr('loaded', 'true')
|
||||||
});
|
});
|
||||||
callback && callback();
|
callback && callback();
|
||||||
|
|
|
@ -366,7 +366,8 @@ layui.define(['laytpl', 'element', 'layer', 'zlPinYin', 'common'], function (exp
|
||||||
color: {{d.radioBgInput}};
|
color: {{d.radioBgInput}};
|
||||||
}
|
}
|
||||||
.layui-form-select dl dd.layui-this {
|
.layui-form-select dl dd.layui-this {
|
||||||
background-color:{{d.menuBgInput}};
|
background-color:var(--kd-color);
|
||||||
|
color: {{d.kd_color_11}};
|
||||||
}
|
}
|
||||||
.layui-side-menu {
|
.layui-side-menu {
|
||||||
font-family:{{d.menuFont}} !important;
|
font-family:{{d.menuFont}} !important;
|
||||||
|
@ -957,6 +958,13 @@ layui.define(['laytpl', 'element', 'layer', 'zlPinYin', 'common'], function (exp
|
||||||
return '?tokenId=' + ($('#tokenId').val() ? $('#tokenId').val() : '') + '&resId=' + resid;
|
return '?tokenId=' + ($('#tokenId').val() ? $('#tokenId').val() : '') + '&resId=' + resid;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
window['SVGInject'] && window['SVGInject'].setOptions({
|
||||||
|
afterLoad: function (svg, svgString) {
|
||||||
|
svgString = svgString.replace(/fill="#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})"/g, '')
|
||||||
|
svg.classList.add('my-class');
|
||||||
|
return svgString
|
||||||
|
},
|
||||||
|
});
|
||||||
/**
|
/**
|
||||||
* 获取一个菜单的的html
|
* 获取一个菜单的的html
|
||||||
* @param {*} item
|
* @param {*} item
|
||||||
|
|
|
@ -46,7 +46,6 @@ layui.define([], function (exports) {
|
||||||
,REFRESH_TREE_DATA_DATA:'REFRESH_TREE_DATA_DATA(NODE)'
|
,REFRESH_TREE_DATA_DATA:'REFRESH_TREE_DATA_DATA(NODE)'
|
||||||
//提交完成消息
|
//提交完成消息
|
||||||
,AFTER_SUBMIT:'AFTER_SUMBIT'
|
,AFTER_SUBMIT:'AFTER_SUMBIT'
|
||||||
|
|
||||||
//画组件的消息
|
//画组件的消息
|
||||||
,WM_DRAW:'WM_DRAW'
|
,WM_DRAW:'WM_DRAW'
|
||||||
},
|
},
|
||||||
|
|
|
@ -11,14 +11,13 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
, selListIds = new Array()
|
, selListIds = new Array()
|
||||||
, tableIns
|
, tableIns
|
||||||
, tableSelIns
|
, tableSelIns
|
||||||
, obj = {}
|
|
||||||
, selectionType;
|
, selectionType;
|
||||||
layui.event('WM_USERDEF', zlConfig.global.WM_USERDEF.WM_DRAW, null, function (WParam) {
|
layui.event('WM_USERDEF', zlConfig.global.WM_USERDEF.WM_DRAW, null, function (WParam) {
|
||||||
if (WParam && $(WParam.elem).attr('class') && $(WParam.elem).attr('class').indexOf('zlPopSourceExt') >= 0) {
|
if (WParam && $(WParam.elem).attr('class') && $(WParam.elem).attr('class').indexOf('zlPopSourceExt') >= 0) {
|
||||||
obj.render($(WParam.elem), $(WParam.elem).value, $(WParam.elem).attr('text'));
|
zlPopSourceExt.render($(WParam.elem), $(WParam.elem).value, $(WParam.elem).attr('text'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
obj = {
|
zlPopSourceExt = {
|
||||||
$elem: null,
|
$elem: null,
|
||||||
getSettings: function () {
|
getSettings: function () {
|
||||||
var ret = {};
|
var ret = {};
|
||||||
|
@ -32,12 +31,11 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
render: function ($elem, value, text) {
|
render: function ($elem, value, text) {
|
||||||
obj.$elem = $elem
|
|
||||||
var showvalue = (value == undefined ? ($elem.attr('value') == undefined ? "" : $elem.attr('value')) : value);
|
var showvalue = (value == undefined ? ($elem.attr('value') == undefined ? "" : $elem.attr('value')) : value);
|
||||||
if ($elem.attr('loaded') && ($elem.attr('value') == undefined ? "" : $elem.attr('value')) == showvalue) {
|
if ($elem.attr('loaded') && ($elem.attr('value') == undefined ? "" : $elem.attr('value')) == showvalue) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
text = text ? text : '';
|
text = text ? text: '' ;
|
||||||
var defaultsetting = {
|
var defaultsetting = {
|
||||||
multselect: true
|
multselect: true
|
||||||
, formtitle: "选择树节点"
|
, formtitle: "选择树节点"
|
||||||
|
@ -88,12 +86,13 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
}
|
}
|
||||||
, callback: {
|
, callback: {
|
||||||
onAsyncSuccess: function (event, treeId, treeNode, msg) {
|
onAsyncSuccess: function (event, treeId, treeNode, msg) {
|
||||||
|
//zlPopSourceExt.setTrreCheck(treeId, $elem.attr('name'), treesetting);
|
||||||
}
|
}
|
||||||
, onClick: function (event, treeId, treeNode) {
|
, onClick: function (event, treeId, treeNode) {
|
||||||
obj.reloadTable(newoptions);
|
zlPopSourceExt.reloadTable(newoptions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
, tabs: [
|
,tabs: [
|
||||||
{ name: '角色', url: '/kdayun/manager/coreroleauth/queryRole', method: 'get', entryname: 'ROLEID', tableUrl: '/kdayun/admin/coreuser/queryusersbydeptrole', tbmethod: 'post' },
|
{ name: '角色', url: '/kdayun/manager/coreroleauth/queryRole', method: 'get', entryname: 'ROLEID', tableUrl: '/kdayun/admin/coreuser/queryusersbydeptrole', tbmethod: 'post' },
|
||||||
{ name: '机构部门', url: '/kdayun/manager/coreroleauth/queryOrgddata', method: 'get', tableUrl: '/kdayun/admin/coreuser/queryusersbydeptrole', tbmethod: 'post' }
|
{ name: '机构部门', url: '/kdayun/manager/coreroleauth/queryOrgddata', method: 'get', tableUrl: '/kdayun/admin/coreuser/queryusersbydeptrole', tbmethod: 'post' }
|
||||||
]
|
]
|
||||||
|
@ -107,7 +106,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
, tableismultiple: false
|
, tableismultiple: false
|
||||||
, max: ''
|
, max: ''
|
||||||
, readonly: false
|
, readonly: false
|
||||||
, verify: ''
|
, verify:''
|
||||||
, selectcallback: function (treedata, data, norow, options, $this) {
|
, selectcallback: function (treedata, data, norow, options, $this) {
|
||||||
|
|
||||||
if (data == undefined) {
|
if (data == undefined) {
|
||||||
|
@ -156,7 +155,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
, tempvalue = options.setvalue ? options.setvalue : value
|
, tempvalue = options.setvalue ? options.setvalue : value
|
||||||
, html = [
|
, html = [
|
||||||
, '<div class = "layui-select-title" name="' + divname + '" >'
|
, '<div class = "layui-select-title" name="' + divname + '" >'
|
||||||
, ' <input type="text" class="layui-input" placeholder ="' + placeholder + '" name="' + inputname + '" readonly lay-verify="' + options.verify + '" value="' + text + '">'
|
, ' <input type="text" class="layui-input" placeholder ="' + placeholder + '" name="' + inputname + '" readonly lay-verify="'+options.verify+'" value="' + text + '">'
|
||||||
, '</div>']
|
, '</div>']
|
||||||
, parenthtml = [
|
, parenthtml = [
|
||||||
, '<input type="hidden" class="layui-input" name="' + inputhiddename + '" value="' + tempvalue + '">'
|
, '<input type="hidden" class="layui-input" name="' + inputhiddename + '" value="' + tempvalue + '">'
|
||||||
|
@ -224,9 +223,10 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
}
|
}
|
||||||
newoptions.async.otherParam = JSON.parse(options.params || '{}');
|
newoptions.async.otherParam = JSON.parse(options.params || '{}');
|
||||||
if (newoptions.edittype == 'edit') {
|
if (newoptions.edittype == 'edit') {
|
||||||
obj.initspans(newoptions, addspanid, delspanid, divname);
|
zlPopSourceExt.initspans(newoptions, addspanid, delspanid, divname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
, initspans: function (options, addspanid, delspanid, divname) {
|
, initspans: function (options, addspanid, delspanid, divname) {
|
||||||
var $input = $('input[name="' + options.inputname + '"]');
|
var $input = $('input[name="' + options.inputname + '"]');
|
||||||
$('#' + delspanid).on('click', function () {
|
$('#' + delspanid).on('click', function () {
|
||||||
|
@ -251,7 +251,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
$('#' + addspanid).on('click', function () {
|
$('#' + addspanid).on('click', function () {
|
||||||
var $this = $(this),
|
var $this = $(this),
|
||||||
//获取弹出框拼接内容
|
//获取弹出框拼接内容
|
||||||
html = obj.concatenationStr(options);
|
html = zlPopSourceExt.concatenationStr(options);
|
||||||
layer.open({
|
layer.open({
|
||||||
type: 1,
|
type: 1,
|
||||||
closeBtn: 1,
|
closeBtn: 1,
|
||||||
|
@ -262,21 +262,21 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
btn: ['确定', '取消'],
|
btn: ['确定', '取消'],
|
||||||
success: function (index) {
|
success: function (index) {
|
||||||
var layercontentH = index.find(".layui-layer-content").height();
|
var layercontentH = index.find(".layui-layer-content").height();
|
||||||
var seacherbox = $("#seacher-box").height() + parseFloat($("#seacher-box").css('margin-top'));
|
var seacherbox = $("#seacher-box").height()+parseFloat($("#seacher-box").css('margin-top'));
|
||||||
var tabtitleH = $("#tab-title").height();
|
var tabtitleH = $("#tab-title").height();
|
||||||
var poptreeboxH = $("#poptree-box");
|
var poptreeboxH = $("#poptree-box");
|
||||||
poptreeboxH.height(layercontentH - tabtitleH - seacherbox - 28).css('box-sizing', 'border-box');
|
poptreeboxH.height(layercontentH - tabtitleH - seacherbox - 28).css('box-sizing','border-box');
|
||||||
tbFileresH = layercontentH - 15;
|
tbFileresH = layercontentH - 15;
|
||||||
tbSelectedH = layercontentH - 64
|
tbSelectedH = layercontentH - 64
|
||||||
checkdatas = [];
|
checkdatas = [];
|
||||||
selListIds = [];
|
selListIds = [];
|
||||||
zt = "";
|
zt = "";
|
||||||
roletree = $.fn.zTree.init($("#" + options.name + "poptree"), options, null);
|
roletree = $.fn.zTree.init($("#" + options.name + "poptree"), options, null);
|
||||||
obj.tabsFun(options);
|
zlPopSourceExt.tabsFun(options);
|
||||||
obj.loadTable(options, tbFileresH);
|
zlPopSourceExt.loadTable(options, tbFileresH);
|
||||||
obj.loadSelTable(options, tbSelectedH);
|
zlPopSourceExt.loadSelTable(options, tbSelectedH);
|
||||||
obj.seacherFun();
|
zlPopSourceExt.seacherFun();
|
||||||
obj.keyvalueFun();
|
zlPopSourceExt.keyvalueFun();
|
||||||
if ($('#tbFileres').next('div').find(' .layui-table-header th[data-field="1"] input[type="checkbox"]').length > 0) {
|
if ($('#tbFileres').next('div').find(' .layui-table-header th[data-field="1"] input[type="checkbox"]').length > 0) {
|
||||||
selectionType = 'checkbox'
|
selectionType = 'checkbox'
|
||||||
} else {
|
} else {
|
||||||
|
@ -329,8 +329,8 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
checkdatas = obj.diff(checkdatas, options);
|
checkdatas = zlPopSourceExt.diff(checkdatas, options);
|
||||||
obj.reloadSelTable(checkdatas, options);
|
zlPopSourceExt.reloadSelTable(checkdatas, options);
|
||||||
});
|
});
|
||||||
table.on(selectionType + '(tbSelDatagrid)', function (obj) {
|
table.on(selectionType + '(tbSelDatagrid)', function (obj) {
|
||||||
if (obj.checked == true) {
|
if (obj.checked == true) {
|
||||||
|
@ -340,7 +340,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
});
|
});
|
||||||
// 点击移除事件
|
// 点击移除事件
|
||||||
$("#remove-btn").on('click', function () {
|
$("#remove-btn").on('click', function () {
|
||||||
obj.removeFun(checkdatas, options);
|
zlPopSourceExt.removeFun(checkdatas, options);
|
||||||
// 如果选中数据为空则已选择列表中选中的数据清空
|
// 如果选中数据为空则已选择列表中选中的数据清空
|
||||||
selListIds = [];
|
selListIds = [];
|
||||||
});
|
});
|
||||||
|
@ -383,7 +383,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 默认树和表头的设置
|
// 默认树和表头的设置
|
||||||
, initialization: function (options, treeUrl, treeMethod, treeparams) {
|
, initialization: function (options, treeUrl, treeMethod,treeparams) {
|
||||||
var setting = {
|
var setting = {
|
||||||
multselect: true,
|
multselect: true,
|
||||||
formtitle: "选择树节点",
|
formtitle: "选择树节点",
|
||||||
|
@ -404,7 +404,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
enable: true,
|
enable: true,
|
||||||
type: treeMethod == undefined ? 'get' : treeMethod,
|
type: treeMethod == undefined ? 'get' : treeMethod,
|
||||||
url: treeUrl == undefined ? 'get' : treeUrl,
|
url: treeUrl == undefined ? 'get' : treeUrl,
|
||||||
otherParam: treeparams ? treeparams : [],
|
otherParam: treeparams?treeparams:[],
|
||||||
dataFilter: function ajaxDataFilter(treeId, parentNode, responseData) {
|
dataFilter: function ajaxDataFilter(treeId, parentNode, responseData) {
|
||||||
if (responseData[zlConfig.global.result.statusName] == 'OK') {
|
if (responseData[zlConfig.global.result.statusName] == 'OK') {
|
||||||
var data = responseData[zlConfig.global.result.dataName];
|
var data = responseData[zlConfig.global.result.dataName];
|
||||||
|
@ -438,7 +438,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
onAsyncSuccess: function (event, treeId, treeNode, msg) {
|
onAsyncSuccess: function (event, treeId, treeNode, msg) {
|
||||||
},
|
},
|
||||||
onClick: function (event, treeId, treeNode) {
|
onClick: function (event, treeId, treeNode) {
|
||||||
obj.reloadTable(options);
|
zlPopSourceExt.reloadTable(options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
, cols: [[{ type: 'numbers', fixed: 'left', title: '#' },
|
, cols: [[{ type: 'numbers', fixed: 'left', title: '#' },
|
||||||
|
@ -470,9 +470,9 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
tableParams = (options.tabs[b].tbparams == undefined ? '' : options.tabs[b].tbparams);
|
tableParams = (options.tabs[b].tbparams == undefined ? '' : options.tabs[b].tbparams);
|
||||||
treeparams = (options.tabs[b].params == undefined ? '' : options.tabs[b].params)
|
treeparams = (options.tabs[b].params == undefined ? '' : options.tabs[b].params)
|
||||||
if (b == 0) {
|
if (b == 0) {
|
||||||
objlist = '<li class="layui-this" lay-url="' + treeUrl + '" lay-tableurl="' + tableUrl + '" lay-tbmethod="' + tableMethod + '" lay-method="' + treeMethod + '" entryname="' + entryname + '" lay-params="' + tableParams + '" lay-treeparams="' + treeparams + '">' + options.tabs[b].name + '</li>'
|
objlist = '<li class="layui-this" lay-url="' + treeUrl + '" lay-tableurl="' + tableUrl + '" lay-tbmethod="' + tableMethod + '" lay-method="' + treeMethod + '" entryname="' + entryname + '" lay-params="' + tableParams + '" lay-treeparams="'+treeparams+'">' + options.tabs[b].name + '</li>'
|
||||||
} else {
|
} else {
|
||||||
objlist = '<li class="" lay-url="' + treeUrl + '" lay-tableurl="' + tableUrl + '" lay-tbmethod="' + tableMethod + '" lay-method="' + treeMethod + '" entryname="' + entryname + '" lay-params="' + tableParams + '" lay-treeparams="' + treeparams + '">' + options.tabs[b].name + '</li>'
|
objlist = '<li class="" lay-url="' + treeUrl + '" lay-tableurl="' + tableUrl + '" lay-tbmethod="' + tableMethod + '" lay-method="' + treeMethod + '" entryname="' + entryname + '" lay-params="' + tableParams + '" lay-treeparams="'+treeparams+'">' + options.tabs[b].name + '</li>'
|
||||||
}
|
}
|
||||||
tabsbox.push(objlist);
|
tabsbox.push(objlist);
|
||||||
}
|
}
|
||||||
|
@ -530,7 +530,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
table_data = res.obj;
|
table_data = res.obj;
|
||||||
$('.layui-none').width($('.layui-table-header table').width() + 'px');
|
$('.layui-none').width($('.layui-table-header table').width() + 'px');
|
||||||
$('.empty-data').width($('.layui-table-body').width() + 'px');
|
$('.empty-data').width($('.layui-table-body').width() + 'px');
|
||||||
obj.setcheck(res, options, checkdatas);
|
zlPopSourceExt.setcheck(res, options, checkdatas);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -569,9 +569,9 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
, response: zlConfig.global.gridResponse
|
, response: zlConfig.global.gridResponse
|
||||||
, done: function (res, curr, count) {
|
, done: function (res, curr, count) {
|
||||||
table_data = res.obj;
|
table_data = res.obj;
|
||||||
obj.setcheck(res, options, checkdatas);
|
zlPopSourceExt.setcheck(res, options, checkdatas);
|
||||||
obj.checkAll('tbSelected');
|
zlPopSourceExt.checkAll('tbSelected');
|
||||||
obj.setReadonly(options.readonly);
|
zlPopSourceExt.setReadonly(options.readonly);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -587,7 +587,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
tableSelIns.reload({
|
tableSelIns.reload({
|
||||||
data: selectedData
|
data: selectedData
|
||||||
, done: function (res, curr, count) {
|
, done: function (res, curr, count) {
|
||||||
obj.setReadonly(options.readonly);
|
zlPopSourceExt.setReadonly(options.readonly);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -599,16 +599,16 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
treeMethod = $(this).attr("lay-method"),
|
treeMethod = $(this).attr("lay-method"),
|
||||||
treeparams = $(this).attr("lay-treeparams"),
|
treeparams = $(this).attr("lay-treeparams"),
|
||||||
//创建zTree组件
|
//创建zTree组件
|
||||||
setting = obj.initialization(options, treeUrl, treeMethod, treeparams);
|
setting = zlPopSourceExt.initialization(options, treeUrl, treeMethod,treeparams);
|
||||||
roletree = $.fn.zTree.init($("#" + options.name + "poptree"), setting, null);
|
roletree = $.fn.zTree.init($("#" + options.name + "poptree"), setting, null);
|
||||||
obj.reloadTable(options);
|
zlPopSourceExt.reloadTable(options);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 搜索按钮事件
|
// 搜索按钮事件
|
||||||
, seacherFun: function () {
|
, seacherFun: function () {
|
||||||
$('#seacher').on('click', function () {
|
$('#seacher').on('click', function () {
|
||||||
var text = $('#keyvalue').val();
|
var text = $('#keyvalue').val();
|
||||||
obj.searchNode(text);
|
zlPopSourceExt.searchNode(text);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 搜索输入框回车事件
|
// 搜索输入框回车事件
|
||||||
|
@ -617,7 +617,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
var e = event || window.event;
|
var e = event || window.event;
|
||||||
if (e.keyCode == 13) {
|
if (e.keyCode == 13) {
|
||||||
var text = $('#keyvalue').val();
|
var text = $('#keyvalue').val();
|
||||||
obj.searchNode(text);
|
zlPopSourceExt.searchNode(text);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -631,14 +631,14 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
}
|
}
|
||||||
nodeList = roletree.getNodesByParamFuzzy(keyType, value);
|
nodeList = roletree.getNodesByParamFuzzy(keyType, value);
|
||||||
nodeList = roletree.transformToArray(nodeList);
|
nodeList = roletree.transformToArray(nodeList);
|
||||||
obj.updateNodes(true, value, keyType);
|
zlPopSourceExt.updateNodes(true, value, keyType);
|
||||||
}
|
}
|
||||||
//搜索完更新树内容
|
//搜索完更新树内容
|
||||||
, updateNodes: function (highlight, value, keyType) {
|
, updateNodes: function (highlight, value, keyType) {
|
||||||
var allNode = roletree.transformToArray(roletree.getNodes());
|
var allNode = roletree.transformToArray(roletree.getNodes());
|
||||||
roletree.hideNodes(allNode);
|
roletree.hideNodes(allNode);
|
||||||
for (var n = 0; n < nodeList.length; n++) {
|
for (var n = 0; n < nodeList.length; n++) {
|
||||||
obj.findParent(roletree, nodeList[n]);
|
zlPopSourceExt.findParent(roletree, nodeList[n]);
|
||||||
}
|
}
|
||||||
roletree.showNodes(nodeList);
|
roletree.showNodes(nodeList);
|
||||||
nodeList = roletree.getNodesByParamFuzzy(keyType, value);
|
nodeList = roletree.getNodesByParamFuzzy(keyType, value);
|
||||||
|
@ -653,7 +653,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
var pNode = node.getParentNode();
|
var pNode = node.getParentNode();
|
||||||
if (pNode != null) {
|
if (pNode != null) {
|
||||||
nodeList.push(pNode);
|
nodeList.push(pNode);
|
||||||
obj.findParent(zTree, pNode);
|
zlPopSourceExt.findParent(zTree, pNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 已选列表移除事件
|
// 已选列表移除事件
|
||||||
|
@ -674,7 +674,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
obj.reloadTable(options);
|
zlPopSourceExt.reloadTable(options);
|
||||||
}
|
}
|
||||||
//数据表格进来设置已选中的数据
|
//数据表格进来设置已选中的数据
|
||||||
, setcheck: function (res, options, recorddata) {
|
, setcheck: function (res, options, recorddata) {
|
||||||
|
@ -694,7 +694,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
res[i]['LAY_CHECKED'] = 'true';
|
res[i]['LAY_CHECKED'] = 'true';
|
||||||
var index = res[i]['LAY_TABLE_INDEX'];
|
var index = res[i]['LAY_TABLE_INDEX'];
|
||||||
var el = $('#tbFileres');
|
var el = $('#tbFileres');
|
||||||
obj.checkStyle(el, index);
|
zlPopSourceExt.checkStyle(el, index);
|
||||||
}
|
}
|
||||||
if (recorddata.length > 0) {
|
if (recorddata.length > 0) {
|
||||||
for (var n = 0; n < recorddata.length; n++) {
|
for (var n = 0; n < recorddata.length; n++) {
|
||||||
|
@ -702,7 +702,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
res[i]['LAY_CHECKED'] = 'true';
|
res[i]['LAY_CHECKED'] = 'true';
|
||||||
var index = res[i]['LAY_TABLE_INDEX'];
|
var index = res[i]['LAY_TABLE_INDEX'];
|
||||||
var el = $('#tbFileres');
|
var el = $('#tbFileres');
|
||||||
obj.checkStyle(el, index);
|
zlPopSourceExt.checkStyle(el, index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -710,9 +710,9 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
}
|
}
|
||||||
layui.form.render();
|
layui.form.render();
|
||||||
//设置全选checkbox的选中状态
|
//设置全选checkbox的选中状态
|
||||||
obj.checkAll('tbFileres');
|
zlPopSourceExt.checkAll('tbFileres');
|
||||||
recorddata = obj.diff(recorddata, options);
|
recorddata = zlPopSourceExt.diff(recorddata, options);
|
||||||
obj.reloadSelTable(recorddata, options);
|
zlPopSourceExt.reloadSelTable(recorddata, options);
|
||||||
}
|
}
|
||||||
//已选中的数据打勾选状态
|
//已选中的数据打勾选状态
|
||||||
, selectSetcheck: function (res, options) {
|
, selectSetcheck: function (res, options) {
|
||||||
|
@ -731,7 +731,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
res[i]['LAY_CHECKED'] = 'true';
|
res[i]['LAY_CHECKED'] = 'true';
|
||||||
var index = res[i]['LAY_TABLE_INDEX'];
|
var index = res[i]['LAY_TABLE_INDEX'];
|
||||||
var el = $('#tbSelected');
|
var el = $('#tbSelected');
|
||||||
obj.checkStyle(el, index);
|
zlPopSourceExt.checkStyle(el, index);
|
||||||
}
|
}
|
||||||
if (selListIds.length > 0) {
|
if (selListIds.length > 0) {
|
||||||
for (var n = 0; n < selListIds.length; n++) {
|
for (var n = 0; n < selListIds.length; n++) {
|
||||||
|
@ -739,7 +739,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
res[i]['LAY_CHECKED'] = 'true';
|
res[i]['LAY_CHECKED'] = 'true';
|
||||||
var index = res[i]['LAY_TABLE_INDEX'];
|
var index = res[i]['LAY_TABLE_INDEX'];
|
||||||
var el = $('#tbSelected');
|
var el = $('#tbSelected');
|
||||||
obj.checkStyle(el, index);
|
zlPopSourceExt.checkStyle(el, index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -747,7 +747,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
}
|
}
|
||||||
layui.form.render();
|
layui.form.render();
|
||||||
//设置全选checkbox的选中状态
|
//设置全选checkbox的选中状态
|
||||||
obj.checkAll('tbSelected');
|
zlPopSourceExt.checkAll('tbSelected');
|
||||||
}
|
}
|
||||||
//设置选中样式
|
//设置选中样式
|
||||||
, checkStyle: function (el, index) {
|
, checkStyle: function (el, index) {
|
||||||
|
@ -770,9 +770,9 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//设置只读的时候不可编辑
|
//设置只读的时候不可编辑
|
||||||
, setReadonly: function (readonlystate) {
|
, setReadonly: function(readonlystate){
|
||||||
if (readonlystate) {
|
if(readonlystate){
|
||||||
if (selectionType == "checkbox") {
|
if(selectionType == "checkbox"){
|
||||||
$(".layui-table-header").find("input[name = 'layTableCheckbox'][lay-filter='layTableAllChoose']").each(function () {
|
$(".layui-table-header").find("input[name = 'layTableCheckbox'][lay-filter='layTableAllChoose']").each(function () {
|
||||||
$(this).attr("disabled", 'disabled');
|
$(this).attr("disabled", 'disabled');
|
||||||
});
|
});
|
||||||
|
@ -782,7 +782,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
$(".layui-table-fixed.layui-table-fixed-l").find(".layui-table-body").find("input[name='layTableCheckbox']").each(function () {
|
$(".layui-table-fixed.layui-table-fixed-l").find(".layui-table-body").find("input[name='layTableCheckbox']").each(function () {
|
||||||
$(this).attr("disabled", 'disabled');
|
$(this).attr("disabled", 'disabled');
|
||||||
});
|
});
|
||||||
} else {
|
}else{
|
||||||
$(".layui-table-body.layui-table-main").find("input[type='radio']").each(function () {
|
$(".layui-table-body.layui-table-main").find("input[type='radio']").each(function () {
|
||||||
$(this).attr("disabled", 'disabled');
|
$(this).attr("disabled", 'disabled');
|
||||||
});
|
});
|
||||||
|
@ -816,13 +816,13 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
}
|
}
|
||||||
// 只弹出框选择,不赋值
|
// 只弹出框选择,不赋值
|
||||||
, onlyshow: function (options, requestEvent) {
|
, onlyshow: function (options, requestEvent) {
|
||||||
options.inputhiddenameno = 'no' + options.name;
|
options.inputhiddenameno = 'no'+options.name;
|
||||||
var html = obj.concatenationStr(options),
|
var html = zlPopSourceExt.concatenationStr(options),
|
||||||
treeUrl = options.tabs[0].url,
|
treeUrl = options.tabs[0].url,
|
||||||
treeMethod = options.tabs[0].method,
|
treeMethod = options.tabs[0].method,
|
||||||
treeparams = options.tabs[0].params,
|
treeparams = options.tabs[0].params,
|
||||||
//创建zTree\和table组件
|
//创建zTree\和table组件
|
||||||
setting = obj.initialization(options, treeUrl, treeMethod, treeparams)
|
setting = zlPopSourceExt.initialization(options, treeUrl, treeMethod,treeparams)
|
||||||
options = $.extend({}, setting, options);
|
options = $.extend({}, setting, options);
|
||||||
|
|
||||||
layer.open({
|
layer.open({
|
||||||
|
@ -846,11 +846,11 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
selListIds = [];
|
selListIds = [];
|
||||||
zt = "";
|
zt = "";
|
||||||
roletree = $.fn.zTree.init($("#" + options.name + "poptree"), options, null);
|
roletree = $.fn.zTree.init($("#" + options.name + "poptree"), options, null);
|
||||||
obj.tabsFun(options);
|
zlPopSourceExt.tabsFun(options);
|
||||||
obj.loadTable(options, tbFileresH);
|
zlPopSourceExt.loadTable(options, tbFileresH);
|
||||||
obj.loadSelTable(options, tbSelectedH);
|
zlPopSourceExt.loadSelTable(options, tbSelectedH);
|
||||||
obj.seacherFun();
|
zlPopSourceExt.seacherFun();
|
||||||
obj.keyvalueFun();
|
zlPopSourceExt.keyvalueFun();
|
||||||
if ($('#tbFileres').next('div').find(' .layui-table-header th[data-field="1"] input[type="checkbox"]').length > 0) {
|
if ($('#tbFileres').next('div').find(' .layui-table-header th[data-field="1"] input[type="checkbox"]').length > 0) {
|
||||||
selectionType = 'checkbox'
|
selectionType = 'checkbox'
|
||||||
} else {
|
} else {
|
||||||
|
@ -902,10 +902,10 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
checkdatas = obj.diff(checkdatas, options);
|
checkdatas = zlPopSourceExt.diff(checkdatas, options);
|
||||||
if (selectionType != 'radio') {
|
if (selectionType != 'radio') {
|
||||||
}
|
}
|
||||||
obj.reloadSelTable(checkdatas, options);
|
zlPopSourceExt.reloadSelTable(checkdatas, options);
|
||||||
});
|
});
|
||||||
table.on(selectionType + '(tbSelDatagrid)', function (obj) {
|
table.on(selectionType + '(tbSelDatagrid)', function (obj) {
|
||||||
if (obj.checked == true) {
|
if (obj.checked == true) {
|
||||||
|
@ -915,7 +915,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
});
|
});
|
||||||
// 点击移除事件
|
// 点击移除事件
|
||||||
$("#remove-btn").on('click', function () {
|
$("#remove-btn").on('click', function () {
|
||||||
obj.removeFun(checkdatas, options);
|
zlPopSourceExt.removeFun(checkdatas, options);
|
||||||
// 如果选中数据为空则已选择列表中选中的数据清空
|
// 如果选中数据为空则已选择列表中选中的数据清空
|
||||||
selListIds = [];
|
selListIds = [];
|
||||||
});
|
});
|
||||||
|
@ -946,7 +946,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
layer.close(index);
|
layer.close(index);
|
||||||
}
|
}
|
||||||
, end: function (index) {
|
, end: function (index) {
|
||||||
$("#zlpopSourceext-box").find('input[name="' + options.inputhiddenameno + '"]').remove();
|
$("#zlpopSourceext-box").find('input[name="'+options.inputhiddenameno+'"]').remove();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -962,5 +962,5 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
|
||||||
}
|
}
|
||||||
this.length -= 1
|
this.length -= 1
|
||||||
}
|
}
|
||||||
exports('zlPopSourceExt', obj);
|
exports('zlPopSourceExt', zlPopSourceExt);
|
||||||
});
|
});
|
|
@ -254,8 +254,7 @@ layui.define(['zlContext', 'zlDynamicCondition', 'table', 'layer', 'zlConfig'],
|
||||||
$('#' + addspanid).trigger('click');
|
$('#' + addspanid).trigger('click');
|
||||||
});
|
});
|
||||||
$('#' + addspanid).on('click', function () {
|
$('#' + addspanid).on('click', function () {
|
||||||
var objlist = new Array(),
|
var zlInstance = null;
|
||||||
zlInstance = null;
|
|
||||||
var html =
|
var html =
|
||||||
'<div class="layui-tab-item layui-show">' +
|
'<div class="layui-tab-item layui-show">' +
|
||||||
' <div id="searchBox" class="extSearchBox">' +
|
' <div id="searchBox" class="extSearchBox">' +
|
||||||
|
@ -423,25 +422,6 @@ layui.define(['zlContext', 'zlDynamicCondition', 'table', 'layer', 'zlConfig'],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 点击确定
|
|
||||||
// layero.on('click','#btnsure',function(){
|
|
||||||
// var checkStatus = table.checkStatus('tbFileres'),
|
|
||||||
// rows = checkStatus.data;
|
|
||||||
// if (rows.length == 0) {
|
|
||||||
// zlContext.errorMsg(options.errmsg == undefined ? "请选择记录" : options.errmsg);
|
|
||||||
// return;
|
|
||||||
// } else if ((!options.multselect) && rows.length > 1) {
|
|
||||||
// zlContext.errorMsg("只能选择一个记录!");
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// layer.close(index);
|
|
||||||
// if (options.selectcallback != undefined) {
|
|
||||||
// options.selectcallback(rows, options);
|
|
||||||
// } else {
|
|
||||||
// return rows;
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
},
|
},
|
||||||
resizing: function (layero) {
|
resizing: function (layero) {
|
||||||
var zlpopformTableBoxH = layero.find('div.layui-layer-content').height() - 48;
|
var zlpopformTableBoxH = layero.find('div.layui-layer-content').height() - 48;
|
||||||
|
|
|
@ -560,13 +560,16 @@ layui.define(['zlContext', 'layer', 'zlConfig', 'form'], function (exports) {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
doCallback: function (text, data) {
|
doCallback: function (text, data) {
|
||||||
var func = JSON.parse(text);
|
if (typeof text == 'function') {
|
||||||
|
var func = text;
|
||||||
if (data) {
|
if (data) {
|
||||||
func(data);
|
func(data);
|
||||||
} else {
|
} else {
|
||||||
func();
|
func();
|
||||||
}
|
}
|
||||||
|
} else if (text != null && text != undefined) {
|
||||||
|
throw new Error('settings callback 函数的类型定义错误')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports('zlpoptree', obj);
|
exports('zlpoptree', obj);
|
||||||
|
|
|
@ -12,12 +12,16 @@ layui.define(['zlContext', 'layer', 'zlConfig'], function (exports) {
|
||||||
isExpand: false,
|
isExpand: false,
|
||||||
options: {},
|
options: {},
|
||||||
callback: {},
|
callback: {},
|
||||||
|
serachCallBack: {},
|
||||||
|
filterCallback: {},
|
||||||
/**
|
/**
|
||||||
* @param {*} id 目标ul ID 值
|
* @param {*} id 目标ul ID 值
|
||||||
* @param {*} setting zTree 自定义配置项 需是对象
|
* @param {*} setting zTree 自定义配置项 需是对象
|
||||||
* @param {*} callback zTree 各回调函数
|
* @param {*} callback zTree 各回调函数
|
||||||
|
* @param {*} serachCallBack 查找完成的回调函数 function(visableNodes)
|
||||||
|
* @param {*} filterCallback 自定义查询的回调函数 function(visableNodes):boolean 返回 true /false
|
||||||
*/
|
*/
|
||||||
render: function (id, setting, callback) {
|
render: function (id, setting, callback, serachCallBack, filterCallback) {
|
||||||
var defaultOptions = { // 默认配置项
|
var defaultOptions = { // 默认配置项
|
||||||
name: 'OBJNAME', // zTree 节点数据保存节点名称的属性名称
|
name: 'OBJNAME', // zTree 节点数据保存节点名称的属性名称
|
||||||
type: 'post', // Ajax 的 http 请求模式
|
type: 'post', // Ajax 的 http 请求模式
|
||||||
|
@ -39,7 +43,7 @@ layui.define(['zlContext', 'layer', 'zlConfig'], function (exports) {
|
||||||
"Y": "ps",
|
"Y": "ps",
|
||||||
"N": "ps"
|
"N": "ps"
|
||||||
},
|
},
|
||||||
zNodes:[],
|
zNodes: [],
|
||||||
// autoCheckTrigger: false,
|
// autoCheckTrigger: false,
|
||||||
// nocheckInherit: false,
|
// nocheckInherit: false,
|
||||||
// chkDisabledInherit: false,
|
// chkDisabledInherit: false,
|
||||||
|
@ -57,11 +61,13 @@ layui.define(['zlContext', 'layer', 'zlConfig'], function (exports) {
|
||||||
}
|
}
|
||||||
|
|
||||||
zltreemenu.callback[id] = $.extend({}, zltreemenu.callback[id], callback);
|
zltreemenu.callback[id] = $.extend({}, zltreemenu.callback[id], callback);
|
||||||
|
zltreemenu.serachCallBack[id] = serachCallBack
|
||||||
|
zltreemenu.filterCallback[id] = filterCallback
|
||||||
var zltreeSetting = {
|
var zltreeSetting = {
|
||||||
view: {
|
view: {
|
||||||
showLine: true,
|
showLine: true,
|
||||||
fontCss: zltreemenu.options[id].fontCss ? zltreemenu.options[id].fontCss : {}
|
fontCss: zltreemenu.options[id].fontCss ? zltreemenu.options[id].fontCss : {},
|
||||||
|
nameIsHTML: true
|
||||||
},
|
},
|
||||||
async: {
|
async: {
|
||||||
enable: true,
|
enable: true,
|
||||||
|
@ -110,15 +116,15 @@ layui.define(['zlContext', 'layer', 'zlConfig'], function (exports) {
|
||||||
|
|
||||||
// 搜索部分 dom
|
// 搜索部分 dom
|
||||||
var searchHtml = [
|
var searchHtml = [
|
||||||
'<div class="layui-form-item layui-search zltreeMenuSearch">',
|
'<div class="layui-search zltreeMenuSearch">',
|
||||||
' <div class="layui-input-block">',
|
' <div class="layui-input-block">',
|
||||||
' <input id="btnTreeSearchInput" type="text" name="search" data-boxid="' + id + '" placeholder="请输入查找的值" class="layui-input">',
|
' <input id="' + zltreemenu.getSearchInputId(id) + '" type="text" name="search" data-boxid="' + id + '" placeholder="请输入查找的值" class="layui-input" style="padding-right: 26px;height: 30px;">',
|
||||||
' <a href="javascript:;" id="btnTreeSearch" style="">',
|
' <a href="javascript:;" id="btnTreeSearch" style="">',
|
||||||
' <i class="layui-icon layui-icon-search"></i>',
|
' <i class="layui-icon layui-icon-search"></i>',
|
||||||
' </a></div></div>'
|
' </a></div></div>'
|
||||||
];
|
];
|
||||||
if (zltreemenu.options[id].search && $('#' + id).parent('div').siblings('div.layui-search').length == 0) { // 开启搜索功能后 搜索框渲染
|
if (zltreemenu.options[id].search && zltreemenu.getElem(id).parent('div').siblings('div.layui-search').length == 0) { // 开启搜索功能后 搜索框渲染
|
||||||
$('#' + id).parent('div').before(searchHtml.join(''))
|
zltreemenu.getElem(id).parent('div').before(searchHtml.join(''))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 树形菜单
|
// 树形菜单
|
||||||
|
@ -127,29 +133,42 @@ layui.define(['zlContext', 'layer', 'zlConfig'], function (exports) {
|
||||||
treeObj = $.fn.zTree.init($('#' + id), zltreeSetting, getzNodes);
|
treeObj = $.fn.zTree.init($('#' + id), zltreeSetting, getzNodes);
|
||||||
return treeObj;
|
return treeObj;
|
||||||
},
|
},
|
||||||
|
getSearchInputId(id) {
|
||||||
|
return "btnTreeSearchInput" + id;
|
||||||
|
},
|
||||||
|
getSerachInput(id) {
|
||||||
|
return $('#' + zltreemenu.getSearchInputId(id))
|
||||||
|
},
|
||||||
|
getSerachValue(id) {
|
||||||
|
return zltreemenu.getSerachInput(id).val();
|
||||||
|
},
|
||||||
|
focus(id) {
|
||||||
|
zltreemenu.getSerachInput(id).focus();
|
||||||
|
},
|
||||||
|
getElem(id) {
|
||||||
|
return $('#' + id)
|
||||||
|
},
|
||||||
search: function (value, type, id) {
|
search: function (value, type, id) {
|
||||||
// 一次性加载所有数据时
|
// 一次性加载所有数据时
|
||||||
if (!type) {
|
if (!type) {
|
||||||
zltreemenu.isloadsearch = true;
|
zltreemenu.isloadsearch = true;
|
||||||
treeObj = $.fn.zTree.getZTreeObj(id);
|
treeObj = $.fn.zTree.getZTreeObj(id);
|
||||||
// 首先显示所有已隐藏的项
|
// 首先显示所有已隐藏的项
|
||||||
treeObj.showNodes(treeObj.getNodesByParam("isHidden", true))
|
var hideNodes = treeObj.getNodesByParam("isHidden", true);
|
||||||
|
treeObj.showNodes(hideNodes)
|
||||||
if (value == '') {
|
if (value == '') {
|
||||||
$('#' + id).find('.noResultBox').remove();
|
zltreemenu.getElem(id).find('.noResultBox').remove();
|
||||||
var firstNode = treeObj.getNodesByFilter(function (node) {
|
var firstNode = treeObj.getNodesByFilter(function (node) {
|
||||||
return node.level == 0 && node.isFirstNode;
|
return node.level == 0 && node.isFirstNode;
|
||||||
});
|
});
|
||||||
if (firstNode.length > 0) {
|
if (firstNode.length > 0) {
|
||||||
treeObj.selectNode(firstNode[0]);
|
treeObj.selectNode(firstNode[0]);
|
||||||
$("#" + firstNode[0].tId + "_a").click();
|
$("#" + firstNode[0].tId + "_a").click();
|
||||||
$('#' + id).parents('.zltree-body').scrollTop(0)
|
zltreemenu.getElem(id).parents('.zltree-body').scrollTop(0)
|
||||||
}
|
|
||||||
if ($('ul#roletree').length > 0) {
|
|
||||||
$('ul#roletree').find('li').show();
|
|
||||||
$('ul#roletree').siblings('.noResultBox').remove();
|
|
||||||
$('ul#authtree').find('li').show();
|
|
||||||
$('ul#authtree').find('div.layui-none').remove();
|
|
||||||
}
|
}
|
||||||
|
var visableNodes = hideNodes;
|
||||||
|
zltreemenu.serachCallBack[id] && zltreemenu.serachCallBack[id](visableNodes);
|
||||||
|
zltreemenu.focus(id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 所有无子节点的节点
|
// 所有无子节点的节点
|
||||||
|
@ -157,68 +176,68 @@ layui.define(['zlContext', 'layer', 'zlConfig'], function (exports) {
|
||||||
// 先隐藏所有,满足条件的节点显示
|
// 先隐藏所有,满足条件的节点显示
|
||||||
treeObj.hideNodes(noChildrenNodes)
|
treeObj.hideNodes(noChildrenNodes)
|
||||||
treeObj.expandAll(true);
|
treeObj.expandAll(true);
|
||||||
treeObj.showNodes(treeObj.getNodesByFilter(function (noChildrenNodes) {
|
treeObj.showNodes(treeObj.getNodesByFilter(function (node) {
|
||||||
return noChildrenNodes.check_Child_State == -1 && noChildrenNodes[treeObj.setting.data.key.name].indexOf(value) > -1
|
if (zltreemenu.filterCallback[id]) {
|
||||||
|
return zltreemenu.filterCallback[id](node);
|
||||||
|
} else {
|
||||||
|
return node.check_Child_State == -1 && node[treeObj.setting.data.key.name].indexOf(value) > -1
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
// 将没有子节点显示的父级节点也隐藏掉
|
// 将没有子节点显示的父级节点也隐藏掉
|
||||||
// 先获取所有父级节点
|
// 先获取所有父级节点
|
||||||
setTimeout(function () {
|
|
||||||
var pNodes = treeObj.getNodesByParam("isParent", true);
|
var pNodes = treeObj.getNodesByParam("isParent", true);
|
||||||
pNodes.sort(compare('level'))
|
pNodes.sort(compare('level'))
|
||||||
for (var i = 0; i < pNodes.length; i++) {
|
for (var i = 0; i < pNodes.length; i++) {
|
||||||
if (pNodes[i].children.length != 0) {
|
var node=pNodes[i];
|
||||||
|
if (node.children.length != 0) {
|
||||||
var hideNum = 0;
|
var hideNum = 0;
|
||||||
for (var k = 0; k < pNodes[i].children.length; k++) {
|
for (var k = 0; k < node.children.length; k++) {
|
||||||
var item = pNodes[i].children[k];
|
var item = node.children[k];
|
||||||
if (item.isHidden == true) {
|
if (item.isHidden == true) {
|
||||||
hideNum++;
|
hideNum++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (hideNum == pNodes[i].children.length && pNodes[i][treeObj.setting.data.key.name].indexOf(value) == -1) {
|
if (hideNum == node.children.length) {
|
||||||
treeObj.hideNode(pNodes[i])
|
if (zltreemenu.filterCallback[id]) {
|
||||||
|
!zltreemenu.filterCallback[id](node) && treeObj.hideNode(node);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (node[treeObj.setting.data.key.name].indexOf(value) == -1) {
|
||||||
|
treeObj.hideNode(node)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (treeObj.getNodesByParam("isHidden", false).length == 0) {
|
}
|
||||||
|
}
|
||||||
|
var visableNodes = treeObj.getNodesByParam("isHidden", false);
|
||||||
|
if (visableNodes.length == 0) {
|
||||||
// zlContext.warnMsg('没有搜索到相关数据');
|
// zlContext.warnMsg('没有搜索到相关数据');
|
||||||
if ($('#' + id).find('.noResultBox').length == 0) {
|
if (zltreemenu.getElem(id).find('.noResultBox').length == 0) {
|
||||||
$('#' + id).append(zltreemenu.noresult)
|
zltreemenu.getElem(id).append(zltreemenu.noresult)
|
||||||
}
|
}
|
||||||
zltreemenu.isHideTableData(zltreemenu.options[id].tableId, false);
|
zltreemenu.isHideTableData(zltreemenu.options[id].tableId, false);
|
||||||
// 角色权限管理页面 搜索显示
|
zltreemenu.serachCallBack[id] && zltreemenu.serachCallBack[id](visableNodes);
|
||||||
if ($('ul#roletree').length > 0) {
|
|
||||||
$('ul#roletree').find('li').hide();
|
|
||||||
if($('ul#roletree').siblings('div.noResultBox').length==0){
|
|
||||||
$('ul#roletree').after(zltreemenu.noresult);
|
|
||||||
}
|
|
||||||
$('ul#authtree').find('li').hide();
|
|
||||||
zlContext.noData($('ul#authtree'))
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if ($('ul#roletree').length > 0) {
|
zltreemenu.serachCallBack[id] && zltreemenu.serachCallBack[id](visableNodes);
|
||||||
$('ul#roletree').find('li').show();
|
|
||||||
$('ul#roletree').siblings('.noResultBox').remove();
|
|
||||||
$('ul#authtree').find('li').show();
|
|
||||||
$('ul#authtree').find('div.layui-none').remove();
|
|
||||||
}
|
|
||||||
zltreemenu.isHideTableData(zltreemenu.options[id].tableId, true);
|
zltreemenu.isHideTableData(zltreemenu.options[id].tableId, true);
|
||||||
$('#' + id).find('.noResultBox').remove();
|
zltreemenu.getElem(id).find('.noResultBox').remove();
|
||||||
var firstNode = treeObj.getNodesByFilter(function (node) {
|
var firstNode = treeObj.getNodesByFilter(function (node) {
|
||||||
return node.level == 0 && node.isFirstNode;
|
return node.level == 0 && node.isFirstNode;
|
||||||
});
|
});
|
||||||
if (firstNode.length > 0) {
|
if (firstNode.length > 0) {
|
||||||
treeObj.selectNode(firstNode[0]);
|
treeObj.selectNode(firstNode[0]);
|
||||||
$("#" + firstNode[0].tId + "_a").click();
|
$("#" + firstNode[0].tId + "_a").click();
|
||||||
$('#' + id).parents('.zltree-body').scrollTop(0)
|
zltreemenu.getElem(id).parents('.zltree-body').scrollTop(0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$('#btnTreeSearchInput').focus();
|
zltreemenu.focus(id);
|
||||||
}, 0)
|
|
||||||
} else {
|
} else {
|
||||||
zltreemenu.searchNodesByFuzzy(value);
|
zltreemenu.searchNodesByFuzzy(value, id);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
searchNodesByFuzzy: function (keyvalue) {
|
searchNodesByFuzzy: function (keyvalue, id) {
|
||||||
if (keyvalue) {
|
if (keyvalue) {
|
||||||
if (zltreemenu.options[treeObj.setting.treeId].flag == 'coreuser') {
|
if (zltreemenu.options[treeObj.setting.treeId].flag == 'coreuser') {
|
||||||
treeObj.setting.async.url = layui.cache['contentPath'] + '/admin/coreorg/queryorgdepttree?resId=252177907A6047E38FC5F1D2E63F15C4';
|
treeObj.setting.async.url = layui.cache['contentPath'] + '/admin/coreorg/queryorgdepttree?resId=252177907A6047E38FC5F1D2E63F15C4';
|
||||||
|
@ -244,8 +263,7 @@ layui.define(['zlContext', 'layer', 'zlConfig'], function (exports) {
|
||||||
zltreemenu.isloadsearch = false;
|
zltreemenu.isloadsearch = false;
|
||||||
}
|
}
|
||||||
treeObj = $.fn.zTree.init($('#' + treeObj.setting.treeId), treeObj.setting, null);
|
treeObj = $.fn.zTree.init($('#' + treeObj.setting.treeId), treeObj.setting, null);
|
||||||
|
zltreemenu.focus(id);
|
||||||
$('#btnTreeSearchInput').focus();
|
|
||||||
},
|
},
|
||||||
dataFilter: function (treeId, parentNode, responseData) {
|
dataFilter: function (treeId, parentNode, responseData) {
|
||||||
if (responseData[statusName] == OK) {
|
if (responseData[statusName] == OK) {
|
||||||
|
@ -287,16 +305,20 @@ layui.define(['zlContext', 'layer', 'zlConfig'], function (exports) {
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('keyup', 'div.zltreeMenuSearch>div>input', function (e) {
|
$(document).on('keyup', 'div.zltreeMenuSearch>div>input', function (e) {
|
||||||
var id = $(this).attr('data-boxid');
|
doSearch(e);
|
||||||
if (e.keyCode == '13') {
|
|
||||||
zltreemenu.search($(this).val(), zltreemenu.options[id].asyncChildNodes, id)
|
|
||||||
}
|
|
||||||
if ((e.keyCode == '46' || e.keyCode == '8' || (e.ctrlKey && e.keyCode == '86')) && $(this).val() == '') {
|
|
||||||
if (!zltreemenu.isloadsearch) return;
|
|
||||||
$(this).siblings('a').trigger('click');
|
|
||||||
$('#btnTreeSearchInput').focus();
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
function doSearch(e) {
|
||||||
|
var $inputElem = $(e.currentTarget);
|
||||||
|
var id = $inputElem.attr('data-boxid');
|
||||||
|
if (e.keyCode == '13') {
|
||||||
|
zltreemenu.search($inputElem.val(), zltreemenu.options[id].asyncChildNodes, id)
|
||||||
|
}
|
||||||
|
if ((e.keyCode == '46' || e.keyCode == '8' || (e.ctrlKey && e.keyCode == '86')) && $inputElem.val() == '') {
|
||||||
|
if (!zltreemenu.isloadsearch) return;
|
||||||
|
$inputElem.siblings('a').trigger('click');
|
||||||
|
}
|
||||||
|
zltreemenu.focus(id);
|
||||||
|
}
|
||||||
|
|
||||||
function compare(property) {
|
function compare(property) {
|
||||||
return function (a, b) {
|
return function (a, b) {
|
||||||
|
|
|
@ -2163,6 +2163,7 @@ hr,
|
||||||
-moz-user-select: none;
|
-moz-user-select: none;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
-ms-user-select: none;
|
-ms-user-select: none;
|
||||||
|
box-shadow: 0 3px 1px -2px rgb(0 0 0 / 20%), 0 2px 2px 0 rgb(0 0 0 / 14%), 0 1px 5px 0 rgb(0 0 0 / 12%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-btn:hover {
|
.layui-btn:hover {
|
||||||
|
@ -2780,6 +2781,7 @@ hr,
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
-webkit-transition: .1s linear;
|
-webkit-transition: .1s linear;
|
||||||
transition: .1s linear;
|
transition: .1s linear;
|
||||||
|
box-shadow: 0 3px 1px -2px rgb(0 0 0 / 20%), 0 2px 2px 0 rgb(0 0 0 / 14%), 0 1px 5px 0 rgb(0 0 0 / 12%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-form-switch i {
|
.layui-form-switch i {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
window.searchData = {"kinds":{"1":"Module","1024":"Property"},"rows":[{"id":0,"kind":1,"name":"dist","url":"modules/dist.html","classes":"tsd-kind-module"},{"id":1,"kind":1024,"name":"__esModule","url":"modules/dist.html#__esmodule","classes":"tsd-kind-property tsd-parent-kind-module","parent":"dist"},{"id":2,"kind":1,"name":"dist/preview","url":"modules/dist_preview.html","classes":"tsd-kind-module"},{"id":3,"kind":1024,"name":"__esModule","url":"modules/dist_preview.html#__esmodule","classes":"tsd-kind-property tsd-parent-kind-module","parent":"dist/preview"},{"id":4,"kind":1,"name":"index","url":"modules/index.html","classes":"tsd-kind-module"},{"id":5,"kind":1,"name":"preview","url":"modules/preview.html","classes":"tsd-kind-module"}],"index":{"version":"2.3.9","fields":["name","parent"],"fieldVectors":[["name/0",[0,10.296]],["parent/0",[]],["name/1",[1,10.296]],["parent/1",[0,0.566]],["name/2",[2,10.296]],["parent/2",[]],["name/3",[1,10.296]],["parent/3",[2,0.566]],["name/4",[3,15.404]],["parent/4",[]],["name/5",[4,15.404]],["parent/5",[]]],"invertedIndex":[["__esmodule",{"_index":1,"name":{"1":{},"3":{}},"parent":{}}],["dist",{"_index":0,"name":{"0":{}},"parent":{"1":{}}}],["dist/preview",{"_index":2,"name":{"2":{}},"parent":{"3":{}}}],["index",{"_index":3,"name":{"4":{}},"parent":{}}],["preview",{"_index":4,"name":{"5":{}},"parent":{}}]],"pipeline":[]}}
|
window.searchData = {"kinds":{"1":"Module"},"rows":[{"id":0,"kind":1,"name":"index","url":"modules/index.html","classes":"tsd-kind-module"},{"id":1,"kind":1,"name":"preview","url":"modules/preview.html","classes":"tsd-kind-module"}],"index":{"version":"2.3.9","fields":["name","parent"],"fieldVectors":[["name/0",[0,6.931]],["parent/0",[]],["name/1",[1,6.931]],["parent/1",[]]],"invertedIndex":[["index",{"_index":0,"name":{"0":{}},"parent":{}}],["preview",{"_index":1,"name":{"1":{}},"parent":{}}]],"pipeline":[]}}
|
|
@ -1,20 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<!doctype html><html><head><title>页面预览</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="renderer" content="webkit"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1"><meta name="apple-mobile-web-app-status-bar-style" content="black"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="format-detection" content="telephone=no"><link rel="stylesheet" href="./css/design.css"><link rel="stylesheet" href="./css/font-awesome/css/font-awesome.css" media="all"/><style>html {
|
||||||
|
|
||||||
<html>
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<title>页面预览</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="renderer" content="webkit">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
||||||
<meta name="format-detection" content="telephone=no">
|
|
||||||
<link rel="stylesheet" href="./css/design.css">
|
|
||||||
<link rel="stylesheet" href="./css/font-awesome/css/font-awesome.css" media="all" />
|
|
||||||
<style>
|
|
||||||
html {
|
|
||||||
background-color: #f2f2f2;
|
background-color: #f2f2f2;
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
|
@ -23,25 +7,7 @@
|
||||||
body {
|
body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}</style></head><body style="min-height: 660px"><div class="yhdesigner" id="yhdesignerid"></div><input id="model" type="hidden" value=""><script src="./libs/jquery.js"></script><script src="./libs/layui/layui.js"></script><script src="./libs/ztree/js/jquery.ztree.all.min.js"></script><script src="./libs/ztree/js/jquery.ztree.exhide.min.js"></script><script src="./libs/lodash.min.js"></script><script>window['yh_config'] = {
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="min-height: 660px">
|
|
||||||
<div class="yhdesigner" id="yhdesignerid"></div>
|
|
||||||
<input id="model" type="hidden" value=''>
|
|
||||||
<script type="text/javascript" src="./libs/jquery.js"></script>
|
|
||||||
<!-- <script type="text/javascript" src="./libs/echarts/dist/echarts.min.js"></script> -->
|
|
||||||
<script type="text/javascript" src="./libs/layui/layui.js"></script>
|
|
||||||
<script type="text/javascript" src="./libs/ztree/js/jquery.ztree.all.min.js"></script>
|
|
||||||
<script type="text/javascript" src="./libs/ztree/js/jquery.ztree.exhide.min.js"></script>
|
|
||||||
<script type="text/javascript" src="./libs/lodash.min.js"></script>
|
|
||||||
|
|
||||||
<!-- <script type="text/javascript" src="./libs/mintui/vue.js"></script> -->
|
|
||||||
<!-- <script type="text/javascript" src="/libs//mintui/index.js"></script> -->
|
|
||||||
|
|
||||||
<script>
|
|
||||||
window['yh_config'] = {
|
|
||||||
rootDir: '',
|
rootDir: '',
|
||||||
supperFormula: false,
|
supperFormula: false,
|
||||||
supperSqlDataSource: false,
|
supperSqlDataSource: false,
|
||||||
|
@ -67,8 +33,4 @@
|
||||||
window.yhdesigner.render('yhdesignerid', data);
|
window.yhdesigner.render('yhdesignerid', data);
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
})
|
})</script><script src="designer.js"></script></body></html>
|
||||||
</script>
|
|
||||||
<script src="designer.js"></script></body>
|
|
||||||
|
|
||||||
</html>
|
|
|
@ -1021,154 +1021,40 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function (exports)
|
||||||
, trs = []
|
, trs = []
|
||||||
, trs_fixed = []
|
, trs_fixed = []
|
||||||
, trs_fixed_r = []
|
, trs_fixed_r = []
|
||||||
|
, checkedRowIndex = undefined,
|
||||||
//渲染视图
|
/**
|
||||||
, render = function () { //后续性能提升的重点
|
* 渲染cardList 的td
|
||||||
var thisCheckedRowIndex;
|
*/
|
||||||
if (!sort && that.sortKey) {
|
renderCardListTd = function (col, row, rowIndex, rowNo) {
|
||||||
return that.sort(that.sortKey.field, that.sortKey.sort, true);
|
var field = col.field
|
||||||
}
|
, key = options.index + '-' + col.key
|
||||||
layui.each(data, function (i1, item1) {
|
, content = row[field]
|
||||||
var tds = [], tds_fixed = [], tds_fixed_r = [], divs = [], infotds = []
|
, title = col.title;
|
||||||
, numbers = i1 + options.limit * (curr - 1) + 1; //序号
|
|
||||||
|
|
||||||
//if (item1.length === 0) return;
|
|
||||||
if (!sort) {
|
|
||||||
item1[table.config.indexName] = i1;
|
|
||||||
}
|
|
||||||
|
|
||||||
that.eachCols(function (i3, item3) {
|
|
||||||
var field = item3.field || i3
|
|
||||||
, key = options.index + '-' + item3.key
|
|
||||||
, content = item1[field]
|
|
||||||
, title = item3.title;
|
|
||||||
|
|
||||||
if (content === undefined || content === null) content = '';
|
|
||||||
if (item3.colGroup) return;
|
|
||||||
if (options.mode == "imgListMode") {
|
|
||||||
//td内容
|
|
||||||
if (item3.type == "checkbox" || item3.type == "radio" || item3.type == "numbers") {
|
|
||||||
var td = [];
|
|
||||||
td = ['<td data-field="' + field + '" data-key="' + key + '" ' + function () { //追加各种属性
|
|
||||||
var attr = [];
|
|
||||||
if (item3.edit) attr.push('data-edit="' + item3.edit + '"'); //是否允许单元格编辑
|
|
||||||
if (item3.align) attr.push('align="' + item3.align + '"'); //对齐方式
|
|
||||||
if (item3.templet) attr.push('data-content="' + content + '"'); //自定义模板
|
|
||||||
if (item3.toolbar) attr.push('data-off="true"'); //行工具列关闭单元格事件
|
|
||||||
if (item3.event) attr.push('lay-event="' + item3.event + '"'); //自定义事件
|
|
||||||
if (item3.style) attr.push('style="' + item3.style + '"'); //自定义样式
|
|
||||||
if (item3.minWidth) attr.push('data-minwidth="' + item3.minWidth + '"'); //单元格最小宽度
|
|
||||||
return attr.join(' ');
|
|
||||||
}() + ' class="' + function () { //追加样式
|
|
||||||
var classNames = [];
|
|
||||||
if (item3.hide) classNames.push(HIDE); //插入隐藏列样式
|
|
||||||
if (!item3.field) classNames.push('layui-table-col-special'); //插入特殊列样式
|
|
||||||
return classNames.join(' ');
|
|
||||||
}() + '">'
|
|
||||||
, '<div class="layui-table-cell laytable-cell-' + function () { //返回对应的CSS类标识
|
|
||||||
return item3.type === 'normal' ? key
|
|
||||||
: (key + ' laytable-cell-' + item3.type);
|
|
||||||
}() + '">' + function () {
|
|
||||||
var tplData = $.extend(true, {
|
|
||||||
LAY_INDEX: numbers
|
|
||||||
}, item1)
|
|
||||||
, checkName = table.config.checkName;
|
|
||||||
|
|
||||||
//渲染不同风格的列
|
|
||||||
switch (item3.type) {
|
|
||||||
case 'checkbox':
|
|
||||||
// 分页勾选逻辑 start
|
|
||||||
var itemValue = item1[that.config.onlyKey]; // 获取唯一值用于判断(默认rwid)
|
|
||||||
var ischecked = that.checkedDefault(itemValue, i1);
|
|
||||||
// 分页勾选逻辑 end
|
|
||||||
return '<input type="checkbox" ' + ischecked + ' name="layTableCheckbox" lay-skin="primary" ' + function () {
|
|
||||||
//如果是全选
|
|
||||||
if (item3[checkName]) {
|
|
||||||
item1[checkName] = item3[checkName];
|
|
||||||
return item3[checkName] ? 'checked' : '';
|
|
||||||
}
|
|
||||||
return tplData[checkName] ? 'checked' : '';
|
|
||||||
}() + '>';
|
|
||||||
break;
|
|
||||||
case 'radio':
|
|
||||||
if (tplData[checkName]) {
|
|
||||||
thisCheckedRowIndex = i1;
|
|
||||||
}
|
|
||||||
return '<input type="radio" name="layTableRadio_' + options.index + '" '
|
|
||||||
+ (tplData[checkName] ? 'checked' : '') + ' lay-type="layTableRadio">';
|
|
||||||
break;
|
|
||||||
case 'numbers':
|
|
||||||
return numbers;
|
|
||||||
break;
|
|
||||||
};
|
|
||||||
|
|
||||||
}()
|
|
||||||
, '</div></td>'].join('');
|
|
||||||
} else {
|
|
||||||
var info = [];
|
|
||||||
info = ['<li data-field="' + field + '" data-key="' + key + '" ' + function () { //追加各种属性
|
|
||||||
var attr = [];
|
|
||||||
if (item3.edit) attr.push('data-edit="' + item3.edit + '"'); //是否允许单元格编辑
|
|
||||||
if (item3.align) attr.push('align="' + item3.align + '"'); //对齐方式
|
|
||||||
if (item3.templet) attr.push('data-content="' + content + '"'); //自定义模板
|
|
||||||
if (item3.toolbar) attr.push('data-off="true"'); //行工具列关闭单元格事件
|
|
||||||
if (item3.event) attr.push('lay-event="' + item3.event + '"'); //自定义事件
|
|
||||||
if (item3.style) attr.push('style="' + item3.style + '"'); //自定义样式
|
|
||||||
if (item3.minWidth) attr.push('data-minwidth="' + item3.minWidth + '"'); //单元格最小宽度
|
|
||||||
return attr.join(' ');
|
|
||||||
}() + ' class="' + function () { //追加样式
|
|
||||||
var classNames = [];
|
|
||||||
if (item3.hide) classNames.push(HIDE); //插入隐藏列样式
|
|
||||||
if (!item3.field) classNames.push('layui-table-col-special'); //插入特殊列样式
|
|
||||||
return classNames.join(' ');
|
|
||||||
}() + '">'
|
|
||||||
, '<div class="layui-table-cell laytable-cell-' + function () { //返回对应的CSS类标识
|
|
||||||
return item3.type === 'normal' ? key
|
|
||||||
: (key + ' laytable-cell-' + item3.type);
|
|
||||||
}() + '">' + function () {
|
|
||||||
var tplData = $.extend(true, {
|
|
||||||
LAY_INDEX: numbers
|
|
||||||
}, item1)
|
|
||||||
|
|
||||||
//解析工具列模板
|
|
||||||
if (item3.toolbar) {
|
|
||||||
return laytpl($(item3.toolbar).html() || '').render(tplData);
|
|
||||||
}
|
|
||||||
return item3.templet ? function () {
|
|
||||||
return typeof item3.templet === 'function'
|
|
||||||
? item3.templet(tplData)
|
|
||||||
: laytpl($(item3.templet).html() || String(content)).render(tplData)
|
|
||||||
}() : content;
|
|
||||||
}()
|
|
||||||
, '</div></li>'].join('');
|
|
||||||
}
|
|
||||||
divs.push(info);
|
|
||||||
} else if (options.mode == "cardListMode") {
|
|
||||||
//渲染不同风格的列
|
//渲染不同风格的列
|
||||||
var tplData = $.extend(true, {
|
var tplData = $.extend(true, {
|
||||||
LAY_INDEX: numbers
|
LAY_INDEX: rowNo
|
||||||
}, item1)
|
}, row)
|
||||||
, checkName = table.config.checkName;
|
, checkName = table.config.checkName;
|
||||||
var td = [];
|
var td = [];
|
||||||
var infotd = []
|
var infotd = []
|
||||||
switch (item3.type) {
|
switch (col.type) {
|
||||||
case 'checkbox':
|
case 'checkbox':
|
||||||
// 分页勾选逻辑 start
|
// 分页勾选逻辑 start
|
||||||
var itemValue = item1[that.config.onlyKey]; // 获取唯一值用于判断(默认rwid)
|
var itemValue = row[that.config.onlyKey]; // 获取唯一值用于判断(默认rwid)
|
||||||
var ischecked = that.checkedDefault(itemValue, i1);
|
var ischecked = that.checkedDefault(itemValue, rowIndex);
|
||||||
// 分页勾选逻辑 end
|
// 分页勾选逻辑 end
|
||||||
td = ['<div class="item-sub item-checkbox" data-field="' + field + '"><input type="checkbox" ' + ischecked + ' name="layTableCheckbox" lay-skin="primary" ' + function () {
|
td = ['<div class="item-sub item-checkbox" data-field="' + field + '"><input type="checkbox" ' + ischecked + ' name="layTableCheckbox" lay-skin="primary" ' + function () {
|
||||||
//如果是全选
|
//如果是全选
|
||||||
if (item3[checkName]) {
|
if (col[checkName]) {
|
||||||
item1[checkName] = item3[checkName];
|
row[checkName] = col[checkName];
|
||||||
return item3[checkName] ? 'checked' : '';
|
return col[checkName] ? 'checked' : '';
|
||||||
}
|
}
|
||||||
return tplData[checkName] ? 'checked' : '';
|
return tplData[checkName] ? 'checked' : '';
|
||||||
}() + '></div>'].join('');
|
}() + '></div>'].join('');
|
||||||
break;
|
break;
|
||||||
case 'radio':
|
case 'radio':
|
||||||
if (tplData[checkName]) {
|
if (tplData[checkName]) {
|
||||||
thisCheckedRowIndex = i1;
|
checkedRowIndex = rowIndex;
|
||||||
}
|
}
|
||||||
td = ['<div class="item-sub item-checkbox" data-field="' + field + '"><input type="radio" name="layTableRadio_' + options.index + '" '
|
td = ['<div class="item-sub item-checkbox" data-field="' + field + '"><input type="radio" name="layTableRadio_' + options.index + '" '
|
||||||
+ (tplData[checkName] ? 'checked' : '') + ' lay-type="layTableRadio"></div>'].join('');
|
+ (tplData[checkName] ? 'checked' : '') + ' lay-type="layTableRadio"></div>'].join('');
|
||||||
|
@ -1176,129 +1062,266 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function (exports)
|
||||||
case 'image':
|
case 'image':
|
||||||
td = ['<div data-field="' + field + '" data-key="' + key + '" ' + function () { //追加各种属性
|
td = ['<div data-field="' + field + '" data-key="' + key + '" ' + function () { //追加各种属性
|
||||||
var attr = [];
|
var attr = [];
|
||||||
if (item3.align) attr.push('align="' + item3.align + '"'); //对齐方式
|
if (col.align) attr.push('align="' + col.align + '"'); //对齐方式
|
||||||
if (item3.templet) attr.push('data-content="' + content + '"'); //自定义模板
|
if (col.templet) attr.push('data-content="' + content + '"'); //自定义模板
|
||||||
if (item3.event) attr.push('lay-event="' + item3.event + '"'); //自定义事件
|
if (col.event) attr.push('lay-event="' + col.event + '"'); //自定义事件
|
||||||
if (item3.style) attr.push('style="' + item3.style + '"'); //自定义样式
|
if (col.style) attr.push('style="' + col.style + '"'); //自定义样式
|
||||||
return attr.join(' ');
|
return attr.join(' ');
|
||||||
}() + ' class="imgbox item-sub"><a href="javascript:;">' + function () {
|
}() + ' class="imgbox item-sub"><a href="javascript:;">' + function () {
|
||||||
var tplData = $.extend(true, {
|
var tplData = $.extend(true, {
|
||||||
LAY_INDEX: numbers
|
LAY_INDEX: rowNo
|
||||||
}, item1);
|
}, row);
|
||||||
return item3.templet ? function () {
|
return col.templet ? function () {
|
||||||
return typeof item3.templet === 'function'
|
return typeof col.templet === 'function'
|
||||||
? item3.templet(tplData)
|
? col.templet(tplData)
|
||||||
: laytpl($(item3.templet).html() || String(content)).render(tplData)
|
: laytpl($(col.templet).html() || String(content)).render(tplData)
|
||||||
}() : content;
|
}() : content;
|
||||||
}()
|
}()
|
||||||
, '</a></div>'].join('');
|
, '</a></div>'].join('');
|
||||||
break;
|
break;
|
||||||
default:
|
default: {
|
||||||
infotd = ['<div data-field="' + field + '" data-key="' + key + '" ' + function () { //追加各种属性
|
//追加各种属性
|
||||||
|
var attrs = function () {
|
||||||
var attr = [];
|
var attr = [];
|
||||||
if (item3.align) attr.push('align="' + item3.align + '"'); //对齐方式
|
if (col.align) attr.push('align="' + col.align + '"'); //对齐方式
|
||||||
if (item3.templet) attr.push('data-content="' + content + '"'); //自定义模板
|
if (col.templet) attr.push('data-content="' + content + '"'); //自定义模板
|
||||||
if (item3.event) attr.push('lay-event="' + item3.event + '"'); //自定义事件
|
if (col.event) attr.push('lay-event="' + col.event + '"'); //自定义事件
|
||||||
if (item3.style) attr.push('style="' + item3.style + '"'); //自定义样式
|
if (col.style) attr.push('style="' + col.style + '"'); //自定义样式
|
||||||
return attr.join(' ');
|
return attr.join(' ');
|
||||||
}() + ' class="layui-table-cell ' + function () { //追加样式
|
}();
|
||||||
|
//追加样式
|
||||||
|
var styles = function () {
|
||||||
var classNames = [];
|
var classNames = [];
|
||||||
if (item3.hide) classNames.push(HIDE); //插入隐藏列样式
|
if (col.hide) classNames.push(HIDE); //插入隐藏列样式
|
||||||
if (!item3.field) classNames.push('layui-table-col-special'); //插入特殊列样式
|
if (!col.field) classNames.push('layui-table-col-special'); //插入特殊列样式
|
||||||
return classNames.join(' ');
|
return classNames.join(' ');
|
||||||
}() + '">' + function () {
|
|
||||||
var tplData = $.extend(true, {
|
|
||||||
LAY_INDEX: numbers
|
|
||||||
}, item1);
|
|
||||||
//解析工具列模板
|
|
||||||
if (item3.toolbar) {
|
|
||||||
return laytpl($(item3.toolbar).html() || '').render(tplData);
|
|
||||||
}
|
|
||||||
return item3.templet ? function () {
|
|
||||||
return typeof item3.templet === 'function'
|
|
||||||
? item3.templet(tplData)
|
|
||||||
: laytpl($(item3.templet).html() || String(content)).render(tplData)
|
|
||||||
}() : (title + ':' + content);
|
|
||||||
}()
|
}()
|
||||||
, '</div>'].join('');
|
var html = function () {
|
||||||
|
var tplData = $.extend(true, {
|
||||||
|
LAY_INDEX: rowNo
|
||||||
|
}, row);
|
||||||
|
//解析工具列模板
|
||||||
|
if (col.toolbar) {
|
||||||
|
return laytpl($(col.toolbar).html() || '').render(tplData);
|
||||||
|
}
|
||||||
|
return col.templet ? function () {
|
||||||
|
return typeof col.templet === 'function'
|
||||||
|
? col.templet(tplData)
|
||||||
|
: laytpl($(col.templet).html() || String(content)).render(tplData)
|
||||||
|
}() : (title + ':' + content);
|
||||||
|
}();
|
||||||
|
|
||||||
|
infotd = [
|
||||||
|
'<div data-field="' + field + '" data-key="' + key + '" ' + attrs + ' class="layui-table-cell ' + styles + '">'
|
||||||
|
, html
|
||||||
|
, '</div>'
|
||||||
|
].join('');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
if (infotd.length != 0) {
|
if (infotd.length != 0) {
|
||||||
infotds.push(infotd)
|
infotds.push(infotd)
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
//td内容
|
|
||||||
var td = ['<td data-field="' + field + '" data-key="' + key + '" ' + function () { //追加各种属性
|
|
||||||
var attr = [];
|
|
||||||
if (item3.edit) attr.push('data-edit="' + item3.edit + '"'); //是否允许单元格编辑
|
|
||||||
if (item3.align) attr.push('align="' + item3.align + '"'); //对齐方式
|
|
||||||
if (item3.templet) attr.push('data-content="' + content + '"'); //自定义模板
|
|
||||||
if (item3.toolbar) attr.push('data-off="true"'); //行工具列关闭单元格事件
|
|
||||||
if (item3.event) attr.push('lay-event="' + item3.event + '"'); //自定义事件
|
|
||||||
if (item3.style) attr.push('style="' + item3.style + '"'); //自定义样式
|
|
||||||
if (item3.minWidth) attr.push('data-minwidth="' + item3.minWidth + '"'); //单元格最小宽度
|
|
||||||
if (item3.currency) attr.push('data-currency="' + item3.currency + '"'); //add 是否对数据做千分号格式化处理
|
|
||||||
if (item3.edit == 'select') attr.push('data-selectvalue="' + content + '"');
|
|
||||||
|
|
||||||
|
return {
|
||||||
|
td: td.join(''),
|
||||||
|
infotds: infotd.join('')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
renderImageListTd = function (col, row, rowIndex, rowNo) {
|
||||||
|
var field = col.field
|
||||||
|
, key = options.index + '-' + col.key
|
||||||
|
, content = row[field]
|
||||||
|
, title = col.title,
|
||||||
|
ret = [];
|
||||||
|
//td内容
|
||||||
|
if (col.type == "checkbox" || col.type == "radio" || col.type == "numbers") {
|
||||||
|
|
||||||
|
ret = ['<td data-field="' + field + '" data-key="' + key + '" ' + function () { //追加各种属性
|
||||||
|
var attr = [];
|
||||||
|
if (col.edit) attr.push('data-edit="' + col.edit + '"'); //是否允许单元格编辑
|
||||||
|
if (col.align) attr.push('align="' + col.align + '"'); //对齐方式
|
||||||
|
if (col.templet) attr.push('data-content="' + content + '"'); //自定义模板
|
||||||
|
if (col.toolbar) attr.push('data-off="true"'); //行工具列关闭单元格事件
|
||||||
|
if (col.event) attr.push('lay-event="' + col.event + '"'); //自定义事件
|
||||||
|
if (col.style) attr.push('style="' + col.style + '"'); //自定义样式
|
||||||
|
if (col.minWidth) attr.push('data-minwidth="' + col.minWidth + '"'); //单元格最小宽度
|
||||||
return attr.join(' ');
|
return attr.join(' ');
|
||||||
}() + ' class="' + function () { //追加样式
|
}() + ' class="' + function () { //追加样式
|
||||||
var classNames = [];
|
var classNames = [];
|
||||||
if (item3.hide) classNames.push(HIDE); //插入隐藏列样式
|
if (col.hide) classNames.push(HIDE); //插入隐藏列样式
|
||||||
if (!item3.field) classNames.push('layui-table-col-special'); //插入特殊列样式
|
if (!col.field) classNames.push('layui-table-col-special'); //插入特殊列样式
|
||||||
return classNames.join(' ');
|
return classNames.join(' ');
|
||||||
}() + '">'
|
}() + '">'
|
||||||
, '<div class="layui-table-cell laytable-cell-' + function () { //返回对应的CSS类标识
|
, '<div class="layui-table-cell laytable-cell-' + function () { //返回对应的CSS类标识
|
||||||
return item3.type === 'normal' ? key
|
return col.type === 'normal' ? key
|
||||||
: (key + ' laytable-cell-' + item3.type);
|
: (key + ' laytable-cell-' + col.type);
|
||||||
}() + '">' + function () {
|
}() + '">' + function () {
|
||||||
var tplData = $.extend(true, {}, {
|
var tplData = $.extend(true, {
|
||||||
LAY_INDEX: numbers
|
LAY_INDEX: rowNo
|
||||||
}, item1)
|
}, row)
|
||||||
, checkName = table.config.checkName;
|
, checkName = table.config.checkName;
|
||||||
|
|
||||||
//渲染不同风格的列
|
//渲染不同风格的列
|
||||||
switch (item3.type) {
|
switch (col.type) {
|
||||||
case 'checkbox':
|
case 'checkbox':
|
||||||
// 分页勾选逻辑 start
|
// 分页勾选逻辑 start
|
||||||
var itemValue = item1[that.config.onlyKey]; // 获取唯一值用于判断(默认rwid)
|
var itemValue = row[that.config.onlyKey]; // 获取唯一值用于判断(默认rwid)
|
||||||
var ischecked = that.checkedDefault(itemValue, i1);
|
var ischecked = that.checkedDefault(itemValue, rowIndex);
|
||||||
// 分页勾选逻辑 end
|
// 分页勾选逻辑 end
|
||||||
return '<input type="checkbox" ' + ischecked + ' name="layTableCheckbox" lay-skin="primary" ' + function () {
|
return '<input type="checkbox" ' + ischecked + ' name="layTableCheckbox" lay-skin="primary" ' + function () {
|
||||||
//如果是全选
|
//如果是全选
|
||||||
if (item3[checkName]) {
|
if (col[checkName]) {
|
||||||
item1[checkName] = item3[checkName];
|
row[checkName] = col[checkName];
|
||||||
return item3[checkName] ? 'checked' : '';
|
return col[checkName] ? 'checked' : '';
|
||||||
}
|
}
|
||||||
return tplData[checkName] ? 'checked' : '';
|
return tplData[checkName] ? 'checked' : '';
|
||||||
}() + '>';
|
}() + '>';
|
||||||
break;
|
break;
|
||||||
case 'radio':
|
case 'radio':
|
||||||
if (tplData[checkName]) {
|
if (tplData[checkName]) {
|
||||||
thisCheckedRowIndex = i1;
|
checkedRowIndex = rowIndex;
|
||||||
}
|
}
|
||||||
return '<input type="radio" name="layTableRadio_' + options.index + '" '
|
return '<input type="radio" name="layTableRadio_' + options.index + '" '
|
||||||
+ (tplData[checkName] ? 'checked' : '') + ' lay-type="layTableRadio">';
|
+ (tplData[checkName] ? 'checked' : '') + ' lay-type="layTableRadio">';
|
||||||
break;
|
break;
|
||||||
case 'numbers':
|
case 'numbers':
|
||||||
return numbers;
|
return rowNo;
|
||||||
|
break;
|
||||||
|
};
|
||||||
|
|
||||||
|
}()
|
||||||
|
, '</div></td>'].join('');
|
||||||
|
} else {
|
||||||
|
titls = ['<li data-field="' + field + '" data-key="' + key + '" ' + function () { //追加各种属性
|
||||||
|
var attr = [];
|
||||||
|
if (col.edit) attr.push('data-edit="' + col.edit + '"'); //是否允许单元格编辑
|
||||||
|
if (col.align) attr.push('align="' + col.align + '"'); //对齐方式
|
||||||
|
if (col.templet) attr.push('data-content="' + content + '"'); //自定义模板
|
||||||
|
if (col.toolbar) attr.push('data-off="true"'); //行工具列关闭单元格事件
|
||||||
|
if (col.event) attr.push('lay-event="' + col.event + '"'); //自定义事件
|
||||||
|
if (col.style) attr.push('style="' + col.style + '"'); //自定义样式
|
||||||
|
if (col.minWidth) attr.push('data-minwidth="' + col.minWidth + '"'); //单元格最小宽度
|
||||||
|
return attr.join(' ');
|
||||||
|
}() + ' class="' + function () { //追加样式
|
||||||
|
var classNames = [];
|
||||||
|
if (col.hide) classNames.push(HIDE); //插入隐藏列样式
|
||||||
|
if (!col.field) classNames.push('layui-table-col-special'); //插入特殊列样式
|
||||||
|
return classNames.join(' ');
|
||||||
|
}() + '">'
|
||||||
|
, '<div class="layui-table-cell laytable-cell-' + function () { //返回对应的CSS类标识
|
||||||
|
return col.type === 'normal' ? key
|
||||||
|
: (key + ' laytable-cell-' + col.type);
|
||||||
|
}() + '">' + function () {
|
||||||
|
var tplData = $.extend(true, {
|
||||||
|
LAY_INDEX: rowNo
|
||||||
|
}, row)
|
||||||
|
|
||||||
|
//解析工具列模板
|
||||||
|
if (col.toolbar) {
|
||||||
|
return laytpl($(col.toolbar).html() || '').render(tplData);
|
||||||
|
}
|
||||||
|
return col.templet ? function () {
|
||||||
|
return typeof col.templet === 'function'
|
||||||
|
? col.templet(tplData)
|
||||||
|
: laytpl($(col.templet).html() || String(content)).render(tplData)
|
||||||
|
}() : content;
|
||||||
|
}()
|
||||||
|
, '</div></li>'].join('');
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
td: ret,
|
||||||
|
title: titls
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 列表view渲染
|
||||||
|
*/
|
||||||
|
renderListTd = function (col, row, rowIndex, rowNo) {
|
||||||
|
var field = col.field
|
||||||
|
, key = options.index + '-' + col.key
|
||||||
|
, content = row[field]
|
||||||
|
, title = col.title;
|
||||||
|
|
||||||
|
//追加各种属性
|
||||||
|
var attrs = function () {
|
||||||
|
var attr = [];
|
||||||
|
if (col.edit) attr.push('data-edit="' + col.edit + '"'); //是否允许单元格编辑
|
||||||
|
if (col.align) attr.push('align="' + col.align + '"'); //对齐方式
|
||||||
|
if (col.templet) attr.push('data-content="' + content + '"'); //自定义模板
|
||||||
|
if (col.toolbar) attr.push('data-off="true"'); //行工具列关闭单元格事件
|
||||||
|
if (col.event) attr.push('lay-event="' + col.event + '"'); //自定义事件
|
||||||
|
if (col.style) attr.push('style="' + col.style + '"'); //自定义样式
|
||||||
|
if (col.minWidth) attr.push('data-minwidth="' + col.minWidth + '"'); //单元格最小宽度
|
||||||
|
if (col.currency) attr.push('data-currency="' + col.currency + '"'); //add 是否对数据做千分号格式化处理
|
||||||
|
if (col.edit == 'select') attr.push('data-selectvalue="' + content + '"');
|
||||||
|
|
||||||
|
return attr.join(' ');
|
||||||
|
}();
|
||||||
|
//追加样式
|
||||||
|
var styles = function () {
|
||||||
|
var classNames = [];
|
||||||
|
if (col.hide) classNames.push(HIDE); //插入隐藏列样式
|
||||||
|
if (!col.field) classNames.push('layui-table-col-special'); //插入特殊列样式
|
||||||
|
return classNames.join(' ');
|
||||||
|
}();
|
||||||
|
//返回对应的CSS类标识
|
||||||
|
var csss = function () {
|
||||||
|
return col.type === 'normal' ? key
|
||||||
|
: (key + ' laytable-cell-' + col.type);
|
||||||
|
}();
|
||||||
|
//td内容
|
||||||
|
var tdHtml = function () {
|
||||||
|
var tplData = $.extend(true, {}, {
|
||||||
|
LAY_INDEX: rowNo
|
||||||
|
}, row)
|
||||||
|
, checkName = table.config.checkName;
|
||||||
|
|
||||||
|
//渲染不同风格的列
|
||||||
|
switch (col.type) {
|
||||||
|
case 'checkbox':
|
||||||
|
// 分页勾选逻辑 start
|
||||||
|
var itemValue = row[that.config.onlyKey]; // 获取唯一值用于判断(默认rwid)
|
||||||
|
var ischecked = that.checkedDefault(itemValue, rowIndex);
|
||||||
|
// 分页勾选逻辑 end
|
||||||
|
return '<input type="checkbox" ' + ischecked + ' name="layTableCheckbox" lay-skin="primary" ' + function () {
|
||||||
|
//如果是全选
|
||||||
|
if (col[checkName]) {
|
||||||
|
row[checkName] = col[checkName];
|
||||||
|
return col[checkName] ? 'checked' : '';
|
||||||
|
}
|
||||||
|
return tplData[checkName] ? 'checked' : '';
|
||||||
|
}() + '>';
|
||||||
|
break;
|
||||||
|
case 'radio':
|
||||||
|
if (tplData[checkName]) {
|
||||||
|
checkedRowIndex = rowIndex;
|
||||||
|
}
|
||||||
|
return '<input type="radio" name="layTableRadio_' + options.index + '" '
|
||||||
|
+ (tplData[checkName] ? 'checked' : '') + ' lay-type="layTableRadio">';
|
||||||
|
break;
|
||||||
|
case 'numbers':
|
||||||
|
return rowNo;
|
||||||
break;
|
break;
|
||||||
case 'currency':
|
case 'currency':
|
||||||
if (!item3.templet) {
|
if (!col.templet) {
|
||||||
if (item3.tofix) {
|
if (col.tofix) {
|
||||||
return table.formatNumberByPermil(parseFloat(item1[item3.field]).toFixed(parseInt(item3.tofix)));
|
return table.formatNumberByPermil(parseFloat(row[col.field]).toFixed(parseInt(col.tofix)));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return table.formatNumberByPermil(item1[item3.field]);
|
return table.formatNumberByPermil(row[col.field]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
|
|
||||||
//解析工具列模板
|
//解析工具列模板
|
||||||
if (item3.toolbar) {
|
if (col.toolbar) {
|
||||||
return laytpl($(item3.toolbar).html() || '').render(tplData);
|
return laytpl($(col.toolbar).html() || '').render(tplData);
|
||||||
}
|
}
|
||||||
if (item3.edit == 'select' && item3.list) {
|
if (col.edit == 'select' && col.list) {
|
||||||
var opts = item3.list();
|
var opts = col.list();
|
||||||
for (let i = 0; i < opts.length; i++) {
|
for (let i = 0; i < opts.length; i++) {
|
||||||
const opt = opts[i];
|
const opt = opts[i];
|
||||||
if (opt.key == content) {
|
if (opt.key == content) {
|
||||||
|
@ -1307,25 +1330,50 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function (exports)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return item3.templet ? function () {
|
return col.templet ? function () {
|
||||||
return typeof item3.templet === 'function'
|
return typeof col.templet === 'function'
|
||||||
? item3.templet(tplData)
|
? col.templet(tplData)
|
||||||
: laytpl($(item3.templet).html() || String(content)).render(tplData)
|
: laytpl($(col.templet).html() || String(content)).render(tplData)
|
||||||
}() : (item3.tofix ? parseFloat(content).toFixed(parseInt(item3.tofix)) : content);
|
}() : (col.tofix ? parseFloat(content).toFixed(parseInt(col.tofix)) : content);
|
||||||
}()
|
}()
|
||||||
|
var td = ['<td data-field="' + field + '" data-key="' + key + '" ' + attrs + ' class="' + styles + '">'
|
||||||
|
, '<div class="layui-table-cell laytable-cell-' + csss + '">'
|
||||||
|
, tdHtml
|
||||||
, '</div></td>'].join('');
|
, '</div></td>'].join('');
|
||||||
|
return td;
|
||||||
}
|
},
|
||||||
tds.push(td);
|
renderCardListRow = function (rowIndex, row) {
|
||||||
if (options.mode != "cardListMode") {
|
var tds = [], infotds = [],
|
||||||
if (item3.fixed && item3.fixed !== 'right') tds_fixed.push(td);
|
numbers = rowIndex + options.limit * (curr - 1) + 1;
|
||||||
if (item3.fixed === 'right') tds_fixed_r.push(td);
|
that.eachCols(function (colIndex, col) {
|
||||||
|
if (col.colGroup) return;
|
||||||
|
var ret = renderCardListTd(col, row, rowIndex, numbers);
|
||||||
|
infotds.push(ret.infotds);
|
||||||
|
tds.push(ret.td);
|
||||||
|
if (col.type === 'radio') {
|
||||||
|
checkedRowIndex = colIndex;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (options.vertical) {
|
||||||
|
trs.push('<div class=" card-item vertical-item" data-index="' + rowIndex + '"><div class="tp">' + tds.join('') + '</div><div class="text">' + infotds.join('') + '</div></div>');
|
||||||
|
} else {
|
||||||
|
trs.push('<div class=" card-item" data-index="' + rowIndex + '"><div class=" layui-row grid-demo item">' + tds.join('') + '<div class="text">' + infotds.join('') + '</div></div></div>');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
renderImageListRow = function (rowIndex, row) {
|
||||||
|
var tds = [], tileDivs = [],
|
||||||
|
numbers = rowIndex + options.limit * (curr - 1) + 1;
|
||||||
|
that.eachCols(function (colIndex, col) {
|
||||||
|
if (col.colGroup) return;
|
||||||
|
var ret = renderImageListTd(col, row, rowIndex, numbers);
|
||||||
|
tds.push(ret.td);
|
||||||
|
tileDivs.push(ret.title);
|
||||||
|
if (col.fixed && col.fixed !== 'right') tds_fixed.push(td);
|
||||||
|
if (col.fixed === 'right') tds_fixed_r.push(td);
|
||||||
|
if (col.type === 'radio') {
|
||||||
|
checkedRowIndex = colIndex;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 三种列表模式拼接
|
|
||||||
if (options.mode == "imgListMode") {
|
|
||||||
// 创建一个标题头部的数据,遍历一下赋值,只循环一次
|
|
||||||
var setsing_obj = options.setsing;
|
var setsing_obj = options.setsing;
|
||||||
var table_nfo_cell = '';
|
var table_nfo_cell = '';
|
||||||
if (setsing_obj) {
|
if (setsing_obj) {
|
||||||
|
@ -1337,62 +1385,85 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function (exports)
|
||||||
}
|
}
|
||||||
table_nfo_cell = '<div class="layui-table-cell table-info-cell"><ul class="ul-list">' + ul_list.join('') + '</ul></div>';
|
table_nfo_cell = '<div class="layui-table-cell table-info-cell"><ul class="ul-list">' + ul_list.join('') + '</ul></div>';
|
||||||
}
|
}
|
||||||
trs.push('<tr class="layu-trhead" data-index="' + i1 + '">' + tds.join('') + '<td colspan="' + (options.cols[0].length - tds.length) + '">' + table_nfo_cell + '<div vlass="layui-table-cell table-images-cell"><ul class="ul-info-list">' + divs.join('') + '</ul></div></td></tr>');
|
trs.push('<tr class="layu-trhead" data-index="' + rowIndex + '">' + tds.join('') + '<td colspan="' + (options.cols[0].length - tds.length) + '">' + table_nfo_cell + '<div vlass="layui-table-cell table-images-cell"><ul class="ul-info-list">' + tileDivs.join('') + '</ul></div></td></tr>');
|
||||||
// trs_fixed.push('<tr class="layu-trhead-fixed" data-index="' + i1 + '">' + tds_fixed.join('') + '</tr>');
|
|
||||||
// trs_fixed_r.push('<tr class="layu-trhead-fixed" data-index="' + i1 + '">' + tds_fixed_r.join('') + '</tr>');
|
|
||||||
} else if (options.mode == "cardListMode") {
|
|
||||||
if (options.vertical) {
|
|
||||||
trs.push('<div class=" card-item vertical-item" data-index="' + i1 + '"><div class="tp">' + tds.join('') + '</div><div class="text">' + infotds.join('') + '</div></div>');
|
|
||||||
} else {
|
|
||||||
trs.push('<div class=" card-item" data-index="' + i1 + '"><div class=" layui-row grid-demo item">' + tds.join('') + '<div class="text">' + infotds.join('') + '</div></div></div>');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
trs.push('<tr data-index="' + i1 + '">' + tds.join('') + '</tr>');
|
|
||||||
trs_fixed.push('<tr data-index="' + i1 + '">' + tds_fixed.join('') + '</tr>');
|
|
||||||
trs_fixed_r.push('<tr data-index="' + i1 + '">' + tds_fixed_r.join('') + '</tr>');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
},
|
||||||
|
renderListRow = function (rowIndex, row) {
|
||||||
|
var tds = [], tds_fixed = [], tds_fixed_r = [],
|
||||||
|
numbers = rowIndex + options.limit * (curr - 1) + 1;
|
||||||
|
that.eachCols(function (colIndex, col) {
|
||||||
|
if (col.colGroup) return;
|
||||||
|
var td = renderListTd(col, row, rowIndex, numbers);
|
||||||
|
tds.push(td);
|
||||||
|
if (col.fixed && col.fixed !== 'right') tds_fixed.push(td);
|
||||||
|
if (col.fixed === 'right') tds_fixed_r.push(td);
|
||||||
|
if (col.type === 'radio') {
|
||||||
|
checkedRowIndex = colIndex;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
trs.push('<tr data-index="' + rowIndex + '">' + tds.join('') + '</tr>');
|
||||||
|
trs_fixed.push('<tr data-index="' + rowIndex + '">' + tds_fixed.join('') + '</tr>');
|
||||||
that.layBody.scrollTop(0);
|
trs_fixed_r.push('<tr data-index="' + rowIndex + '">' + tds_fixed_r.join('') + '</tr>');
|
||||||
that.layMain.find('.' + NONE).remove();
|
return {
|
||||||
if (options.mode == "cardListMode") {
|
tr: '<tr data-index="' + rowIndex + '">' + tds.join('') + '</tr>',
|
||||||
var layConent = '.layui-table';
|
trs_fixed: '<tr data-index="' + rowIndex + '">' + tds_fixed.join('') + '</tr>',
|
||||||
} else {
|
trs_fixed_r: '<tr data-index="' + rowIndex + '">' + tds_fixed_r.join('') + '</tr>'
|
||||||
var layConent = 'tbody';
|
|
||||||
}
|
|
||||||
that.layMain.find(layConent).html(trs.join(''));
|
|
||||||
|
|
||||||
if (options.mode == "listMode") {
|
|
||||||
that.layFixLeft.find('tbody').html(trs_fixed.join(''));
|
|
||||||
that.layFixRight.find('tbody').html(trs_fixed_r.join(''));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
renderCardList = function (rows) {
|
||||||
|
layui.each(data, function (rowIndex, row) {
|
||||||
|
renderCardListRow(rowIndex, row)
|
||||||
|
});
|
||||||
|
that.layMain.find('.layui-table').html(trs.join(''));
|
||||||
if ($(".imgbox a").length > 0) {
|
if ($(".imgbox a").length > 0) {
|
||||||
var imgboxH = $(".imgbox a").height();
|
var imgboxH = $(".imgbox a").height();
|
||||||
if (imgboxH) {
|
if (imgboxH) {
|
||||||
$(".imgbox a").css("line-height", imgboxH + 'px');
|
$(".imgbox a").css("line-height", imgboxH + 'px');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
renderImageList = function (rows) {
|
||||||
|
layui.each(data, function (rowIndex, row) {
|
||||||
|
renderImageListRow(rowIndex, row)
|
||||||
|
});
|
||||||
|
that.layMain.find('tbody').html(trs.join(''));
|
||||||
|
that.layFixLeft.find('tbody').html(trs_fixed.join(''));
|
||||||
|
that.layFixRight.find('tbody').html(trs_fixed_r.join(''));
|
||||||
|
},
|
||||||
|
renderList = function (rows) {
|
||||||
|
layui.each(data, function (rowIndex, row) {
|
||||||
|
renderListRow(rowIndex, row)
|
||||||
|
});
|
||||||
|
that.layMain.find('tbody').html(trs.join(''));
|
||||||
|
that.layFixLeft.find('tbody').html(trs_fixed.join(''));
|
||||||
|
that.layFixRight.find('tbody').html(trs_fixed_r.join(''));
|
||||||
|
},
|
||||||
|
//渲染视图
|
||||||
|
render = function () {
|
||||||
|
if (!sort && that.sortKey) {
|
||||||
|
return that.sort(that.sortKey.field, that.sortKey.sort, true);
|
||||||
|
}
|
||||||
|
if (options.mode == "imgListMode") {
|
||||||
|
renderImageList(data);
|
||||||
|
} else if (options.mode == "cardListMode") {
|
||||||
|
renderCardList(data);
|
||||||
|
} else {
|
||||||
|
renderList(data);
|
||||||
|
}
|
||||||
|
that.layBody.scrollTop(0);
|
||||||
|
that.layMain.find('.' + NONE).remove();
|
||||||
// 表格里面有下拉框的添加样式
|
// 表格里面有下拉框的添加样式
|
||||||
if ($(".layui-table-cell").find('select').length > 0) {
|
if ($(".layui-table-cell").find('select').length > 0) {
|
||||||
$(".layui-table-cell").find('select').parent(".layui-table-cell").css('overflow', 'visible');
|
$(".layui-table-cell").find('select').parent(".layui-table-cell").css('overflow', 'visible');
|
||||||
$(".layui-table-cell").find('select').parent(".layui-table-cell").addClass('layui-table-cell-active')
|
$(".layui-table-cell").find('select').parent(".layui-table-cell").addClass('layui-table-cell-active')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
that.renderForm();
|
that.renderForm();
|
||||||
typeof thisCheckedRowIndex === 'number' && that.setThisRowChecked(thisCheckedRowIndex);
|
typeof checkedRowIndex === 'number' && that.setThisRowChecked(checkedRowIndex);
|
||||||
that.syncCheckAll();
|
that.syncCheckAll();
|
||||||
|
|
||||||
that.scrollPatch();
|
that.scrollPatch();
|
||||||
/*
|
|
||||||
that.haveInit ? that.scrollPatch() : setTimeout(function(){
|
|
||||||
that.scrollPatch();
|
|
||||||
}, 50);
|
|
||||||
that.haveInit = true;
|
|
||||||
*/
|
|
||||||
|
|
||||||
layer.close(that.tipsIndex);
|
layer.close(that.tipsIndex);
|
||||||
that.loadingnews(true);
|
that.loadingnews(true);
|
||||||
|
@ -2494,6 +2565,7 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function (exports)
|
||||||
input[0].value = othis.data('content') || elemCell.text();
|
input[0].value = othis.data('content') || elemCell.text();
|
||||||
othis.find('.' + ELEM_EDIT)[0] || othis.append(input);
|
othis.find('.' + ELEM_EDIT)[0] || othis.append(input);
|
||||||
input.focus();
|
input.focus();
|
||||||
|
input.select();
|
||||||
return;
|
return;
|
||||||
} else if (editType == 'select') {
|
} else if (editType == 'select') {
|
||||||
var select = $('<select class="' + ELEM_EDIT + '" style="z-index:9999999; display: inline;">');
|
var select = $('<select class="' + ELEM_EDIT + '" style="z-index:9999999; display: inline;">');
|
||||||
|
|
1
modules/kdayun-app/src/main/resources/static/libs/formdesign/libs/wangEditor.min.js
vendored
Normal file
|
@ -3081,9 +3081,10 @@
|
||||||
curNode.addClass(setting.treeObj.attr("class"));
|
curNode.addClass(setting.treeObj.attr("class"));
|
||||||
curNode.appendTo(body);
|
curNode.appendTo(body);
|
||||||
|
|
||||||
tmpArrow = $$("<span class='tmpzTreeMove_arrow' style='z-index:99999999999;'></span>", setting);
|
tmpArrow = $$("<span class='tmpzTreeMove_arrow'></span>", setting);
|
||||||
tmpArrow.attr("id", "zTreeMove_arrow_tmp");
|
tmpArrow.attr("id", "zTreeMove_arrow_tmp");
|
||||||
tmpArrow.appendTo(body);
|
tmpArrow.appendTo(body);
|
||||||
|
tmpArrow.css({ "z-index": Common.generalSeri(1) })
|
||||||
|
|
||||||
setting.treeObj.trigger(consts.event.DRAG, [event, setting.treeId, nodes]);
|
setting.treeObj.trigger(consts.event.DRAG, [event, setting.treeId, nodes]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,41 +1,9 @@
|
||||||
<!DOCTYPE html>
|
<!doctype html><html><head><title>页面预览</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="renderer" content="webkit"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1"><meta name="apple-mobile-web-app-status-bar-style" content="black"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="format-detection" content="telephone=no"><link rel="stylesheet" href="./css/font-awesome/css/font-awesome.css" media="all"/><style>#yhdesignerPreviewId {
|
||||||
|
|
||||||
<html>
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<title>页面预览</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="renderer" content="webkit">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
||||||
<meta name="format-detection" content="telephone=no">
|
|
||||||
<!-- <link rel="stylesheet" href="./css/design.css"> -->
|
|
||||||
<link rel="stylesheet" href="./css/font-awesome/css/font-awesome.css" media="all" />
|
|
||||||
<style>
|
|
||||||
#yhdesignerPreviewId {
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}</style></head><body style="min-height: 660px"><div class="yhdesigner" id="yhdesignerPreviewId"></div><input id="model" type="hidden" value=""><script src="./libs/jquery.js"></script><script src="./libs/layui/layui.js"></script><script src="./libs/ztree/js/jquery.ztree.all.min.js"></script><script src="./libs/lodash.js"></script><script>window['yh_config'] = {
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="min-height: 660px">
|
|
||||||
<div class="yhdesigner" id="yhdesignerPreviewId"></div>
|
|
||||||
<input id="model" type="hidden" value=''>
|
|
||||||
<script type="text/javascript" src="./libs/jquery.js"></script>
|
|
||||||
<script type="text/javascript" src="./libs/layui/layui.js"></script>
|
|
||||||
<script type="text/javascript" src="./libs/ztree/js/jquery.ztree.all.min.js"></script>
|
|
||||||
<script type="text/javascript" src="./libs/lodash.js"></script>
|
|
||||||
<script>
|
|
||||||
window['yh_config'] = {
|
|
||||||
rootDir: ''
|
rootDir: ''
|
||||||
}
|
}
|
||||||
$(function () {
|
$(function () {
|
||||||
window.yhpreview && window.yhpreview.render('yhdesignerPreviewId');
|
window.yhpreview && window.yhpreview.render('yhdesignerPreviewId');
|
||||||
})
|
})</script><script src="preview.js"></script></body></html>
|
||||||
</script>
|
|
||||||
<script src="preview.js"></script></body>
|
|
||||||
|
|
||||||
</html>
|
|
|
@ -732,6 +732,11 @@ hitTitle: string
|
||||||
*/
|
*/
|
||||||
id: string
|
id: string
|
||||||
/**
|
/**
|
||||||
|
*设计模式下是否拖拽释放时候创建的组件
|
||||||
|
有些组件需要区分这个,来增加默认值
|
||||||
|
*/
|
||||||
|
isDropCreate: boolean
|
||||||
|
/**
|
||||||
*子组件数组
|
*子组件数组
|
||||||
*/
|
*/
|
||||||
items: ComponentBase[]
|
items: ComponentBase[]
|
||||||
|
@ -1538,6 +1543,11 @@ hitTitle: string
|
||||||
*/
|
*/
|
||||||
id: string
|
id: string
|
||||||
/**
|
/**
|
||||||
|
*设计模式下是否拖拽释放时候创建的组件
|
||||||
|
有些组件需要区分这个,来增加默认值
|
||||||
|
*/
|
||||||
|
isDropCreate: boolean
|
||||||
|
/**
|
||||||
*子组件数组
|
*子组件数组
|
||||||
*/
|
*/
|
||||||
items: ComponentBase[]
|
items: ComponentBase[]
|
||||||
|
@ -1600,6 +1610,11 @@ hitTitle: string
|
||||||
*/
|
*/
|
||||||
id: string
|
id: string
|
||||||
/**
|
/**
|
||||||
|
*设计模式下是否拖拽释放时候创建的组件
|
||||||
|
有些组件需要区分这个,来增加默认值
|
||||||
|
*/
|
||||||
|
isDropCreate: boolean
|
||||||
|
/**
|
||||||
*是否权限资源
|
*是否权限资源
|
||||||
true可以在用户权限内看到改资源的控制,false 则看不到资源
|
true可以在用户权限内看到改资源的控制,false 则看不到资源
|
||||||
*/
|
*/
|
||||||
|
@ -1709,6 +1724,11 @@ hitTitle: string
|
||||||
*/
|
*/
|
||||||
id: string
|
id: string
|
||||||
/**
|
/**
|
||||||
|
*设计模式下是否拖拽释放时候创建的组件
|
||||||
|
有些组件需要区分这个,来增加默认值
|
||||||
|
*/
|
||||||
|
isDropCreate: boolean
|
||||||
|
/**
|
||||||
*子组件数组
|
*子组件数组
|
||||||
*/
|
*/
|
||||||
items: ComponentBase[]
|
items: ComponentBase[]
|
||||||
|
@ -1802,6 +1822,11 @@ hitTitle: string
|
||||||
*/
|
*/
|
||||||
id: string
|
id: string
|
||||||
/**
|
/**
|
||||||
|
*设计模式下是否拖拽释放时候创建的组件
|
||||||
|
有些组件需要区分这个,来增加默认值
|
||||||
|
*/
|
||||||
|
isDropCreate: boolean
|
||||||
|
/**
|
||||||
*是否权限资源
|
*是否权限资源
|
||||||
true可以在用户权限内看到改资源的控制,false 则看不到资源
|
true可以在用户权限内看到改资源的控制,false 则看不到资源
|
||||||
*/
|
*/
|
||||||
|
@ -1885,6 +1910,11 @@ hitTitle: string
|
||||||
*/
|
*/
|
||||||
id: string
|
id: string
|
||||||
/**
|
/**
|
||||||
|
*设计模式下是否拖拽释放时候创建的组件
|
||||||
|
有些组件需要区分这个,来增加默认值
|
||||||
|
*/
|
||||||
|
isDropCreate: boolean
|
||||||
|
/**
|
||||||
*是否权限资源
|
*是否权限资源
|
||||||
true可以在用户权限内看到改资源的控制,false 则看不到资源
|
true可以在用户权限内看到改资源的控制,false 则看不到资源
|
||||||
*/
|
*/
|
||||||
|
@ -2050,6 +2080,11 @@ hitTitle: string
|
||||||
*/
|
*/
|
||||||
id: string
|
id: string
|
||||||
/**
|
/**
|
||||||
|
*设计模式下是否拖拽释放时候创建的组件
|
||||||
|
有些组件需要区分这个,来增加默认值
|
||||||
|
*/
|
||||||
|
isDropCreate: boolean
|
||||||
|
/**
|
||||||
*是否权限资源
|
*是否权限资源
|
||||||
true可以在用户权限内看到改资源的控制,false 则看不到资源
|
true可以在用户权限内看到改资源的控制,false 则看不到资源
|
||||||
*/
|
*/
|
||||||
|
@ -2210,6 +2245,11 @@ hitTitle: string
|
||||||
*/
|
*/
|
||||||
id: string
|
id: string
|
||||||
/**
|
/**
|
||||||
|
*设计模式下是否拖拽释放时候创建的组件
|
||||||
|
有些组件需要区分这个,来增加默认值
|
||||||
|
*/
|
||||||
|
isDropCreate: boolean
|
||||||
|
/**
|
||||||
*子组件数组
|
*子组件数组
|
||||||
*/
|
*/
|
||||||
items: ComponentBase[]
|
items: ComponentBase[]
|
||||||
|
@ -2315,6 +2355,11 @@ hitTitle: string
|
||||||
*/
|
*/
|
||||||
id: string
|
id: string
|
||||||
/**
|
/**
|
||||||
|
*设计模式下是否拖拽释放时候创建的组件
|
||||||
|
有些组件需要区分这个,来增加默认值
|
||||||
|
*/
|
||||||
|
isDropCreate: boolean
|
||||||
|
/**
|
||||||
*是否权限资源
|
*是否权限资源
|
||||||
true可以在用户权限内看到改资源的控制,false 则看不到资源
|
true可以在用户权限内看到改资源的控制,false 则看不到资源
|
||||||
*/
|
*/
|
||||||
|
@ -4363,6 +4408,11 @@ hitTitle: string
|
||||||
*/
|
*/
|
||||||
id: string
|
id: string
|
||||||
/**
|
/**
|
||||||
|
*设计模式下是否拖拽释放时候创建的组件
|
||||||
|
有些组件需要区分这个,来增加默认值
|
||||||
|
*/
|
||||||
|
isDropCreate: boolean
|
||||||
|
/**
|
||||||
*是否权限资源
|
*是否权限资源
|
||||||
true可以在用户权限内看到改资源的控制,false 则看不到资源
|
true可以在用户权限内看到改资源的控制,false 则看不到资源
|
||||||
*/
|
*/
|
||||||
|
@ -5066,6 +5116,28 @@ class VueComponentBase extends ContainerBase {
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
*点击的动画
|
||||||
|
*/
|
||||||
|
enum ClickAnimation {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*点击边框声波
|
||||||
|
*/
|
||||||
|
broderWaver = "broderWave",
|
||||||
|
/**
|
||||||
|
*无效果
|
||||||
|
*/
|
||||||
|
none = "none",
|
||||||
|
/**
|
||||||
|
*抖动
|
||||||
|
*/
|
||||||
|
quiver = "quiver",
|
||||||
|
/**
|
||||||
|
*点击水波纹
|
||||||
|
*/
|
||||||
|
ripple = "ripple"
|
||||||
|
}
|
||||||
|
/**
|
||||||
*按钮的尺寸
|
*按钮的尺寸
|
||||||
*/
|
*/
|
||||||
enum btnSize {
|
enum btnSize {
|
||||||
|
@ -5216,6 +5288,11 @@ icon: string
|
||||||
*/
|
*/
|
||||||
id: string
|
id: string
|
||||||
/**
|
/**
|
||||||
|
*设计模式下是否拖拽释放时候创建的组件
|
||||||
|
有些组件需要区分这个,来增加默认值
|
||||||
|
*/
|
||||||
|
isDropCreate: boolean
|
||||||
|
/**
|
||||||
*子组件数组
|
*子组件数组
|
||||||
*/
|
*/
|
||||||
items: ComponentBase[]
|
items: ComponentBase[]
|
||||||
|
@ -5446,6 +5523,11 @@ id: string
|
||||||
*/
|
*/
|
||||||
inpuElemId: string
|
inpuElemId: string
|
||||||
/**
|
/**
|
||||||
|
*设计模式下是否拖拽释放时候创建的组件
|
||||||
|
有些组件需要区分这个,来增加默认值
|
||||||
|
*/
|
||||||
|
isDropCreate: boolean
|
||||||
|
/**
|
||||||
*是否权限资源
|
*是否权限资源
|
||||||
true可以在用户权限内看到改资源的控制,false 则看不到资源
|
true可以在用户权限内看到改资源的控制,false 则看不到资源
|
||||||
*/
|
*/
|
||||||
|
@ -5804,7 +5886,7 @@ addMataRow(rows: Row[]): void
|
||||||
addRow(rows: Row[]): Row[]
|
addRow(rows: Row[]): Row[]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据数据对象新增数据行 会被记录到modified里
|
* 根据数据数组新增数据行 会被记录到modified里
|
||||||
* @param datas 数据对象数组 如:ds.addRowDatas([{field1:value1,field2:value2,field3:value3,field4:value4...}])
|
* @param datas 数据对象数组 如:ds.addRowDatas([{field1:value1,field2:value2,field3:value3,field4:value4...}])
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@ -6463,6 +6545,11 @@ hitTitle: string
|
||||||
*/
|
*/
|
||||||
id: string
|
id: string
|
||||||
/**
|
/**
|
||||||
|
*设计模式下是否拖拽释放时候创建的组件
|
||||||
|
有些组件需要区分这个,来增加默认值
|
||||||
|
*/
|
||||||
|
isDropCreate: boolean
|
||||||
|
/**
|
||||||
*子组件数组
|
*子组件数组
|
||||||
*/
|
*/
|
||||||
items: ComponentBase[]
|
items: ComponentBase[]
|
||||||
|
@ -7112,7 +7199,7 @@ endEdit(): void
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取数据值
|
* 获取数据值
|
||||||
* @param fieldName 字段名* @returns 返回当前行的字段的值;受format 影响.如果field的设置的格式则反回格式化的值(对于时间/数字类型回如果设置了format只会返回string) 否则返回最相应的数据类型的值.
|
* @param fieldName 字段名* @returns 返回当前行的字段的值;受format 影响.如果field的设置的格式则反回格式化的值(对于时间/数字类型回如果设置了format只会返回string) 否则返回原始的数据类型的值.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
get(fieldName: string): any
|
get(fieldName: string): any
|
||||||
|
@ -7176,6 +7263,13 @@ getKeys(): string[]
|
||||||
*/
|
*/
|
||||||
getOriginalData(): object
|
getOriginalData(): object
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回行的原始数据,不受format的影响
|
||||||
|
* @param fieldName 字段名* @returns 返回当前行的字段的值.不受format 影响.
|
||||||
|
|
||||||
|
*/
|
||||||
|
getRaw(fieldName: string): any
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取原始数据
|
* 获取原始数据
|
||||||
* @returns 原始数据
|
* @returns 原始数据
|
||||||
|
@ -7720,6 +7814,11 @@ hitTitle: string
|
||||||
*/
|
*/
|
||||||
id: string
|
id: string
|
||||||
/**
|
/**
|
||||||
|
*设计模式下是否拖拽释放时候创建的组件
|
||||||
|
有些组件需要区分这个,来增加默认值
|
||||||
|
*/
|
||||||
|
isDropCreate: boolean
|
||||||
|
/**
|
||||||
*子组件数组
|
*子组件数组
|
||||||
*/
|
*/
|
||||||
items: ComponentBase[]
|
items: ComponentBase[]
|
||||||
|
@ -7902,8 +8001,9 @@ $elemt: JQuery<any>
|
||||||
active: boolean
|
active: boolean
|
||||||
/**
|
/**
|
||||||
*弹出框的大小
|
*弹出框的大小
|
||||||
|
['100','200'] 或者 area: ['100%','200%'] 或者 area: '100' 或者 area: ['calc(100%-100px)','calc(100%-100px)']
|
||||||
*/
|
*/
|
||||||
area: string
|
area: string | string[]
|
||||||
/**
|
/**
|
||||||
*背景色
|
*背景色
|
||||||
*/
|
*/
|
||||||
|
@ -7973,6 +8073,11 @@ id: string
|
||||||
*/
|
*/
|
||||||
idField: string
|
idField: string
|
||||||
/**
|
/**
|
||||||
|
*设计模式下是否拖拽释放时候创建的组件
|
||||||
|
有些组件需要区分这个,来增加默认值
|
||||||
|
*/
|
||||||
|
isDropCreate: boolean
|
||||||
|
/**
|
||||||
*能是否启用分页
|
*能是否启用分页
|
||||||
默认值: "false",不启用分页,注意如果不启用分页而limit又太小的话,就会发生展示部分数据的现象
|
默认值: "false",不启用分页,注意如果不启用分页而limit又太小的话,就会发生展示部分数据的现象
|
||||||
*/
|
*/
|
||||||
|
@ -8260,8 +8365,9 @@ $elemt: JQuery<any>
|
||||||
active: boolean
|
active: boolean
|
||||||
/**
|
/**
|
||||||
*弹出框的大小
|
*弹出框的大小
|
||||||
|
['100','200'] 或者 area: ['100%','200%'] 或者 area: '100' 或者 area: ['calc(100%-100px)','calc(100%-100px)']
|
||||||
*/
|
*/
|
||||||
area: string
|
area: string | string[]
|
||||||
/**
|
/**
|
||||||
*背景色
|
*背景色
|
||||||
*/
|
*/
|
||||||
|
@ -8330,6 +8436,11 @@ id: string
|
||||||
*/
|
*/
|
||||||
idField: string
|
idField: string
|
||||||
/**
|
/**
|
||||||
|
*设计模式下是否拖拽释放时候创建的组件
|
||||||
|
有些组件需要区分这个,来增加默认值
|
||||||
|
*/
|
||||||
|
isDropCreate: boolean
|
||||||
|
/**
|
||||||
*能是否启用分页
|
*能是否启用分页
|
||||||
默认值: "false",不启用分页,注意如果不启用分页而limit又太小的话,就会发生展示部分数据的现象
|
默认值: "false",不启用分页,注意如果不启用分页而limit又太小的话,就会发生展示部分数据的现象
|
||||||
*/
|
*/
|
||||||
|
@ -8512,8 +8623,9 @@ $elemt: JQuery<any>
|
||||||
active: boolean
|
active: boolean
|
||||||
/**
|
/**
|
||||||
*弹出框的大小
|
*弹出框的大小
|
||||||
|
['100','200'] 或者 area: ['100%','200%'] 或者 area: '100' 或者 area: ['calc(100%-100px)','calc(100%-100px)']
|
||||||
*/
|
*/
|
||||||
area: string
|
area: string | string[]
|
||||||
/**
|
/**
|
||||||
*背景色
|
*背景色
|
||||||
*/
|
*/
|
||||||
|
@ -8583,6 +8695,11 @@ id: string
|
||||||
*/
|
*/
|
||||||
idField: string
|
idField: string
|
||||||
/**
|
/**
|
||||||
|
*设计模式下是否拖拽释放时候创建的组件
|
||||||
|
有些组件需要区分这个,来增加默认值
|
||||||
|
*/
|
||||||
|
isDropCreate: boolean
|
||||||
|
/**
|
||||||
*能是否启用分页
|
*能是否启用分页
|
||||||
默认值: "false",不启用分页,注意如果不启用分页而limit又太小的话,就会发生展示部分数据的现象
|
默认值: "false",不启用分页,注意如果不启用分页而limit又太小的话,就会发生展示部分数据的现象
|
||||||
*/
|
*/
|
||||||
|
@ -8734,8 +8851,9 @@ $elemt: JQuery<any>
|
||||||
active: boolean
|
active: boolean
|
||||||
/**
|
/**
|
||||||
*弹出框的大小
|
*弹出框的大小
|
||||||
|
['100','200'] 或者 area: ['100%','200%'] 或者 area: '100' 或者 area: ['calc(100%-100px)','calc(100%-100px)']
|
||||||
*/
|
*/
|
||||||
area: string
|
area: string | string[]
|
||||||
/**
|
/**
|
||||||
*背景色
|
*背景色
|
||||||
*/
|
*/
|
||||||
|
@ -8804,6 +8922,11 @@ id: string
|
||||||
*/
|
*/
|
||||||
idField: string
|
idField: string
|
||||||
/**
|
/**
|
||||||
|
*设计模式下是否拖拽释放时候创建的组件
|
||||||
|
有些组件需要区分这个,来增加默认值
|
||||||
|
*/
|
||||||
|
isDropCreate: boolean
|
||||||
|
/**
|
||||||
*能是否启用分页
|
*能是否启用分页
|
||||||
默认值: "false",不启用分页,注意如果不启用分页而limit又太小的话,就会发生展示部分数据的现象
|
默认值: "false",不启用分页,注意如果不启用分页而limit又太小的话,就会发生展示部分数据的现象
|
||||||
*/
|
*/
|
||||||
|
@ -9003,6 +9126,11 @@ hitTitle: string
|
||||||
*/
|
*/
|
||||||
id: string
|
id: string
|
||||||
/**
|
/**
|
||||||
|
*设计模式下是否拖拽释放时候创建的组件
|
||||||
|
有些组件需要区分这个,来增加默认值
|
||||||
|
*/
|
||||||
|
isDropCreate: boolean
|
||||||
|
/**
|
||||||
*是否权限资源
|
*是否权限资源
|
||||||
true可以在用户权限内看到改资源的控制,false 则看不到资源
|
true可以在用户权限内看到改资源的控制,false 则看不到资源
|
||||||
*/
|
*/
|
||||||
|
@ -9269,6 +9397,11 @@ hitTitle: string
|
||||||
*/
|
*/
|
||||||
id: string
|
id: string
|
||||||
/**
|
/**
|
||||||
|
*设计模式下是否拖拽释放时候创建的组件
|
||||||
|
有些组件需要区分这个,来增加默认值
|
||||||
|
*/
|
||||||
|
isDropCreate: boolean
|
||||||
|
/**
|
||||||
*是否权限资源
|
*是否权限资源
|
||||||
true可以在用户权限内看到改资源的控制,false 则看不到资源
|
true可以在用户权限内看到改资源的控制,false 则看不到资源
|
||||||
*/
|
*/
|
||||||
|
@ -12791,6 +12924,15 @@ static asyncAjax(url: string,metho: MethodType,param: any,callBackFunc: any,show
|
||||||
*/
|
*/
|
||||||
static autoFill(frmElem: HTMLElement,data: string[],options: object): void
|
static autoFill(frmElem: HTMLElement,data: string[],options: object): void
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消息广播发送到各个iframe 全局发送
|
||||||
|
* @param cmpId 目标组件ID或者组件实例
|
||||||
|
* @param msgName 消息常量值
|
||||||
|
* @param params 参数
|
||||||
|
|
||||||
|
*/
|
||||||
|
static broadcast(cmpId: string | IComponent,msgName: string,params: any): void
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关闭指定的弹出层
|
* 关闭指定的弹出层
|
||||||
* @param index 层的唯一索引
|
* @param index 层的唯一索引
|
||||||
|
@ -14890,7 +15032,7 @@ bindAction: string | JQuery<any>
|
||||||
data: string
|
data: string
|
||||||
/**
|
/**
|
||||||
*允许上传的文件后缀。一般结合 accept 参数类设定
|
*允许上传的文件后缀。一般结合 accept 参数类设定
|
||||||
exts: 'zip|rar|7z' 即代表只允许上传压缩格式的文件。如果 accept 未设定,那么限制的就是图片的文件格式
|
只允许上传压缩格式的文件:'zip$|rar$|7z$' ;只允许上传图片: jpg$|png$|gif$|bmp$|jpeg$
|
||||||
*/
|
*/
|
||||||
exts: string
|
exts: string
|
||||||
/**
|
/**
|
||||||
|
@ -17406,16 +17548,96 @@ cfWanc = 5
|
||||||
class WorkFlow extends InvisibleBase {
|
class WorkFlow extends InvisibleBase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审核关联数据源当前行的流程
|
* 审核关联数据源当前行的流程.
|
||||||
* @param finishCallBack 完成回调
|
注意:这个函数只是在行上打上审批流程标记并没有提交到后台,需要关联的数据源提交才算真正的审批成功,
|
||||||
|
如果需要立刻提交后台的审批流程的函数使用 confirmAndPostByRow 来直接审批流程.
|
||||||
|
当审配与数据修改需要在同一个事务内的时候可以使用该函数
|
||||||
|
* @param finishCallBack 完成回调 function (audFlag, audName, auditMemo, error) 如果 error是非空说明有错误发生.
|
||||||
|
|
||||||
|
例如:
|
||||||
|
```javascript
|
||||||
|
function Button13_onClickScript(cxt: ScriptContext, btn: Button) {
|
||||||
|
btn.getPage().components.WorkFlow1.confirm(function (audFlag, auditMemo, error) {
|
||||||
|
if (Common.isNotEmpty(error)) {
|
||||||
|
Common.errorMsg(error);
|
||||||
|
} else {
|
||||||
|
btn.getPage().components.WorkFlow1.getDataSource().post(function (err) {
|
||||||
|
if(Common.isNotEmpty(err)){
|
||||||
|
Common.errorMsg(err);
|
||||||
|
}else{
|
||||||
|
Common.successMsg('审批完成');
|
||||||
|
btn.getPage().components.Table1.loadData();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
*/
|
*/
|
||||||
confirm(finishCallBack: WorkflowCallBack): void
|
confirm(finishCallBack: WorkflowCallBack): void
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审核指定行的流程
|
* 通过行直接审核行并提交到后台.
|
||||||
|
当启动流程与数据修改不需要在一个事务内的时候可以使用该函数;
|
||||||
|
当审配与数据修改不需要在同一个事务内的时候可以使用该函数;
|
||||||
|
* @param row 需要审核的行
|
||||||
|
* @param finishCallBack 完成回调 function (audFlag, audName, auditMemo, error) 如果 error是非空说明有错误发生.
|
||||||
|
|
||||||
|
例如:
|
||||||
|
```javascript
|
||||||
|
function Button13_onClickScript(cxt: ScriptContext, btn: Button) {
|
||||||
|
var rows = btn.getPage().components.Table1.getChecks();
|
||||||
|
if (rows.length == 0) {
|
||||||
|
Common.warnMsg('请选择行');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
btn.getPage().components.WorkFlow1.confirmAndPostByRow(rows[0], function (audFlag, auditMemo, error) {
|
||||||
|
if (Common.isNotEmpty(error)) {
|
||||||
|
Common.errorMsg(error);
|
||||||
|
} else {
|
||||||
|
Common.successMsg('审批完成');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
*/
|
||||||
|
confirmAndPostByRow(row: Row,finishCallBack: WorkflowCallBack): void
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核指定行的流程.
|
||||||
|
注意:这个函数只是在行上打上审批标记并没有提交到后台,需要关联的数据源提交才算真正的启动成功,
|
||||||
|
如果需要立刻提交后台的审批流程的函数使用 confirmAndPostByRow 来直接审批流程.
|
||||||
|
当审配与数据修改需要在同一个事务内的时候可以使用该函数.
|
||||||
* @param row 行
|
* @param row 行
|
||||||
* @param finishCallBack 审核完成的事件回调
|
* @param finishCallBack 审核完成的事件回调 function (audFlag, audName, auditMemo, error) 如果 error是非空说明有错误发生.
|
||||||
|
|
||||||
|
例如:
|
||||||
|
```javascript
|
||||||
|
function Button13_onClickScript(cxt: ScriptContext, btn: Button) {
|
||||||
|
var rows = btn.getPage().components.Table1.getChecks();
|
||||||
|
if (rows.length == 0) {
|
||||||
|
Common.warnMsg('请选择行');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
btn.getPage().components.WorkFlow1.confirmByRow(rows[0], function (audFlag, auditMemo, error) {
|
||||||
|
if (Common.isNotEmpty(error)) {
|
||||||
|
Common.errorMsg(error);
|
||||||
|
} else {
|
||||||
|
btn.getPage().components.WorkFlow1.getDataSource().post(function (err) {
|
||||||
|
if(Common.isNotEmpty(err)){
|
||||||
|
Common.errorMsg(err);
|
||||||
|
}else{
|
||||||
|
Common.successMsg('审批完成');
|
||||||
|
btn.getPage().components.Table1.loadData();
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
*/
|
*/
|
||||||
confirmByRow(row: Row,finishCallBack: WorkflowCallBack): void
|
confirmByRow(row: Row,finishCallBack: WorkflowCallBack): void
|
||||||
|
@ -17461,16 +17683,98 @@ getToDoList(): void
|
||||||
getWorkFlowPic(processId: string): void
|
getWorkFlowPic(processId: string): void
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启动关联的数据源的当前行的流程
|
* 启动关联的数据源的当前行的流程.
|
||||||
* @param finishCallBack 完成回调函数
|
当启动流程与数据修改需要在同一个事务内的时候可以使用该函数.
|
||||||
|
* @param finishCallBack 完成回调函数 function (audFlag, audName, auditMemo, error) 如果 error是非空说明有错误发生.
|
||||||
|
|
||||||
|
例如:
|
||||||
|
```javascript
|
||||||
|
function Button13_onClickScript(cxt: ScriptContext, btn: Button) {
|
||||||
|
var rows = btn.getPage().components.Table1.getChecks();
|
||||||
|
if (rows.length == 0) {
|
||||||
|
Common.warnMsg('请选择行');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
btn.getPage().components.WorkFlow1.start(function (audFlag, auditMemo, error) {
|
||||||
|
if (Common.isNotEmpty(error)) {
|
||||||
|
Common.errorMsg(error);
|
||||||
|
} else {
|
||||||
|
btn.getPage().components.WorkFlow1.getDataSource().post(function (err) {
|
||||||
|
if(Common.isNotEmpty(err)){
|
||||||
|
Common.errorMsg(err);
|
||||||
|
}else{
|
||||||
|
Common.successMsg('流程启动成功');
|
||||||
|
btn.getPage().components.Table1.loadData();
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
*/
|
*/
|
||||||
start(finishCallBack: WorkflowCallBack): void
|
start(finishCallBack: WorkflowCallBack): void
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启动指定行的流程
|
* 通过行直接启动流程并提交到后台.
|
||||||
|
当启动流程与数据修改不需要在一个事务内的时候可以使用该函数.
|
||||||
|
* @param row 需要启动流程的行
|
||||||
|
* @param finishCallBack 完成回调; function (audFlag, audName, auditMemo, error) 如果 error是非空说明有错误发生.
|
||||||
|
|
||||||
|
例如:
|
||||||
|
```javascript
|
||||||
|
function Button13_onClickScript(cxt: ScriptContext, btn: Button) {
|
||||||
|
var rows = btn.getPage().components.Table1.getChecks();
|
||||||
|
if (rows.length == 0) {
|
||||||
|
Common.warnMsg('请选择行');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
btn.getPage().components.WorkFlow1.startAndPostByRow(rows[0], function (audFlag, auditMemo, error) {
|
||||||
|
if (Common.isNotEmpty(error)) {
|
||||||
|
Common.errorMsg(error);
|
||||||
|
} else
|
||||||
|
Common.successMsg('流程启动成功');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
*/
|
||||||
|
startAndPostByRow(row: Row,finishCallBack: WorkflowCallBack): void
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 启动指定行的流程;
|
||||||
|
注意:这个函数只是在行上打上启动流程标记并没有提交到后台,需要关联的数据源提交才算真正的启动成功,
|
||||||
|
如果需要立刻提交后台的启动流程的函数使用 startAndPostByRow 来直接发起流程.
|
||||||
|
当启动流程与数据修改需要在同一个事务内的时候可以使用该函数.
|
||||||
* @param row 行
|
* @param row 行
|
||||||
* @param finishCallBack 完成的回调函数
|
* @param finishCallBack 完成的回调函数 function (audFlag, audName, auditMemo, error) 如果 error是非空说明有错误发生
|
||||||
|
|
||||||
|
例如:
|
||||||
|
```javascript
|
||||||
|
function Button13_onClickScript(cxt: ScriptContext, btn: Button) {
|
||||||
|
var rows = btn.getPage().components.Table1.getChecks();
|
||||||
|
if (rows.length == 0) {
|
||||||
|
Common.warnMsg('请选择行');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
btn.getPage().components.WorkFlow1.startByRow(rows[0], function (audFlag, auditMemo, error) {
|
||||||
|
if (Common.isNotEmpty(error)) {
|
||||||
|
Common.errorMsg(error);
|
||||||
|
} else {
|
||||||
|
btn.getPage().components.WorkFlow1.getDataSource().post(function (err) {
|
||||||
|
if(Common.isNotEmpty(err)){
|
||||||
|
Common.errorMsg(err);
|
||||||
|
}else{
|
||||||
|
Common.successMsg('流程启动成功');
|
||||||
|
btn.getPage().components.Table1.loadData();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
*/
|
*/
|
||||||
startByRow(row: Row,finishCallBack: WorkflowCallBack): void
|
startByRow(row: Row,finishCallBack: WorkflowCallBack): void
|
||||||
|
|
|
@ -316,6 +316,8 @@ layui.define('layer', function (exports) {
|
||||||
//初始选中样式
|
//初始选中样式
|
||||||
dds.eq(index).addClass(THIS).siblings().removeClass(THIS);
|
dds.eq(index).addClass(THIS).siblings().removeClass(THIS);
|
||||||
|
|
||||||
|
layui.getZindex && (dl[0].style.zIndex = layui.getZindex());
|
||||||
|
|
||||||
//上下定位识别
|
//上下定位识别
|
||||||
if (top + dlHeight > $win.height() && top >= dlHeight) {
|
if (top + dlHeight > $win.height() && top >= dlHeight) {
|
||||||
reElem.addClass(CLASS + 'up');
|
reElem.addClass(CLASS + 'up');
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
//异常提示
|
//异常提示
|
||||||
, log = function (msg) {
|
, log = function (msg) {
|
||||||
win.console && console.log ; //console.log('Layui hint: ' + msg);
|
win.console && console.log; //console.log('Layui hint: ' + msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
, isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]'
|
, isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]'
|
||||||
|
@ -515,7 +515,16 @@
|
||||||
|
|
||||||
return Layui.event(modName, events, null, callback);
|
return Layui.event(modName, events, null, callback);
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* 得到一个最近的zIndex
|
||||||
|
*/
|
||||||
|
Layui.prototype.getZindex = function () {
|
||||||
|
if (window['Common'] && window['Common'].generalSeri) {
|
||||||
|
return window['Common'].generalSeri(1);
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
//执行自定义模块事件
|
//执行自定义模块事件
|
||||||
Layui.prototype.event = Layui.event = function (modName, events, params, fn) {
|
Layui.prototype.event = Layui.event = function (modName, events, params, fn) {
|
||||||
var that = this
|
var that = this
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||||
|
<title></title>
|
||||||
|
<style type="text/css">
|
||||||
|
*{color: #838383;margin: 0;padding: 0}
|
||||||
|
html,body {font-size: 12px;overflow: hidden; }
|
||||||
|
.content{padding:5px 0 0 15px;}
|
||||||
|
input{width:210px;height:21px;line-height:21px;margin-left: 4px;}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="content">
|
||||||
|
<span><var id="lang_input_anchorName"></var></span><input id="anchorName" value="" />
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript" src="../internal.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var anchorInput = $G('anchorName'),
|
||||||
|
node = editor.selection.getRange().getClosedNode();
|
||||||
|
if(node && node.tagName == 'IMG' && (node = node.getAttribute('anchorname'))){
|
||||||
|
anchorInput.value = node;
|
||||||
|
}
|
||||||
|
anchorInput.onkeydown = function(evt){
|
||||||
|
evt = evt || window.event;
|
||||||
|
if(evt.keyCode == 13){
|
||||||
|
editor.execCommand('anchor', anchorInput.value);
|
||||||
|
dialog.close();
|
||||||
|
domUtils.preventDefault(evt)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
dialog.onok = function (){
|
||||||
|
editor.execCommand('anchor', anchorInput.value);
|
||||||
|
dialog.close();
|
||||||
|
};
|
||||||
|
$focus(anchorInput);
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,681 @@
|
||||||
|
@charset "utf-8";
|
||||||
|
/* dialog样式 */
|
||||||
|
.wrapper {
|
||||||
|
zoom: 1;
|
||||||
|
width: 630px;
|
||||||
|
*width: 626px;
|
||||||
|
height: 380px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 10px;
|
||||||
|
position: relative;
|
||||||
|
font-family: sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*tab样式框大小*/
|
||||||
|
.tabhead {
|
||||||
|
float:left;
|
||||||
|
}
|
||||||
|
.tabbody {
|
||||||
|
width: 100%;
|
||||||
|
height: 346px;
|
||||||
|
position: relative;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabbody .panel {
|
||||||
|
position: absolute;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
background: #fff;
|
||||||
|
overflow: hidden;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabbody .panel.focus {
|
||||||
|
width: 100%;
|
||||||
|
height: 346px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 上传附件 */
|
||||||
|
.tabbody #upload.panel {
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
position: absolute !important;
|
||||||
|
clip: rect(1px, 1px, 1px, 1px);
|
||||||
|
background: #fff;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabbody #upload.panel.focus {
|
||||||
|
width: 100%;
|
||||||
|
height: 346px;
|
||||||
|
display: block;
|
||||||
|
clip: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .queueList {
|
||||||
|
margin: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.element-invisible {
|
||||||
|
width: 0 !important;
|
||||||
|
height: 0 !important;
|
||||||
|
border: 0;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
position: absolute !important;
|
||||||
|
clip: rect(1px, 1px, 1px, 1px);
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .placeholder {
|
||||||
|
margin: 10px;
|
||||||
|
border: 2px dashed #e6e6e6;
|
||||||
|
*border: 0px dashed #e6e6e6;
|
||||||
|
height: 172px;
|
||||||
|
padding-top: 150px;
|
||||||
|
text-align: center;
|
||||||
|
background: url(./images/image.png) center 70px no-repeat;
|
||||||
|
color: #cccccc;
|
||||||
|
font-size: 18px;
|
||||||
|
position: relative;
|
||||||
|
top:0;
|
||||||
|
*top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .placeholder .webuploader-pick {
|
||||||
|
font-size: 18px;
|
||||||
|
background: #00b7ee;
|
||||||
|
border-radius: 3px;
|
||||||
|
line-height: 44px;
|
||||||
|
padding: 0 30px;
|
||||||
|
*width: 120px;
|
||||||
|
color: #fff;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 auto 20px auto;
|
||||||
|
cursor: pointer;
|
||||||
|
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .placeholder .webuploader-pick-hover {
|
||||||
|
background: #00a2d4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#filePickerContainer {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .placeholder .flashTip {
|
||||||
|
color: #666666;
|
||||||
|
font-size: 12px;
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .placeholder .flashTip a {
|
||||||
|
color: #0785d1;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .placeholder .flashTip a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .placeholder.webuploader-dnd-over {
|
||||||
|
border-color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .filelist {
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
position: relative;
|
||||||
|
height: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .filelist:after {
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .filelist li {
|
||||||
|
width: 113px;
|
||||||
|
height: 113px;
|
||||||
|
background: url(./images/bg.png);
|
||||||
|
text-align: center;
|
||||||
|
margin: 9px 0 0 9px;
|
||||||
|
*margin: 6px 0 0 6px;
|
||||||
|
position: relative;
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
overflow: hidden;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .filelist li p.log {
|
||||||
|
position: relative;
|
||||||
|
top: -45px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .filelist li p.title {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
top: 5px;
|
||||||
|
text-indent: 5px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .filelist li p.progress {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
height: 8px;
|
||||||
|
overflow: hidden;
|
||||||
|
z-index: 50;
|
||||||
|
margin: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
background: none;
|
||||||
|
-webkit-box-shadow: 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .filelist li p.progress span {
|
||||||
|
display: none;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 0;
|
||||||
|
height: 100%;
|
||||||
|
background: #1483d8 url(./images/progress.png) repeat-x;
|
||||||
|
|
||||||
|
-webit-transition: width 200ms linear;
|
||||||
|
-moz-transition: width 200ms linear;
|
||||||
|
-o-transition: width 200ms linear;
|
||||||
|
-ms-transition: width 200ms linear;
|
||||||
|
transition: width 200ms linear;
|
||||||
|
|
||||||
|
-webkit-animation: progressmove 2s linear infinite;
|
||||||
|
-moz-animation: progressmove 2s linear infinite;
|
||||||
|
-o-animation: progressmove 2s linear infinite;
|
||||||
|
-ms-animation: progressmove 2s linear infinite;
|
||||||
|
animation: progressmove 2s linear infinite;
|
||||||
|
|
||||||
|
-webkit-transform: translateZ(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes progressmove {
|
||||||
|
0% {
|
||||||
|
background-position: 0 0;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
background-position: 17px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@-moz-keyframes progressmove {
|
||||||
|
0% {
|
||||||
|
background-position: 0 0;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
background-position: 17px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes progressmove {
|
||||||
|
0% {
|
||||||
|
background-position: 0 0;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
background-position: 17px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .filelist li p.imgWrap {
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
line-height: 113px;
|
||||||
|
vertical-align: middle;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 113px;
|
||||||
|
height: 113px;
|
||||||
|
|
||||||
|
-webkit-transform-origin: 50% 50%;
|
||||||
|
-moz-transform-origin: 50% 50%;
|
||||||
|
-o-transform-origin: 50% 50%;
|
||||||
|
-ms-transform-origin: 50% 50%;
|
||||||
|
transform-origin: 50% 50%;
|
||||||
|
|
||||||
|
-webit-transition: 200ms ease-out;
|
||||||
|
-moz-transition: 200ms ease-out;
|
||||||
|
-o-transition: 200ms ease-out;
|
||||||
|
-ms-transition: 200ms ease-out;
|
||||||
|
transition: 200ms ease-out;
|
||||||
|
}
|
||||||
|
#upload .filelist li p.imgWrap.notimage {
|
||||||
|
margin-top: 0;
|
||||||
|
width: 111px;
|
||||||
|
height: 111px;
|
||||||
|
border: 1px #eeeeee solid;
|
||||||
|
}
|
||||||
|
#upload .filelist li p.imgWrap.notimage i.file-preview {
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .filelist li img {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .filelist li p.error {
|
||||||
|
background: #f43838;
|
||||||
|
color: #fff;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
height: 28px;
|
||||||
|
line-height: 28px;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 100;
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .filelist li .success {
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
height: 40px;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 200;
|
||||||
|
background: url(./images/success.png) no-repeat right bottom;
|
||||||
|
background-image: url(./images/success.gif) \9;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .filelist li.filePickerBlock {
|
||||||
|
width: 113px;
|
||||||
|
height: 113px;
|
||||||
|
background: url(./images/image.png) no-repeat center 12px;
|
||||||
|
border: 1px solid #eeeeee;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
#upload .filelist li.filePickerBlock div.webuploader-pick {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
opacity: 0;
|
||||||
|
background: none;
|
||||||
|
font-size: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .filelist div.file-panel {
|
||||||
|
position: absolute;
|
||||||
|
height: 0;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#80000000', endColorstr='#80000000') \0;
|
||||||
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
width: 100%;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
z-index: 300;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .filelist div.file-panel span {
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
display: inline;
|
||||||
|
float: right;
|
||||||
|
text-indent: -9999px;
|
||||||
|
overflow: hidden;
|
||||||
|
background: url(./images/icons.png) no-repeat;
|
||||||
|
background: url(./images/icons.gif) no-repeat \9;
|
||||||
|
margin: 5px 1px 1px;
|
||||||
|
cursor: pointer;
|
||||||
|
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .filelist div.file-panel span.rotateLeft {
|
||||||
|
display:none;
|
||||||
|
background-position: 0 -24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .filelist div.file-panel span.rotateLeft:hover {
|
||||||
|
background-position: 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .filelist div.file-panel span.rotateRight {
|
||||||
|
display:none;
|
||||||
|
background-position: -24px -24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .filelist div.file-panel span.rotateRight:hover {
|
||||||
|
background-position: -24px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .filelist div.file-panel span.cancel {
|
||||||
|
background-position: -48px -24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .filelist div.file-panel span.cancel:hover {
|
||||||
|
background-position: -48px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .statusBar {
|
||||||
|
height: 45px;
|
||||||
|
border-bottom: 1px solid #dadada;
|
||||||
|
margin: 0 10px;
|
||||||
|
padding: 0;
|
||||||
|
line-height: 45px;
|
||||||
|
vertical-align: middle;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .statusBar .progress {
|
||||||
|
border: 1px solid #1483d8;
|
||||||
|
width: 198px;
|
||||||
|
background: #fff;
|
||||||
|
height: 18px;
|
||||||
|
position: absolute;
|
||||||
|
top: 12px;
|
||||||
|
display: none;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 18px;
|
||||||
|
color: #6dbfff;
|
||||||
|
margin: 0 10px 0 0;
|
||||||
|
}
|
||||||
|
#upload .statusBar .progress span.percentage {
|
||||||
|
width: 0;
|
||||||
|
height: 100%;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
background: #1483d8;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
#upload .statusBar .progress span.text {
|
||||||
|
position: relative;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .statusBar .info {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #666666;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .statusBar .btns {
|
||||||
|
position: absolute;
|
||||||
|
top: 7px;
|
||||||
|
right: 0;
|
||||||
|
line-height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#filePickerBtn {
|
||||||
|
display: inline-block;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
#upload .statusBar .btns .webuploader-pick,
|
||||||
|
#upload .statusBar .btns .uploadBtn,
|
||||||
|
#upload .statusBar .btns .uploadBtn.state-uploading,
|
||||||
|
#upload .statusBar .btns .uploadBtn.state-paused {
|
||||||
|
background: #ffffff;
|
||||||
|
border: 1px solid #cfcfcf;
|
||||||
|
color: #565656;
|
||||||
|
padding: 0 18px;
|
||||||
|
display: inline-block;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin-left: 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 14px;
|
||||||
|
float: left;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
#upload .statusBar .btns .webuploader-pick-hover,
|
||||||
|
#upload .statusBar .btns .uploadBtn:hover,
|
||||||
|
#upload .statusBar .btns .uploadBtn.state-uploading:hover,
|
||||||
|
#upload .statusBar .btns .uploadBtn.state-paused:hover {
|
||||||
|
background: #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .statusBar .btns .uploadBtn,
|
||||||
|
#upload .statusBar .btns .uploadBtn.state-paused{
|
||||||
|
background: #00b7ee;
|
||||||
|
color: #fff;
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
#upload .statusBar .btns .uploadBtn:hover,
|
||||||
|
#upload .statusBar .btns .uploadBtn.state-paused:hover{
|
||||||
|
background: #00a2d4;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload .statusBar .btns .uploadBtn.disabled {
|
||||||
|
pointer-events: none;
|
||||||
|
filter:alpha(opacity=60);
|
||||||
|
-moz-opacity:0.6;
|
||||||
|
-khtml-opacity: 0.6;
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* 图片管理样式 */
|
||||||
|
#online {
|
||||||
|
width: 100%;
|
||||||
|
height: 336px;
|
||||||
|
padding: 10px 0 0 0;
|
||||||
|
}
|
||||||
|
#online #fileList{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
#online ul {
|
||||||
|
display: block;
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
#online li {
|
||||||
|
float: left;
|
||||||
|
display: block;
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
width: 113px;
|
||||||
|
height: 113px;
|
||||||
|
margin: 0 0 9px 9px;
|
||||||
|
*margin: 0 0 6px 6px;
|
||||||
|
background-color: #eee;
|
||||||
|
overflow: hidden;
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
#online li.clearFloat {
|
||||||
|
float: none;
|
||||||
|
clear: both;
|
||||||
|
display: block;
|
||||||
|
width:0;
|
||||||
|
height:0;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
#online li img {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
#online li div.file-wrapper {
|
||||||
|
cursor: pointer;
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
width: 111px;
|
||||||
|
height: 111px;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
background: url("./images/bg.png") repeat;
|
||||||
|
}
|
||||||
|
#online li div span.file-title{
|
||||||
|
display: block;
|
||||||
|
padding: 0 3px;
|
||||||
|
margin: 3px 0 0 0;
|
||||||
|
font-size: 12px;
|
||||||
|
height: 13px;
|
||||||
|
color: #555555;
|
||||||
|
text-align: center;
|
||||||
|
width: 107px;
|
||||||
|
white-space: nowrap;
|
||||||
|
word-break: break-all;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
#online li .icon {
|
||||||
|
cursor: pointer;
|
||||||
|
width: 113px;
|
||||||
|
height: 113px;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 2;
|
||||||
|
border: 0;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
#online li .icon:hover {
|
||||||
|
width: 107px;
|
||||||
|
height: 107px;
|
||||||
|
border: 3px solid #1094fa;
|
||||||
|
}
|
||||||
|
#online li.selected .icon {
|
||||||
|
background-image: url(images/success.png);
|
||||||
|
background-image: url(images/success.gif) \9;
|
||||||
|
background-position: 75px 75px;
|
||||||
|
}
|
||||||
|
#online li.selected .icon:hover {
|
||||||
|
width: 107px;
|
||||||
|
height: 107px;
|
||||||
|
border: 3px solid #1094fa;
|
||||||
|
background-position: 72px 72px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* 在线文件的文件预览图标 */
|
||||||
|
i.file-preview {
|
||||||
|
display: block;
|
||||||
|
margin: 10px auto;
|
||||||
|
width: 70px;
|
||||||
|
height: 70px;
|
||||||
|
background-image: url("./images/file-icons.png");
|
||||||
|
background-image: url("./images/file-icons.gif") \9;
|
||||||
|
background-position: -140px center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
i.file-preview.file-type-dir{
|
||||||
|
background-position: 0 center;
|
||||||
|
}
|
||||||
|
i.file-preview.file-type-file{
|
||||||
|
background-position: -140px center;
|
||||||
|
}
|
||||||
|
i.file-preview.file-type-filelist{
|
||||||
|
background-position: -210px center;
|
||||||
|
}
|
||||||
|
i.file-preview.file-type-zip,
|
||||||
|
i.file-preview.file-type-rar,
|
||||||
|
i.file-preview.file-type-7z,
|
||||||
|
i.file-preview.file-type-tar,
|
||||||
|
i.file-preview.file-type-gz,
|
||||||
|
i.file-preview.file-type-bz2{
|
||||||
|
background-position: -280px center;
|
||||||
|
}
|
||||||
|
i.file-preview.file-type-xls,
|
||||||
|
i.file-preview.file-type-xlsx{
|
||||||
|
background-position: -350px center;
|
||||||
|
}
|
||||||
|
i.file-preview.file-type-doc,
|
||||||
|
i.file-preview.file-type-docx{
|
||||||
|
background-position: -420px center;
|
||||||
|
}
|
||||||
|
i.file-preview.file-type-ppt,
|
||||||
|
i.file-preview.file-type-pptx{
|
||||||
|
background-position: -490px center;
|
||||||
|
}
|
||||||
|
i.file-preview.file-type-vsd{
|
||||||
|
background-position: -560px center;
|
||||||
|
}
|
||||||
|
i.file-preview.file-type-pdf{
|
||||||
|
background-position: -630px center;
|
||||||
|
}
|
||||||
|
i.file-preview.file-type-txt,
|
||||||
|
i.file-preview.file-type-md,
|
||||||
|
i.file-preview.file-type-json,
|
||||||
|
i.file-preview.file-type-htm,
|
||||||
|
i.file-preview.file-type-xml,
|
||||||
|
i.file-preview.file-type-html,
|
||||||
|
i.file-preview.file-type-js,
|
||||||
|
i.file-preview.file-type-css,
|
||||||
|
i.file-preview.file-type-php,
|
||||||
|
i.file-preview.file-type-jsp,
|
||||||
|
i.file-preview.file-type-asp{
|
||||||
|
background-position: -700px center;
|
||||||
|
}
|
||||||
|
i.file-preview.file-type-apk{
|
||||||
|
background-position: -770px center;
|
||||||
|
}
|
||||||
|
i.file-preview.file-type-exe{
|
||||||
|
background-position: -840px center;
|
||||||
|
}
|
||||||
|
i.file-preview.file-type-ipa{
|
||||||
|
background-position: -910px center;
|
||||||
|
}
|
||||||
|
i.file-preview.file-type-mp4,
|
||||||
|
i.file-preview.file-type-swf,
|
||||||
|
i.file-preview.file-type-mkv,
|
||||||
|
i.file-preview.file-type-avi,
|
||||||
|
i.file-preview.file-type-flv,
|
||||||
|
i.file-preview.file-type-mov,
|
||||||
|
i.file-preview.file-type-mpg,
|
||||||
|
i.file-preview.file-type-mpeg,
|
||||||
|
i.file-preview.file-type-ogv,
|
||||||
|
i.file-preview.file-type-webm,
|
||||||
|
i.file-preview.file-type-rm,
|
||||||
|
i.file-preview.file-type-rmvb{
|
||||||
|
background-position: -980px center;
|
||||||
|
}
|
||||||
|
i.file-preview.file-type-ogg,
|
||||||
|
i.file-preview.file-type-wav,
|
||||||
|
i.file-preview.file-type-wmv,
|
||||||
|
i.file-preview.file-type-mid,
|
||||||
|
i.file-preview.file-type-mp3{
|
||||||
|
background-position: -1050px center;
|
||||||
|
}
|
||||||
|
i.file-preview.file-type-jpg,
|
||||||
|
i.file-preview.file-type-jpeg,
|
||||||
|
i.file-preview.file-type-gif,
|
||||||
|
i.file-preview.file-type-bmp,
|
||||||
|
i.file-preview.file-type-png,
|
||||||
|
i.file-preview.file-type-psd{
|
||||||
|
background-position: -140px center;
|
||||||
|
}
|
|
@ -0,0 +1,60 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>ueditor图片对话框</title>
|
||||||
|
<script type="text/javascript" src="../internal.js"></script>
|
||||||
|
|
||||||
|
<!-- jquery -->
|
||||||
|
<script type="text/javascript" src="../../third-party/jquery-1.10.2.min.js"></script>
|
||||||
|
|
||||||
|
<!-- webuploader -->
|
||||||
|
<script src="../../third-party/webuploader/webuploader.min.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../../third-party/webuploader/webuploader.css">
|
||||||
|
|
||||||
|
<!-- attachment dialog -->
|
||||||
|
<link rel="stylesheet" href="attachment.css" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="wrapper">
|
||||||
|
<div id="tabhead" class="tabhead">
|
||||||
|
<span class="tab focus" data-content-id="upload"><var id="lang_tab_upload"></var></span>
|
||||||
|
<span class="tab" data-content-id="online"><var id="lang_tab_online"></var></span>
|
||||||
|
</div>
|
||||||
|
<div id="tabbody" class="tabbody">
|
||||||
|
<!-- 上传图片 -->
|
||||||
|
<div id="upload" class="panel focus">
|
||||||
|
<div id="queueList" class="queueList">
|
||||||
|
<div class="statusBar element-invisible">
|
||||||
|
<div class="progress">
|
||||||
|
<span class="text">0%</span>
|
||||||
|
<span class="percentage"></span>
|
||||||
|
</div><div class="info"></div>
|
||||||
|
<div class="btns">
|
||||||
|
<div id="filePickerBtn"></div>
|
||||||
|
<div class="uploadBtn"><var id="lang_start_upload"></var></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="dndArea" class="placeholder">
|
||||||
|
<div class="filePickerContainer">
|
||||||
|
<div id="filePickerReady"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<ul class="filelist element-invisible">
|
||||||
|
<li id="filePickerBlock" class="filePickerBlock"></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 在线图片 -->
|
||||||
|
<div id="online" class="panel">
|
||||||
|
<div id="fileList"><var id="lang_imgLoading"></var></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript" src="attachment.js"></script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,754 @@
|
||||||
|
/**
|
||||||
|
* User: Jinqn
|
||||||
|
* Date: 14-04-08
|
||||||
|
* Time: 下午16:34
|
||||||
|
* 上传图片对话框逻辑代码,包括tab: 远程图片/上传图片/在线图片/搜索图片
|
||||||
|
*/
|
||||||
|
|
||||||
|
(function () {
|
||||||
|
|
||||||
|
var uploadFile,
|
||||||
|
onlineFile;
|
||||||
|
|
||||||
|
window.onload = function () {
|
||||||
|
initTabs();
|
||||||
|
initButtons();
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 初始化tab标签 */
|
||||||
|
function initTabs() {
|
||||||
|
var tabs = $G('tabhead').children;
|
||||||
|
for (var i = 0; i < tabs.length; i++) {
|
||||||
|
domUtils.on(tabs[i], "click", function (e) {
|
||||||
|
var target = e.target || e.srcElement;
|
||||||
|
setTabFocus(target.getAttribute('data-content-id'));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
setTabFocus('upload');
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 初始化tabbody */
|
||||||
|
function setTabFocus(id) {
|
||||||
|
if(!id) return;
|
||||||
|
var i, bodyId, tabs = $G('tabhead').children;
|
||||||
|
for (i = 0; i < tabs.length; i++) {
|
||||||
|
bodyId = tabs[i].getAttribute('data-content-id')
|
||||||
|
if (bodyId == id) {
|
||||||
|
domUtils.addClass(tabs[i], 'focus');
|
||||||
|
domUtils.addClass($G(bodyId), 'focus');
|
||||||
|
} else {
|
||||||
|
domUtils.removeClasses(tabs[i], 'focus');
|
||||||
|
domUtils.removeClasses($G(bodyId), 'focus');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
switch (id) {
|
||||||
|
case 'upload':
|
||||||
|
uploadFile = uploadFile || new UploadFile('queueList');
|
||||||
|
break;
|
||||||
|
case 'online':
|
||||||
|
onlineFile = onlineFile || new OnlineFile('fileList');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 初始化onok事件 */
|
||||||
|
function initButtons() {
|
||||||
|
|
||||||
|
dialog.onok = function () {
|
||||||
|
var list = [], id, tabs = $G('tabhead').children;
|
||||||
|
for (var i = 0; i < tabs.length; i++) {
|
||||||
|
if (domUtils.hasClass(tabs[i], 'focus')) {
|
||||||
|
id = tabs[i].getAttribute('data-content-id');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (id) {
|
||||||
|
case 'upload':
|
||||||
|
list = uploadFile.getInsertList();
|
||||||
|
var count = uploadFile.getQueueCount();
|
||||||
|
if (count) {
|
||||||
|
$('.info', '#queueList').html('<span style="color:red;">' + '还有2个未上传文件'.replace(/[\d]/, count) + '</span>');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'online':
|
||||||
|
list = onlineFile.getInsertList();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
editor.execCommand('insertfile', list);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* 上传附件 */
|
||||||
|
function UploadFile(target) {
|
||||||
|
this.$wrap = target.constructor == String ? $('#' + target) : $(target);
|
||||||
|
this.init();
|
||||||
|
}
|
||||||
|
UploadFile.prototype = {
|
||||||
|
init: function () {
|
||||||
|
this.fileList = [];
|
||||||
|
this.initContainer();
|
||||||
|
this.initUploader();
|
||||||
|
},
|
||||||
|
initContainer: function () {
|
||||||
|
this.$queue = this.$wrap.find('.filelist');
|
||||||
|
},
|
||||||
|
/* 初始化容器 */
|
||||||
|
initUploader: function () {
|
||||||
|
var _this = this,
|
||||||
|
$ = jQuery, // just in case. Make sure it's not an other libaray.
|
||||||
|
$wrap = _this.$wrap,
|
||||||
|
// 图片容器
|
||||||
|
$queue = $wrap.find('.filelist'),
|
||||||
|
// 状态栏,包括进度和控制按钮
|
||||||
|
$statusBar = $wrap.find('.statusBar'),
|
||||||
|
// 文件总体选择信息。
|
||||||
|
$info = $statusBar.find('.info'),
|
||||||
|
// 上传按钮
|
||||||
|
$upload = $wrap.find('.uploadBtn'),
|
||||||
|
// 上传按钮
|
||||||
|
$filePickerBtn = $wrap.find('.filePickerBtn'),
|
||||||
|
// 上传按钮
|
||||||
|
$filePickerBlock = $wrap.find('.filePickerBlock'),
|
||||||
|
// 没选择文件之前的内容。
|
||||||
|
$placeHolder = $wrap.find('.placeholder'),
|
||||||
|
// 总体进度条
|
||||||
|
$progress = $statusBar.find('.progress').hide(),
|
||||||
|
// 添加的文件数量
|
||||||
|
fileCount = 0,
|
||||||
|
// 添加的文件总大小
|
||||||
|
fileSize = 0,
|
||||||
|
// 优化retina, 在retina下这个值是2
|
||||||
|
ratio = window.devicePixelRatio || 1,
|
||||||
|
// 缩略图大小
|
||||||
|
thumbnailWidth = 113 * ratio,
|
||||||
|
thumbnailHeight = 113 * ratio,
|
||||||
|
// 可能有pedding, ready, uploading, confirm, done.
|
||||||
|
state = '',
|
||||||
|
// 所有文件的进度信息,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,
|
||||||
|
actionUrl = editor.getActionUrl(editor.getOpt('fileActionName')),
|
||||||
|
fileMaxSize = editor.getOpt('fileMaxSize'),
|
||||||
|
acceptExtensions = (editor.getOpt('fileAllowFiles') || []).join('').replace(/\./g, ',').replace(/^[,]/, '');;
|
||||||
|
|
||||||
|
if (!WebUploader.Uploader.support()) {
|
||||||
|
$('#filePickerReady').after($('<div>').html(lang.errorNotSupport)).hide();
|
||||||
|
return;
|
||||||
|
} else if (!editor.getOpt('fileActionName')) {
|
||||||
|
$('#filePickerReady').after($('<div>').html(lang.errorLoadConfig)).hide();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
uploader = _this.uploader = WebUploader.create({
|
||||||
|
pick: {
|
||||||
|
id: '#filePickerReady',
|
||||||
|
label: lang.uploadSelectFile
|
||||||
|
},
|
||||||
|
swf: '../../third-party/webuploader/Uploader.swf',
|
||||||
|
server: actionUrl,
|
||||||
|
fileVal: editor.getOpt('fileFieldName'),
|
||||||
|
duplicate: true,
|
||||||
|
fileSingleSizeLimit: fileMaxSize,
|
||||||
|
compress: false
|
||||||
|
});
|
||||||
|
uploader.addButton({
|
||||||
|
id: '#filePickerBlock'
|
||||||
|
});
|
||||||
|
uploader.addButton({
|
||||||
|
id: '#filePickerBtn',
|
||||||
|
label: lang.uploadAddFile
|
||||||
|
});
|
||||||
|
|
||||||
|
setState('pedding');
|
||||||
|
|
||||||
|
// 当有文件添加进来时执行,负责view的创建
|
||||||
|
function addFile(file) {
|
||||||
|
var $li = $('<li id="' + file.id + '">' +
|
||||||
|
'<p class="title">' + file.name + '</p>' +
|
||||||
|
'<p class="imgWrap"></p>' +
|
||||||
|
'<p class="progress"><span></span></p>' +
|
||||||
|
'</li>'),
|
||||||
|
|
||||||
|
$btns = $('<div class="file-panel">' +
|
||||||
|
'<span class="cancel">' + lang.uploadDelete + '</span>' +
|
||||||
|
'<span class="rotateRight">' + lang.uploadTurnRight + '</span>' +
|
||||||
|
'<span class="rotateLeft">' + lang.uploadTurnLeft + '</span></div>').appendTo($li),
|
||||||
|
$prgress = $li.find('p.progress span'),
|
||||||
|
$wrap = $li.find('p.imgWrap'),
|
||||||
|
$info = $('<p class="error"></p>').hide().appendTo($li),
|
||||||
|
|
||||||
|
showError = function (code) {
|
||||||
|
switch (code) {
|
||||||
|
case 'exceed_size':
|
||||||
|
text = lang.errorExceedSize;
|
||||||
|
break;
|
||||||
|
case 'interrupt':
|
||||||
|
text = lang.errorInterrupt;
|
||||||
|
break;
|
||||||
|
case 'http':
|
||||||
|
text = lang.errorHttp;
|
||||||
|
break;
|
||||||
|
case 'not_allow_type':
|
||||||
|
text = lang.errorFileType;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
text = lang.errorUploadRetry;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$info.text(text).show();
|
||||||
|
};
|
||||||
|
|
||||||
|
if (file.getStatus() === 'invalid') {
|
||||||
|
showError(file.statusText);
|
||||||
|
} else {
|
||||||
|
$wrap.text(lang.uploadPreview);
|
||||||
|
if ('|png|jpg|jpeg|bmp|gif|'.indexOf('|'+file.ext.toLowerCase()+'|') == -1) {
|
||||||
|
$wrap.empty().addClass('notimage').append('<i class="file-preview file-type-' + file.ext.toLowerCase() + '"></i>' +
|
||||||
|
'<span class="file-title" title="' + file.name + '">' + file.name + '</span>');
|
||||||
|
} else {
|
||||||
|
if (browser.ie && browser.version <= 7) {
|
||||||
|
$wrap.text(lang.uploadNoPreview);
|
||||||
|
} else {
|
||||||
|
uploader.makeThumb(file, function (error, src) {
|
||||||
|
if (error || !src) {
|
||||||
|
$wrap.text(lang.uploadNoPreview);
|
||||||
|
} else {
|
||||||
|
var $img = $('<img src="' + src + '">');
|
||||||
|
$wrap.empty().append($img);
|
||||||
|
$img.on('error', function () {
|
||||||
|
$wrap.text(lang.uploadNoPreview);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, thumbnailWidth, thumbnailHeight);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
percentages[ file.id ] = [ file.size, 0 ];
|
||||||
|
file.rotation = 0;
|
||||||
|
|
||||||
|
/* 检查文件格式 */
|
||||||
|
if (!file.ext || acceptExtensions.indexOf(file.ext.toLowerCase()) == -1) {
|
||||||
|
showError('not_allow_type');
|
||||||
|
uploader.removeFile(file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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') {
|
||||||
|
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.hide();
|
||||||
|
$prgress.css('display', 'block');
|
||||||
|
} else if (cur === 'complete') {
|
||||||
|
}
|
||||||
|
|
||||||
|
$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) + ')');
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$li.insertBefore($filePickerBlock);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 负责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 setState(val, files) {
|
||||||
|
|
||||||
|
if (val != state) {
|
||||||
|
|
||||||
|
var stats = uploader.getStats();
|
||||||
|
|
||||||
|
$upload.removeClass('state-' + state);
|
||||||
|
$upload.addClass('state-' + val);
|
||||||
|
|
||||||
|
switch (val) {
|
||||||
|
|
||||||
|
/* 未选择文件 */
|
||||||
|
case 'pedding':
|
||||||
|
$queue.addClass('element-invisible');
|
||||||
|
$statusBar.addClass('element-invisible');
|
||||||
|
$placeHolder.removeClass('element-invisible');
|
||||||
|
$progress.hide(); $info.hide();
|
||||||
|
uploader.refresh();
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* 可以开始上传 */
|
||||||
|
case 'ready':
|
||||||
|
$placeHolder.addClass('element-invisible');
|
||||||
|
$queue.removeClass('element-invisible');
|
||||||
|
$statusBar.removeClass('element-invisible');
|
||||||
|
$progress.hide(); $info.show();
|
||||||
|
$upload.text(lang.uploadStart);
|
||||||
|
uploader.refresh();
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* 上传中 */
|
||||||
|
case 'uploading':
|
||||||
|
$progress.show(); $info.hide();
|
||||||
|
$upload.text(lang.uploadPause);
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* 暂停上传 */
|
||||||
|
case 'paused':
|
||||||
|
$progress.show(); $info.hide();
|
||||||
|
$upload.text(lang.uploadContinue);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'confirm':
|
||||||
|
$progress.show(); $info.hide();
|
||||||
|
$upload.text(lang.uploadStart);
|
||||||
|
|
||||||
|
stats = uploader.getStats();
|
||||||
|
if (stats.successNum && !stats.uploadFailNum) {
|
||||||
|
setState('finish');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'finish':
|
||||||
|
$progress.hide(); $info.show();
|
||||||
|
if (stats.uploadFailNum) {
|
||||||
|
$upload.text(lang.uploadRetry);
|
||||||
|
} else {
|
||||||
|
$upload.text(lang.uploadStart);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
state = val;
|
||||||
|
updateStatus();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!_this.getQueueCount()) {
|
||||||
|
$upload.addClass('disabled')
|
||||||
|
} else {
|
||||||
|
$upload.removeClass('disabled')
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateStatus() {
|
||||||
|
var text = '', stats;
|
||||||
|
|
||||||
|
if (state === 'ready') {
|
||||||
|
text = lang.updateStatusReady.replace('_', fileCount).replace('_KB', WebUploader.formatSize(fileSize));
|
||||||
|
} else if (state === 'confirm') {
|
||||||
|
stats = uploader.getStats();
|
||||||
|
if (stats.uploadFailNum) {
|
||||||
|
text = lang.updateStatusConfirm.replace('_', stats.successNum).replace('_', stats.successNum);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
stats = uploader.getStats();
|
||||||
|
text = lang.updateStatusFinish.replace('_', fileCount).
|
||||||
|
replace('_KB', WebUploader.formatSize(fileSize)).
|
||||||
|
replace('_', stats.successNum);
|
||||||
|
|
||||||
|
if (stats.uploadFailNum) {
|
||||||
|
text += lang.updateStatusError.replace('_', stats.uploadFailNum);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$info.html(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
uploader.on('fileQueued', function (file) {
|
||||||
|
fileCount++;
|
||||||
|
fileSize += file.size;
|
||||||
|
|
||||||
|
if (fileCount === 1) {
|
||||||
|
$placeHolder.addClass('element-invisible');
|
||||||
|
$statusBar.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
addFile(file);
|
||||||
|
});
|
||||||
|
|
||||||
|
uploader.on('fileDequeued', function (file) {
|
||||||
|
fileCount--;
|
||||||
|
fileSize -= file.size;
|
||||||
|
|
||||||
|
removeFile(file);
|
||||||
|
updateTotalProgress();
|
||||||
|
});
|
||||||
|
|
||||||
|
uploader.on('filesQueued', function (file) {
|
||||||
|
if (!uploader.isInProgress() && (state == 'pedding' || state == 'finish' || state == 'confirm' || state == 'ready')) {
|
||||||
|
setState('ready');
|
||||||
|
}
|
||||||
|
updateTotalProgress();
|
||||||
|
});
|
||||||
|
|
||||||
|
uploader.on('all', function (type, files) {
|
||||||
|
switch (type) {
|
||||||
|
case 'uploadFinished':
|
||||||
|
setState('confirm', files);
|
||||||
|
break;
|
||||||
|
case 'startUpload':
|
||||||
|
/* 添加额外的GET参数 */
|
||||||
|
var params = utils.serializeParam(editor.queryCommandValue('serverparam')) || '',
|
||||||
|
url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?':'&') + 'encode=utf-8&' + params);
|
||||||
|
uploader.option('server', url);
|
||||||
|
setState('uploading', files);
|
||||||
|
break;
|
||||||
|
case 'stopUpload':
|
||||||
|
setState('paused', files);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
uploader.on('uploadBeforeSend', function (file, data, header) {
|
||||||
|
//这里可以通过data对象添加POST参数
|
||||||
|
header['X_Requested_With'] = 'XMLHttpRequest';
|
||||||
|
});
|
||||||
|
|
||||||
|
uploader.on('uploadProgress', function (file, percentage) {
|
||||||
|
var $li = $('#' + file.id),
|
||||||
|
$percent = $li.find('.progress span');
|
||||||
|
|
||||||
|
$percent.css('width', percentage * 100 + '%');
|
||||||
|
percentages[ file.id ][ 1 ] = percentage;
|
||||||
|
updateTotalProgress();
|
||||||
|
});
|
||||||
|
|
||||||
|
uploader.on('uploadSuccess', function (file, ret) {
|
||||||
|
var $file = $('#' + file.id);
|
||||||
|
try {
|
||||||
|
var responseText = (ret._raw || ret),
|
||||||
|
json = utils.str2json(responseText);
|
||||||
|
if (json.state == 'SUCCESS') {
|
||||||
|
_this.fileList.push(json);
|
||||||
|
$file.append('<span class="success"></span>');
|
||||||
|
} else {
|
||||||
|
$file.find('.error').text(json.state).show();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
$file.find('.error').text(lang.errorServerUpload).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
uploader.on('uploadError', function (file, code) {
|
||||||
|
});
|
||||||
|
uploader.on('error', function (code, file) {
|
||||||
|
if (code == 'Q_TYPE_DENIED' || code == 'F_EXCEED_SIZE') {
|
||||||
|
addFile(file);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
uploader.on('uploadComplete', function (file, ret) {
|
||||||
|
});
|
||||||
|
|
||||||
|
$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();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$upload.addClass('state-' + state);
|
||||||
|
updateTotalProgress();
|
||||||
|
},
|
||||||
|
getQueueCount: function () {
|
||||||
|
var file, i, status, readyFile = 0, files = this.uploader.getFiles();
|
||||||
|
for (i = 0; file = files[i++]; ) {
|
||||||
|
status = file.getStatus();
|
||||||
|
if (status == 'queued' || status == 'uploading' || status == 'progress') readyFile++;
|
||||||
|
}
|
||||||
|
return readyFile;
|
||||||
|
},
|
||||||
|
getInsertList: function () {
|
||||||
|
var i, link, data, list = [],
|
||||||
|
prefix = editor.getOpt('fileUrlPrefix');
|
||||||
|
for (i = 0; i < this.fileList.length; i++) {
|
||||||
|
data = this.fileList[i];
|
||||||
|
link = data.url;
|
||||||
|
list.push({
|
||||||
|
title: data.original || link.substr(link.lastIndexOf('/') + 1),
|
||||||
|
url: prefix + link
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* 在线附件 */
|
||||||
|
function OnlineFile(target) {
|
||||||
|
this.container = utils.isString(target) ? document.getElementById(target) : target;
|
||||||
|
this.init();
|
||||||
|
}
|
||||||
|
OnlineFile.prototype = {
|
||||||
|
init: function () {
|
||||||
|
this.initContainer();
|
||||||
|
this.initEvents();
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
|
/* 初始化容器 */
|
||||||
|
initContainer: function () {
|
||||||
|
this.container.innerHTML = '';
|
||||||
|
this.list = document.createElement('ul');
|
||||||
|
this.clearFloat = document.createElement('li');
|
||||||
|
|
||||||
|
domUtils.addClass(this.list, 'list');
|
||||||
|
domUtils.addClass(this.clearFloat, 'clearFloat');
|
||||||
|
|
||||||
|
this.list.appendChild(this.clearFloat);
|
||||||
|
this.container.appendChild(this.list);
|
||||||
|
},
|
||||||
|
/* 初始化滚动事件,滚动到地步自动拉取数据 */
|
||||||
|
initEvents: function () {
|
||||||
|
var _this = this;
|
||||||
|
|
||||||
|
/* 滚动拉取图片 */
|
||||||
|
domUtils.on($G('fileList'), 'scroll', function(e){
|
||||||
|
var panel = this;
|
||||||
|
if (panel.scrollHeight - (panel.offsetHeight + panel.scrollTop) < 10) {
|
||||||
|
_this.getFileData();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
/* 选中图片 */
|
||||||
|
domUtils.on(this.list, 'click', function (e) {
|
||||||
|
var target = e.target || e.srcElement,
|
||||||
|
li = target.parentNode;
|
||||||
|
|
||||||
|
if (li.tagName.toLowerCase() == 'li') {
|
||||||
|
if (domUtils.hasClass(li, 'selected')) {
|
||||||
|
domUtils.removeClasses(li, 'selected');
|
||||||
|
} else {
|
||||||
|
domUtils.addClass(li, 'selected');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/* 初始化第一次的数据 */
|
||||||
|
initData: function () {
|
||||||
|
|
||||||
|
/* 拉取数据需要使用的值 */
|
||||||
|
this.state = 0;
|
||||||
|
this.listSize = editor.getOpt('fileManagerListSize');
|
||||||
|
this.listIndex = 0;
|
||||||
|
this.listEnd = false;
|
||||||
|
|
||||||
|
/* 第一次拉取数据 */
|
||||||
|
this.getFileData();
|
||||||
|
},
|
||||||
|
/* 向后台拉取图片列表数据 */
|
||||||
|
getFileData: function () {
|
||||||
|
var _this = this;
|
||||||
|
|
||||||
|
if(!_this.listEnd && !this.isLoadingData) {
|
||||||
|
this.isLoadingData = true;
|
||||||
|
ajax.request(editor.getActionUrl(editor.getOpt('fileManagerActionName')), {
|
||||||
|
timeout: 100000,
|
||||||
|
data: utils.extend({
|
||||||
|
start: this.listIndex,
|
||||||
|
size: this.listSize
|
||||||
|
}, editor.queryCommandValue('serverparam')),
|
||||||
|
method: 'get',
|
||||||
|
onsuccess: function (r) {
|
||||||
|
try {
|
||||||
|
var json = JSON.parse( r.responseText );
|
||||||
|
if (json.state == 'SUCCESS') {
|
||||||
|
_this.pushData(json.list);
|
||||||
|
_this.listIndex = parseInt(json.start) + parseInt(json.list.length);
|
||||||
|
if(_this.listIndex >= json.total) {
|
||||||
|
_this.listEnd = true;
|
||||||
|
}
|
||||||
|
_this.isLoadingData = false;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
if(r.responseText.indexOf('ue_separate_ue') != -1) {
|
||||||
|
var list = r.responseText.split(r.responseText);
|
||||||
|
_this.pushData(list);
|
||||||
|
_this.listIndex = parseInt(list.length);
|
||||||
|
_this.listEnd = true;
|
||||||
|
_this.isLoadingData = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onerror: function () {
|
||||||
|
_this.isLoadingData = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/* 添加图片到列表界面上 */
|
||||||
|
pushData: function (list) {
|
||||||
|
var i, item, img, filetype, preview, icon, _this = this,
|
||||||
|
urlPrefix = editor.getOpt('fileManagerUrlPrefix');
|
||||||
|
for (i = 0; i < list.length; i++) {
|
||||||
|
if(list[i] && list[i].url) {
|
||||||
|
item = document.createElement('li');
|
||||||
|
icon = document.createElement('span');
|
||||||
|
filetype = list[i].url.substr(list[i].url.lastIndexOf('.') + 1);
|
||||||
|
|
||||||
|
if ( "png|jpg|jpeg|gif|bmp".indexOf(filetype) != -1 ) {
|
||||||
|
preview = document.createElement('img');
|
||||||
|
domUtils.on(preview, 'load', (function(image){
|
||||||
|
return function(){
|
||||||
|
_this.scale(image, image.parentNode.offsetWidth, image.parentNode.offsetHeight);
|
||||||
|
};
|
||||||
|
})(preview));
|
||||||
|
preview.width = 113;
|
||||||
|
preview.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=':'&noCache=') + (+new Date()).toString(36) );
|
||||||
|
} else {
|
||||||
|
var ic = document.createElement('i'),
|
||||||
|
textSpan = document.createElement('span');
|
||||||
|
textSpan.innerHTML = list[i].url.substr(list[i].url.lastIndexOf('/') + 1);
|
||||||
|
preview = document.createElement('div');
|
||||||
|
preview.appendChild(ic);
|
||||||
|
preview.appendChild(textSpan);
|
||||||
|
domUtils.addClass(preview, 'file-wrapper');
|
||||||
|
domUtils.addClass(textSpan, 'file-title');
|
||||||
|
domUtils.addClass(ic, 'file-type-' + filetype);
|
||||||
|
domUtils.addClass(ic, 'file-preview');
|
||||||
|
}
|
||||||
|
domUtils.addClass(icon, 'icon');
|
||||||
|
item.setAttribute('data-url', urlPrefix + list[i].url);
|
||||||
|
if (list[i].original) {
|
||||||
|
item.setAttribute('data-title', list[i].original);
|
||||||
|
}
|
||||||
|
|
||||||
|
item.appendChild(preview);
|
||||||
|
item.appendChild(icon);
|
||||||
|
this.list.insertBefore(item, this.clearFloat);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/* 改变图片大小 */
|
||||||
|
scale: function (img, w, h, type) {
|
||||||
|
var ow = img.width,
|
||||||
|
oh = img.height;
|
||||||
|
|
||||||
|
if (type == 'justify') {
|
||||||
|
if (ow >= oh) {
|
||||||
|
img.width = w;
|
||||||
|
img.height = h * oh / ow;
|
||||||
|
img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px';
|
||||||
|
} else {
|
||||||
|
img.width = w * ow / oh;
|
||||||
|
img.height = h;
|
||||||
|
img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (ow >= oh) {
|
||||||
|
img.width = w * ow / oh;
|
||||||
|
img.height = h;
|
||||||
|
img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px';
|
||||||
|
} else {
|
||||||
|
img.width = w;
|
||||||
|
img.height = h * oh / ow;
|
||||||
|
img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getInsertList: function () {
|
||||||
|
var i, lis = this.list.children, list = [];
|
||||||
|
for (i = 0; i < lis.length; i++) {
|
||||||
|
if (domUtils.hasClass(lis[i], 'selected')) {
|
||||||
|
var url = lis[i].getAttribute('data-url');
|
||||||
|
var title = lis[i].getAttribute('data-title') || url.substr(url.lastIndexOf('/') + 1);
|
||||||
|
list.push({
|
||||||
|
title: title,
|
||||||
|
url: url
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
})();
|
After Width: | Height: | Size: 923 B |
After Width: | Height: | Size: 841 B |
After Width: | Height: | Size: 1012 B |
After Width: | Height: | Size: 949 B |
After Width: | Height: | Size: 950 B |
After Width: | Height: | Size: 986 B |
After Width: | Height: | Size: 1001 B |
After Width: | Height: | Size: 996 B |
After Width: | Height: | Size: 1001 B |
After Width: | Height: | Size: 1009 B |
After Width: | Height: | Size: 1007 B |
After Width: | Height: | Size: 970 B |
After Width: | Height: | Size: 1005 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 453 B |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 445 B |
After Width: | Height: | Size: 1.6 KiB |
|
@ -0,0 +1,94 @@
|
||||||
|
.wrapper{ width: 424px;margin: 10px auto; zoom:1;position: relative}
|
||||||
|
.tabbody{height:225px;}
|
||||||
|
.tabbody .panel { position: absolute;width:100%; height:100%;background: #fff; display: none;}
|
||||||
|
.tabbody .focus { display: block;}
|
||||||
|
|
||||||
|
body{font-size: 12px;color: #888;overflow: hidden;}
|
||||||
|
input,label{vertical-align:middle}
|
||||||
|
.clear{clear: both;}
|
||||||
|
.pl{padding-left: 18px;padding-left: 23px\9;}
|
||||||
|
|
||||||
|
#imageList {width: 420px;height: 215px;margin-top: 10px;overflow: hidden;overflow-y: auto;}
|
||||||
|
#imageList div {float: left;width: 100px;height: 95px;margin: 5px 10px;}
|
||||||
|
#imageList img {cursor: pointer;border: 2px solid white;}
|
||||||
|
|
||||||
|
.bgarea{margin: 10px;padding: 5px;height: 84%;border: 1px solid #A8A297;}
|
||||||
|
.content div{margin: 10px 0 10px 5px;}
|
||||||
|
.content .iptradio{margin: 0px 5px 5px 0px;}
|
||||||
|
.txt{width:280px;}
|
||||||
|
|
||||||
|
.wrapcolor{height: 19px;}
|
||||||
|
div.color{float: left;margin: 0;}
|
||||||
|
#colorPicker{width: 17px;height: 17px;border: 1px solid #CCC;display: inline-block;border-radius: 3px;box-shadow: 2px 2px 5px #D3D6DA;margin: 0;float: left;}
|
||||||
|
div.alignment,#custom{margin-left: 23px;margin-left: 28px\9;}
|
||||||
|
#custom input{height: 15px;min-height: 15px;width:20px;}
|
||||||
|
#repeatType{width:100px;}
|
||||||
|
|
||||||
|
|
||||||
|
/* 图片管理样式 */
|
||||||
|
#imgManager {
|
||||||
|
width: 100%;
|
||||||
|
height: 225px;
|
||||||
|
}
|
||||||
|
#imgManager #imageList{
|
||||||
|
width: 100%;
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
#imgManager ul {
|
||||||
|
display: block;
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
#imgManager li {
|
||||||
|
float: left;
|
||||||
|
display: block;
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
width: 113px;
|
||||||
|
height: 113px;
|
||||||
|
margin: 9px 0 0 19px;
|
||||||
|
background-color: #eee;
|
||||||
|
overflow: hidden;
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
#imgManager li.clearFloat {
|
||||||
|
float: none;
|
||||||
|
clear: both;
|
||||||
|
display: block;
|
||||||
|
width:0;
|
||||||
|
height:0;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
#imgManager li img {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
#imgManager li .icon {
|
||||||
|
cursor: pointer;
|
||||||
|
width: 113px;
|
||||||
|
height: 113px;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 2;
|
||||||
|
border: 0;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
#imgManager li .icon:hover {
|
||||||
|
width: 107px;
|
||||||
|
height: 107px;
|
||||||
|
border: 3px solid #1094fa;
|
||||||
|
}
|
||||||
|
#imgManager li.selected .icon {
|
||||||
|
background-image: url(images/success.png);
|
||||||
|
background-position: 75px 75px;
|
||||||
|
}
|
||||||
|
#imgManager li.selected .icon:hover {
|
||||||
|
width: 107px;
|
||||||
|
height: 107px;
|
||||||
|
border: 3px solid #1094fa;
|
||||||
|
background-position: 72px 72px;
|
||||||
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
|
||||||
|
<script type="text/javascript" src="../internal.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="background.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="bg_container" class="wrapper">
|
||||||
|
<div id="tabHeads" class="tabhead">
|
||||||
|
<span class="focus" data-content-id="normal"><var id="lang_background_normal"></var></span>
|
||||||
|
<span class="" data-content-id="imgManager"><var id="lang_background_local"></var></span>
|
||||||
|
</div>
|
||||||
|
<div id="tabBodys" class="tabbody">
|
||||||
|
<div id="normal" class="panel focus">
|
||||||
|
<fieldset class="bgarea">
|
||||||
|
<legend><var id="lang_background_set"></var></legend>
|
||||||
|
<div class="content">
|
||||||
|
<div>
|
||||||
|
<label><input id="nocolorRadio" class="iptradio" type="radio" name="t" value="none" checked="checked"><var id="lang_background_none"></var></label>
|
||||||
|
<label><input id="coloredRadio" class="iptradio" type="radio" name="t" value="color"><var id="lang_background_colored"></var></label>
|
||||||
|
</div>
|
||||||
|
<div class="wrapcolor pl">
|
||||||
|
<div class="color">
|
||||||
|
<var id="lang_background_color"></var>:
|
||||||
|
</div>
|
||||||
|
<div id="colorPicker"></div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
<div class="wrapcolor pl">
|
||||||
|
<label><var id="lang_background_netimg"></var>:</label><input class="txt" type="text" id="url">
|
||||||
|
</div>
|
||||||
|
<div id="alignment" class="alignment">
|
||||||
|
<var id="lang_background_align"></var>:<select id="repeatType">
|
||||||
|
<option value="center"></option>
|
||||||
|
<option value="repeat-x"></option>
|
||||||
|
<option value="repeat-y"></option>
|
||||||
|
<option value="repeat"></option>
|
||||||
|
<option value="self"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div id="custom" >
|
||||||
|
<var id="lang_background_position"></var>:x:<input type="text" size="1" id="x" maxlength="4" value="0">px y:<input type="text" size="1" id="y" maxlength="4" value="0">px
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="imgManager" class="panel">
|
||||||
|
<div id="imageList" style=""></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript" src="background.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,376 @@
|
||||||
|
(function () {
|
||||||
|
|
||||||
|
var onlineImage,
|
||||||
|
backupStyle = editor.queryCommandValue('background');
|
||||||
|
|
||||||
|
window.onload = function () {
|
||||||
|
initTabs();
|
||||||
|
initColorSelector();
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 初始化tab标签 */
|
||||||
|
function initTabs() {
|
||||||
|
var tabs = $G('tabHeads').children;
|
||||||
|
for (var i = 0; i < tabs.length; i++) {
|
||||||
|
domUtils.on(tabs[i], "click", function (e) {
|
||||||
|
var target = e.target || e.srcElement;
|
||||||
|
for (var j = 0; j < tabs.length; j++) {
|
||||||
|
if (tabs[j] == target) {
|
||||||
|
tabs[j].className = "focus";
|
||||||
|
var contentId = tabs[j].getAttribute('data-content-id');
|
||||||
|
$G(contentId).style.display = "block";
|
||||||
|
if (contentId == 'imgManager') {
|
||||||
|
initImagePanel();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
tabs[j].className = "";
|
||||||
|
$G(tabs[j].getAttribute('data-content-id')).style.display = "none";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 初始化颜色设置 */
|
||||||
|
function initColorSelector() {
|
||||||
|
var obj = editor.queryCommandValue('background');
|
||||||
|
if (obj) {
|
||||||
|
var color = obj['background-color'],
|
||||||
|
repeat = obj['background-repeat'] || 'repeat',
|
||||||
|
image = obj['background-image'] || '',
|
||||||
|
position = obj['background-position'] || 'center center',
|
||||||
|
pos = position.split(' '),
|
||||||
|
x = parseInt(pos[0]) || 0,
|
||||||
|
y = parseInt(pos[1]) || 0;
|
||||||
|
|
||||||
|
if (repeat == 'no-repeat' && (x || y)) repeat = 'self';
|
||||||
|
|
||||||
|
image = image.match(/url[\s]*\(([^\)]*)\)/);
|
||||||
|
image = image ? image[1] : '';
|
||||||
|
updateFormState('colored', color, image, repeat, x, y);
|
||||||
|
} else {
|
||||||
|
updateFormState();
|
||||||
|
}
|
||||||
|
|
||||||
|
var updateHandler = function () {
|
||||||
|
updateFormState();
|
||||||
|
updateBackground();
|
||||||
|
}
|
||||||
|
domUtils.on($G('nocolorRadio'), 'click', updateBackground);
|
||||||
|
domUtils.on($G('coloredRadio'), 'click', updateHandler);
|
||||||
|
domUtils.on($G('url'), 'keyup', function () {
|
||||||
|
if ($G('url').value && $G('alignment').style.display == "none") {
|
||||||
|
utils.each($G('repeatType').children, function (item) {
|
||||||
|
item.selected = ('repeat' == item.getAttribute('value') ? 'selected' : false);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
updateHandler();
|
||||||
|
});
|
||||||
|
domUtils.on($G('repeatType'), 'change', updateHandler);
|
||||||
|
domUtils.on($G('x'), 'keyup', updateBackground);
|
||||||
|
domUtils.on($G('y'), 'keyup', updateBackground);
|
||||||
|
|
||||||
|
initColorPicker();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 初始化颜色选择器 */
|
||||||
|
function initColorPicker() {
|
||||||
|
var me = editor,
|
||||||
|
cp = $G("colorPicker");
|
||||||
|
|
||||||
|
/* 生成颜色选择器ui对象 */
|
||||||
|
var popup = new UE.ui.Popup({
|
||||||
|
content: new UE.ui.ColorPicker({
|
||||||
|
noColorText: me.getLang("clearColor"),
|
||||||
|
editor: me,
|
||||||
|
onpickcolor: function (t, color) {
|
||||||
|
updateFormState('colored', color);
|
||||||
|
updateBackground();
|
||||||
|
UE.ui.Popup.postHide();
|
||||||
|
},
|
||||||
|
onpicknocolor: function (t, color) {
|
||||||
|
updateFormState('colored', 'transparent');
|
||||||
|
updateBackground();
|
||||||
|
UE.ui.Popup.postHide();
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
editor: me,
|
||||||
|
onhide: function () {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/* 设置颜色选择器 */
|
||||||
|
domUtils.on(cp, "click", function () {
|
||||||
|
popup.showAnchor(this);
|
||||||
|
});
|
||||||
|
domUtils.on(document, 'mousedown', function (evt) {
|
||||||
|
var el = evt.target || evt.srcElement;
|
||||||
|
UE.ui.Popup.postHide(el);
|
||||||
|
});
|
||||||
|
domUtils.on(window, 'scroll', function () {
|
||||||
|
UE.ui.Popup.postHide();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 初始化在线图片列表 */
|
||||||
|
function initImagePanel() {
|
||||||
|
onlineImage = onlineImage || new OnlineImage('imageList');
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 更新背景色设置面板 */
|
||||||
|
function updateFormState(radio, color, url, align, x, y) {
|
||||||
|
var nocolorRadio = $G('nocolorRadio'),
|
||||||
|
coloredRadio = $G('coloredRadio');
|
||||||
|
|
||||||
|
if (radio) {
|
||||||
|
nocolorRadio.checked = (radio == 'colored' ? false : 'checked');
|
||||||
|
coloredRadio.checked = (radio == 'colored' ? 'checked' : false);
|
||||||
|
}
|
||||||
|
if (color) {
|
||||||
|
domUtils.setStyle($G("colorPicker"), "background-color", color);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (url && /^\//.test(url)) {
|
||||||
|
var a = document.createElement('a');
|
||||||
|
a.href = url;
|
||||||
|
browser.ie && (a.href = a.href);
|
||||||
|
url = browser.ie ? a.href : (a.protocol + '//' + a.host + a.pathname + a.search + a.hash);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (url || url === '') {
|
||||||
|
$G('url').value = url;
|
||||||
|
}
|
||||||
|
if (align) {
|
||||||
|
utils.each($G('repeatType').children, function (item) {
|
||||||
|
item.selected = (align == item.getAttribute('value') ? 'selected' : false);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (x || y) {
|
||||||
|
$G('x').value = parseInt(x) || 0;
|
||||||
|
$G('y').value = parseInt(y) || 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$G('alignment').style.display = coloredRadio.checked && $G('url').value ? '' : 'none';
|
||||||
|
$G('custom').style.display = coloredRadio.checked && $G('url').value && $G('repeatType').value == 'self' ? '' : 'none';
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 更新背景颜色 */
|
||||||
|
function updateBackground() {
|
||||||
|
if ($G('coloredRadio').checked) {
|
||||||
|
var color = domUtils.getStyle($G("colorPicker"), "background-color"),
|
||||||
|
bgimg = $G("url").value,
|
||||||
|
align = $G("repeatType").value,
|
||||||
|
backgroundObj = {
|
||||||
|
"background-repeat": "no-repeat",
|
||||||
|
"background-position": "center center"
|
||||||
|
};
|
||||||
|
|
||||||
|
if (color) backgroundObj["background-color"] = color;
|
||||||
|
if (bgimg) backgroundObj["background-image"] = 'url(' + bgimg + ')';
|
||||||
|
if (align == 'self') {
|
||||||
|
backgroundObj["background-position"] = $G("x").value + "px " + $G("y").value + "px";
|
||||||
|
} else if (align == 'repeat-x' || align == 'repeat-y' || align == 'repeat') {
|
||||||
|
backgroundObj["background-repeat"] = align;
|
||||||
|
}
|
||||||
|
|
||||||
|
editor.execCommand('background', backgroundObj);
|
||||||
|
} else {
|
||||||
|
editor.execCommand('background', null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* 在线图片 */
|
||||||
|
function OnlineImage(target) {
|
||||||
|
this.container = utils.isString(target) ? document.getElementById(target) : target;
|
||||||
|
this.init();
|
||||||
|
}
|
||||||
|
OnlineImage.prototype = {
|
||||||
|
init: function () {
|
||||||
|
this.reset();
|
||||||
|
this.initEvents();
|
||||||
|
},
|
||||||
|
/* 初始化容器 */
|
||||||
|
initContainer: function () {
|
||||||
|
this.container.innerHTML = '';
|
||||||
|
this.list = document.createElement('ul');
|
||||||
|
this.clearFloat = document.createElement('li');
|
||||||
|
|
||||||
|
domUtils.addClass(this.list, 'list');
|
||||||
|
domUtils.addClass(this.clearFloat, 'clearFloat');
|
||||||
|
|
||||||
|
this.list.id = 'imageListUl';
|
||||||
|
this.list.appendChild(this.clearFloat);
|
||||||
|
this.container.appendChild(this.list);
|
||||||
|
},
|
||||||
|
/* 初始化滚动事件,滚动到地步自动拉取数据 */
|
||||||
|
initEvents: function () {
|
||||||
|
var _this = this;
|
||||||
|
|
||||||
|
/* 滚动拉取图片 */
|
||||||
|
domUtils.on($G('imageList'), 'scroll', function (e) {
|
||||||
|
var panel = this;
|
||||||
|
if (panel.scrollHeight - (panel.offsetHeight + panel.scrollTop) < 10) {
|
||||||
|
_this.getImageData();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
/* 选中图片 */
|
||||||
|
domUtils.on(this.container, 'click', function (e) {
|
||||||
|
var target = e.target || e.srcElement,
|
||||||
|
li = target.parentNode,
|
||||||
|
nodes = $G('imageListUl').childNodes;
|
||||||
|
|
||||||
|
if (li.tagName.toLowerCase() == 'li') {
|
||||||
|
updateFormState('nocolor', null, '');
|
||||||
|
for (var i = 0, node; node = nodes[i++];) {
|
||||||
|
if (node == li && !domUtils.hasClass(node, 'selected')) {
|
||||||
|
domUtils.addClass(node, 'selected');
|
||||||
|
updateFormState('colored', null, li.firstChild.getAttribute("_src"), 'repeat');
|
||||||
|
} else {
|
||||||
|
domUtils.removeClasses(node, 'selected');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
updateBackground();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/* 初始化第一次的数据 */
|
||||||
|
initData: function () {
|
||||||
|
|
||||||
|
/* 拉取数据需要使用的值 */
|
||||||
|
this.state = 0;
|
||||||
|
this.listSize = editor.getOpt('imageManagerListSize');
|
||||||
|
this.listIndex = 0;
|
||||||
|
this.listEnd = false;
|
||||||
|
|
||||||
|
/* 第一次拉取数据 */
|
||||||
|
this.getImageData();
|
||||||
|
},
|
||||||
|
/* 重置界面 */
|
||||||
|
reset: function () {
|
||||||
|
this.initContainer();
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
|
/* 向后台拉取图片列表数据 */
|
||||||
|
getImageData: function () {
|
||||||
|
var _this = this;
|
||||||
|
|
||||||
|
if (!_this.listEnd && !this.isLoadingData) {
|
||||||
|
this.isLoadingData = true;
|
||||||
|
var url = editor.getActionUrl(editor.getOpt('imageManagerActionName')),
|
||||||
|
isJsonp = utils.isCrossDomainUrl(url);
|
||||||
|
ajax.request(url, {
|
||||||
|
'timeout': 100000,
|
||||||
|
'dataType': isJsonp ? 'jsonp' : '',
|
||||||
|
'data': utils.extend({
|
||||||
|
start: this.listIndex,
|
||||||
|
size: this.listSize
|
||||||
|
}, editor.queryCommandValue('serverparam')),
|
||||||
|
'method': 'get',
|
||||||
|
'onsuccess': function (r) {
|
||||||
|
try {
|
||||||
|
var json = isJsonp ? r : JSON.parse( r.responseText );
|
||||||
|
if (json.state == 'SUCCESS') {
|
||||||
|
_this.pushData(json.list);
|
||||||
|
_this.listIndex = parseInt(json.start) + parseInt(json.list.length);
|
||||||
|
if (_this.listIndex >= json.total) {
|
||||||
|
_this.listEnd = true;
|
||||||
|
}
|
||||||
|
_this.isLoadingData = false;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
if (r.responseText.indexOf('ue_separate_ue') != -1) {
|
||||||
|
var list = r.responseText.split(r.responseText);
|
||||||
|
_this.pushData(list);
|
||||||
|
_this.listIndex = parseInt(list.length);
|
||||||
|
_this.listEnd = true;
|
||||||
|
_this.isLoadingData = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'onerror': function () {
|
||||||
|
_this.isLoadingData = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/* 添加图片到列表界面上 */
|
||||||
|
pushData: function (list) {
|
||||||
|
var i, item, img, icon, _this = this,
|
||||||
|
urlPrefix = editor.getOpt('imageManagerUrlPrefix');
|
||||||
|
for (i = 0; i < list.length; i++) {
|
||||||
|
if (list[i] && list[i].url) {
|
||||||
|
item = document.createElement('li');
|
||||||
|
img = document.createElement('img');
|
||||||
|
icon = document.createElement('span');
|
||||||
|
|
||||||
|
domUtils.on(img, 'load', (function (image) {
|
||||||
|
return function () {
|
||||||
|
_this.scale(image, image.parentNode.offsetWidth, image.parentNode.offsetHeight);
|
||||||
|
}
|
||||||
|
})(img));
|
||||||
|
img.width = 113;
|
||||||
|
img.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=' : '&noCache=') + (+new Date()).toString(36));
|
||||||
|
img.setAttribute('_src', urlPrefix + list[i].url);
|
||||||
|
domUtils.addClass(icon, 'icon');
|
||||||
|
|
||||||
|
item.appendChild(img);
|
||||||
|
item.appendChild(icon);
|
||||||
|
this.list.insertBefore(item, this.clearFloat);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/* 改变图片大小 */
|
||||||
|
scale: function (img, w, h, type) {
|
||||||
|
var ow = img.width,
|
||||||
|
oh = img.height;
|
||||||
|
|
||||||
|
if (type == 'justify') {
|
||||||
|
if (ow >= oh) {
|
||||||
|
img.width = w;
|
||||||
|
img.height = h * oh / ow;
|
||||||
|
img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px';
|
||||||
|
} else {
|
||||||
|
img.width = w * ow / oh;
|
||||||
|
img.height = h;
|
||||||
|
img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (ow >= oh) {
|
||||||
|
img.width = w * ow / oh;
|
||||||
|
img.height = h;
|
||||||
|
img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px';
|
||||||
|
} else {
|
||||||
|
img.width = w;
|
||||||
|
img.height = h * oh / ow;
|
||||||
|
img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getInsertList: function () {
|
||||||
|
var i, lis = this.list.children, list = [], align = getAlign();
|
||||||
|
for (i = 0; i < lis.length; i++) {
|
||||||
|
if (domUtils.hasClass(lis[i], 'selected')) {
|
||||||
|
var img = lis[i].firstChild,
|
||||||
|
src = img.getAttribute('_src');
|
||||||
|
list.push({
|
||||||
|
src: src,
|
||||||
|
_src: src,
|
||||||
|
floatStyle: align
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
dialog.onok = function () {
|
||||||
|
updateBackground();
|
||||||
|
editor.fireEvent('saveScene');
|
||||||
|
};
|
||||||
|
dialog.oncancel = function () {
|
||||||
|
editor.execCommand('background', backupStyle);
|
||||||
|
};
|
||||||
|
|
||||||
|
})();
|
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 1.6 KiB |
|
@ -0,0 +1,65 @@
|
||||||
|
/*
|
||||||
|
* 图表配置文件
|
||||||
|
* */
|
||||||
|
|
||||||
|
|
||||||
|
//不同类型的配置
|
||||||
|
var typeConfig = [
|
||||||
|
{
|
||||||
|
chart: {
|
||||||
|
type: 'line'
|
||||||
|
},
|
||||||
|
plotOptions: {
|
||||||
|
line: {
|
||||||
|
dataLabels: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
enableMouseTracking: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
chart: {
|
||||||
|
type: 'line'
|
||||||
|
},
|
||||||
|
plotOptions: {
|
||||||
|
line: {
|
||||||
|
dataLabels: {
|
||||||
|
enabled: true
|
||||||
|
},
|
||||||
|
enableMouseTracking: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
chart: {
|
||||||
|
type: 'area'
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
chart: {
|
||||||
|
type: 'bar'
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
chart: {
|
||||||
|
type: 'column'
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
chart: {
|
||||||
|
plotBackgroundColor: null,
|
||||||
|
plotBorderWidth: null,
|
||||||
|
plotShadow: false
|
||||||
|
},
|
||||||
|
plotOptions: {
|
||||||
|
pie: {
|
||||||
|
allowPointSelect: true,
|
||||||
|
cursor: 'pointer',
|
||||||
|
dataLabels: {
|
||||||
|
enabled: true,
|
||||||
|
color: '#000000',
|
||||||
|
connectorColor: '#000000',
|
||||||
|
formatter: function() {
|
||||||
|
return '<b>'+ this.point.name +'</b>: '+ ( Math.round( this.point.percentage*100 ) / 100 ) +' %';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
|
@ -0,0 +1,165 @@
|
||||||
|
html, body {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main {
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-view {
|
||||||
|
height: 100%;
|
||||||
|
float: left;
|
||||||
|
margin: 20px;
|
||||||
|
width: 40%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-view .table-container {
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 50px;
|
||||||
|
overflow: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-view th {
|
||||||
|
padding: 5px 10px;
|
||||||
|
background-color: #F7F7F7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-view td {
|
||||||
|
width: 50px;
|
||||||
|
text-align: center;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-container input {
|
||||||
|
width: 40px;
|
||||||
|
padding: 5px;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-view caption {
|
||||||
|
font-size: 18px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.charts-view {
|
||||||
|
/*margin-left: 49%!important;*/
|
||||||
|
width: 50%;
|
||||||
|
margin-left: 49%;
|
||||||
|
height: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.charts-container {
|
||||||
|
border-left: 1px solid #c3c3c3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.charts-format fieldset {
|
||||||
|
padding-left: 20px;
|
||||||
|
margin-bottom: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.charts-format legend {
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.format-item-container {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.format-item-container label {
|
||||||
|
display: block;
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.charts-format .data-item {
|
||||||
|
border: 1px solid black;
|
||||||
|
outline: none;
|
||||||
|
padding: 2px 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 图表类型 */
|
||||||
|
|
||||||
|
.charts-type {
|
||||||
|
margin-top: 50px;
|
||||||
|
height: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-view {
|
||||||
|
border: 1px solid #c3c3c3;
|
||||||
|
border-left: none;
|
||||||
|
border-right: none;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-container {
|
||||||
|
margin: 20px;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-bed {
|
||||||
|
width: 10000px;
|
||||||
|
_margin-top: 20px;
|
||||||
|
-webkit-transition: margin-left .5s ease;
|
||||||
|
-moz-transition: margin-left .5s ease;
|
||||||
|
transition: margin-left .5s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.view-box {
|
||||||
|
display: inline-block;
|
||||||
|
*display: inline;
|
||||||
|
*zoom: 1;
|
||||||
|
margin-right: 20px;
|
||||||
|
border: 2px solid white;
|
||||||
|
line-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.view-box img {
|
||||||
|
border: 1px solid #cecece;
|
||||||
|
}
|
||||||
|
|
||||||
|
.view-box.selected {
|
||||||
|
border-color: #7274A7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-container {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-container a {
|
||||||
|
display: inline-block;
|
||||||
|
width: 100px;
|
||||||
|
height: 25px;
|
||||||
|
line-height: 25px;
|
||||||
|
border: 1px solid #c2ccd1;
|
||||||
|
margin-right: 30px;
|
||||||
|
text-decoration: none;
|
||||||
|
color: black;
|
||||||
|
-webkit-border-radius: 2px;
|
||||||
|
-moz-border-radius: 2px;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-container a:HOVER {
|
||||||
|
background: #fcfcfc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-container a:ACTIVE {
|
||||||
|
border-top-color: #c2ccd1;
|
||||||
|
box-shadow:inset 0 5px 4px -4px rgba(49, 49, 64, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.edui-charts-not-data {
|
||||||
|
height: 100px;
|
||||||
|
line-height: 100px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
|
@ -0,0 +1,89 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>chart</title>
|
||||||
|
<meta chartset="utf-8">
|
||||||
|
<link rel="stylesheet" type="text/css" href="charts.css">
|
||||||
|
<script type="text/javascript" src="../internal.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="main">
|
||||||
|
<div class="table-view">
|
||||||
|
<h3><var id="lang_data_source"></var></h3>
|
||||||
|
<div id="tableContainer" class="table-container"></div>
|
||||||
|
<h3><var id="lang_chart_format"></var></h3>
|
||||||
|
<form name="data-form">
|
||||||
|
<div class="charts-format">
|
||||||
|
<fieldset>
|
||||||
|
<legend><var id="lang_data_align"></var></legend>
|
||||||
|
<div class="format-item-container">
|
||||||
|
<label>
|
||||||
|
<input type="radio" class="format-ctrl not-pie-item" name="charts-format" value="1" checked="checked">
|
||||||
|
<var id="lang_chart_align_same"></var>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<input type="radio" class="format-ctrl not-pie-item" name="charts-format" value="-1">
|
||||||
|
<var id="lang_chart_align_reverse"></var>
|
||||||
|
</label>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
<fieldset>
|
||||||
|
<legend><var id="lang_chart_title"></var></legend>
|
||||||
|
<div class="format-item-container">
|
||||||
|
<label>
|
||||||
|
<var id="lang_chart_main_title"></var><input type="text" name="title" class="data-item">
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<var id="lang_chart_sub_title"></var><input type="text" name="sub-title" class="data-item not-pie-item">
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<var id="lang_chart_x_title"></var><input type="text" name="x-title" class="data-item not-pie-item">
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<var id="lang_chart_y_title"></var><input type="text" name="y-title" class="data-item not-pie-item">
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
<fieldset>
|
||||||
|
<legend><var id="lang_chart_tip"></var></legend>
|
||||||
|
<div class="format-item-container">
|
||||||
|
<label>
|
||||||
|
<var id="lang_cahrt_tip_prefix"></var>
|
||||||
|
<input type="text" id="tipInput" name="tip" class="data-item" disabled="disabled">
|
||||||
|
</label>
|
||||||
|
<p><var id="lang_cahrt_tip_description"></var></p>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
<fieldset>
|
||||||
|
<legend><var id="lang_chart_data_unit"></var></legend>
|
||||||
|
<div class="format-item-container">
|
||||||
|
<label><var id="lang_chart_data_unit_title"></var><input type="text" name="unit" class="data-item"></label>
|
||||||
|
<p><var id="lang_chart_data_unit_description"></var></p>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="charts-view">
|
||||||
|
<div id="chartsContainer" class="charts-container"></div>
|
||||||
|
<div id="chartsType" class="charts-type">
|
||||||
|
<h3><var id="lang_chart_type"></var></h3>
|
||||||
|
<div class="scroll-view">
|
||||||
|
<div class="scroll-container">
|
||||||
|
<div id="scrollBed" class="scroll-bed"></div>
|
||||||
|
</div>
|
||||||
|
<div id="buttonContainer" class="button-container">
|
||||||
|
<a href="#" data-title="prev"><var id="lang_prev_btn"></var></a>
|
||||||
|
<a href="#" data-title="next"><var id="lang_next_btn"></var></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../../third-party/jquery-1.10.2.min.js"></script>
|
||||||
|
<script src="../../third-party/highcharts/highcharts.js"></script>
|
||||||
|
<script src="chart.config.js"></script>
|
||||||
|
<script src="charts.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,519 @@
|
||||||
|
/*
|
||||||
|
* 图片转换对话框脚本
|
||||||
|
**/
|
||||||
|
|
||||||
|
var tableData = [],
|
||||||
|
//编辑器页面table
|
||||||
|
editorTable = null,
|
||||||
|
chartsConfig = window.typeConfig,
|
||||||
|
resizeTimer = null,
|
||||||
|
//初始默认图表类型
|
||||||
|
currentChartType = 0;
|
||||||
|
|
||||||
|
window.onload = function () {
|
||||||
|
|
||||||
|
editorTable = domUtils.findParentByTagName( editor.selection.getRange().startContainer, 'table', true);
|
||||||
|
|
||||||
|
//未找到表格, 显示错误页面
|
||||||
|
if ( !editorTable ) {
|
||||||
|
document.body.innerHTML = "<div class='edui-charts-not-data'>未找到数据</div>";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//初始化图表类型选择
|
||||||
|
initChartsTypeView();
|
||||||
|
renderTable( editorTable );
|
||||||
|
initEvent();
|
||||||
|
initUserConfig( editorTable.getAttribute( "data-chart" ) );
|
||||||
|
$( "#scrollBed .view-box:eq("+ currentChartType +")" ).trigger( "click" );
|
||||||
|
updateViewType( currentChartType );
|
||||||
|
|
||||||
|
dialog.addListener( "resize", function () {
|
||||||
|
|
||||||
|
if ( resizeTimer != null ) {
|
||||||
|
window.clearTimeout( resizeTimer );
|
||||||
|
}
|
||||||
|
|
||||||
|
resizeTimer = window.setTimeout( function () {
|
||||||
|
|
||||||
|
resizeTimer = null;
|
||||||
|
|
||||||
|
renderCharts();
|
||||||
|
|
||||||
|
}, 500 );
|
||||||
|
|
||||||
|
} );
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
function initChartsTypeView () {
|
||||||
|
|
||||||
|
var contents = [];
|
||||||
|
|
||||||
|
for ( var i = 0, len = chartsConfig.length; i<len; i++ ) {
|
||||||
|
|
||||||
|
contents.push( '<div class="view-box" data-chart-type="'+ i +'"><img width="300" src="images/charts'+ i +'.png"></div>' );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$( "#scrollBed" ).html( contents.join( "" ) );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//渲染table, 以便用户修改数据
|
||||||
|
function renderTable ( table ) {
|
||||||
|
|
||||||
|
var tableHtml = [];
|
||||||
|
|
||||||
|
//构造数据
|
||||||
|
for ( var i = 0, row; row = table.rows[ i ]; i++ ) {
|
||||||
|
|
||||||
|
tableData[ i ] = [];
|
||||||
|
tableHtml[ i ] = [];
|
||||||
|
|
||||||
|
for ( var j = 0, cell; cell = row.cells[ j ]; j++ ) {
|
||||||
|
|
||||||
|
var value = getCellValue( cell );
|
||||||
|
|
||||||
|
if ( i > 0 && j > 0 ) {
|
||||||
|
value = +value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( i === 0 || j === 0 ) {
|
||||||
|
tableHtml[ i ].push( '<th>'+ value +'</th>' );
|
||||||
|
} else {
|
||||||
|
tableHtml[ i ].push( '<td><input type="text" class="data-item" value="'+ value +'"></td>' );
|
||||||
|
}
|
||||||
|
|
||||||
|
tableData[ i ][ j ] = value;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
tableHtml[ i ] = tableHtml[ i ].join( "" );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//draw 表格
|
||||||
|
$( "#tableContainer" ).html( '<table id="showTable" border="1"><tbody><tr>'+ tableHtml.join( "</tr><tr>" ) +'</tr></tbody></table>' );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 根据表格已有的图表属性初始化当前图表属性
|
||||||
|
*/
|
||||||
|
function initUserConfig ( config ) {
|
||||||
|
|
||||||
|
var parsedConfig = {};
|
||||||
|
|
||||||
|
if ( !config ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
config = config.split( ";" );
|
||||||
|
|
||||||
|
$.each( config, function ( index, item ) {
|
||||||
|
|
||||||
|
item = item.split( ":" );
|
||||||
|
parsedConfig[ item[ 0 ] ] = item[ 1 ];
|
||||||
|
|
||||||
|
} );
|
||||||
|
|
||||||
|
setUserConfig( parsedConfig );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function initEvent () {
|
||||||
|
|
||||||
|
var cacheValue = null,
|
||||||
|
//图表类型数
|
||||||
|
typeViewCount = chartsConfig.length- 1,
|
||||||
|
$chartsTypeViewBox = $( '#scrollBed .view-box' );
|
||||||
|
|
||||||
|
$( ".charts-format" ).delegate( ".format-ctrl", "change", function () {
|
||||||
|
|
||||||
|
renderCharts();
|
||||||
|
|
||||||
|
} )
|
||||||
|
|
||||||
|
$( ".table-view" ).delegate( ".data-item", "focus", function () {
|
||||||
|
|
||||||
|
cacheValue = this.value;
|
||||||
|
|
||||||
|
} ).delegate( ".data-item", "blur", function () {
|
||||||
|
|
||||||
|
if ( this.value !== cacheValue ) {
|
||||||
|
renderCharts();
|
||||||
|
}
|
||||||
|
|
||||||
|
cacheValue = null;
|
||||||
|
|
||||||
|
} );
|
||||||
|
|
||||||
|
$( "#buttonContainer" ).delegate( "a", "click", function (e) {
|
||||||
|
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
if ( this.getAttribute( "data-title" ) === 'prev' ) {
|
||||||
|
|
||||||
|
if ( currentChartType > 0 ) {
|
||||||
|
currentChartType--;
|
||||||
|
updateViewType( currentChartType );
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if ( currentChartType < typeViewCount ) {
|
||||||
|
currentChartType++;
|
||||||
|
updateViewType( currentChartType );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} );
|
||||||
|
|
||||||
|
//图表类型变化
|
||||||
|
$( '#scrollBed' ).delegate( ".view-box", "click", function (e) {
|
||||||
|
|
||||||
|
var index = $( this ).attr( "data-chart-type" );
|
||||||
|
$chartsTypeViewBox.removeClass( "selected" );
|
||||||
|
$( $chartsTypeViewBox[ index ] ).addClass( "selected" );
|
||||||
|
|
||||||
|
currentChartType = index | 0;
|
||||||
|
|
||||||
|
//饼图, 禁用部分配置
|
||||||
|
if ( currentChartType === chartsConfig.length - 1 ) {
|
||||||
|
|
||||||
|
disableNotPieConfig();
|
||||||
|
|
||||||
|
//启用完整配置
|
||||||
|
} else {
|
||||||
|
|
||||||
|
enableNotPieConfig();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
renderCharts();
|
||||||
|
|
||||||
|
} );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderCharts () {
|
||||||
|
|
||||||
|
var data = collectData();
|
||||||
|
|
||||||
|
$('#chartsContainer').highcharts( $.extend( {}, chartsConfig[ currentChartType ], {
|
||||||
|
|
||||||
|
credits: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
exporting: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
text: data.title,
|
||||||
|
x: -20 //center
|
||||||
|
},
|
||||||
|
subtitle: {
|
||||||
|
text: data.subTitle,
|
||||||
|
x: -20
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
title: {
|
||||||
|
text: data.xTitle
|
||||||
|
},
|
||||||
|
categories: data.categories
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
title: {
|
||||||
|
text: data.yTitle
|
||||||
|
},
|
||||||
|
plotLines: [{
|
||||||
|
value: 0,
|
||||||
|
width: 1,
|
||||||
|
color: '#808080'
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
enabled: true,
|
||||||
|
valueSuffix: data.suffix
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
layout: 'vertical',
|
||||||
|
align: 'right',
|
||||||
|
verticalAlign: 'middle',
|
||||||
|
borderWidth: 1
|
||||||
|
},
|
||||||
|
series: data.series
|
||||||
|
|
||||||
|
} ));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateViewType ( index ) {
|
||||||
|
|
||||||
|
$( "#scrollBed" ).css( 'marginLeft', -index*324+'px' );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function collectData () {
|
||||||
|
|
||||||
|
var form = document.forms[ 'data-form' ],
|
||||||
|
data = null;
|
||||||
|
|
||||||
|
if ( currentChartType !== chartsConfig.length - 1 ) {
|
||||||
|
|
||||||
|
data = getSeriesAndCategories();
|
||||||
|
$.extend( data, getUserConfig() );
|
||||||
|
|
||||||
|
//饼图数据格式
|
||||||
|
} else {
|
||||||
|
data = getSeriesForPieChart();
|
||||||
|
data.title = form[ 'title' ].value;
|
||||||
|
data.suffix = form[ 'unit' ].value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户配置信息
|
||||||
|
*/
|
||||||
|
function getUserConfig () {
|
||||||
|
|
||||||
|
var form = document.forms[ 'data-form' ],
|
||||||
|
info = {
|
||||||
|
title: form[ 'title' ].value,
|
||||||
|
subTitle: form[ 'sub-title' ].value,
|
||||||
|
xTitle: form[ 'x-title' ].value,
|
||||||
|
yTitle: form[ 'y-title' ].value,
|
||||||
|
suffix: form[ 'unit' ].value,
|
||||||
|
//数据对齐方式
|
||||||
|
tableDataFormat: getTableDataFormat (),
|
||||||
|
//饼图提示文字
|
||||||
|
tip: $( "#tipInput" ).val()
|
||||||
|
};
|
||||||
|
|
||||||
|
return info;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function setUserConfig ( config ) {
|
||||||
|
|
||||||
|
var form = document.forms[ 'data-form' ];
|
||||||
|
|
||||||
|
config.title && ( form[ 'title' ].value = config.title );
|
||||||
|
config.subTitle && ( form[ 'sub-title' ].value = config.subTitle );
|
||||||
|
config.xTitle && ( form[ 'x-title' ].value = config.xTitle );
|
||||||
|
config.yTitle && ( form[ 'y-title' ].value = config.yTitle );
|
||||||
|
config.suffix && ( form[ 'unit' ].value = config.suffix );
|
||||||
|
config.dataFormat == "-1" && ( form[ 'charts-format' ][ 1 ].checked = true );
|
||||||
|
config.tip && ( form[ 'tip' ].value = config.tip );
|
||||||
|
currentChartType = config.chartType || 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSeriesAndCategories () {
|
||||||
|
|
||||||
|
var form = document.forms[ 'data-form' ],
|
||||||
|
series = [],
|
||||||
|
categories = [],
|
||||||
|
tmp = [],
|
||||||
|
tableData = getTableData();
|
||||||
|
|
||||||
|
//反转数据
|
||||||
|
if ( getTableDataFormat() === "-1" ) {
|
||||||
|
|
||||||
|
for ( var i = 0, len = tableData.length; i < len; i++ ) {
|
||||||
|
|
||||||
|
for ( var j = 0, jlen = tableData[ i ].length; j < jlen; j++ ) {
|
||||||
|
|
||||||
|
if ( !tmp[ j ] ) {
|
||||||
|
tmp[ j ] = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
tmp[ j ][ i ] = tableData[ i ][ j ];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
tableData = tmp;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
categories = tableData[0].slice( 1 );
|
||||||
|
|
||||||
|
for ( var i = 1, data; data = tableData[ i ]; i++ ) {
|
||||||
|
|
||||||
|
series.push( {
|
||||||
|
name: data[ 0 ],
|
||||||
|
data: data.slice( 1 )
|
||||||
|
} );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
series: series,
|
||||||
|
categories: categories
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 获取数据源数据对齐方式
|
||||||
|
*/
|
||||||
|
function getTableDataFormat () {
|
||||||
|
|
||||||
|
var form = document.forms[ 'data-form' ],
|
||||||
|
items = form['charts-format'];
|
||||||
|
|
||||||
|
return items[ 0 ].checked ? items[ 0 ].value : items[ 1 ].value;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 禁用非饼图类型的配置项
|
||||||
|
*/
|
||||||
|
function disableNotPieConfig() {
|
||||||
|
|
||||||
|
updateConfigItem( 'disable' );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 启用非饼图类型的配置项
|
||||||
|
*/
|
||||||
|
function enableNotPieConfig() {
|
||||||
|
|
||||||
|
updateConfigItem( 'enable' );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateConfigItem ( value ) {
|
||||||
|
|
||||||
|
var table = $( "#showTable" )[ 0 ],
|
||||||
|
isDisable = value === 'disable' ? true : false;
|
||||||
|
|
||||||
|
//table中的input处理
|
||||||
|
for ( var i = 2 , row; row = table.rows[ i ]; i++ ) {
|
||||||
|
|
||||||
|
for ( var j = 1, cell; cell = row.cells[ j ]; j++ ) {
|
||||||
|
|
||||||
|
$( "input", cell ).attr( "disabled", isDisable );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//其他项处理
|
||||||
|
$( "input.not-pie-item" ).attr( "disabled", isDisable );
|
||||||
|
$( "#tipInput" ).attr( "disabled", !isDisable )
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 获取饼图数据
|
||||||
|
* 饼图的数据只取第一行的
|
||||||
|
**/
|
||||||
|
function getSeriesForPieChart () {
|
||||||
|
|
||||||
|
var series = {
|
||||||
|
type: 'pie',
|
||||||
|
name: $("#tipInput").val(),
|
||||||
|
data: []
|
||||||
|
},
|
||||||
|
tableData = getTableData();
|
||||||
|
|
||||||
|
|
||||||
|
for ( var j = 1, jlen = tableData[ 0 ].length; j < jlen; j++ ) {
|
||||||
|
|
||||||
|
var title = tableData[ 0 ][ j ],
|
||||||
|
val = tableData[ 1 ][ j ];
|
||||||
|
|
||||||
|
series.data.push( [ title, val ] );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
series: [ series ]
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function getTableData () {
|
||||||
|
|
||||||
|
var table = document.getElementById( "showTable" ),
|
||||||
|
xCount = table.rows[0].cells.length - 1,
|
||||||
|
values = getTableInputValue();
|
||||||
|
|
||||||
|
for ( var i = 0, value; value = values[ i ]; i++ ) {
|
||||||
|
|
||||||
|
tableData[ Math.floor( i / xCount ) + 1 ][ i % xCount + 1 ] = values[ i ];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return tableData;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function getTableInputValue () {
|
||||||
|
|
||||||
|
var table = document.getElementById( "showTable" ),
|
||||||
|
inputs = table.getElementsByTagName( "input" ),
|
||||||
|
values = [];
|
||||||
|
|
||||||
|
for ( var i = 0, input; input = inputs[ i ]; i++ ) {
|
||||||
|
values.push( input.value | 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
return values;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCellValue ( cell ) {
|
||||||
|
|
||||||
|
var value = utils.trim( ( cell.innerText || cell.textContent || '' ) );
|
||||||
|
|
||||||
|
return value.replace( new RegExp( UE.dom.domUtils.fillChar, 'g' ), '' ).replace( /^\s+|\s+$/g, '' );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//dialog确认事件
|
||||||
|
dialog.onok = function () {
|
||||||
|
|
||||||
|
//收集信息
|
||||||
|
var form = document.forms[ 'data-form' ],
|
||||||
|
info = getUserConfig();
|
||||||
|
|
||||||
|
//添加图表类型
|
||||||
|
info.chartType = currentChartType;
|
||||||
|
|
||||||
|
//同步表格数据到编辑器
|
||||||
|
syncTableData();
|
||||||
|
|
||||||
|
//执行图表命令
|
||||||
|
editor.execCommand( 'charts', info );
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 同步图表编辑视图的表格数据到编辑器里的原始表格
|
||||||
|
*/
|
||||||
|
function syncTableData () {
|
||||||
|
|
||||||
|
var tableData = getTableData();
|
||||||
|
|
||||||
|
for ( var i = 1, row; row = editorTable.rows[ i ]; i++ ) {
|
||||||
|
|
||||||
|
for ( var j = 1, cell; cell = row.cells[ j ]; j++ ) {
|
||||||
|
|
||||||
|
cell.innerHTML = tableData[ i ] [ j ];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 7.6 KiB |
After Width: | Height: | Size: 8.1 KiB |
After Width: | Height: | Size: 46 KiB |
|
@ -0,0 +1,43 @@
|
||||||
|
.jd img{
|
||||||
|
background:transparent url(images/jxface2.gif?v=1.1) no-repeat scroll left top;
|
||||||
|
cursor:pointer;width:35px;height:35px;display:block;
|
||||||
|
}
|
||||||
|
.pp img{
|
||||||
|
background:transparent url(images/fface.gif?v=1.1) no-repeat scroll left top;
|
||||||
|
cursor:pointer;width:25px;height:25px;display:block;
|
||||||
|
}
|
||||||
|
.ldw img{
|
||||||
|
background:transparent url(images/wface.gif?v=1.1) no-repeat scroll left top;
|
||||||
|
cursor:pointer;width:35px;height:35px;display:block;
|
||||||
|
}
|
||||||
|
.tsj img{
|
||||||
|
background:transparent url(images/tface.gif?v=1.1) no-repeat scroll left top;
|
||||||
|
cursor:pointer;width:35px;height:35px;display:block;
|
||||||
|
}
|
||||||
|
.cat img{
|
||||||
|
background:transparent url(images/cface.gif?v=1.1) no-repeat scroll left top;
|
||||||
|
cursor:pointer;width:35px;height:35px;display:block;
|
||||||
|
}
|
||||||
|
.bb img{
|
||||||
|
background:transparent url(images/bface.gif?v=1.1) no-repeat scroll left top;
|
||||||
|
cursor:pointer;width:35px;height:35px;display:block;
|
||||||
|
}
|
||||||
|
.youa img{
|
||||||
|
background:transparent url(images/yface.gif?v=1.1) no-repeat scroll left top;
|
||||||
|
cursor:pointer;width:35px;height:35px;display:block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.smileytable td {height: 37px;}
|
||||||
|
#tabPanel{margin-left:5px;overflow: hidden;}
|
||||||
|
#tabContent {float:left;background:#FFFFFF;}
|
||||||
|
#tabContent div{display: none;width:480px;overflow:hidden;}
|
||||||
|
#tabIconReview.show{left:17px;display:block;}
|
||||||
|
.menuFocus{background:#ACCD3C;}
|
||||||
|
.menuDefault{background:#FFFFFF;}
|
||||||
|
#tabIconReview{position:absolute;left:406px;left:398px \9;top:41px;z-index:65533;width:90px;height:76px;}
|
||||||
|
img.review{width:90px;height:76px;border:2px solid #9cb945;background:#FFFFFF;background-position:center;background-repeat:no-repeat;}
|
||||||
|
|
||||||
|
.wrapper .tabbody{position:relative;float:left;clear:both;padding:10px;width: 95%;}
|
||||||
|
.tabbody table{width: 100%;}
|
||||||
|
.tabbody td{border:1px solid #BAC498;}
|
||||||
|
.tabbody td span{display: block;zoom:1;padding:0 4px;}
|
|
@ -0,0 +1,54 @@
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||||
|
<meta name="robots" content="noindex, nofollow"/>
|
||||||
|
<script type="text/javascript" src="../internal.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="emotion.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="tabPanel" class="wrapper">
|
||||||
|
<div id="tabHeads" class="tabhead">
|
||||||
|
<span><var id="lang_input_choice"></var></span>
|
||||||
|
<span><var id="lang_input_Tuzki"></var></span>
|
||||||
|
<span><var id="lang_input_lvdouwa"></var></span>
|
||||||
|
<span><var id="lang_input_BOBO"></var></span>
|
||||||
|
<span><var id="lang_input_babyCat"></var></span>
|
||||||
|
<span><var id="lang_input_bubble"></var></span>
|
||||||
|
<span><var id="lang_input_youa"></var></span>
|
||||||
|
</div>
|
||||||
|
<div id="tabBodys" class="tabbody">
|
||||||
|
<div id="tab0"></div>
|
||||||
|
<div id="tab1"></div>
|
||||||
|
<div id="tab2"></div>
|
||||||
|
<div id="tab3"></div>
|
||||||
|
<div id="tab4"></div>
|
||||||
|
<div id="tab5"></div>
|
||||||
|
<div id="tab6"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="tabIconReview">
|
||||||
|
<img id='faceReview' class='review' src="../../themes/default/images/spacer.gif"/>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript" src="emotion.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var emotion = {
|
||||||
|
tabNum:7, //切换面板数量
|
||||||
|
SmilmgName:{ tab0:['j_00', 84], tab1:['t_00', 40], tab2:['w_00', 52], tab3:['B_00', 63], tab4:['C_00', 20], tab5:['i_f', 50], tab6:['y_00', 40] }, //图片前缀名
|
||||||
|
imageFolders:{ tab0:'jx2/', tab1:'tsj/', tab2:'ldw/', tab3:'bobo/', tab4:'babycat/', tab5:'face/', tab6:'youa/'}, //图片对应文件夹路径
|
||||||
|
imageCss:{tab0:'jd', tab1:'tsj', tab2:'ldw', tab3:'bb', tab4:'cat', tab5:'pp', tab6:'youa'}, //图片css类名
|
||||||
|
imageCssOffset:{tab0:35, tab1:35, tab2:35, tab3:35, tab4:35, tab5:25, tab6:35}, //图片偏移
|
||||||
|
SmileyInfor:{
|
||||||
|
tab0:['Kiss', 'Love', 'Yeah', '啊!', '背扭', '顶', '抖胸', '88', '汗', '瞌睡', '鲁拉', '拍砖', '揉脸', '生日快乐', '大笑', '瀑布汗~', '惊讶', '臭美', '傻笑', '抛媚眼', '发怒', '打酱油', '俯卧撑', '气愤', '?', '吻', '怒', '胜利', 'HI', 'KISS', '不说', '不要', '扯花', '大心', '顶', '大惊', '飞吻', '鬼脸', '害羞', '口水', '狂哭', '来', '发财了', '吃西瓜', '套牢', '害羞', '庆祝', '我来了', '敲打', '晕了', '胜利', '臭美', '被打了', '贪吃', '迎接', '酷', '微笑', '亲吻', '调皮', '惊恐', '耍酷', '发火', '害羞', '汗水', '大哭', '', '加油', '困', '你NB', '晕倒', '开心', '偷笑', '大哭', '滴汗', '叹气', '超赞', '??', '飞吻', '天使', '撒花', '生气', '被砸', '吓傻', '随意吐'],
|
||||||
|
tab1:['Kiss', 'Love', 'Yeah', '啊!', '背扭', '顶', '抖胸', '88', '汗', '瞌睡', '鲁拉', '拍砖', '揉脸', '生日快乐', '摊手', '睡觉', '瘫坐', '无聊', '星星闪', '旋转', '也不行', '郁闷', '正Music', '抓墙', '撞墙至死', '歪头', '戳眼', '飘过', '互相拍砖', '砍死你', '扔桌子', '少林寺', '什么?', '转头', '我爱牛奶', '我踢', '摇晃', '晕厥', '在笼子里', '震荡'],
|
||||||
|
tab2:['大笑', '瀑布汗~', '惊讶', '臭美', '傻笑', '抛媚眼', '发怒', '我错了', 'money', '气愤', '挑逗', '吻', '怒', '胜利', '委屈', '受伤', '说啥呢?', '闭嘴', '不', '逗你玩儿', '飞吻', '眩晕', '魔法', '我来了', '睡了', '我打', '闭嘴', '打', '打晕了', '刷牙', '爆揍', '炸弹', '倒立', '刮胡子', '邪恶的笑', '不要不要', '爱恋中', '放大仔细看', '偷窥', '超高兴', '晕', '松口气', '我跑', '享受', '修养', '哭', '汗', '啊~', '热烈欢迎', '打酱油', '俯卧撑', '?'],
|
||||||
|
tab3:['HI', 'KISS', '不说', '不要', '扯花', '大心', '顶', '大惊', '飞吻', '鬼脸', '害羞', '口水', '狂哭', '来', '泪眼', '流泪', '生气', '吐舌', '喜欢', '旋转', '再见', '抓狂', '汗', '鄙视', '拜', '吐血', '嘘', '打人', '蹦跳', '变脸', '扯肉', '吃To', '吃花', '吹泡泡糖', '大变身', '飞天舞', '回眸', '可怜', '猛抽', '泡泡', '苹果', '亲', '', '骚舞', '烧香', '睡', '套娃娃', '捅捅', '舞倒', '西红柿', '爱慕', '摇', '摇摆', '杂耍', '招财', '被殴', '被球闷', '大惊', '理想', '欧打', '呕吐', '碎', '吐痰'],
|
||||||
|
tab4:['发财了', '吃西瓜', '套牢', '害羞', '庆祝', '我来了', '敲打', '晕了', '胜利', '臭美', '被打了', '贪吃', '迎接', '酷', '顶', '幸运', '爱心', '躲', '送花', '选择'],
|
||||||
|
tab5:['微笑', '亲吻', '调皮', '惊讶', '耍酷', '发火', '害羞', '汗水', '大哭', '得意', '鄙视', '困', '夸奖', '晕倒', '疑问', '媒婆', '狂吐', '青蛙', '发愁', '亲吻', '', '爱心', '心碎', '玫瑰', '礼物', '哭', '奸笑', '可爱', '得意', '呲牙', '暴汗', '楚楚可怜', '困', '哭', '生气', '惊讶', '口水', '彩虹', '夜空', '太阳', '钱钱', '灯泡', '咖啡', '蛋糕', '音乐', '爱', '胜利', '赞', '鄙视', 'OK'],
|
||||||
|
tab6:['男兜', '女兜', '开心', '乖乖', '偷笑', '大笑', '抽泣', '大哭', '无奈', '滴汗', '叹气', '狂晕', '委屈', '超赞', '??', '疑问', '飞吻', '天使', '撒花', '生气', '被砸', '口水', '泪奔', '吓傻', '吐舌头', '点头', '随意吐', '旋转', '困困', '鄙视', '狂顶', '篮球', '再见', '欢迎光临', '恭喜发财', '稍等', '我在线', '恕不议价', '库房有货', '货在路上']
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,186 @@
|
||||||
|
window.onload = function () {
|
||||||
|
editor.setOpt({
|
||||||
|
emotionLocalization:false
|
||||||
|
});
|
||||||
|
|
||||||
|
emotion.SmileyPath = editor.options.emotionLocalization === true ? 'images/' : "http://img.baidu.com/hi/";
|
||||||
|
emotion.SmileyBox = createTabList( emotion.tabNum );
|
||||||
|
emotion.tabExist = createArr( emotion.tabNum );
|
||||||
|
|
||||||
|
initImgName();
|
||||||
|
initEvtHandler( "tabHeads" );
|
||||||
|
};
|
||||||
|
|
||||||
|
function initImgName() {
|
||||||
|
for ( var pro in emotion.SmilmgName ) {
|
||||||
|
var tempName = emotion.SmilmgName[pro],
|
||||||
|
tempBox = emotion.SmileyBox[pro],
|
||||||
|
tempStr = "";
|
||||||
|
|
||||||
|
if ( tempBox.length ) return;
|
||||||
|
for ( var i = 1; i <= tempName[1]; i++ ) {
|
||||||
|
tempStr = tempName[0];
|
||||||
|
if ( i < 10 ) tempStr = tempStr + '0';
|
||||||
|
tempStr = tempStr + i + '.gif';
|
||||||
|
tempBox.push( tempStr );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function initEvtHandler( conId ) {
|
||||||
|
var tabHeads = $G( conId );
|
||||||
|
for ( var i = 0, j = 0; i < tabHeads.childNodes.length; i++ ) {
|
||||||
|
var tabObj = tabHeads.childNodes[i];
|
||||||
|
if ( tabObj.nodeType == 1 ) {
|
||||||
|
domUtils.on( tabObj, "click", (function ( index ) {
|
||||||
|
return function () {
|
||||||
|
switchTab( index );
|
||||||
|
};
|
||||||
|
})( j ) );
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
switchTab( 0 );
|
||||||
|
$G( "tabIconReview" ).style.display = 'none';
|
||||||
|
}
|
||||||
|
|
||||||
|
function InsertSmiley( url, evt ) {
|
||||||
|
var obj = {
|
||||||
|
src:editor.options.emotionLocalization ? editor.options.UEDITOR_HOME_URL + "dialogs/emotion/" + url : url
|
||||||
|
};
|
||||||
|
obj._src = obj.src;
|
||||||
|
editor.execCommand( 'insertimage', obj );
|
||||||
|
if ( !evt.ctrlKey ) {
|
||||||
|
dialog.popup.hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function switchTab( index ) {
|
||||||
|
|
||||||
|
autoHeight( index );
|
||||||
|
if ( emotion.tabExist[index] == 0 ) {
|
||||||
|
emotion.tabExist[index] = 1;
|
||||||
|
createTab( 'tab' + index );
|
||||||
|
}
|
||||||
|
//获取呈现元素句柄数组
|
||||||
|
var tabHeads = $G( "tabHeads" ).getElementsByTagName( "span" ),
|
||||||
|
tabBodys = $G( "tabBodys" ).getElementsByTagName( "div" ),
|
||||||
|
i = 0, L = tabHeads.length;
|
||||||
|
//隐藏所有呈现元素
|
||||||
|
for ( ; i < L; i++ ) {
|
||||||
|
tabHeads[i].className = "";
|
||||||
|
tabBodys[i].style.display = "none";
|
||||||
|
}
|
||||||
|
//显示对应呈现元素
|
||||||
|
tabHeads[index].className = "focus";
|
||||||
|
tabBodys[index].style.display = "block";
|
||||||
|
}
|
||||||
|
|
||||||
|
function autoHeight( index ) {
|
||||||
|
var iframe = dialog.getDom( "iframe" ),
|
||||||
|
parent = iframe.parentNode.parentNode;
|
||||||
|
switch ( index ) {
|
||||||
|
case 0:
|
||||||
|
iframe.style.height = "380px";
|
||||||
|
parent.style.height = "392px";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
iframe.style.height = "220px";
|
||||||
|
parent.style.height = "232px";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
iframe.style.height = "260px";
|
||||||
|
parent.style.height = "272px";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
iframe.style.height = "300px";
|
||||||
|
parent.style.height = "312px";
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
iframe.style.height = "140px";
|
||||||
|
parent.style.height = "152px";
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
iframe.style.height = "260px";
|
||||||
|
parent.style.height = "272px";
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
iframe.style.height = "230px";
|
||||||
|
parent.style.height = "242px";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function createTab( tabName ) {
|
||||||
|
var faceVersion = "?v=1.1", //版本号
|
||||||
|
tab = $G( tabName ), //获取将要生成的Div句柄
|
||||||
|
imagePath = emotion.SmileyPath + emotion.imageFolders[tabName], //获取显示表情和预览表情的路径
|
||||||
|
positionLine = 11 / 2, //中间数
|
||||||
|
iWidth = iHeight = 35, //图片长宽
|
||||||
|
iColWidth = 3, //表格剩余空间的显示比例
|
||||||
|
tableCss = emotion.imageCss[tabName],
|
||||||
|
cssOffset = emotion.imageCssOffset[tabName],
|
||||||
|
textHTML = ['<table class="smileytable">'],
|
||||||
|
i = 0, imgNum = emotion.SmileyBox[tabName].length, imgColNum = 11, faceImage,
|
||||||
|
sUrl, realUrl, posflag, offset, infor;
|
||||||
|
|
||||||
|
for ( ; i < imgNum; ) {
|
||||||
|
textHTML.push( '<tr>' );
|
||||||
|
for ( var j = 0; j < imgColNum; j++, i++ ) {
|
||||||
|
faceImage = emotion.SmileyBox[tabName][i];
|
||||||
|
if ( faceImage ) {
|
||||||
|
sUrl = imagePath + faceImage + faceVersion;
|
||||||
|
realUrl = imagePath + faceImage;
|
||||||
|
posflag = j < positionLine ? 0 : 1;
|
||||||
|
offset = cssOffset * i * (-1) - 1;
|
||||||
|
infor = emotion.SmileyInfor[tabName][i];
|
||||||
|
|
||||||
|
textHTML.push( '<td class="' + tableCss + '" border="1" width="' + iColWidth + '%" style="border-collapse:collapse;" align="center" bgcolor="transparent" onclick="InsertSmiley(\'' + realUrl.replace( /'/g, "\\'" ) + '\',event)" onmouseover="over(this,\'' + sUrl + '\',\'' + posflag + '\')" onmouseout="out(this)">' );
|
||||||
|
textHTML.push( '<span>' );
|
||||||
|
textHTML.push( '<img style="background-position:left ' + offset + 'px;" title="' + infor + '" src="' + emotion.SmileyPath + (editor.options.emotionLocalization ? '0.gif" width="' : 'default/0.gif" width="') + iWidth + '" height="' + iHeight + '"></img>' );
|
||||||
|
textHTML.push( '</span>' );
|
||||||
|
} else {
|
||||||
|
textHTML.push( '<td width="' + iColWidth + '%" bgcolor="#FFFFFF">' );
|
||||||
|
}
|
||||||
|
textHTML.push( '</td>' );
|
||||||
|
}
|
||||||
|
textHTML.push( '</tr>' );
|
||||||
|
}
|
||||||
|
textHTML.push( '</table>' );
|
||||||
|
textHTML = textHTML.join( "" );
|
||||||
|
tab.innerHTML = textHTML;
|
||||||
|
}
|
||||||
|
|
||||||
|
function over( td, srcPath, posFlag ) {
|
||||||
|
td.style.backgroundColor = "#ACCD3C";
|
||||||
|
$G( 'faceReview' ).style.backgroundImage = "url(" + srcPath + ")";
|
||||||
|
if ( posFlag == 1 ) $G( "tabIconReview" ).className = "show";
|
||||||
|
$G( "tabIconReview" ).style.display = 'block';
|
||||||
|
}
|
||||||
|
|
||||||
|
function out( td ) {
|
||||||
|
td.style.backgroundColor = "transparent";
|
||||||
|
var tabIconRevew = $G( "tabIconReview" );
|
||||||
|
tabIconRevew.className = "";
|
||||||
|
tabIconRevew.style.display = 'none';
|
||||||
|
}
|
||||||
|
|
||||||
|
function createTabList( tabNum ) {
|
||||||
|
var obj = {};
|
||||||
|
for ( var i = 0; i < tabNum; i++ ) {
|
||||||
|
obj["tab" + i] = [];
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
function createArr( tabNum ) {
|
||||||
|
var arr = [];
|
||||||
|
for ( var i = 0; i < tabNum; i++ ) {
|
||||||
|
arr[i] = 0;
|
||||||
|
}
|
||||||
|
return arr;
|
||||||
|
}
|
||||||
|
|