├── doc ├── mddoc.json ├── SUMMARY.md ├── template.md ├── config.md ├── cli.md ├── README.md ├── .gitignore └── webhook.md ├── template ├── statics │ ├── images │ │ ├── left_menuForOutLook.gif │ │ └── left_menuForOutLook.png │ ├── plugin │ │ ├── layui │ │ │ ├── font │ │ │ │ ├── iconfont.eot │ │ │ │ ├── iconfont.ttf │ │ │ │ └── iconfont.woff │ │ │ ├── images │ │ │ │ └── face │ │ │ │ │ ├── 0.gif │ │ │ │ │ ├── 1.gif │ │ │ │ │ ├── 10.gif │ │ │ │ │ ├── 11.gif │ │ │ │ │ ├── 12.gif │ │ │ │ │ ├── 13.gif │ │ │ │ │ ├── 14.gif │ │ │ │ │ ├── 15.gif │ │ │ │ │ ├── 16.gif │ │ │ │ │ ├── 17.gif │ │ │ │ │ ├── 18.gif │ │ │ │ │ ├── 19.gif │ │ │ │ │ ├── 2.gif │ │ │ │ │ ├── 20.gif │ │ │ │ │ ├── 21.gif │ │ │ │ │ ├── 22.gif │ │ │ │ │ ├── 23.gif │ │ │ │ │ ├── 24.gif │ │ │ │ │ ├── 25.gif │ │ │ │ │ ├── 26.gif │ │ │ │ │ ├── 27.gif │ │ │ │ │ ├── 28.gif │ │ │ │ │ ├── 29.gif │ │ │ │ │ ├── 3.gif │ │ │ │ │ ├── 30.gif │ │ │ │ │ ├── 31.gif │ │ │ │ │ ├── 32.gif │ │ │ │ │ ├── 33.gif │ │ │ │ │ ├── 34.gif │ │ │ │ │ ├── 35.gif │ │ │ │ │ ├── 36.gif │ │ │ │ │ ├── 37.gif │ │ │ │ │ ├── 38.gif │ │ │ │ │ ├── 39.gif │ │ │ │ │ ├── 4.gif │ │ │ │ │ ├── 40.gif │ │ │ │ │ ├── 41.gif │ │ │ │ │ ├── 42.gif │ │ │ │ │ ├── 43.gif │ │ │ │ │ ├── 44.gif │ │ │ │ │ ├── 45.gif │ │ │ │ │ ├── 46.gif │ │ │ │ │ ├── 47.gif │ │ │ │ │ ├── 48.gif │ │ │ │ │ ├── 49.gif │ │ │ │ │ ├── 5.gif │ │ │ │ │ ├── 50.gif │ │ │ │ │ ├── 51.gif │ │ │ │ │ ├── 52.gif │ │ │ │ │ ├── 53.gif │ │ │ │ │ ├── 54.gif │ │ │ │ │ ├── 55.gif │ │ │ │ │ ├── 56.gif │ │ │ │ │ ├── 57.gif │ │ │ │ │ ├── 58.gif │ │ │ │ │ ├── 59.gif │ │ │ │ │ ├── 6.gif │ │ │ │ │ ├── 60.gif │ │ │ │ │ ├── 61.gif │ │ │ │ │ ├── 62.gif │ │ │ │ │ ├── 63.gif │ │ │ │ │ ├── 64.gif │ │ │ │ │ ├── 65.gif │ │ │ │ │ ├── 66.gif │ │ │ │ │ ├── 67.gif │ │ │ │ │ ├── 68.gif │ │ │ │ │ ├── 69.gif │ │ │ │ │ ├── 7.gif │ │ │ │ │ ├── 70.gif │ │ │ │ │ ├── 71.gif │ │ │ │ │ ├── 8.gif │ │ │ │ │ └── 9.gif │ │ │ ├── css │ │ │ │ ├── modules │ │ │ │ │ ├── layer │ │ │ │ │ │ └── default │ │ │ │ │ │ │ ├── icon.png │ │ │ │ │ │ │ ├── icon-ext.png │ │ │ │ │ │ │ ├── loading-0.gif │ │ │ │ │ │ │ ├── loading-1.gif │ │ │ │ │ │ │ └── loading-2.gif │ │ │ │ │ ├── code.css │ │ │ │ │ └── laydate │ │ │ │ │ │ └── default │ │ │ │ │ │ └── laydate.css │ │ │ │ └── layui.mobile.css │ │ │ ├── lay │ │ │ │ └── modules │ │ │ │ │ ├── code.js │ │ │ │ │ ├── laytpl.js │ │ │ │ │ ├── flow.js │ │ │ │ │ ├── util.js │ │ │ │ │ ├── rate.js │ │ │ │ │ ├── tree.js │ │ │ │ │ ├── carousel.js │ │ │ │ │ ├── laypage.js │ │ │ │ │ ├── upload.js │ │ │ │ │ ├── element.js │ │ │ │ │ ├── form.js │ │ │ │ │ └── layedit.js │ │ │ └── layui.js │ │ ├── zTree │ │ │ ├── css │ │ │ │ ├── metroStyle │ │ │ │ │ ├── img │ │ │ │ │ │ ├── metro.gif │ │ │ │ │ │ ├── metro.png │ │ │ │ │ │ ├── loading.gif │ │ │ │ │ │ └── line_conn.png │ │ │ │ │ └── metroStyle.css │ │ │ │ ├── zTreeStyle │ │ │ │ │ ├── img │ │ │ │ │ │ ├── diy │ │ │ │ │ │ │ ├── 2.png │ │ │ │ │ │ │ ├── 3.png │ │ │ │ │ │ │ ├── 4.png │ │ │ │ │ │ │ ├── 5.png │ │ │ │ │ │ │ ├── 6.png │ │ │ │ │ │ │ ├── 7.png │ │ │ │ │ │ │ ├── 8.png │ │ │ │ │ │ │ ├── 9.png │ │ │ │ │ │ │ ├── 1_open.png │ │ │ │ │ │ │ └── 1_close.png │ │ │ │ │ │ ├── loading.gif │ │ │ │ │ │ ├── line_conn.gif │ │ │ │ │ │ ├── zTreeStandard.gif │ │ │ │ │ │ └── zTreeStandard.png │ │ │ │ │ └── zTreeStyle.css │ │ │ │ └── awesomeStyle │ │ │ │ │ ├── img │ │ │ │ │ └── loading.gif │ │ │ │ │ ├── awesome.less │ │ │ │ │ └── awesome.css │ │ │ ├── .gitattributes │ │ │ ├── package.json │ │ │ ├── zTree.v3.jquery.json │ │ │ ├── README.md │ │ │ ├── .gitignore │ │ │ └── js │ │ │ │ ├── jquery.ztree.exhide.min.js │ │ │ │ └── jquery.ztree.excheck.min.js │ │ └── SyntaxHighlighter │ │ │ └── shCoreDefault.css │ ├── js │ │ ├── home.js │ │ └── docView.js │ └── css │ │ └── style.css └── html │ ├── search.php │ └── article.php ├── github-webhook.php ├── composer.json ├── config └── github.php ├── README.md ├── LICENSE ├── .php_cs.dist └── src ├── Args.php ├── GithubWebhook.php ├── File.php ├── CategoryParser.php └── Builder.php /doc/mddoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mddoc 使用手册" 3 | } -------------------------------------------------------------------------------- /template/statics/images/left_menuForOutLook.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/images/left_menuForOutLook.gif -------------------------------------------------------------------------------- /template/statics/images/left_menuForOutLook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/images/left_menuForOutLook.png -------------------------------------------------------------------------------- /template/statics/plugin/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/font/iconfont.eot -------------------------------------------------------------------------------- /template/statics/plugin/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /template/statics/plugin/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/font/iconfont.woff -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/0.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/1.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/10.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/11.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/12.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/13.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/14.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/15.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/16.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/17.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/18.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/19.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/2.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/20.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/21.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/22.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/23.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/24.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/25.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/26.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/27.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/28.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/29.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/3.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/30.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/31.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/32.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/33.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/34.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/35.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/36.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/37.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/38.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/39.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/4.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/40.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/41.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/42.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/43.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/44.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/45.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/46.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/47.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/48.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/49.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/5.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/50.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/51.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/52.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/53.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/54.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/55.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/56.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/57.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/58.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/59.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/6.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/60.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/61.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/62.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/63.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/64.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/65.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/66.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/67.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/68.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/69.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/7.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/70.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/71.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/8.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/images/face/9.gif -------------------------------------------------------------------------------- /doc/SUMMARY.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | 3 | * [介绍](README.md) 4 | * [配置文件](config.md) 5 | * [命令行生成](cli.md) 6 | * [Webhook 生成](webhook.md) 7 | * [自定义模版](template.md) 8 | -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/metroStyle/img/metro.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/zTree/css/metroStyle/img/metro.gif -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/metroStyle/img/metro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/zTree/css/metroStyle/img/metro.png -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/zTreeStyle/img/diy/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/zTree/css/zTreeStyle/img/diy/2.png -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/zTreeStyle/img/diy/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/zTree/css/zTreeStyle/img/diy/3.png -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/zTreeStyle/img/diy/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/zTree/css/zTreeStyle/img/diy/4.png -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/zTreeStyle/img/diy/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/zTree/css/zTreeStyle/img/diy/5.png -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/zTreeStyle/img/diy/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/zTree/css/zTreeStyle/img/diy/6.png -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/zTreeStyle/img/diy/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/zTree/css/zTreeStyle/img/diy/7.png -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/zTreeStyle/img/diy/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/zTree/css/zTreeStyle/img/diy/8.png -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/zTreeStyle/img/diy/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/zTree/css/zTreeStyle/img/diy/9.png -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/metroStyle/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/zTree/css/metroStyle/img/loading.gif -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/zTreeStyle/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/zTree/css/zTreeStyle/img/loading.gif -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/awesomeStyle/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/zTree/css/awesomeStyle/img/loading.gif -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/metroStyle/img/line_conn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/zTree/css/metroStyle/img/line_conn.png -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/zTreeStyle/img/diy/1_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/zTree/css/zTreeStyle/img/diy/1_open.png -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/zTreeStyle/img/line_conn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/zTree/css/zTreeStyle/img/line_conn.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/zTreeStyle/img/diy/1_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/zTree/css/zTreeStyle/img/diy/1_close.png -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/zTreeStyle/img/zTreeStandard.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/zTree/css/zTreeStyle/img/zTreeStandard.gif -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/zTreeStyle/img/zTreeStandard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/zTree/css/zTreeStyle/img/zTreeStandard.png -------------------------------------------------------------------------------- /template/statics/plugin/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /template/statics/plugin/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /template/statics/plugin/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yurunsoft/mddoc/HEAD/template/statics/plugin/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /template/statics/js/home.js: -------------------------------------------------------------------------------- 1 | $.ajaxSetup({ 2 | xhrFields: { 3 | withCredentials: true 4 | }, 5 | }); 6 | $(function(){ 7 | layui.element.init(); 8 | layui.table.init(); 9 | layui.form.render(); 10 | }); -------------------------------------------------------------------------------- /doc/template.md: -------------------------------------------------------------------------------- 1 | # 自定义模版 2 | 3 | [TOC] 4 | 5 | ## 模版结构 6 | 7 | `html/article.php` - 文档页面模版 8 | `html/search.php` - 实现搜索的`js`文件模版,最终生成到`statics/js/mddoc-search.js` 9 | `statics` - 该目录及目录中所有文件,原样复制到生成目录中。 10 | 11 | > 其它详见代码,不复杂 -------------------------------------------------------------------------------- /doc/config.md: -------------------------------------------------------------------------------- 1 | # 配置文件 2 | 3 | [TOC] 4 | 5 | ## 文档配置文件 6 | 7 | 在文档根目录下,创建`mddoc.json`文件。内容格式是`json`,这里面数据是可以代入到生成模版中的。默认一般建议配置一个`name`即可,其它如有需要再配置。 8 | 9 | ```json 10 | { 11 | "name": "mddoc 使用手册" 12 | } 13 | ``` 14 | 15 | 16 | -------------------------------------------------------------------------------- /github-webhook.php: -------------------------------------------------------------------------------- 1 | handle(); 11 | -------------------------------------------------------------------------------- /doc/cli.md: -------------------------------------------------------------------------------- 1 | # 命令行生成 2 | 3 | [TOC] 4 | 5 | ## 使用步骤 6 | 7 | 1. 首先通过 git 将项目拉取下来 8 | 2. 执行`composer update`安装 9 | 3. 执行`php build.php -markdownPath "md文档路径" -htmlPath "html生成路径"` 10 | 11 | > 注意!html生成目录在生成前会被清空所有文件,请慎重选择目录! 12 | 13 | 默认生成使用的模版是`mddoc/template`下的,如果要指定自定义的模版路径,加上参数`-templatePath "路径"` -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "yurunsoft/mddoc", 3 | "description": "use php to build markdown doc", 4 | "type": "library", 5 | "license": "MIT", 6 | "autoload": { 7 | "psr-4": { 8 | "Yurun\\MdDoc\\": "src/" 9 | } 10 | }, 11 | "require": { 12 | "php": ">=7.1.0", 13 | "joyqi/hyper-down" : "~2.4.0", 14 | "yurunsoft/yurun-http": "~4.0" 15 | }, 16 | "require-dev": { 17 | "friendsofphp/php-cs-fixer": "~2.18.0" 18 | }, 19 | "bin": [ 20 | "build.php" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /doc/README.md: -------------------------------------------------------------------------------- 1 | # 介绍 2 | 3 | [TOC] 4 | 5 | mddoc 是一个开源的 markdown 文档转 html 文档工具,它使用 php 开发,支持 php >= 5.4。它生成的 html 可以直接放在网站上,支持全文搜索、自定义 html 模版。 6 | 7 | mddoc 同时支持命令行、git webhook生成,不光可以本地生成后上传,也可以直接做成 webhook 自动部署生成,非常简单。 8 | 9 | mddoc 兼容 GitBook Editor 编辑的格式,可以说 mddoc 是不想装 Node 环境又想使用 gitbook 的用户的一个非常好的选择。 10 | 11 | 其实我开发 mddoc 的本意,其实是因为我用的虚拟主机,不能装 Node 环境。想要实现 webhook 自动生成比较困难,所以就用 php 写了这个…… 12 | 13 | 具体效果你现在看的这个文档就是使用 mddoc 生成哒!(https://doc.yurunsoft.com/mddoc) 14 | 15 | Github:https://github.com/Yurunsoft/mddoc 16 | 17 | Gitee:https://gitee.com/yurunsoft/mddoc 18 | 19 | composer:`yurunsoft/mddoc` 20 | -------------------------------------------------------------------------------- /template/statics/plugin/zTree/.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /config/github.php: -------------------------------------------------------------------------------- 1 | '', 6 | // 更新文档的事件 7 | 'events' => [ 8 | 'push', 9 | 'pull_request', 10 | 'ping', 11 | ], 12 | // 要下载的文件地址,一般可以用github提供的 13 | 'downloadUrl' => 'https://github.com/{username}/{projectName}/archive/master.zip', 14 | // 下载文件保存路径(下载前会清空该目录,请谨慎选择目录) 15 | 'downloadSavePath' => dirname(__DIR__) . '/tmp', 16 | // 生成的html保存路径(生成前会清空该目录,请谨慎选择目录) 17 | 'htmlSavePath' => dirname(__DIR__) . '/html', 18 | // 模版目录 19 | // 'templatePath' => dirname(__DIR__) . '/template', 20 | ]; 21 | -------------------------------------------------------------------------------- /doc/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | 10 | # Directory for instrumented libs generated by jscoverage/JSCover 11 | lib-cov 12 | 13 | # Coverage directory used by tools like istanbul 14 | coverage 15 | 16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 17 | .grunt 18 | 19 | # Compiled binary addons (http://nodejs.org/api/addons.html) 20 | build/Release 21 | 22 | # Dependency directory 23 | # Deployed apps should consider commenting this line out: 24 | # see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git 25 | node_modules 26 | 27 | _book/ 28 | book.pdf 29 | book.epub 30 | book.mobi 31 | -------------------------------------------------------------------------------- /template/statics/plugin/zTree/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zTree_v3", 3 | "description": "zTree is a multi-functional 'tree plug-ins.' based on jQuery. The main advantages of zTree includes excellent performance, flexible configuration, and the combination of multiple functions.", 4 | "version": "3.5.29", 5 | "homepage": "http://www.treejs.cn/v3/main.php", 6 | "author": "zTree (https://github.com/zTree)", 7 | "repository": "zTree/zTree", 8 | "license": "MIT", 9 | "main": "index.js", 10 | "engines": { 11 | "node": ">=0.10.0" 12 | }, 13 | "keywords": [ 14 | "tree", 15 | "jquery", 16 | "plug-in", 17 | "plugin", 18 | "ztree", 19 | "html", 20 | "node" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 介绍 2 | 3 | mddoc 是一个开源的 markdown 文档转 html 文档工具,它使用 php 开发,支持 php >= 5.4。它生成的 html 可以直接放在网站上,支持全文搜索、自定义 html 模版。 4 | 5 | mddoc 同时支持命令行、git webhook生成,不光可以本地生成后上传,也可以直接做成 webhook 自动部署生成,非常简单。 6 | 7 | mddoc 兼容 GitBook Editor 编辑的格式,可以说 mddoc 是不想装 Node 环境又想使用 gitbook 的用户的一个非常好的选择。 8 | 9 | 其实我开发 mddoc 的本意,其实是因为我用的虚拟主机,不能装 Node 环境。想要实现 webhook 自动生成比较困难,所以就用 php 写了这个…… 10 | 11 | 具体效果你现在看的这个文档就是使用 mddoc 生成哒!( https://doc.yurunsoft.com/mddoc ) 12 | 13 | Github:https://github.com/Yurunsoft/mddoc 14 | 15 | Gitee:https://gitee.com/yurunsoft/mddoc 16 | 17 | composer:`yurunsoft/mddoc` 18 | 19 | ## 命令行生成 20 | 21 | 1. 首先通过 git 将项目拉取下来 22 | 2. 执行`composer update`安装 23 | 3. 执行`php build.php -markdownPath "md文档路径" -htmlPath "html生成路径"` 24 | 25 | > 注意!html生成目录在生成前会被清空所有文件,请慎重选择目录! 26 | 27 | 默认生成使用的模版是`mddoc/template`下的,如果要指定自定义的模版路径,加上参数`-templatePath "路径"` 28 | -------------------------------------------------------------------------------- /doc/webhook.md: -------------------------------------------------------------------------------- 1 | # Webhook 生成 2 | 3 | [TOC] 4 | 5 | 有两个方法可选 6 | 7 | ## 方法一 8 | 9 | 1. 首先通过 git 将项目拉取下来 10 | 2. 执行`composer update`安装 11 | 3. 修改`config/github.php`配置文件,详见该文件注释 12 | 4. 在`github`或`gitee`中配置`webhook`,url为`http://xxx.com/github-webhook.php?password={password}`,`{password}`为你配置文件中设置的 13 | 14 | > 注意!html生成目录在生成前会被清空所有文件,请慎重选择目录! 15 | 16 | ## 方法二 17 | 18 | 1. 通过`composer`将`mddoc`作为包引入你的项目 19 | 2. 新建一个`webhook`入口文件 20 | ```php 21 | handle(); 32 | ``` 33 | 3. 在`github`或`gitee`中配置`webhook`,url为`http://xxx.com/github-webhook.php?password={password}`,`{password}`为你配置文件中设置的 34 | 35 | > 注意!html生成目录在生成前会被清空所有文件,请慎重选择目录! 36 | -------------------------------------------------------------------------------- /template/statics/plugin/zTree/zTree.v3.jquery.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zTree.v3", 3 | "title": "zTree.v3", 4 | "description": "jquery tree plugin", 5 | "keywords": [ 6 | "tree", 7 | "ui" 8 | ], 9 | "version": "3.5.29", 10 | "author": { 11 | "name": "Zhang QiGang", 12 | "email":"hunter.z@263.net", 13 | "url": "https://github.com/zTree/zTree_v3" 14 | }, 15 | "maintainers": [ 16 | { 17 | "name": "Zhang QiGang", 18 | "email":"hunter.z@263.net", 19 | "url": "http://www.ztree.me/" 20 | } 21 | ], 22 | "licenses": [ 23 | { 24 | "type": "MIT", 25 | "url": "http://www.ztree.me/v3/main.php#_license" 26 | } 27 | ], 28 | "bugs": "https://github.com/zTree/zTree_v3/issues", 29 | "homepage": "http://www.ztree.me/", 30 | "demo": "http://www.ztree.me/v3/demo.php", 31 | "docs": "http://www.ztree.me/v3/api.php", 32 | "dependencies": { 33 | "jquery": ">=1.4.4" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /template/statics/plugin/layui/css/modules/code.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 宇润 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /template/statics/plugin/layui/lay/modules/code.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var a=layui.$,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
  1. '+o.replace(/[\r\t\n]+/g,"
  2. ")+"
"),c.find(">.layui-code-h3")[0]||c.prepend('

'+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); -------------------------------------------------------------------------------- /.php_cs.dist: -------------------------------------------------------------------------------- 1 | setRules([ 10 | '@Symfony' => true, 11 | '@Symfony:risky' => true, 12 | 'php_unit_dedicate_assert' => ['target' => '5.6'], 13 | 'array_syntax' => ['syntax' => 'short'], 14 | 'array_indentation' => true, 15 | 'binary_operator_spaces' => [ 16 | 'operators' => [ 17 | '=>' => 'align_single_space', 18 | ], 19 | ], 20 | 'concat_space' => [ 21 | 'spacing' => 'one', 22 | ], 23 | 'fopen_flags' => false, 24 | 'protected_to_private' => false, 25 | 'native_constant_invocation' => true, 26 | 'combine_nested_dirname' => true, 27 | 'single_quote' => true, 28 | 'braces' => [ 29 | 'position_after_control_structures' => 'next', 30 | ], 31 | 'no_superfluous_phpdoc_tags' => false, 32 | 'backtick_to_shell_exec' => false, 33 | ]) 34 | ->setRiskyAllowed(true) 35 | ->setFinder( 36 | PhpCsFixer\Finder::create() 37 | ->exclude(__DIR__ . '/vendor') 38 | ->in(__DIR__ . '/src') 39 | ->in(__DIR__ . '/config') 40 | ->append([__FILE__, __DIR__ . '/build.php', __DIR__ . '/github-webhook.php']) 41 | ) 42 | ; 43 | -------------------------------------------------------------------------------- /template/statics/plugin/layui/lay/modules/laytpl.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)}); -------------------------------------------------------------------------------- /template/statics/plugin/layui/lay/modules/flow.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('
'+d+"
");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)}); -------------------------------------------------------------------------------- /template/statics/plugin/zTree/README.md: -------------------------------------------------------------------------------- 1 | jQuery Tree Plugin ---- zTree 2 | ============ 3 | last verson : 3.5.29 4 | 5 | 6 | **Donate to zTree** : http://www.treejs.cn/v3/donate.php 7 | 8 | 9 | zTree API : http://www.treejs.cn/v3/api.php 10 | 11 | 12 | zTree Demo : http://www.treejs.cn/v3/demo.php 13 | 14 | 15 | Introduction of zTree (简介) 16 | ============ 17 | * zTree is a multi-functional "tree plug-ins." based on jQuery. The main advantages of zTree includes excellent performance, flexible configuration, and the combination of multiple functions. 18 | (zTree 是一个依靠 jQuery 实现的多功能 “树插件”。优异的性能、灵活的配置、多种功能的组合是 zTree 最大优点。) 19 | 20 | * zTree is a free tree plug-in and uses the MIT license. 21 | (zTree 是开源免费的软件, 使用 MIT 许可证) 22 | 23 | * The code of zTree v3.x has been seperated according to the various functions. You can only load the code you need. 24 | (zTree v3.x 将核心代码按照功能进行了分割,不需要的代码可以不用加载) 25 | * zTree v3.x uses delay loading technique, which can easily load tens of thousands of nodes in seconds even in IE6 browser. 26 | (采用了 延迟加载 技术,上万节点轻松加载,即使在 IE6 下也能基本做到秒杀) 27 | * Compatible with IE, FireFox?, Chrome, Opera, Safari and other browsers. 28 | (兼容 IE、FireFox?、Chrome、Opera、Safari 等浏览器) 29 | * Support for JSON data. 30 | (支持 JSON 数据) 31 | * Support for static and asynchronous data loading node. 32 | (支持静态 和 Ajax 异步加载节点数据) 33 | * Replace the skin / custom icon flexibllly. 34 | (支持任意更换皮肤 / 自定义图标) 35 | * Support extremely flexible checkbox or radio selection function. 36 | (支持极其灵活的 checkbox 或 radio 选择功能) 37 | * Provide enough incident response callback. 38 | (提供多种事件响应回调) 39 | * Flexible editing (add / delete / change / search) functions, such as drag and drop nodes,you can even drag and drop multiple nodes. 40 | (灵活的编辑(增/删/改/查)功能,可随意拖拽节点,还可以多节点拖拽哟) 41 | * Enable to generate multiple instances of zTree in one page. 42 | (在一个页面内可同时生成多个 Tree 实例) 43 | * Simple parameters to achieve flexible configuration capabilities. 44 | (简单的参数配置实现 灵活多变的功能) 45 | * To enhance performance, zTree transforms the js & css structure to provide excellent browser compatibility and make the development more easily 46 | (zTree v3.x(JQuery Tree 插件),性能全面提升,js & css 架构全面调整,提供更好的兼容性和易开发性) 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/Args.php: -------------------------------------------------------------------------------- 1 | config = $config; 20 | } 21 | 22 | public function handle() 23 | { 24 | // 密码验证 25 | if (!isset($_GET['password'], $this->config['password']) || $this->config['password'] !== $_GET['password'] || '' === $this->config['password']) 26 | { 27 | exit('are you ok 1?'); 28 | } 29 | 30 | // post数据 31 | $data = json_decode(file_get_contents('php://input'), true); 32 | 33 | // 事件验证 34 | if (!isset($_SERVER['HTTP_X_GITHUB_EVENT']) || !\in_array($_SERVER['HTTP_X_GITHUB_EVENT'], $this->config['events'])) 35 | { 36 | exit('are you ok 2?'); 37 | } 38 | 39 | // 下载 40 | 41 | if (is_dir($this->config['downloadSavePath'])) 42 | { 43 | File::clearDir($this->config['downloadSavePath']); 44 | } 45 | else 46 | { 47 | mkdir($this->config['downloadSavePath'], 0777, true); 48 | } 49 | $zipFileName = File::path($this->config['downloadSavePath'], 'download.zip'); 50 | $http = new HttpRequest(); 51 | $http->download($zipFileName, $this->config['downloadUrl']); 52 | 53 | // 解压 54 | 55 | $zip = new \ZipArchive(); 56 | $return = $zip->open($zipFileName); 57 | if (true !== $return) 58 | { 59 | exit($zipFileName . ' 文件打开失败'); 60 | } 61 | if (!$zip->extractTo($this->config['downloadSavePath'])) 62 | { 63 | exit($zipFileName . ' 文件解压失败'); 64 | } 65 | $firstFileName = $zip->getNameIndex(0); 66 | $zip->close(); 67 | 68 | // 生成 69 | 70 | $builder = new Builder(File::path($this->config['downloadSavePath'], $firstFileName), $this->config['htmlSavePath']); 71 | if (isset($this->config['templatePath'])) 72 | { 73 | $builder->templatePath = $this->config['templatePath']; 74 | } 75 | $builder->build(); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /template/statics/plugin/layui/lay/modules/util.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var t=layui.$,i={fixbar:function(e){var i,a,o="layui-fixbar",r="layui-fixbar-top",l=t(document),n=t("body");e=t.extend({showHeight:200},e),e.bar1=e.bar1===!0?"":e.bar1,e.bar2=e.bar2===!0?"":e.bar2,e.bgcolor=e.bgcolor?"background-color:"+e.bgcolor:"";var c=[e.bar1,e.bar2,""],g=t(['"].join("")),u=g.find("."+r),s=function(){var t=l.scrollTop();t>=e.showHeight?i||(u.show(),i=1):i&&(u.hide(),i=0)};t("."+o)[0]||("object"==typeof e.css&&g.css(e.css),n.append(g),s(),g.find("li").on("click",function(){var i=t(this),a=i.attr("lay-type");"top"===a&&t("html,body").animate({scrollTop:0},200),e.click&&e.click.call(this,a)}),l.on("scroll",function(){clearTimeout(a),a=setTimeout(function(){s()},100)}))},countdown:function(e,t,i){var a=this,o="function"==typeof t,r=new Date(e).getTime(),l=new Date(!t||o?(new Date).getTime():t).getTime(),n=r-l,c=[Math.floor(n/864e5),Math.floor(n/36e5)%24,Math.floor(n/6e4)%60,Math.floor(n/1e3)%60];o&&(i=t);var g=setTimeout(function(){a.countdown(e,l+1e3,i)},1e3);return i&&i(n>0?c:[0,0,0,0],t,g),n<=0&&clearTimeout(g),g},timeAgo:function(e,t){var i=this,a=[[],[]],o=(new Date).getTime()-new Date(e).getTime();return o>6912e5?(o=new Date(e),a[0][0]=i.digit(o.getFullYear(),4),a[0][1]=i.digit(o.getMonth()+1),a[0][2]=i.digit(o.getDate()),t||(a[1][0]=i.digit(o.getHours()),a[1][1]=i.digit(o.getMinutes()),a[1][2]=i.digit(o.getSeconds())),a[0].join("-")+" "+a[1].join(":")):o>=864e5?(o/1e3/60/60/24|0)+"天前":o>=36e5?(o/1e3/60/60|0)+"小时前":o>=12e4?(o/1e3/60|0)+"分钟前":o<0?"未来":"刚刚"},digit:function(e,t){var i="";e=String(e),t=t||2;for(var a=e.length;a/g,">").replace(/'/g,"'").replace(/"/g,""")}};e("util",i)}); -------------------------------------------------------------------------------- /template/statics/plugin/layui/lay/modules/rate.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var a=layui.jquery,i={config:{},index:layui.rate?layui.rate.index+1e4:0,set:function(e){var i=this;return i.config=a.extend({},i.config,e),i},on:function(e,a){return layui.onevent.call(this,n,e,a)}},l=function(){var e=this,a=e.config;return{setvalue:function(a){e.setvalue.call(e,a)},config:a}},n="rate",t="layui-rate",o="layui-icon-rate",s="layui-icon-rate-solid",u="layui-icon-rate-half",r="layui-icon-rate-solid layui-icon-rate-half",c="layui-icon-rate-solid layui-icon-rate",f="layui-icon-rate layui-icon-rate-half",v=function(e){var l=this;l.index=++i.index,l.config=a.extend({},l.config,i.config,e),l.render()};v.prototype.config={length:5,text:!1,readonly:!1,half:!1,value:0,theme:""},v.prototype.render=function(){var e=this,i=e.config,l=i.theme?'style="color: '+i.theme+';"':"";i.elem=a(i.elem),parseInt(i.value)!==i.value&&(i.half||(i.value=Math.ceil(i.value)-i.value<.5?Math.ceil(i.value):Math.floor(i.value)));for(var n='"+(i.text?''+i.value+"星":"")+"";var c=i.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),i.span=e.elemTemp.next("span"),i.setText&&i.setText(i.value),c.html(e.elemTemp),c.addClass("layui-inline"),i.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,i=a.config;i.value=e,a.render()},v.prototype.action=function(){var e=this,i=e.config,l=e.elemTemp,n=l.find("i").width();l.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(i.value=t,i.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(i.value=i.value-.5)}i.text&&l.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),v.on("mousemove",function(e){if(l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+t+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(u).removeClass(s)}}),v.on("mouseleave",function(){l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+Math.floor(i.value)+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half&&parseInt(i.value)!==i.value&&l.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(u).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},i.render=function(e){var a=new v(e);return l.call(a)},e(n,i)}); -------------------------------------------------------------------------------- /template/statics/plugin/zTree/.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | [Dd]ebug/ 46 | [Rr]elease/ 47 | *_i.c 48 | *_p.c 49 | *.ilk 50 | *.meta 51 | *.obj 52 | *.pch 53 | *.pdb 54 | *.pgc 55 | *.pgd 56 | *.rsp 57 | *.sbr 58 | *.tlb 59 | *.tli 60 | *.tlh 61 | *.tmp 62 | *.vspscc 63 | .builds 64 | *.dotCover 65 | 66 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 67 | #packages/ 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | 76 | # Visual Studio profiler 77 | *.psess 78 | *.vsp 79 | 80 | # ReSharper is a .NET coding add-in 81 | _ReSharper* 82 | 83 | # Installshield output folder 84 | [Ee]xpress 85 | 86 | # DocProject is a documentation generator add-in 87 | DocProject/buildhelp/ 88 | DocProject/Help/*.HxT 89 | DocProject/Help/*.HxC 90 | DocProject/Help/*.hhc 91 | DocProject/Help/*.hhk 92 | DocProject/Help/*.hhp 93 | DocProject/Help/Html2 94 | DocProject/Help/html 95 | 96 | # Click-Once directory 97 | publish 98 | 99 | # Others 100 | [Bb]in 101 | [Oo]bj 102 | sql 103 | TestResults 104 | *.Cache 105 | ClientBin 106 | stylecop.* 107 | ~$* 108 | *.dbmdl 109 | Generated_Code #added for RIA/Silverlight projects 110 | 111 | # Backup & report files from converting an old project file to a newer 112 | # Visual Studio version. Backup files are not needed, because we have git ;-) 113 | _UpgradeReport_Files/ 114 | Backup*/ 115 | UpgradeLog*.XML 116 | 117 | 118 | 119 | ############ 120 | ## Windows 121 | ############ 122 | 123 | # Windows image file caches 124 | Thumbs.db 125 | 126 | # Folder config file 127 | Desktop.ini 128 | 129 | 130 | ############# 131 | ## Python 132 | ############# 133 | 134 | *.py[co] 135 | 136 | # Packages 137 | *.egg 138 | *.egg-info 139 | dist 140 | build 141 | eggs 142 | parts 143 | bin 144 | var 145 | sdist 146 | develop-eggs 147 | .installed.cfg 148 | 149 | # Installer logs 150 | pip-log.txt 151 | 152 | # Unit test / coverage reports 153 | .coverage 154 | .tox 155 | 156 | #Translations 157 | *.mo 158 | 159 | #Mr Developer 160 | .mr.developer.cfg 161 | 162 | # Mac crap 163 | .DS_Store 164 | -------------------------------------------------------------------------------- /template/statics/plugin/layui/lay/modules/tree.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var o=layui.$,a=layui.hint(),i="layui-tree-enter",r=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};r.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},r.prototype.tree=function(e,a){var i=this,r=i.options,n=a||r.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o(''),s=o(["
  • ",function(){return l?''+(n.spread?t.arrow[1]:t.arrow[0])+"":""}(),function(){return r.check?''+("checkbox"===r.check?t.checkbox[0]:"radio"===r.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),"
  • "].join(""));l&&(s.append(c),i.tree(c,n.children)),e.append(s),"function"==typeof r.click&&i.click(s,n),i.spread(s,n),r.drag&&i.drag(s,n)})},r.prototype.click=function(e,o){var a=this,i=a.options;e.children("a").on("click",function(e){layui.stope(e),i.click(o)})},r.prototype.spread=function(e,o){var a=this,i=(a.options,e.children(".layui-tree-spread")),r=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),r.removeClass("layui-show"),i.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),r.addClass("layui-show"),i.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};r[0]&&(i.on("click",l),n.on("dblclick",l))},r.prototype.on=function(e){var a=this,r=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),r.drag&&o(document).on("mousemove",function(e){var i=a.move;if(i.from){var r=(i.to,o('
    '));e.preventDefault(),o("."+t)[0]||o("body").append(r);var n=o("."+t)[0]?o("."+t):r;n.addClass("layui-show").html(i.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(i),e.to&&e.to.elem.children("a").removeClass(i),a.move={},o("."+t).remove())})},r.prototype.move={},r.prototype.drag=function(e,a){var r=this,t=(r.options,e.children("a")),n=function(){var t=o(this),n=r.move;n.from&&(n.to={item:a,elem:e},t.addClass(i))};t.on("mousedown",function(){var o=r.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=r.move;a.from&&(delete a.to,e.removeClass(i))})},e("tree",function(e){var i=new r(e=e||{}),t=o(e.elem);return t[0]?void i.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})}); -------------------------------------------------------------------------------- /template/html/search.php: -------------------------------------------------------------------------------- 1 | var originSearchDatas = ; 2 | var searchDatas = []; 3 | function initSearchDatas() 4 | { 5 | searchDatas = JSON.parse(JSON.stringify(originSearchDatas)); 6 | for(var i = 0; i < searchDatas.length; ++i) 7 | { 8 | if(void 0 !== searchDatas[i].url) 9 | { 10 | searchDatas[i].url = rootPath + searchDatas[i].url; 11 | } 12 | } 13 | doSearch($('#search-keyword').val()); 14 | } 15 | 16 | String.prototype.indexOf2 = function(f){ 17 | var rt = this.match(eval('/' + f + '/i')); 18 | return (rt == null) ? -1 : rt.index; 19 | } 20 | 21 | function switchSearchNode(a) 22 | { 23 | if ('pushState' in history) 24 | { 25 | getChapter(a.attr('href')); 26 | history.pushState('', '', a.attr('href')); 27 | $('#treeSearch a').removeClass('curSelectedNode'); 28 | a.addClass('curSelectedNode'); 29 | } 30 | else 31 | { 32 | location = treeNode.url; 33 | } 34 | } 35 | 36 | function searchArticle(keyword) 37 | { 38 | if ('object' === (typeof Intl)) 39 | { 40 | var segmenterJa = new Intl.Segmenter("zh-CN", { granularity: "word" }); 41 | var segments = segmenterJa.segment(keyword); 42 | var keywords = []; 43 | for (let segment of segments) 44 | { 45 | if (segment.segment.trim().length > 0) 46 | { 47 | keywords.push(segment.segment); 48 | } 49 | } 50 | } 51 | else 52 | { 53 | var keywords = keyword.split(' '); 54 | } 55 | var tSearchDatas = searchDatas; 56 | var result = []; 57 | keywords.forEach(function(kw){ 58 | if('' === kw) 59 | { 60 | return; 61 | } 62 | result = []; 63 | tSearchDatas.forEach(function(item, index){ 64 | if(item.content.indexOf2(kw) > -1 || item.title.indexOf2(kw) > -1) 65 | { 66 | result.push(item); 67 | } 68 | }); 69 | tSearchDatas = result; 70 | }); 71 | return result; 72 | } 73 | 74 | var searchTimer = null; 75 | function parseSearch() 76 | { 77 | $('#search-keyword').on('input', function(){ 78 | if(null != searchTimer) 79 | { 80 | clearTimeout(searchTimer); 81 | searchTimer = null; 82 | } 83 | var inputKeyword = $(this); 84 | searchTimer = setTimeout(function(){ 85 | doSearch(inputKeyword.val()); 86 | searchTimer = null; 87 | }, 200); 88 | return false; 89 | }); 90 | } 91 | 92 | function doSearch(keyword) 93 | { 94 | var result = searchArticle(keyword); 95 | if(result.length > 0) 96 | { 97 | $('.searchResultNone').hide(); 98 | } 99 | else 100 | { 101 | $('.searchResultNone').show(); 102 | } 103 | var index = -1; 104 | $('#treeSearch a').each(function(i, item){ 105 | ++index; 106 | if($(item).hasClass('curSelectedNode')) 107 | { 108 | return false; 109 | } 110 | }); 111 | layui.laytpl($('#searchListTemplate').html()).render(result, function(html){ 112 | $('#treeSearch').html(html); 113 | if(index >= 0) 114 | { 115 | var node = $('#treeSearch a').get(index); 116 | if(null !== node) 117 | { 118 | $(node).addClass('curSelectedNode'); 119 | } 120 | } 121 | }); 122 | } 123 | 124 | $(function(){ 125 | 126 | $('body').on('click', '#treeSearch a', function(e){ 127 | switchSearchNode($(this)); 128 | return false; 129 | }); 130 | 131 | parseSearch(); 132 | 133 | }) -------------------------------------------------------------------------------- /template/statics/plugin/layui/lay/modules/carousel.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
      ',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("")}),i.join("")}(),"
    "].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):agetFilename(), ['.', '..'])) 127 | { 128 | continue; 129 | } 130 | if (is_file($file)) 131 | { 132 | unlink($file); 133 | } 134 | elseif (is_dir($file)) 135 | { 136 | rmdir($file); 137 | } 138 | } 139 | } 140 | } 141 | -------------------------------------------------------------------------------- /template/statics/plugin/layui/lay/modules/laypage.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var a=document,t="getElementById",n="getElementsByTagName",i="laypage",r="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config,t=a.groups="groups"in a?0|a.groups:5;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),t<0?t=1:t>a.pages&&(t=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var n=a.pages>t?Math.ceil((a.curr+(t>1?1:0))/(t>0?t:1)):1,i={prev:function(){return a.prev?''+a.prev+"":""}(),page:function(){var e=[];if(a.count<1)return"";n>1&&a.first!==!1&&0!==t&&e.push(''+(a.first||1)+"");var i=Math.floor((t-1)/2),r=n>1?a.curr-i:1,u=n>1?function(){var e=a.curr+(t-i-1);return e>a.pages?a.pages:e}():t;for(u-r2&&e.push('');r<=u;r++)r===a.curr?e.push('"+r+""):e.push(''+r+"");return a.pages>t&&a.pages>u&&a.last!==!1&&(u+1…'),0!==t&&e.push(''+(a.last||a.pages)+"")),e.join("")}(),next:function(){return a.next?''+a.next+"":""}(),count:'共 '+a.count+" 条",limit:function(){var e=['"}(),refresh:['','',""].join(""),skip:function(){return['到第','','页',""].join("")}()};return['
    ',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"
    "].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;oi.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)}); -------------------------------------------------------------------------------- /template/statics/css/style.css: -------------------------------------------------------------------------------- 1 | .clear{ 2 | clear:both; 3 | } 4 | .center{ 5 | text-align:center; 6 | } 7 | .pull-left { 8 | float: left !important; 9 | } 10 | .pull-right { 11 | float: right !important; 12 | } 13 | #navbar{ 14 | background-color: #393D49; 15 | height:60px; 16 | padding: 0 10px; 17 | position: fixed; 18 | right: 0; 19 | left: 0; 20 | z-index: 1000; 21 | } 22 | #navbar .layui-nav{ 23 | border-radius: 0; 24 | } 25 | #navbar .logo{ 26 | float: left; 27 | font-size: 1.625rem; 28 | color: #fff; 29 | line-height: 60px; 30 | } 31 | #leftbar{ 32 | width:260px; 33 | top: 60px; 34 | border-radius: 0; 35 | transition: left 0.5s ease; 36 | -webkit-transition: left 0.5s ease; 37 | -moz-transition: left 0.5s ease; 38 | -ms-transition: left 0.5s ease; 39 | -o-transition: left 0.5s ease; 40 | overflow-x: visible; 41 | border-right:1px solid #eee; 42 | background-color:#fafafa; 43 | } 44 | #leftbar .copyright { 45 | color: #fff; 46 | text-align: center; 47 | line-height: 24px; 48 | background: rgba(255,255,255,0.1); 49 | } 50 | #leftbar .copyright.noScroll{ 51 | bottom: 0; 52 | position: absolute; 53 | width: 100%; 54 | } 55 | #leftbar > li > a > i.layui-icon{ 56 | font-size: 1.625rem; 57 | vertical-align: top; 58 | margin-right: 10px; 59 | } 60 | #leftbar > li > dl > dd > a > i.layui-icon{ 61 | font-size: 1.125rem; 62 | vertical-align: top; 63 | margin-right: 10px; 64 | } 65 | #leftbar > li > dl > dd > a{ 66 | padding-left: 30px; 67 | } 68 | .left-show-hide{ 69 | position: absolute; 70 | top: 50%; 71 | left: 100%; 72 | transform: translateY(-100%); 73 | padding: 0; 74 | height: 64px; 75 | width: 18px; 76 | background-color: #393D49; 77 | color: #F0F0F0; 78 | border: none; 79 | border-radius: 0; 80 | opacity: 1; 81 | display:none; 82 | } 83 | .left-show-hide:hover{ 84 | color:#fff; 85 | } 86 | .left-show-hide > .layui-icon{ 87 | font-size:14px; 88 | } 89 | #body { 90 | padding-left: 260px; 91 | width: 100%; 92 | padding-top: 60px; 93 | position: absolute; 94 | transition: left 0.5s ease; 95 | -webkit-transition: left 0.5s ease; 96 | -moz-transition: left 0.5s ease; 97 | -ms-transition: left 0.5s ease; 98 | -o-transition: left 0.5s ease; 99 | height: 100%; 100 | box-sizing: border-box; 101 | top: 0; 102 | } 103 | .navRight{ 104 | float:right; 105 | } 106 | #navMenuLeft, #navMenuRight{ 107 | display:none; 108 | color:#fff; 109 | line-height: 60px; 110 | } 111 | #navMenuLeft{ 112 | float:left; 113 | } 114 | #navMenuRight{ 115 | float:right; 116 | } 117 | #navMenuLeft.active > i, #navMenuRight.active > i{ 118 | color: #5FB878 119 | } 120 | #navMenuLeft > i, #navMenuRight > i{ 121 | font-size:1.625rem; 122 | } 123 | .inputBox{ 124 | position: relative; 125 | } 126 | .inputBox .input-icon{ 127 | position: absolute; 128 | top: 50%; 129 | transform: translateY(-50%); 130 | right: 6px; 131 | color:#c2c2c2; 132 | pointer-events: none; 133 | } 134 | .inputBox .layui-input:focus + .input-icon{ 135 | color:#000 136 | } 137 | @media screen and (max-width: 768px) 138 | { 139 | #leftbar{ 140 | left:-260px !important; 141 | } 142 | #leftbar.show-item{ 143 | left:0 !important; 144 | } 145 | #navbar{ 146 | text-align: center; 147 | } 148 | #navbar .logo{ 149 | float:none; 150 | margin-left:0; 151 | display: inline-block; 152 | } 153 | #navbar .layui-nav{ 154 | top: 0px; 155 | position: absolute; 156 | width: 100%; 157 | left: 0; 158 | transition: top 0.5s ease; 159 | -webkit-transition: top 0.5s ease; 160 | -moz-transition: top 0.5s ease; 161 | -ms-transition: top 0.5s ease; 162 | -o-transition: top 0.5s ease; 163 | z-index:999; 164 | } 165 | #navMenuLeft, #navMenuRight{ 166 | display:block; 167 | } 168 | #body{ 169 | padding-left:0 170 | } 171 | #navbar > .layui-nav.show-item{ 172 | top:60px; 173 | } 174 | #navbar > .layui-nav > .navRight{ 175 | width: 100%; 176 | } 177 | #navbar > .layui-nav > .navRight .layui-nav-item{ 178 | width: 100%; 179 | text-align: left; 180 | } 181 | .nav-menu{ 182 | z-index:1000; 183 | background: inherit; 184 | position: absolute; 185 | top:0; 186 | left:0; 187 | width:100%; 188 | padding: 0 10px; 189 | box-sizing: border-box; 190 | } 191 | .left-show-hide{ 192 | display:none !important; 193 | } 194 | } -------------------------------------------------------------------------------- /template/statics/plugin/zTree/js/jquery.ztree.exhide.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * JQuery zTree exHideNodes v3.5.29 3 | * http://treejs.cn/ 4 | * 5 | * Copyright (c) 2010 Hunter.z 6 | * 7 | * Licensed same as jquery - MIT License 8 | * http://www.opensource.org/licenses/mit-license.php 9 | * 10 | * email: hunter.z@263.net 11 | * Date: 2017-06-19 12 | */ 13 | (function(i){i.extend(!0,i.fn.zTree._z,{view:{clearOldFirstNode:function(c,a){for(var b=a.getNextNode();b;){if(b.isFirstNode){b.isFirstNode=!1;d.setNodeLineIcos(c,b);break}if(b.isLastNode)break;b=b.getNextNode()}},clearOldLastNode:function(c,a,b){for(a=a.getPreNode();a;){if(a.isLastNode){a.isLastNode=!1;b&&d.setNodeLineIcos(c,a);break}if(a.isFirstNode)break;a=a.getPreNode()}},makeDOMNodeMainBefore:function(c,a,b){c.push("
  • ")},showNode:function(c,a){a.isHidden=!1;f.initShowForExCheck(c,a);j(a,c).show()},showNodes:function(c,a,b){if(a&&a.length!=0){var e={},g,k;for(g=0,k=a.length;g0&&!a[b][0].isHidden? 16 | a[b][0].isFirstNode=!0:e>0&&d.setFirstNodeForHide(c,a[b])},setLastNode:function(c,a){var b=c.data.key.children,e=a[b].length;e>0&&!a[b][0].isHidden?a[b][e-1].isLastNode=!0:e>0&&d.setLastNodeForHide(c,a[b])},setFirstNodeForHide:function(c,a){var b,e,g;for(e=0,g=a.length;e=0;e--){b=a[e];if(b.isLastNode)break;if(!b.isHidden&&!b.isLastNode){b.isLastNode=!0;d.setNodeLineIcos(c,b);break}else b=null}return b},setLastNodeForShow:function(c,a){var b,e,g,f;for(e=a.length-1;e>=0;e--)if(b=a[e],!g&&!b.isHidden&& 18 | b.isLastNode){g=b;break}else if(!g&&!b.isHidden&&!b.isLastNode)b.isLastNode=!0,g=b,d.setNodeLineIcos(c,b);else if(g&&b.isLastNode){b.isLastNode=!1;f=b;d.setNodeLineIcos(c,b);break}return{"new":g,old:f}}},data:{initHideForExCheck:function(c,a){if(a.isHidden&&c.check&&c.check.enable){if(typeof a._nocheck=="undefined")a._nocheck=!!a.nocheck,a.nocheck=!0;a.check_Child_State=-1;d.repairParentChkClassWithSelf&&d.repairParentChkClassWithSelf(c,a)}},initShowForExCheck:function(c,a){if(!a.isHidden&&c.check&& 19 | c.check.enable){if(typeof a._nocheck!="undefined")a.nocheck=a._nocheck,delete a._nocheck;if(d.setChkClass){var b=j(a,l.id.CHECK,c);d.setChkClass(c,b,a)}d.repairParentChkClassWithSelf&&d.repairParentChkClassWithSelf(c,a)}}}});var i=i.fn.zTree,m=i._z.tools,l=i.consts,d=i._z.view,f=i._z.data,j=m.$;f.addInitNode(function(c,a,b){if(typeof b.isHidden=="string")b.isHidden=m.eqs(b.isHidden,"true");b.isHidden=!!b.isHidden;f.initHideForExCheck(c,b)});f.addBeforeA(function(){});f.addZTreeTools(function(c,a){a.showNodes= 20 | function(a,b){d.showNodes(c,a,b)};a.showNode=function(a,b){a&&d.showNodes(c,[a],b)};a.hideNodes=function(a,b){d.hideNodes(c,a,b)};a.hideNode=function(a,b){a&&d.hideNodes(c,[a],b)};var b=a.checkNode;if(b)a.checkNode=function(c,d,f,h){(!c||!c.isHidden)&&b.apply(a,arguments)}});var n=f.initNode;f.initNode=function(c,a,b,e,g,i,h){var j=(e?e:f.getRoot(c))[c.data.key.children];f.tmpHideFirstNode=d.setFirstNodeForHide(c,j);f.tmpHideLastNode=d.setLastNodeForHide(c,j);h&&(d.setNodeLineIcos(c,f.tmpHideFirstNode), 21 | d.setNodeLineIcos(c,f.tmpHideLastNode));g=f.tmpHideFirstNode===b;i=f.tmpHideLastNode===b;n&&n.apply(f,arguments);h&&i&&d.clearOldLastNode(c,b,h)};var o=f.makeChkFlag;if(o)f.makeChkFlag=function(c,a){(!a||!a.isHidden)&&o.apply(f,arguments)};var p=f.getTreeCheckedNodes;if(p)f.getTreeCheckedNodes=function(c,a,b,e){if(a&&a.length>0){var d=a[0].getParentNode();if(d&&d.isHidden)return[]}return p.apply(f,arguments)};var q=f.getTreeChangeCheckedNodes;if(q)f.getTreeChangeCheckedNodes=function(c,a,b){if(a&& 22 | a.length>0){var d=a[0].getParentNode();if(d&&d.isHidden)return[]}return q.apply(f,arguments)};var r=d.expandCollapseSonNode;if(r)d.expandCollapseSonNode=function(c,a,b,e,f){(!a||!a.isHidden)&&r.apply(d,arguments)};var s=d.setSonNodeCheckBox;if(s)d.setSonNodeCheckBox=function(c,a,b,e){(!a||!a.isHidden)&&s.apply(d,arguments)};var t=d.repairParentChkClassWithSelf;if(t)d.repairParentChkClassWithSelf=function(c,a){(!a||!a.isHidden)&&t.apply(d,arguments)}})(jQuery); 23 | -------------------------------------------------------------------------------- /src/CategoryParser.php: -------------------------------------------------------------------------------- 1 | ++$id, 31 | 'parent_id' => 0, 32 | 'title' => $part, 33 | 'level' => 0, 34 | 'children' => [], 35 | 'parent' => null, 36 | ]; 37 | $list[] = &$partItem; 38 | } 39 | $count = preg_match_all('/(?P[\t ]*)\*\s*\[(?P[^\]]+)\]\((?P<mdFileName>[^\)]+)\)/', $contentItem, $matches); 40 | if ($count <= 0) 41 | { 42 | return []; 43 | } 44 | for ($i = 0; $i < $count; ++$i) 45 | { 46 | $mdFileName = &$matches['mdFileName'][$i]; 47 | list($mdFileName, $anchorPoint) = explode('#', $mdFileName . '#', 2); 48 | if ('' !== $anchorPoint) 49 | { 50 | $anchorPoint = rtrim($anchorPoint, '#'); 51 | } 52 | $markdownFullPath = File::path($markdownPath, $mdFileName); 53 | if (is_file($markdownFullPath)) 54 | { 55 | $markdownContent = file_get_contents($markdownFullPath); 56 | } 57 | else 58 | { 59 | $markdownContent = ''; 60 | } 61 | preg_match('/#\s*([^\r\n]+)/', $markdownContent . \PHP_EOL, $matches2); 62 | $item = [ 63 | 'id' => ++$id, 64 | 'parent_id' => 0, 65 | 'title' => $matches['title'][$i], 66 | 'pageTitle' => $matches2[1] ?? $matches['title'][$i], 67 | 'mdFileName' => $mdFileName, 68 | 'url' => str_replace('\\', '/', File::path(\dirname($mdFileName), basename($mdFileName, '.' . pathinfo($mdFileName, \PATHINFO_EXTENSION)) . '.html')) . ('' === $anchorPoint ? '' : ('#' . $anchorPoint)), 69 | 'level' => \strlen($matches['space'][$i]) / 2 + ($hasPart ? 1 : 0), 70 | 'children' => [], 71 | 'parent' => null, 72 | ]; 73 | $item['url'] = trim($item['url'], './'); 74 | $list[] = $item; 75 | } 76 | unset($item); 77 | if (isset($partItem)) 78 | { 79 | unset($partItem); 80 | } 81 | } 82 | $result = []; 83 | $lastItem = null; 84 | $first = true; 85 | $firstItem = null; 86 | foreach ($list as &$item) 87 | { 88 | if ($first && isset($item['url'])) 89 | { 90 | $item['url'] = 'index.html'; 91 | $firstItem = $item; 92 | $first = false; 93 | } 94 | if (0 === $item['level']) 95 | { 96 | $result[] = &$item; 97 | } 98 | elseif ($lastItem['level'] === $item['level']) 99 | { 100 | $item['parent'] = &$lastItem['parent']; 101 | $item['parent_id'] = $lastItem['parent_id']; 102 | $lastItem['parent']['children'][] = &$item; 103 | } 104 | else 105 | { 106 | $tmpLastItem = &$lastItem; 107 | while (true) 108 | { 109 | if ($tmpLastItem['level'] + 1 === $item['level']) 110 | { 111 | $item['parent'] = &$tmpLastItem; 112 | $item['parent_id'] = $tmpLastItem['id']; 113 | $tmpLastItem['children'][] = &$item; 114 | break; 115 | } 116 | $tmpLastItem = &$tmpLastItem['parent']; 117 | } 118 | } 119 | $lastItem = &$item; 120 | if (isset($item['mdFileName'])) 121 | { 122 | $fileNameRelation[$item['mdFileName']] = $item; 123 | } 124 | } 125 | foreach ($list as $k => $v) 126 | { 127 | unset($list[$k]['parent']); 128 | } 129 | $list = json_decode(json_encode($list), true); 130 | foreach ($list as $k => $v) 131 | { 132 | unset($list[$k]['children']); 133 | } 134 | 135 | return [$list, $result, $fileNameRelation, $firstItem]; 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /template/statics/plugin/layui/layui.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | ;!function(e){"use strict";var t=document,n={modules:{},status:{},timeout:10,event:{}},o=function(){this.v="2.3.0"},r=function(){var e=t.currentScript?t.currentScript.src:function(){for(var e,n=t.scripts,o=n.length-1,r=o;r>0;r--)if("interactive"===n[r].readyState){e=n[r].src;break}return e||n[o].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),a=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},i="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),u={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",tree:"modules/tree",table:"modules/table",element:"modules/element",rate:"modules/rate",carousel:"modules/carousel",flow:"modules/flow",util:"modules/util",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"../layui.all"};o.prototype.cache=n,o.prototype.define=function(e,t){var o=this,r="function"==typeof e,a=function(){var e=function(e,t){layui[e]=t,n.status[e]=!0};return"function"==typeof t&&t(function(o,r){e(o,r),n.callback[o]=function(){t(e)}}),this};return r&&(t=e,e=[]),layui["layui.all"]||!layui["layui.all"]&&layui["layui.mobile"]?a.call(o):(o.use(e,a),o)},o.prototype.use=function(e,o,l){function s(e,t){var o="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||o.test((e.currentTarget||e.srcElement).readyState))&&(n.modules[d]=t,f.removeChild(v),function r(){return++m>1e3*n.timeout/4?a(d+" is not a valid module"):void(n.status[d]?c():setTimeout(r,4))}())}function c(){l.push(layui[d]),e.length>1?y.use(e.slice(1),o,l):"function"==typeof o&&o.apply(layui,l)}var y=this,p=n.dir=n.dir?n.dir:r,f=t.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(y.each(e,function(t,n){"jquery"===n&&e.splice(t,1)}),layui.jquery=layui.$=jQuery);var d=e[0],m=0;if(l=l||[],n.host=n.host||(p.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&u[d]||!layui["layui.all"]&&layui["layui.mobile"]&&u[d])return c(),y;if(n.modules[d])!function g(){return++m>1e3*n.timeout/4?a(d+" is not a valid module"):void("string"==typeof n.modules[d]&&n.status[d]?c():setTimeout(g,4))}();else{var v=t.createElement("script"),h=(u[d]?p+"lay/":/^\{\/\}/.test(y.modules[d])?"":n.base||"")+(y.modules[d]||d)+".js";h=h.replace(/^\{\/\}/,""),v.async=!0,v.charset="utf-8",v.src=h+function(){var e=n.version===!0?n.v||(new Date).getTime():n.version||"";return e?"?v="+e:""}(),f.appendChild(v),!v.attachEvent||v.attachEvent.toString&&v.attachEvent.toString().indexOf("[native code")<0||i?v.addEventListener("load",function(e){s(e,h)},!1):v.attachEvent("onreadystatechange",function(e){s(e,h)}),n.modules[d]=h}return y},o.prototype.getStyle=function(t,n){var o=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return o[o.getPropertyValue?"getPropertyValue":"getAttribute"](n)},o.prototype.link=function(e,o,r){var i=this,u=t.createElement("link"),l=t.getElementsByTagName("head")[0];"string"==typeof o&&(r=o);var s=(r||e).replace(/\.|\//g,""),c=u.id="layuicss-"+s,y=0;return u.rel="stylesheet",u.href=e+(n.debug?"?v="+(new Date).getTime():""),u.media="all",t.getElementById(c)||l.appendChild(u),"function"!=typeof o?i:(function p(){return++y>1e3*n.timeout/100?a(e+" timeout"):void(1989===parseInt(i.getStyle(t.getElementById(c),"width"))?function(){o()}():setTimeout(p,100))}(),i)},n.callback={},o.prototype.factory=function(e){if(layui[e])return"function"==typeof n.callback[e]?n.callback[e]:null},o.prototype.addcss=function(e,t,o){return layui.link(n.dir+"css/"+e,t,o)},o.prototype.img=function(e,t,n){var o=new Image;return o.src=e,o.complete?t(o):(o.onload=function(){o.onload=null,"function"==typeof t&&t(o)},void(o.onerror=function(e){o.onerror=null,"function"==typeof n&&n(e)}))},o.prototype.config=function(e){e=e||{};for(var t in e)n[t]=e[t];return this},o.prototype.modules=function(){var e={};for(var t in u)e[t]=u[t];return e}(),o.prototype.extend=function(e){var t=this;e=e||{};for(var n in e)t[n]||t.modules[n]?a("模块名 "+n+" 已被占用"):t.modules[n]=e[n];return t},o.prototype.router=function(e){var t=this,e=e||location.hash,n={path:[],search:{},hash:(e.match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)?(e=e.replace(/^#\//,""),n.href="/"+e,e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],t.each(e,function(e,t){/^\w+=/.test(t)?function(){t=t.split("="),n.search[t[0]]=t[1]}():n.path.push(t)}),n):n},o.prototype.data=function(t,n,o){if(t=t||"layui",o=o||localStorage,e.JSON&&e.JSON.parse){if(null===n)return delete o[t];n="object"==typeof n?n:{key:n};try{var r=JSON.parse(o[t])}catch(a){var r={}}return"value"in n&&(r[n.key]=n.value),n.remove&&delete r[n.key],o[t]=JSON.stringify(r),n.key?r[n.key]:r}},o.prototype.sessionData=function(e,t){return this.data(e,t,sessionStorage)},o.prototype.device=function(t){var n=navigator.userAgent.toLowerCase(),o=function(e){var t=new RegExp(e+"/([^\\s\\_\\-]+)");return e=(n.match(t)||[])[1],e||!1},r={os:function(){return/windows/.test(n)?"windows":/linux/.test(n)?"linux":/iphone|ipod|ipad|ios/.test(n)?"ios":/mac/.test(n)?"mac":void 0}(),ie:function(){return!!(e.ActiveXObject||"ActiveXObject"in e)&&((n.match(/msie\s(\d+)/)||[])[1]||"11")}(),weixin:o("micromessenger")};return t&&!r[t]&&(r[t]=o(t)),r.android=/android/.test(n),r.ios="ios"===r.os,r},o.prototype.hint=function(){return{error:a}},o.prototype.each=function(e,t){var n,o=this;if("function"!=typeof t)return o;if(e=e||[],e.constructor===Object){for(n in e)if(t.call(e[n],n,e[n]))break}else for(n=0;n<e.length&&!t.call(e[n],n,e[n]);n++);return o},o.prototype.sort=function(e,t,n){var o=JSON.parse(JSON.stringify(e||[]));return t?(o.sort(function(e,n){var o=/^-?\d+$/,r=e[t],a=n[t];return o.test(r)&&(r=parseFloat(r)),o.test(a)&&(a=parseFloat(a)),r&&!a?1:!r&&a?-1:r>a?1:r<a?-1:0}),n&&o.reverse(),o):o},o.prototype.stope=function(t){t=t||e.event;try{t.stopPropagation()}catch(n){t.cancelBubble=!0}},o.prototype.onevent=function(e,t,n){return"string"!=typeof e||"function"!=typeof n?this:o.event(e,t,null,n)},o.prototype.event=o.event=function(e,t,o,r){var a=this,i=null,u=t.match(/\((.*)\)$/)||[],l=(e+"."+t).replace(u[0],""),s=u[1]||"",c=function(e,t){var n=t&&t.call(a,o);n===!1&&null===i&&(i=!1)};return r?(n.event[l]=n.event[l]||{},n.event[l][s]=[r],this):(layui.each(n.event[l],function(e,t){return"{*}"===s?void layui.each(t,c):(""===e&&layui.each(t,c),void(e===s&&layui.each(t,c)))}),i)},e.layui=new o}(window); -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/zTreeStyle/zTreeStyle.css: -------------------------------------------------------------------------------- 1 | /*------------------------------------- 2 | zTree Style 3 | 4 | version: 3.5.19 5 | author: Hunter.z 6 | email: hunter.z@263.net 7 | website: http://code.google.com/p/jquerytree/ 8 | 9 | -------------------------------------*/ 10 | 11 | .ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif} 12 | .ztree {margin:0; padding:5px; color:#333} 13 | .ztree li{padding:0; margin:0; list-style:none; line-height:14px; text-align:left; white-space:nowrap; outline:0} 14 | .ztree li ul{ margin:0; padding:0 0 0 18px} 15 | .ztree li ul.line{ background:url(./img/line_conn.gif) 0 0 repeat-y;} 16 | 17 | .ztree li a {padding:1px 3px 0 0; margin:0; cursor:pointer; height:17px; color:#333; background-color: transparent; 18 | text-decoration:none; vertical-align:top; display: inline-block} 19 | .ztree li a:hover {text-decoration:underline} 20 | .ztree li a.curSelectedNode {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;} 21 | .ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;} 22 | .ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#316AC5; color:white; height:16px; border:1px #316AC5 solid; 23 | opacity:0.8; filter:alpha(opacity=80)} 24 | .ztree li a.tmpTargetNode_prev {} 25 | .ztree li a.tmpTargetNode_next {} 26 | .ztree li a input.rename {height:14px; width:80px; padding:0; margin:0; 27 | font-size:12px; border:1px #7EC4CC solid; *border:0px} 28 | .ztree li span {line-height:16px; margin-right:2px} 29 | .ztree li span.button {line-height:0; margin:0; width:16px; height:16px; display: inline-block; vertical-align:middle; 30 | border:0 none; cursor: pointer;outline:none; 31 | background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; 32 | background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")} 33 | 34 | .ztree li span.button.chk {width:13px; height:13px; margin:0 3px 0 0; cursor: auto} 35 | .ztree li span.button.chk.checkbox_false_full {background-position:0 0} 36 | .ztree li span.button.chk.checkbox_false_full_focus {background-position:0 -14px} 37 | .ztree li span.button.chk.checkbox_false_part {background-position:0 -28px} 38 | .ztree li span.button.chk.checkbox_false_part_focus {background-position:0 -42px} 39 | .ztree li span.button.chk.checkbox_false_disable {background-position:0 -56px} 40 | .ztree li span.button.chk.checkbox_true_full {background-position:-14px 0} 41 | .ztree li span.button.chk.checkbox_true_full_focus {background-position:-14px -14px} 42 | .ztree li span.button.chk.checkbox_true_part {background-position:-14px -28px} 43 | .ztree li span.button.chk.checkbox_true_part_focus {background-position:-14px -42px} 44 | .ztree li span.button.chk.checkbox_true_disable {background-position:-14px -56px} 45 | .ztree li span.button.chk.radio_false_full {background-position:-28px 0} 46 | .ztree li span.button.chk.radio_false_full_focus {background-position:-28px -14px} 47 | .ztree li span.button.chk.radio_false_part {background-position:-28px -28px} 48 | .ztree li span.button.chk.radio_false_part_focus {background-position:-28px -42px} 49 | .ztree li span.button.chk.radio_false_disable {background-position:-28px -56px} 50 | .ztree li span.button.chk.radio_true_full {background-position:-42px 0} 51 | .ztree li span.button.chk.radio_true_full_focus {background-position:-42px -14px} 52 | .ztree li span.button.chk.radio_true_part {background-position:-42px -28px} 53 | .ztree li span.button.chk.radio_true_part_focus {background-position:-42px -42px} 54 | .ztree li span.button.chk.radio_true_disable {background-position:-42px -56px} 55 | 56 | .ztree li span.button.switch {width:18px; height:18px} 57 | .ztree li span.button.root_open{background-position:-92px -54px} 58 | .ztree li span.button.root_close{background-position:-74px -54px} 59 | .ztree li span.button.roots_open{background-position:-92px 0} 60 | .ztree li span.button.roots_close{background-position:-74px 0} 61 | .ztree li span.button.center_open{background-position:-92px -18px} 62 | .ztree li span.button.center_close{background-position:-74px -18px} 63 | .ztree li span.button.bottom_open{background-position:-92px -36px} 64 | .ztree li span.button.bottom_close{background-position:-74px -36px} 65 | .ztree li span.button.noline_open{background-position:-92px -72px} 66 | .ztree li span.button.noline_close{background-position:-74px -72px} 67 | .ztree li span.button.root_docu{ background:none;} 68 | .ztree li span.button.roots_docu{background-position:-56px 0} 69 | .ztree li span.button.center_docu{background-position:-56px -18px} 70 | .ztree li span.button.bottom_docu{background-position:-56px -36px} 71 | .ztree li span.button.noline_docu{ background:none;} 72 | 73 | .ztree li span.button.ico_open{margin-right:2px; background-position:-110px -16px; vertical-align:top; *vertical-align:middle} 74 | .ztree li span.button.ico_close{margin-right:2px; background-position:-110px 0; vertical-align:top; *vertical-align:middle} 75 | .ztree li span.button.ico_docu{margin-right:2px; background-position:-110px -32px; vertical-align:top; *vertical-align:middle} 76 | .ztree li span.button.edit {margin-right:2px; background-position:-110px -48px; vertical-align:top; *vertical-align:middle} 77 | .ztree li span.button.remove {margin-right:2px; background-position:-110px -64px; vertical-align:top; *vertical-align:middle} 78 | 79 | .ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle} 80 | 81 | ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)} 82 | 83 | span.tmpzTreeMove_arrow {width:16px; height:16px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute; 84 | background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; 85 | background-position:-110px -80px; background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")} 86 | 87 | ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)} 88 | .zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute} 89 | 90 | /* level style*/ 91 | /*.ztree li span.button.level0 { 92 | display:none; 93 | } 94 | .ztree li ul.level0 { 95 | padding:0; 96 | background:none; 97 | }*/ -------------------------------------------------------------------------------- /template/statics/plugin/layui/lay/modules/upload.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | ;layui.define("layer",function(e){"use strict";var i=layui.$,t=layui.layer,n=layui.hint(),a=layui.device(),o={config:{},set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,r,e,i)}},l=function(){var e=this;return{upload:function(i){e.upload.call(e,i)},config:e.config}},r="upload",u="layui-upload-file",c="layui-upload-form",f="layui-upload-iframe",s="layui-upload-choose",p=function(e){var t=this;t.config=i.extend({},t.config,o.config,e),t.render()};p.prototype.config={accept:"images",exts:"",auto:!0,bindAction:"",url:"",field:"file",method:"post",data:{},drag:!0,size:0,number:0,multiple:!1},p.prototype.render=function(e){var t=this,e=t.config;e.elem=i(e.elem),e.bindAction=i(e.bindAction),t.file(),t.events()},p.prototype.file=function(){var e=this,t=e.config,n=e.elemFile=i(['<input class="'+u+'" type="file" accept="'+t.acceptMime+'" name="'+t.field+'"',t.multiple?" multiple":"",">"].join("")),o=t.elem.next();(o.hasClass(u)||o.hasClass(c))&&o.remove(),a.ie&&a.ie<10&&t.elem.wrap('<div class="layui-upload-wrap"></div>'),e.isFile()?(e.elemFile=t.elem,t.field=t.elem[0].name):t.elem.after(n),a.ie&&a.ie<10&&e.initIE()},p.prototype.initIE=function(){var e=this,t=e.config,n=i('<iframe id="'+f+'" class="'+f+'" name="'+f+'" frameborder="0"></iframe>'),a=i(['<form target="'+f+'" class="'+c+'" method="'+t.method,'" key="set-mine" enctype="multipart/form-data" action="'+t.url+'">',"</form>"].join(""));i("#"+f)[0]||i("body").append(n),t.elem.next().hasClass(c)||(e.elemFile.wrap(a),t.elem.next("."+c).append(function(){var e=[];return layui.each(t.data,function(i,t){t="function"==typeof t?t():t,e.push('<input type="hidden" name="'+i+'" value="'+t+'">')}),e.join("")}()))},p.prototype.msg=function(e){return t.msg(e,{icon:2,shift:6})},p.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},p.prototype.preview=function(e){var i=this;window.FileReader&&layui.each(i.chooseFiles,function(i,t){var n=new FileReader;n.readAsDataURL(t),n.onload=function(){e&&e(i,t,this.result)}})},p.prototype.upload=function(e,t){var n,o=this,l=o.config,r=o.elemFile[0],u=function(){var t=0,n=0,a=e||o.files||o.chooseFiles||r.files,u=function(){l.multiple&&t+n===o.fileLength&&"function"==typeof l.allDone&&l.allDone({total:o.fileLength,successful:t,aborted:n})};layui.each(a,function(e,a){var r=new FormData;r.append(l.field,a),layui.each(l.data,function(e,i){i="function"==typeof i?i():i,r.append(e,i)}),i.ajax({url:l.url,type:l.method,data:r,contentType:!1,processData:!1,dataType:"json",headers:l.headers||{},success:function(i){t++,d(e,i),u()},error:function(){n++,o.msg("请求上传接口出现异常"),m(e),u()}})})},c=function(){var e=i("#"+f);o.elemFile.parent().submit(),clearInterval(p.timer),p.timer=setInterval(function(){var i,t=e.contents().find("body");try{i=t.text()}catch(n){o.msg("获取上传后的响应信息出现异常"),clearInterval(p.timer),m()}i&&(clearInterval(p.timer),t.html(""),d(0,i))},30)},d=function(e,i){if(o.elemFile.next("."+s).remove(),r.value="","object"!=typeof i)try{i=JSON.parse(i)}catch(t){return i={},o.msg("请对上传接口返回有效JSON")}"function"==typeof l.done&&l.done(i,e||0,function(e){o.upload(e)})},m=function(e){l.auto&&(r.value=""),"function"==typeof l.error&&l.error(e||0,function(e){o.upload(e)})},h=l.exts,v=function(){var i=[];return layui.each(e||o.chooseFiles,function(e,t){i.push(t.name)}),i}(),g={preview:function(e){o.preview(e)},upload:function(e,i){var t={};t[e]=i,o.upload(t)},pushFile:function(){return o.files=o.files||{},layui.each(o.chooseFiles,function(e,i){o.files[e]=i}),o.files},resetFile:function(e,i,t){var n=new File([i],t);o.files=o.files||{},o.files[e]=n}},y=function(){if("choose"!==t&&!l.auto||(l.choose&&l.choose(g),"choose"!==t))return l.before&&l.before(g),a.ie?a.ie>9?u():c():void u()};if(v=0===v.length?r.value.match(/[^\/\\]+\..+/g)||[]||"":v,0!==v.length){switch(l.accept){case"file":if(h&&!RegExp("\\w\\.("+h+")$","i").test(escape(v)))return o.msg("选择的文件中包含不支持的格式"),r.value="";break;case"video":if(!RegExp("\\w\\.("+(h||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(v)))return o.msg("选择的视频中包含不支持的格式"),r.value="";break;case"audio":if(!RegExp("\\w\\.("+(h||"mp3|wav|mid")+")$","i").test(escape(v)))return o.msg("选择的音频中包含不支持的格式"),r.value="";break;default:if(layui.each(v,function(e,i){RegExp("\\w\\.("+(h||"jpg|png|gif|bmp|jpeg$")+")","i").test(escape(i))||(n=!0)}),n)return o.msg("选择的图片中包含不支持的格式"),r.value=""}if(o.fileLength=function(){var i=0,t=e||o.files||o.chooseFiles||r.files;return layui.each(t,function(){i++}),i}(),l.number&&o.fileLength>l.number)return o.msg("同时最多只能上传的数量为:"+l.number);if(l.size>0&&!(a.ie&&a.ie<10)){var F;if(layui.each(o.chooseFiles,function(e,i){if(i.size>1024*l.size){var t=l.size/1024;t=t>=1?t.toFixed(2)+"MB":l.size+"KB",r.value="",F=t}}),F)return o.msg("文件不能超过"+F)}y()}},p.prototype.events=function(){var e=this,t=e.config,o=function(i){e.chooseFiles={},layui.each(i,function(i,t){var n=(new Date).getTime();e.chooseFiles[n+"-"+i]=t})},l=function(i,n){var a=e.elemFile,o=i.length>1?i.length+"个文件":(i[0]||{}).name||a[0].value.match(/[^\/\\]+\..+/g)||[]||"";a.next().hasClass(s)&&a.next().remove(),e.upload(null,"choose"),e.isFile()||t.choose||a.after('<span class="layui-inline '+s+'">'+o+"</span>")};t.elem.off("upload.start").on("upload.start",function(){var a=i(this),o=a.attr("lay-data");if(o)try{o=new Function("return "+o)(),e.config=i.extend({},t,o)}catch(l){n.error("Upload element property lay-data configuration item has a syntax error: "+o)}e.config.item=a,e.elemFile[0].click()}),a.ie&&a.ie<10||t.elem.off("upload.over").on("upload.over",function(){var e=i(this);e.attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){var e=i(this);e.removeAttr("lay-over")}).off("upload.drop").on("upload.drop",function(n,a){var r=i(this),u=a.originalEvent.dataTransfer.files||[];r.removeAttr("lay-over"),o(u),t.auto?e.upload(u):l(u)}),e.elemFile.off("upload.change").on("upload.change",function(){var i=this.files||[];o(i),t.auto?e.upload():l(i)}),t.bindAction.off("upload.action").on("upload.action",function(){e.upload()}),t.elem.data("haveEvents")||(e.elemFile.on("change",function(){i(this).trigger("upload.change")}),t.elem.on("click",function(){e.isFile()||i(this).trigger("upload.start")}),t.drag&&t.elem.on("dragover",function(e){e.preventDefault(),i(this).trigger("upload.over")}).on("dragleave",function(e){i(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),i(this).trigger("upload.drop",e)}),t.bindAction.on("click",function(){i(this).trigger("upload.action")}),t.elem.data("haveEvents",!0))},o.render=function(e){var i=new p(e);return l.call(i)},e(r,o)}); -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/metroStyle/metroStyle.css: -------------------------------------------------------------------------------- 1 | /*------------------------------------- 2 | zTree Style 3 | 4 | version: 3.4 5 | author: Hunter.z 6 | email: hunter.z@263.net 7 | website: http://code.google.com/p/jquerytree/ 8 | 9 | -------------------------------------*/ 10 | 11 | .ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif} 12 | .ztree {margin:0; padding:5px; color:#333} 13 | .ztree li{padding:0; margin:0; list-style:none; line-height:17px; text-align:left; white-space:nowrap; outline:0} 14 | .ztree li ul{ margin:0; padding:0 0 0 18px} 15 | .ztree li ul.line{ background:url(./img/line_conn.png) 0 0 repeat-y;} 16 | 17 | .ztree li a {padding-right:3px; margin:0; cursor:pointer; height:21px; color:#333; background-color: transparent; text-decoration:none; vertical-align:top; display: inline-block} 18 | .ztree li a:hover {text-decoration:underline} 19 | .ztree li a.curSelectedNode {padding-top:0px; background-color:#e5e5e5; color:black; height:21px; opacity:0.8;} 20 | .ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#e5e5e5; color:black; height:21px; border:1px #666 solid; opacity:0.8;} 21 | .ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#aaa; color:white; height:21px; border:1px #666 solid; 22 | opacity:0.8; filter:alpha(opacity=80)} 23 | .ztree li a.tmpTargetNode_prev {} 24 | .ztree li a.tmpTargetNode_next {} 25 | .ztree li a input.rename {height:14px; width:80px; padding:0; margin:0; 26 | font-size:12px; border:1px #585956 solid; *border:0px} 27 | .ztree li span {line-height:21px; margin-right:2px} 28 | .ztree li span.button {line-height:0; margin:0; padding: 0; width:21px; height:21px; display: inline-block; vertical-align:middle; 29 | border:0 none; cursor: pointer;outline:none; 30 | background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; 31 | background-image:url("./img/metro.png"); *background-image:url("./img/metro.gif")} 32 | 33 | .ztree li span.button.chk {width:13px; height:13px; margin:0 2px; cursor: auto} 34 | .ztree li span.button.chk.checkbox_false_full {background-position: -5px -5px;} 35 | .ztree li span.button.chk.checkbox_false_full_focus {background-position: -5px -26px;} 36 | .ztree li span.button.chk.checkbox_false_part {background-position: -5px -48px;} 37 | .ztree li span.button.chk.checkbox_false_part_focus {background-position: -5px -68px;} 38 | .ztree li span.button.chk.checkbox_false_disable {background-position: -5px -89px;} 39 | .ztree li span.button.chk.checkbox_true_full {background-position: -26px -5px;} 40 | .ztree li span.button.chk.checkbox_true_full_focus {background-position: -26px -26px;} 41 | .ztree li span.button.chk.checkbox_true_part {background-position: -26px -48px;} 42 | .ztree li span.button.chk.checkbox_true_part_focus {background-position: -26px -68px;} 43 | .ztree li span.button.chk.checkbox_true_disable {background-position: -26px -89px;} 44 | .ztree li span.button.chk.radio_false_full {background-position: -47px -5px;} 45 | .ztree li span.button.chk.radio_false_full_focus {background-position: -47px -26px;} 46 | .ztree li span.button.chk.radio_false_part {background-position: -47px -47px;} 47 | .ztree li span.button.chk.radio_false_part_focus {background-position: -47px -68px;} 48 | .ztree li span.button.chk.radio_false_disable {background-position: -47px -89px;} 49 | .ztree li span.button.chk.radio_true_full {background-position: -68px -5px;} 50 | .ztree li span.button.chk.radio_true_full_focus {background-position: -68px -26px;} 51 | .ztree li span.button.chk.radio_true_part {background-position: -68px -47px;} 52 | .ztree li span.button.chk.radio_true_part_focus {background-position: -68px -68px;} 53 | .ztree li span.button.chk.radio_true_disable {background-position: -68px -89px;} 54 | 55 | .ztree li span.button.switch {width:21px; height:21px} 56 | .ztree li span.button.root_open{background-position:-105px -63px} 57 | .ztree li span.button.root_close{background-position:-126px -63px} 58 | .ztree li span.button.roots_open{background-position: -105px 0;} 59 | .ztree li span.button.roots_close{background-position: -126px 0;} 60 | .ztree li span.button.center_open{background-position: -105px -21px;} 61 | .ztree li span.button.center_close{background-position: -126px -21px;} 62 | .ztree li span.button.bottom_open{background-position: -105px -42px;} 63 | .ztree li span.button.bottom_close{background-position: -126px -42px;} 64 | .ztree li span.button.noline_open{background-position: -105px -84px;} 65 | .ztree li span.button.noline_close{background-position: -126px -84px;} 66 | .ztree li span.button.root_docu{ background:none;} 67 | .ztree li span.button.roots_docu{background-position: -84px 0;} 68 | .ztree li span.button.center_docu{background-position: -84px -21px;} 69 | .ztree li span.button.bottom_docu{background-position: -84px -42px;} 70 | .ztree li span.button.noline_docu{ background:none;} 71 | 72 | .ztree li span.button.ico_open{margin-right:2px; background-position: -147px -21px; vertical-align:top; *vertical-align:middle} 73 | .ztree li span.button.ico_close{margin-right:2px; margin-right:2px; background-position: -147px 0; vertical-align:top; *vertical-align:middle} 74 | .ztree li span.button.ico_docu{margin-right:2px; background-position: -147px -42px; vertical-align:top; *vertical-align:middle} 75 | .ztree li span.button.edit {margin-left:2px; margin-right: -1px; background-position: -189px -21px; vertical-align:top; *vertical-align:middle} 76 | .ztree li span.button.edit:hover { 77 | background-position: -168px -21px; 78 | } 79 | .ztree li span.button.remove {margin-left:2px; margin-right: -1px; background-position: -189px -42px; vertical-align:top; *vertical-align:middle} 80 | .ztree li span.button.remove:hover { 81 | background-position: -168px -42px; 82 | } 83 | .ztree li span.button.add {margin-left:2px; margin-right: -1px; background-position: -189px 0; vertical-align:top; *vertical-align:middle} 84 | .ztree li span.button.add:hover { 85 | background-position: -168px 0; 86 | } 87 | .ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle} 88 | 89 | ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)} 90 | 91 | span.tmpzTreeMove_arrow {width:16px; height:21px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute; 92 | background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; 93 | background-position:-168px -84px; background-image:url("./img/metro.png"); *background-image:url("./img/metro.gif")} 94 | 95 | ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)} 96 | .ztreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute} 97 | -------------------------------------------------------------------------------- /template/statics/plugin/SyntaxHighlighter/shCoreDefault.css: -------------------------------------------------------------------------------- 1 | .syntaxhighlighter a,.syntaxhighlighter div,.syntaxhighlighter code,.syntaxhighlighter,.syntaxhighlighter td,.syntaxhighlighter tr,.syntaxhighlighter tbody,.syntaxhighlighter thead,.syntaxhighlighter caption,.syntaxhighlighter textarea{-moz-border-radius:0 0 0 0!important;-webkit-border-radius:0 0 0 0!important;background:none!important;border:0!important;bottom:auto!important;float:none!important;left:auto!important;line-height:1.1em!important;margin:0!important;outline:0!important;overflow:visible!important;padding:0!important;position:static!important;right:auto!important;text-align:left!important;top:auto!important;vertical-align:baseline!important;width:auto!important;box-sizing:content-box!important;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-weight:normal!important;font-style:normal!important;min-height:inherit!important;min-height:auto!important;font-size:13px!important}.syntaxhighlighter{width:100%!important;margin:.3em 0 .3em 0!important;position:relative!important;overflow:auto!important;background-color:#f5f5f5!important;border:1px solid #ccc!important;border-radius:4px!important;border-collapse:separate!important}.syntaxhighlighter.source{overflow:hidden!important}.syntaxhighlighter .bold{font-weight:bold!important}.syntaxhighlighter .italic{font-style:italic!important}.syntaxhighlighter .gutter div{white-space:pre!important;word-wrap:normal}.syntaxhighlighter caption{text-align:left!important;padding:.5em 0 .5em 1em!important}.syntaxhighlighter td.code{width:100%!important}.syntaxhighlighter td.code .container{position:relative!important}.syntaxhighlighter td.code .container textarea{box-sizing:border-box!important;position:absolute!important;left:0!important;top:0!important;width:100%!important;border:none!important;background:white!important;padding-left:1em!important;overflow:hidden!important;white-space:pre!important}.syntaxhighlighter td.gutter .line{text-align:right!important;padding:0 .5em 0 1em!important}.syntaxhighlighter td.code .line{padding:0 1em!important}.syntaxhighlighter.nogutter td.code .container textarea,.syntaxhighlighter.nogutter td.code .line{padding-left:0!important}.syntaxhighlighter.show{display:block!important}.syntaxhighlighter.collapsed table{display:none!important}.syntaxhighlighter.collapsed .toolbar{padding:.1em .8em 0 .8em!important;font-size:1em!important;position:static!important;width:auto!important}.syntaxhighlighter.collapsed .toolbar span{display:inline!important;margin-right:1em!important}.syntaxhighlighter.collapsed .toolbar span a{padding:0!important;display:none!important}.syntaxhighlighter.collapsed .toolbar span a.expandSource{display:inline!important}.syntaxhighlighter .toolbar{position:absolute!important;right:1px!important;top:1px!important;width:11px!important;height:11px!important;font-size:10px!important;z-index:10!important}.syntaxhighlighter .toolbar span.title{display:inline!important}.syntaxhighlighter .toolbar a{display:block!important;text-align:center!important;text-decoration:none!important;padding-top:1px!important}.syntaxhighlighter .toolbar a.expandSource{display:none!important}.syntaxhighlighter.ie{font-size:.9em!important;padding:1px 0 1px 0!important}.syntaxhighlighter.ie .toolbar{line-height:8px!important}.syntaxhighlighter.ie .toolbar a{padding-top:0!important}.syntaxhighlighter.printing .line.alt1 .content,.syntaxhighlighter.printing .line.alt2 .content,.syntaxhighlighter.printing .line.highlighted .number,.syntaxhighlighter.printing .line.highlighted.alt1 .content,.syntaxhighlighter.printing .line.highlighted.alt2 .content{background:none!important}.syntaxhighlighter.printing .line .number{color:#bbb!important}.syntaxhighlighter.printing .line .content{color:black!important}.syntaxhighlighter.printing .toolbar{display:none!important}.syntaxhighlighter.printing a{text-decoration:none!important}.syntaxhighlighter.printing .plain,.syntaxhighlighter.printing .plain a{color:black!important}.syntaxhighlighter.printing .comments,.syntaxhighlighter.printing .comments a{color:#008200!important}.syntaxhighlighter.printing .string,.syntaxhighlighter.printing .string a{color:blue!important}.syntaxhighlighter.printing .keyword{color:#ff7800!important;font-weight:bold!important}.syntaxhighlighter.printing .preprocessor{color:gray!important}.syntaxhighlighter.printing .variable{color:#a70!important}.syntaxhighlighter.printing .value{color:#090!important}.syntaxhighlighter.printing .functions{color:#ff1493!important}.syntaxhighlighter.printing .constants{color:#06c!important}.syntaxhighlighter.printing .script{font-weight:bold!important}.syntaxhighlighter.printing .color1,.syntaxhighlighter.printing .color1 a{color:gray!important}.syntaxhighlighter.printing .color2,.syntaxhighlighter.printing .color2 a{color:#ff1493!important}.syntaxhighlighter.printing .color3,.syntaxhighlighter.printing .color3 a{color:red!important}.syntaxhighlighter.printing .break,.syntaxhighlighter.printing .break a{color:black!important}.syntaxhighlighter{background-color:#f5f5f5!important}.syntaxhighlighter .line.highlighted.number{color:black!important}.syntaxhighlighter caption{color:black!important}.syntaxhighlighter .gutter{color:#afafaf!important;background-color:#f7f7f9!important;border-right:1px solid #e1e1e8!important;padding:9.5px 0 9.5px 9.5px!important;border-top-left-radius:4px!important;border-bottom-left-radius:4px!important;user-select:none!important;-moz-user-select:none!important;-webkit-user-select:none!important}.syntaxhighlighter .gutter .line.highlighted{background-color:#6ce26c!important;color:white!important}.syntaxhighlighter.printing .line .content{border:none!important}.syntaxhighlighter.collapsed{overflow:visible!important}.syntaxhighlighter.collapsed .toolbar{color:blue!important;background:white!important;border:1px solid #6ce26c!important}.syntaxhighlighter.collapsed .toolbar a{color:blue!important}.syntaxhighlighter.collapsed .toolbar a:hover{color:red!important}.syntaxhighlighter .toolbar{color:white!important;background:#6ce26c!important;border:none!important}.syntaxhighlighter .toolbar a{color:white!important}.syntaxhighlighter .toolbar a:hover{color:black!important}.syntaxhighlighter .plain,.syntaxhighlighter .plain a{color:black!important}.syntaxhighlighter .comments,.syntaxhighlighter .comments a{color:#008200!important}.syntaxhighlighter .string,.syntaxhighlighter .string a{color:blue!important}.syntaxhighlighter .keyword{color:#ff7800!important}.syntaxhighlighter .preprocessor{color:gray!important}.syntaxhighlighter .variable{color:#a70!important}.syntaxhighlighter .value{color:#090!important}.syntaxhighlighter .functions{color:#ff1493!important}.syntaxhighlighter .constants{color:#06c!important}.syntaxhighlighter .script{font-weight:bold!important;color:#ff7800!important;background-color:none!important}.syntaxhighlighter .color1,.syntaxhighlighter .color1 a{color:gray!important}.syntaxhighlighter .color2,.syntaxhighlighter .color2 a{color:#ff1493!important}.syntaxhighlighter .color3,.syntaxhighlighter .color3 a{color:red!important}.syntaxhighlighter .keyword{font-weight:bold!important} -------------------------------------------------------------------------------- /template/statics/plugin/layui/lay/modules/element.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(t){"use strict";var a=layui.$,i=(layui.hint(),layui.device()),e="element",l="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(t){var i=this;return a.extend(!0,i.config,t),i},s.prototype.on=function(t,a){return layui.onevent.call(this,e,t,a)},s.prototype.tabAdd=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.children(".layui-tab-bar"),o=l.children(".layui-tab-content"),r='<li lay-id="'+(i.id||"")+'"'+(i.attr?' lay-attr="'+i.attr+'"':"")+">"+(i.title||"unnaming")+"</li>";return s[0]?s.before(r):n.append(r),o.append('<div class="layui-tab-item">'+(i.content||"")+"</div>"),f.hideTabMore(!0),f.tabAuto(),this},s.prototype.tabDelete=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabDelete(null,s),this},s.prototype.tabChange=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabClick.call(s[0],null,null,s),this},s.prototype.tab=function(t){t=t||{},b.on("click",t.headerElem,function(i){var e=a(this).index();f.tabClick.call(this,i,e,null,t)})},s.prototype.progress=function(t,i){var e="layui-progress",l=a("."+e+"[lay-filter="+t+"]"),n=l.find("."+e+"-bar"),s=n.find("."+e+"-text");return n.css("width",i),s.text(i),this};var o=".layui-nav",r="layui-nav-item",c="layui-nav-bar",u="layui-nav-tree",d="layui-nav-child",y="layui-nav-more",h="layui-anim layui-anim-upbit",f={tabClick:function(t,i,s,o){o=o||{};var r=s||a(this),i=i||r.parent().children("li").index(r),c=o.headerElem?r.parent():r.parents(".layui-tab").eq(0),u=o.bodyElem?a(o.bodyElem):c.children(".layui-tab-content").children(".layui-tab-item"),d=r.find("a"),y=c.attr("lay-filter");"javascript:;"!==d.attr("href")&&"_blank"===d.attr("target")||(r.addClass(l).siblings().removeClass(l),u.eq(i).addClass(n).siblings().removeClass(n)),layui.event.call(this,e,"tab("+y+")",{elem:c,index:i})},tabDelete:function(t,i){var n=i||a(this).parent(),s=n.index(),o=n.parents(".layui-tab").eq(0),r=o.children(".layui-tab-content").children(".layui-tab-item"),c=o.attr("lay-filter");n.hasClass(l)&&(n.next()[0]?f.tabClick.call(n.next()[0],null,s+1):n.prev()[0]&&f.tabClick.call(n.prev()[0],null,s-1)),n.remove(),r.eq(s).remove(),setTimeout(function(){f.tabAuto()},50),layui.event.call(this,e,"tabDelete("+c+")",{elem:o,index:s})},tabAuto:function(){var t="layui-tab-more",e="layui-tab-bar",l="layui-tab-close",n=this;a(".layui-tab").each(function(){var s=a(this),o=s.children(".layui-tab-title"),r=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),c=a('<span class="layui-unselect layui-tab-bar" '+r+"><i "+r+' class="layui-icon"></i></span>');if(n===window&&8!=i.ie&&f.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var t=a(this);if(!t.find("."+l)[0]){var i=a('<i class="layui-icon layui-unselect '+l+'">ဆ</i>');i.on("click",f.tabDelete),t.append(i)}}),"string"!=typeof s.attr("lay-unauto"))if(o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+e)[0])return;o.append(c),s.attr("overflow",""),c.on("click",function(a){o[this.title?"removeClass":"addClass"](t),this.title=this.title?"":"收缩"})}else o.find("."+e).remove(),s.removeAttr("overflow")})},hideTabMore:function(t){var i=a(".layui-tab-title");t!==!0&&"tabmore"===a(t.target).attr("lay-stope")||(i.removeClass("layui-tab-more"),i.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var t=a(this),i=t.parents(o),n=i.attr("lay-filter"),s=t.parent(),c=t.siblings("."+d),y="string"==typeof s.attr("lay-unselect");"javascript:;"!==t.attr("href")&&"_blank"===t.attr("target")||y||c[0]||(i.find("."+l).removeClass(l),s.addClass(l)),i.hasClass(u)&&(c.removeClass(h),c[0]&&(s["none"===c.css("display")?"addClass":"removeClass"](r+"ed"),"all"===i.attr("lay-shrink")&&s.siblings().removeClass(r+"ed"))),layui.event.call(this,e,"nav("+n+")",t)},collapse:function(){var t=a(this),i=t.find(".layui-colla-icon"),l=t.siblings(".layui-colla-content"),s=t.parents(".layui-collapse").eq(0),o=s.attr("lay-filter"),r="none"===l.css("display");if("string"==typeof s.attr("lay-accordion")){var c=s.children(".layui-colla-item").children("."+n);c.siblings(".layui-colla-title").children(".layui-colla-icon").html(""),c.removeClass(n)}l[r?"addClass":"removeClass"](n),i.html(r?"":""),layui.event.call(this,e,"collapse("+o+")",{title:t,content:l,show:r})}};s.prototype.init=function(t,e){var l=function(){return e?'[lay-filter="'+e+'"]':""}(),s={tab:function(){f.tabAuto.call({})},nav:function(){var t=200,e={},s={},p={},b=function(l,o,r){var c=a(this),f=c.find("."+d);o.hasClass(u)?l.css({top:c.position().top,height:c.children("a").outerHeight(),opacity:1}):(f.addClass(h),l.css({left:c.position().left+parseFloat(c.css("marginLeft")),top:c.position().top+c.height()-l.height()}),e[r]=setTimeout(function(){l.css({width:c.width(),opacity:1})},i.ie&&i.ie<10?0:t),clearTimeout(p[r]),"block"===f.css("display")&&clearTimeout(s[r]),s[r]=setTimeout(function(){f.addClass(n),c.find("."+y).addClass(y+"d")},300))};a(o+l).each(function(i){var l=a(this),o=a('<span class="'+c+'"></span>'),h=l.find("."+r);l.find("."+c)[0]||(l.append(o),h.on("mouseenter",function(){b.call(this,o,l,i)}).on("mouseleave",function(){l.hasClass(u)||(clearTimeout(s[i]),s[i]=setTimeout(function(){l.find("."+d).removeClass(n),l.find("."+y).removeClass(y+"d")},300))}),l.on("mouseleave",function(){clearTimeout(e[i]),p[i]=setTimeout(function(){l.hasClass(u)?o.css({height:0,top:o.position().top+o.height()/2,opacity:0}):o.css({width:0,left:o.position().left+o.width()/2,opacity:0})},t)})),h.find("a").each(function(){var t=a(this),i=(t.parent(),t.siblings("."+d));i[0]&&!t.children("."+y)[0]&&t.append('<span class="'+y+'"></span>'),t.off("click",f.clickThis).on("click",f.clickThis)})})},breadcrumb:function(){var t=".layui-breadcrumb";a(t+l).each(function(){var t=a(this),i="lay-separator",e=t.attr(i)||"/",l=t.find("a");l.next("span["+i+"]")[0]||(l.each(function(t){t!==l.length-1&&a(this).after("<span "+i+">"+e+"</span>")}),t.css("visibility","visible"))})},progress:function(){var t="layui-progress";a("."+t+l).each(function(){var i=a(this),e=i.find(".layui-progress-bar"),l=e.attr("lay-percent");e.css("width",function(){return/^.+\/.+$/.test(l)?100*new Function("return "+l)()+"%":l}()),i.attr("lay-showPercent")&&setTimeout(function(){e.html('<span class="'+t+'-text">'+l+"</span>")},350)})},collapse:function(){var t="layui-collapse";a("."+t+l).each(function(){var t=a(this).find(".layui-colla-item");t.each(function(){var t=a(this),i=t.find(".layui-colla-title"),e=t.find(".layui-colla-content"),l="none"===e.css("display");i.find(".layui-colla-icon").remove(),i.append('<i class="layui-icon layui-colla-icon">'+(l?"":"")+"</i>"),i.off("click",f.collapse).on("click",f.collapse)})})}};return s[t]?s[t]():layui.each(s,function(t,a){a()})},s.prototype.render=s.prototype.init;var p=new s,b=a(document);p.render();var v=".layui-tab-title li";b.on("click",v,f.tabClick),b.on("click",f.hideTabMore),a(window).on("resize",f.tabAuto),t(e,p)}); -------------------------------------------------------------------------------- /template/statics/plugin/layui/css/modules/laydate/default/laydate.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | .laydate-set-ym,.layui-laydate,.layui-laydate *,.layui-laydate-list{box-sizing:border-box}html #layuicss-laydate{display:none;position:absolute;width:1989px}.layui-laydate *{margin:0;padding:0}.layui-laydate{position:absolute;z-index:66666666;margin:5px 0;border-radius:2px;font-size:14px;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:laydate-upbit;animation-name:laydate-upbit}.layui-laydate-main{width:272px}.layui-laydate-content td,.layui-laydate-header *,.layui-laydate-list li{transition-duration:.3s;-webkit-transition-duration:.3s}@-webkit-keyframes laydate-upbit{from{-webkit-transform:translate3d(0,20px,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes laydate-upbit{from{transform:translate3d(0,20px,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-laydate-static{position:relative;z-index:0;display:inline-block;margin:0;-webkit-animation:none;animation:none}.laydate-ym-show .laydate-next-m,.laydate-ym-show .laydate-prev-m{display:none!important}.laydate-ym-show .laydate-next-y,.laydate-ym-show .laydate-prev-y{display:inline-block!important}.laydate-time-show .laydate-set-ym span[lay-type=month],.laydate-time-show .laydate-set-ym span[lay-type=year],.laydate-time-show .layui-laydate-header .layui-icon,.laydate-ym-show .laydate-set-ym span[lay-type=month]{display:none!important}.layui-laydate-header{position:relative;line-height:30px;padding:10px 70px 5px}.laydate-set-ym span,.layui-laydate-header i{padding:0 5px;cursor:pointer}.layui-laydate-header *{display:inline-block;vertical-align:bottom}.layui-laydate-header i{position:absolute;top:10px;color:#999;font-size:18px}.layui-laydate-header i.laydate-prev-y{left:15px}.layui-laydate-header i.laydate-prev-m{left:45px}.layui-laydate-header i.laydate-next-y{right:15px}.layui-laydate-header i.laydate-next-m{right:45px}.laydate-set-ym{width:100%;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.laydate-time-text{cursor:default!important}.layui-laydate-content{position:relative;padding:10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-laydate-content table{border-collapse:collapse;border-spacing:0}.layui-laydate-content td,.layui-laydate-content th{width:36px;height:30px;padding:5px;text-align:center}.layui-laydate-content td{position:relative;cursor:pointer}.laydate-day-mark{position:absolute;left:0;top:0;width:100%;height:100%;line-height:30px;font-size:12px;overflow:hidden}.laydate-day-mark::after{position:absolute;content:'';right:2px;top:2px;width:5px;height:5px;border-radius:50%}.layui-laydate-footer{position:relative;height:46px;line-height:26px;padding:10px 20px}.layui-laydate-footer span{margin-right:15px;display:inline-block;cursor:pointer;font-size:12px}.layui-laydate-footer span:hover{color:#5FB878}.laydate-footer-btns{position:absolute;right:10px;top:10px}.laydate-footer-btns span{height:26px;line-height:26px;margin:0 0 0 -1px;padding:0 10px;border:1px solid #C9C9C9;background-color:#fff;white-space:nowrap;vertical-align:top;border-radius:2px}.layui-laydate-list>li,.layui-laydate-range .layui-laydate-main{display:inline-block;vertical-align:middle}.layui-laydate-list{position:absolute;left:0;top:0;width:100%;height:100%;padding:10px;background-color:#fff}.layui-laydate-list>li{position:relative;width:33.3%;height:36px;line-height:36px;margin:3px 0;text-align:center;cursor:pointer}.laydate-month-list>li{width:25%;margin:17px 0}.laydate-time-list>li{height:100%;margin:0;line-height:normal;cursor:default}.laydate-time-list p{position:relative;top:-4px;line-height:29px}.laydate-time-list ol{height:181px;overflow:hidden}.laydate-time-list>li:hover ol{overflow-y:auto}.laydate-time-list ol li{width:130%;padding-left:33px;line-height:30px;text-align:left;cursor:pointer}.layui-laydate-hint{position:absolute;top:115px;left:50%;width:250px;margin-left:-125px;line-height:20px;padding:15px;text-align:center;font-size:12px}.layui-laydate-range{width:546px}.layui-laydate-range .laydate-main-list-0 .laydate-next-m,.layui-laydate-range .laydate-main-list-0 .laydate-next-y,.layui-laydate-range .laydate-main-list-1 .laydate-prev-m,.layui-laydate-range .laydate-main-list-1 .laydate-prev-y{display:none}.layui-laydate-range .laydate-main-list-1 .layui-laydate-content{border-left:1px solid #e2e2e2}.layui-laydate,.layui-laydate-hint{border:1px solid #d2d2d2;box-shadow:0 2px 4px rgba(0,0,0,.12);background-color:#fff;color:#666}.layui-laydate-header{border-bottom:1px solid #e2e2e2}.layui-laydate-header i:hover,.layui-laydate-header span:hover{color:#5FB878}.layui-laydate-content{border-top:none 0;border-bottom:none 0}.layui-laydate-content th{font-weight:400;color:#333}.layui-laydate-content td{color:#666}.layui-laydate-content td.laydate-selected{background-color:#00F7DE}.laydate-selected:hover{background-color:#00F7DE!important}.layui-laydate-content td:hover,.layui-laydate-list li:hover{background-color:#eaeaea;color:#333}.laydate-time-list li ol{margin:0;padding:0;border:1px solid #e2e2e2;border-left-width:0}.laydate-time-list li:first-child ol{border-left-width:1px}.laydate-time-list>li:hover{background:0 0}.layui-laydate-content .laydate-day-next,.layui-laydate-content .laydate-day-prev{color:#d2d2d2}.laydate-selected.laydate-day-next,.laydate-selected.laydate-day-prev{background-color:#f8f8f8!important}.layui-laydate-footer{border-top:1px solid #e2e2e2}.layui-laydate-hint{color:#FF5722}.laydate-day-mark::after{background-color:#5FB878}.layui-laydate-content td.layui-this .laydate-day-mark::after{display:none}.layui-laydate-footer span[lay-type=date]{color:#5FB878}.layui-laydate .layui-this{background-color:#009688!important;color:#fff!important}.layui-laydate .laydate-disabled,.layui-laydate .laydate-disabled:hover{background:0 0!important;color:#d2d2d2!important;cursor:not-allowed!important;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.laydate-theme-molv{border:none}.laydate-theme-molv.layui-laydate-range{width:548px}.laydate-theme-molv .layui-laydate-main{width:274px}.laydate-theme-molv .layui-laydate-header{border:none;background-color:#009688}.laydate-theme-molv .layui-laydate-header i,.laydate-theme-molv .layui-laydate-header span{color:#f6f6f6}.laydate-theme-molv .layui-laydate-header i:hover,.laydate-theme-molv .layui-laydate-header span:hover{color:#fff}.laydate-theme-molv .layui-laydate-content{border:1px solid #e2e2e2;border-top:none;border-bottom:none}.laydate-theme-molv .laydate-main-list-1 .layui-laydate-content{border-left:none}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li,.laydate-theme-grid .layui-laydate-content td,.laydate-theme-grid .layui-laydate-content thead,.laydate-theme-molv .layui-laydate-footer{border:1px solid #e2e2e2}.laydate-theme-grid .laydate-selected,.laydate-theme-grid .laydate-selected:hover{background-color:#f2f2f2!important;color:#009688!important}.laydate-theme-grid .laydate-selected.laydate-day-next,.laydate-theme-grid .laydate-selected.laydate-day-prev{color:#d2d2d2!important}.laydate-theme-grid .laydate-month-list,.laydate-theme-grid .laydate-year-list{margin:1px 0 0 1px}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li{margin:0 -1px -1px 0}.laydate-theme-grid .laydate-year-list>li{height:43px;line-height:43px}.laydate-theme-grid .laydate-month-list>li{height:71px;line-height:71px} -------------------------------------------------------------------------------- /template/html/article.php: -------------------------------------------------------------------------------- 1 | <!doctype html> 2 | <html> 3 | <head> 4 | <meta charset="UTF-8"> 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> 6 | <meta http-equiv="X-UA-Compatible" content="ie=edge"> 7 | <?php 8 | $pageTitle = $currentCatalog['title'] . ' - ' . $this->config['name'] . ' - mddoc'; 9 | ?> 10 | <title><?php echo $pageTitle; ?> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 45 | 91 | 92 | 93 | 94 |
    95 |
    96 |
      97 |
    • 目录
    • 98 |
    • 搜索
    • 99 |
    100 |
    101 |
    102 |
      103 |
      104 |
      105 | 119 |
      120 |
      121 | 122 |
      123 |
      124 | 131 | 132 | 133 |
      134 |
      135 |
      136 | 154 | 155 |
      156 |
      157 |
      158 | 159 | 202 | 203 | 204 | -------------------------------------------------------------------------------- /template/statics/js/docView.js: -------------------------------------------------------------------------------- 1 | var curMenu = null, menuTree = null; 2 | var ajaxSetting = { 3 | edit: { 4 | drag: { 5 | autoExpandTrigger: true, 6 | prev: true, 7 | inner: true, 8 | next: true 9 | }, 10 | enable: true, 11 | showRemoveBtn: false, 12 | showRenameBtn: false 13 | }, 14 | view: { 15 | showLine: false, 16 | showIcon: false, 17 | selectedMulti: false, 18 | dblClickExpand: false, 19 | addDiyDom: addDiyDom 20 | }, 21 | data: { 22 | key:{ 23 | name: 'title', 24 | children: null, 25 | }, 26 | simpleData: { 27 | enable: true, 28 | idKey: "id", 29 | pIdKey: 'parent_id', 30 | rootPId: 0, 31 | } 32 | }, 33 | callback: { 34 | onClick: onClick, 35 | }, 36 | }; 37 | var loadingHandler; 38 | function switchNode(event, treeId, treeNode) 39 | { 40 | if ('pushState' in history) 41 | { 42 | getChapter(treeNode.url); 43 | history.pushState('', '', treeNode.url); 44 | } 45 | else 46 | { 47 | location = treeNode.url; 48 | } 49 | event.preventDefault() 50 | } 51 | 52 | function getChapter(url) 53 | { 54 | if(void 0 === url) 55 | { 56 | return; 57 | } 58 | loadingHandler = layer.open({ 59 | type:3, 60 | icon:2, 61 | shade:0.1, 62 | }); 63 | $.ajax({ 64 | method: 'GET', 65 | url: url, 66 | success: function(result){ 67 | var resultElement = $(result); 68 | $('#article-content').html(resultElement.find('#article-content').html()); 69 | onContentChange(); 70 | var hash = location.hash; 71 | if (hash.length > 0) { 72 | location.hash = ''; 73 | location.hash = hash; 74 | } 75 | else { 76 | // 有时切换文档不在最上面 77 | $('#content_body').scrollTop(0) 78 | } 79 | }, 80 | error: function(){ 81 | location = url; 82 | }, 83 | complete: function(){ 84 | layer.close(loadingHandler); 85 | }, 86 | }); 87 | } 88 | 89 | function addDiyDom(treeId, treeNode) { 90 | var spaceWidth = 5; 91 | var switchObj = $("#" + treeNode.tId + "_switch"), 92 | icoObj = $("#" + treeNode.tId + "_ico"); 93 | switchObj.remove(); 94 | icoObj.before(switchObj); 95 | 96 | if (treeNode.level > 1) { 97 | var spaceStr = ""; 98 | switchObj.before(spaceStr); 99 | } 100 | } 101 | 102 | function initTree(data) 103 | { 104 | for(var i in data) 105 | { 106 | data[i].target = '_self'; 107 | } 108 | if (null === menuTree) { 109 | var treeObj = $("#treeDirectory"); 110 | $.fn.zTree.init(treeObj, ajaxSetting, data); 111 | menuTree = $.fn.zTree.getZTreeObj("treeDirectory"); 112 | var nodes = menuTree.getNodesByParam('url', location.pathname + location.hash, null); 113 | if (nodes.length > 0) { 114 | if (nodes.length > 1) { 115 | console.log('menuTree.getSelectedNodes()', menuTree.getSelectedNodes()); 116 | if (menuTree.getSelectedNodes().length > 0) { 117 | return; 118 | } 119 | } 120 | menuTree.selectNode(nodes[0]); 121 | } 122 | else { 123 | menuTree.selectNode(menuTree.getNodeByParam('id', currentCatalog.id, null)); 124 | } 125 | } 126 | } 127 | 128 | function onClick(event, treeId, treeNode) 129 | { 130 | // 未修改内容,直接切换 131 | switchNode(event, treeId, treeNode); 132 | } 133 | 134 | function parseLeftHeight() 135 | { 136 | $('#leftbar .layui-tab-content').css('max-height', ($('#leftbar').height() - $('#leftbar .layui-tab-title').height() - $('#leftbar .copyright').height()) + 'px'); 137 | } 138 | 139 | function onContentChange() 140 | { 141 | $('#content-toc').css('max-height', ($(document).height() / 2) + 'px'); 142 | hCatalog('#article-content', '#content-toc'); 143 | var content = $('#article-content'); 144 | content.find('blockquote').addClass('layui-elem-quote'); 145 | content.find('table').addClass('layui-table'); 146 | content.find('pre code').each(function(index, item){ 147 | var pre = $(item).parent(); 148 | var content = $(item).text(); 149 | var brush = parseCodeBrush($(item).attr('class')); 150 | var newPre = $('
      ').addClass('brush: ' + brush).addClass('toolbar: false').text(content);
      151 | 		pre.replaceWith(newPre);
      152 | 	});
      153 | 	SyntaxHighlighter.highlight();
      154 | 	initSearchDatas();
      155 | 	$('#content_body a').each(function(){
      156 | 		var url = $(this).attr('href');
      157 | 		if(void 0 !== url && '#' !== url.substr(0, 1))
      158 | 		{
      159 | 			$(this).attr('target', '_blank');
      160 | 		}
      161 | 	})
      162 | 	setTimeout(function(){
      163 | 		resizeCode();
      164 | 	}, 1)
      165 | }
      166 | 
      167 | function parseCodeBrush(brush)
      168 | {
      169 | 	for(var i in SyntaxHighlighter.brushes)
      170 | 	{
      171 | 		if(SyntaxHighlighter.brushes[i].aliases.indexOf(brush) > -1)
      172 | 		{
      173 | 			return brush;
      174 | 		}
      175 | 	}
      176 | 	return 'text';
      177 | }
      178 | 
      179 | function resizeCode()
      180 | {
      181 | 	var guttelines=$('.gutter .line');
      182 | 	var codelines=$('.code .line');
      183 | 	for(var i=0;imddoc 生成!');
      284 | 	});
      285 | 
      286 | 	initContentToc();
      287 | 
      288 | 	SyntaxHighlighter.all();
      289 | 	onContentChange();
      290 | })
      291 | 
      292 | $(window).load(function(){
      293 | 	$(window).resize(resizeCode);
      294 | });
      
      
      --------------------------------------------------------------------------------
      /template/statics/plugin/layui/lay/modules/form.js:
      --------------------------------------------------------------------------------
      1 | /** layui-v2.3.0 MIT License By https://www.layui.com */
      2 |  ;layui.define("layer",function(e){"use strict";var i=layui.$,t=layui.layer,a=layui.hint(),n=layui.device(),l="form",r=".layui-form",s="layui-this",o="layui-hide",c="layui-disabled",u=function(){this.config={verify:{required:[/[\S]+/,"必填项不能为空"],phone:[/^1\d{10}$/,"请输入正确的手机号"],email:[/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,"邮箱格式不正确"],url:[/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/,"链接格式不正确"],number:function(e){if(!e||isNaN(e))return"只能填写数字"},date:[/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/,"日期格式不正确"],identity:[/(^\d{15}$)|(^\d{17}(x|X|\d)$)/,"请输入正确的身份证号"]}}};u.prototype.set=function(e){var t=this;return i.extend(!0,t.config,e),t},u.prototype.verify=function(e){var t=this;return i.extend(!0,t.config.verify,e),t},u.prototype.on=function(e,i){return layui.onevent.call(this,l,e,i)},u.prototype.val=function(e,t){var a=i(r+'[lay-filter="'+e+'"]');a.each(function(e,a){var n=i(this);layui.each(t,function(e,i){var t,a=n.find('[name="'+e+'"]');a[0]&&(t=a[0].type,"checkbox"===t?a[0].checked=i:"radio"===t?a.each(function(){this.value===i&&(this.checked=!0)}):a.val(i))})}),f.render(null,e)},u.prototype.render=function(e,t){var n=this,u=i(r+function(){return t?'[lay-filter="'+t+'"]':""}()),d={select:function(){var e,t="请选择",a="layui-form-select",n="layui-select-title",r="layui-select-none",d="",f=u.find("select"),v=function(t,l){i(t.target).parent().hasClass(n)&&!l||(i("."+a).removeClass(a+"ed "+a+"up"),e&&d&&e.val(d)),e=null},y=function(t,u,f){var y,p=i(this),m=t.find("."+n),k=m.find("input"),g=t.find("dl"),x=g.children("dd"),b=this.selectedIndex;if(!u){var C=function(){var e=t.offset().top+t.outerHeight()+5-h.scrollTop(),i=g.outerHeight();b=p[0].selectedIndex,t.addClass(a+"ed"),x.removeClass(o),y=null,x.eq(b).addClass(s).siblings().removeClass(s),e+i>h.height()&&e>=i&&t.addClass(a+"up")},w=function(e){t.removeClass(a+"ed "+a+"up"),k.blur(),y=null,e||$(k.val(),function(e){e&&(d=g.find("."+s).html(),k&&k.val(d))})};m.on("click",function(e){t.hasClass(a+"ed")?w():(v(e,!0),C()),g.find("."+r).remove()}),m.find(".layui-edge").on("click",function(){k.focus()}),k.on("keyup",function(e){var i=e.keyCode;9===i&&C()}).on("keydown",function(e){var i=e.keyCode;9===i&&w();var t=function(i,a){var n,l;if(e.preventDefault(),a=function(){return a&&a[0]?a:y&&y[0]?y:x.eq(b)}(),l=a[i](),n=a[i]("dd"),l[0]){if(y=a[i](),!n[0]||n.hasClass(c))return t(i,y);n.addClass(s).siblings().removeClass(s);var r=g.children("dd.layui-this"),o=r.position().top,u=g.height(),d=r.height();o>u&&g.scrollTop(o+g.scrollTop()-u+d-5),o<0&&g.scrollTop(o+g.scrollTop())}};38===i&&t("prev"),40===i&&t("next"),13===i&&(e.preventDefault(),g.children("dd."+s).trigger("click"))});var $=function(e,t,a){var n=0;layui.each(x,function(){var t=i(this),l=t.text(),r=l.indexOf(e)===-1;(""===e||"blur"===a?e!==l:r)&&n++,"keyup"===a&&t[r?"addClass":"removeClass"](o)});var l=n===x.length;return t(l),l},T=function(e){var i=this.value,t=e.keyCode;return 9!==t&&13!==t&&37!==t&&38!==t&&39!==t&&40!==t&&($(i,function(e){e?g.find("."+r)[0]||g.append('

      无匹配项

      '):g.find("."+r).remove()},"keyup"),void(""===i&&g.find("."+r).remove()))};f&&k.on("keyup",T).on("blur",function(t){var a=p[0].selectedIndex;e=k,d=i(p[0].options[a]).html(),setTimeout(function(){$(k.val(),function(e){d||k.val("")},"blur")},200)}),x.on("click",function(){var e=i(this),a=e.attr("lay-value"),n=p.attr("lay-filter");return!e.hasClass(c)&&(e.hasClass("layui-select-tips")?k.val(""):(k.val(e.text()),e.addClass(s)),e.siblings().removeClass(s),p.val(a).removeClass("layui-form-danger"),layui.event.call(this,l,"select("+n+")",{elem:p[0],value:a,othis:t}),w(!0),!1)}),t.find("dl>dt").on("click",function(e){return!1}),i(document).off("click",v).on("click",v)}};f.each(function(e,l){var r=i(this),o=r.next("."+a),u=this.disabled,d=l.value,f=i(l.options[l.selectedIndex]),v=l.options[0];if("string"==typeof r.attr("lay-ignore"))return r.show();var h="string"==typeof r.attr("lay-search"),p=v?v.value?t:v.innerHTML||t:t,m=i(['
      ','
      ','','
      ','
      ',function(e){var i=[];return layui.each(e,function(e,a){0!==e||a.value?"optgroup"===a.tagName.toLowerCase()?i.push("
      "+a.label+"
      "):i.push('
      '+a.innerHTML+"
      "):i.push('
      '+(a.innerHTML||t)+"
      ")}),0===i.length&&i.push('
      没有选项
      '),i.join("")}(r.find("*"))+"
      ","
      "].join(""));o[0]&&o.remove(),r.after(m),y.call(this,m,u,h)})},checkbox:function(){var e={checkbox:["layui-form-checkbox","layui-form-checked","checkbox"],_switch:["layui-form-switch","layui-form-onswitch","switch"]},t=u.find("input[type=checkbox]"),a=function(e,t){var a=i(this);e.on("click",function(){var i=a.attr("lay-filter"),n=(a.attr("lay-text")||"").split("|");a[0].disabled||(a[0].checked?(a[0].checked=!1,e.removeClass(t[1]).find("em").text(n[1])):(a[0].checked=!0,e.addClass(t[1]).find("em").text(n[0])),layui.event.call(a[0],l,t[2]+"("+i+")",{elem:a[0],value:a[0].value,othis:e}))})};t.each(function(t,n){var l=i(this),r=l.attr("lay-skin"),s=(l.attr("lay-text")||"").split("|"),o=this.disabled;"switch"===r&&(r="_"+r);var u=e[r]||e.checkbox;if("string"==typeof l.attr("lay-ignore"))return l.show();var d=l.next("."+u[0]),f=i(['
      ",function(){var e=n.title.replace(/\s/g,""),i={checkbox:[e?""+n.title+"":"",''].join(""),_switch:""+((n.checked?s[0]:s[1])||"")+""};return i[r]||i.checkbox}(),"
      "].join(""));d[0]&&d.remove(),l.after(f),a.call(this,f,u)})},radio:function(){var e="layui-form-radio",t=["",""],a=u.find("input[type=radio]"),n=function(a){var n=i(this),s="layui-anim-scaleSpring";a.on("click",function(){var o=n[0].name,c=n.parents(r),u=n.attr("lay-filter"),d=c.find("input[name="+o.replace(/(\.|#|\[|\])/g,"\\$1")+"]");n[0].disabled||(layui.each(d,function(){var a=i(this).next("."+e);this.checked=!1,a.removeClass(e+"ed"),a.find(".layui-icon").removeClass(s).html(t[1])}),n[0].checked=!0,a.addClass(e+"ed"),a.find(".layui-icon").addClass(s).html(t[0]),layui.event.call(n[0],l,"radio("+u+")",{elem:n[0],value:n[0].value,othis:a}))})};a.each(function(a,l){var r=i(this),s=r.next("."+e),o=this.disabled;if("string"==typeof r.attr("lay-ignore"))return r.show();s[0]&&s.remove();var u=i(['
      ',''+t[l.checked?0:1]+"","
      "+function(){var e=l.title||"";return"string"==typeof r.next().attr("lay-radio")&&(e=r.next().html(),r.next().remove()),e}()+"
      ","
      "].join(""));r.after(u),n.call(this,u)})}};return e?d[e]?d[e]():a.error("不支持的"+e+"表单渲染"):layui.each(d,function(e,i){i()}),n};var d=function(){var e=i(this),a=f.config.verify,s=null,o="layui-form-danger",c={},u=e.parents(r),d=u.find("*[lay-verify]"),v=e.parents("form")[0],h=u.find("input,select,textarea"),y=e.attr("lay-filter");if(layui.each(d,function(e,l){var r=i(this),c=r.attr("lay-verify").split("|"),u=r.attr("lay-verType"),d=r.val();if(r.removeClass(o),layui.each(c,function(e,i){var c,f="",v="function"==typeof a[i];if(a[i]){var c=v?f=a[i](d,l):!a[i][0].test(d);if(f=f||a[i][1],c)return"tips"===u?t.tips(f,function(){return"string"==typeof r.attr("lay-ignore")||"select"!==l.tagName.toLowerCase()&&!/^checkbox|radio$/.test(l.type)?r:r.next()}(),{tips:1}):"alert"===u?t.alert(f,{title:"提示",shadeClose:!0}):t.msg(f,{icon:5,shift:6}),n.android||n.ios||l.focus(),r.addClass(o),s=!0}}),s)return s}),s)return!1;var p={};return layui.each(h,function(e,i){if(i.name=(i.name||"").replace(/^\s*|\s*&/,""),i.name){if(/^.*\[\]$/.test(i.name)){var t=i.name.match(/^(.*)\[\]$/g)[0];p[t]=0|p[t],i.name=i.name.replace(/^(.*)\[\]$/,"$1["+p[t]++ +"]")}/^checkbox|radio$/.test(i.type)&&!i.checked||(c[i.name]=i.value)}}),layui.event.call(this,l,"submit("+y+")",{elem:this,form:v,field:c})},f=new u,v=i(document),h=i(window);f.render(),v.on("reset",r,function(){var e=i(this).attr("lay-filter");setTimeout(function(){f.render(null,e)},50)}),v.on("submit",r,d).on("click","*[lay-submit]",d),e(l,f)}); -------------------------------------------------------------------------------- /src/Builder.php: -------------------------------------------------------------------------------- 1 | markdownPath = realpath($markdownPath); 78 | if (!is_dir($htmlPath)) 79 | { 80 | mkdir($htmlPath, 0777, true); 81 | } 82 | $this->htmlPath = realpath($htmlPath); 83 | $this->templatePath = static::getDefaultTemplatePath(); 84 | $this->parser = new Parser(); 85 | } 86 | 87 | /** 88 | * 获取默认模版路径. 89 | * 90 | * @return string 91 | */ 92 | public static function getDefaultTemplatePath() 93 | { 94 | return File::path(\dirname(__DIR__), 'template'); 95 | } 96 | 97 | /** 98 | * 开始生成html. 99 | * 100 | * @return void 101 | */ 102 | public function build() 103 | { 104 | $this->loadConfig(); 105 | $this->clearHtmlPath(); 106 | $this->copyStatics(); 107 | $this->prepareBuildData(); 108 | $this->buildDocs(); 109 | $this->buildSearchJS(); 110 | $this->copyFiles(); 111 | } 112 | 113 | /** 114 | * 加载配置. 115 | * 116 | * @return void 117 | */ 118 | public function loadConfig() 119 | { 120 | $file = File::path($this->markdownPath, 'mddoc.json'); 121 | if (is_file($file)) 122 | { 123 | $this->config = json_decode(file_get_contents($file), true); 124 | } 125 | else 126 | { 127 | $this->config = []; 128 | } 129 | } 130 | 131 | /** 132 | * 清空html生成目录. 133 | * 134 | * @return void 135 | */ 136 | public function clearHtmlPath() 137 | { 138 | if (!\in_array($this->htmlPath, [ 139 | '', 140 | './', 141 | '.', 142 | '/', 143 | ])) 144 | { 145 | File::clearDir($this->htmlPath); 146 | } 147 | } 148 | 149 | /** 150 | * 复制静态文件们. 151 | * 152 | * @return void 153 | */ 154 | public function copyStatics() 155 | { 156 | File::copy(File::path($this->templatePath, 'statics'), File::path($this->htmlPath, 'statics')); 157 | } 158 | 159 | /** 160 | * 准备生成数据. 161 | * 162 | * @return void 163 | */ 164 | protected function prepareBuildData() 165 | { 166 | $this->buildData = [ 167 | 'catalog' => [], 168 | ]; 169 | 170 | $catalogFileName = File::path($this->markdownPath, 'SUMMARY.md'); 171 | if (is_file($catalogFileName)) 172 | { 173 | $content = file_get_contents($catalogFileName); 174 | list($catalogList, $catalog, $fileNameRelation, $firstItem) = CategoryParser::parse($content, $this->markdownPath); 175 | // 列表 176 | $this->buildData['catalogList'] = $catalogList; 177 | // children关系 178 | $this->buildData['catalog'] = $catalog; 179 | $this->buildData['fileNameRelation'] = $fileNameRelation; 180 | $this->buildData['firstItem'] = $firstItem; 181 | } 182 | } 183 | 184 | /** 185 | * 生成文档. 186 | * 187 | * @return void 188 | */ 189 | protected function buildDocs() 190 | { 191 | $markdownPathLen = \strlen($this->markdownPath) + 1; 192 | $firstItem = $this->buildData['firstItem']; 193 | foreach (File::enumFile($this->markdownPath) as $file) 194 | { 195 | $mdFileFullName = $file[0]; 196 | $baseName = basename($mdFileFullName, '.' . pathinfo($mdFileFullName, \PATHINFO_EXTENSION)); 197 | if ('SUMMARY' === $baseName) 198 | { 199 | continue; 200 | } 201 | $mdFileName = substr($mdFileFullName, $markdownPathLen); 202 | if ($firstItem && $firstItem['mdFileName'] === $mdFileName) 203 | { 204 | $url = $firstItem['url']; 205 | } 206 | else 207 | { 208 | $url = trim(str_replace('\\', '/', File::path(\dirname($mdFileName), $baseName . '.html')), './'); 209 | } 210 | $savePath = File::path($this->htmlPath, $url); 211 | $markdownContent = file_get_contents($mdFileFullName); 212 | preg_match('/#\s*([^\r\n]+)/', $markdownContent . \PHP_EOL, $matches); 213 | $title = $matches[1] ?? ''; 214 | $articleContent = $this->markdownToHtml($markdownContent); 215 | 216 | $item = [ 217 | 'id' => $this->buildData['fileNameRelation'][$mdFileName]['id'] ?? uniqid('', true), 218 | 'title' => $title, 219 | 'pageTitle' => $title, 220 | 'url' => $url, 221 | ]; 222 | 223 | $articleItem = $item; 224 | $articleItem['content'] = $articleContent; 225 | $this->articles[$item['id']] = $articleItem; 226 | ob_start(); 227 | $this->renderTemplate(File::path($this->templatePath, 'html/article.php'), [ 228 | 'data' => $this->buildData, 229 | 'currentCatalog' => $item, 230 | 'articleContent' => $articleContent, 231 | ]); 232 | $content = ob_get_clean(); 233 | $path = \dirname($savePath); 234 | if (!is_dir($path)) 235 | { 236 | mkdir($path, 0777, true); 237 | } 238 | file_put_contents($savePath, $content); 239 | } 240 | } 241 | 242 | protected function renderTemplate($template, $data = []) 243 | { 244 | $this->renderData = $data; 245 | extract($data); 246 | include $template; 247 | } 248 | 249 | public function path($path) 250 | { 251 | $level = substr_count($this->renderData['currentCatalog']['url'], '/'); 252 | 253 | return str_repeat('../', $level) . $path; 254 | } 255 | 256 | protected function buildSearchJS() 257 | { 258 | $savePath = File::path($this->htmlPath, 'statics/js/mddoc-search.js'); 259 | ob_start(); 260 | $searchDatas = []; 261 | foreach ($this->articles as $item) 262 | { 263 | if (isset($item['url'])) 264 | { 265 | $item['content'] = preg_replace('/<[^>]+>/', '', $item['content']); 266 | $searchDatas[] = $item; 267 | } 268 | } 269 | include File::path($this->templatePath, 'html/search.php'); 270 | $content = ob_get_clean(); 271 | file_put_contents($savePath, $content); 272 | } 273 | 274 | public function markdownToHtml($content) 275 | { 276 | $content = $this->parser->makeHtml($content); 277 | $content = str_replace('
    • [x]', '
    • ', $content); 278 | $content = str_replace('
    • [ ]', '
    • ', $content); 279 | $content = preg_replace_callback('/()(.+?)(<\/h[0-6]>)/', function ($matches) { 280 | $anchorPoint = htmlspecialchars($matches[3]); 281 | 282 | return $matches[1] . ' id="' . $anchorPoint . '"' . $matches[2] . '' . $matches[3] . '' . $matches[4]; 283 | }, $content); 284 | $content = str_ireplace('[toc]', '

      目录

      ', $content); 285 | 286 | return $content; 287 | } 288 | 289 | protected function copyFiles() 290 | { 291 | File::copy($this->markdownPath, $this->htmlPath, function ($from, $to) { 292 | $ext = pathinfo((string) $from, \PATHINFO_EXTENSION); 293 | if (\in_array($ext, ['md'])) 294 | { 295 | return false; 296 | } 297 | }); 298 | } 299 | } 300 | -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/awesomeStyle/awesome.less: -------------------------------------------------------------------------------- 1 | /*------------------------------------- 2 | zTree Style using fontawesome instead of images 3 | 4 | version: 1.1 5 | author: Mike King 6 | email: mikkelking @ hotmail . com 7 | website: http://code.google.com/p/jquerytree/ 8 | 9 | -------------------------------------*/ 10 | 11 | /* Definitions ----------------------*/ 12 | @font-size: 12px; 13 | // Regular icon and text color is white, which suits any medium -> dark background 14 | @color-normal: white; 15 | // Background color 16 | @color-bg: #af0000; 17 | // Highlight color 18 | @color-highlight: yellow; 19 | // Partially selected (checkboxes, radio buttons) 20 | @color-partial: #aaaaaa; 21 | // Partially selected and focused (checkboxes, radio buttons) 22 | @color-partfocus: #cad96c; 23 | // Disabled altogether 24 | @color-disabled: #808080; 25 | // Editing color 26 | @color-edit: yellow; 27 | @w: 15px; 28 | @h: 17px; 29 | @pad-left: 2px; 30 | @pad-top: 10px; 31 | /* End of Definitions ---------------*/ 32 | 33 | /* Imports -------------------------*/ 34 | @import "fa.less"; 35 | /* End of Imports ------------------*/ 36 | 37 | .ztree * {padding:0; margin:0; font-size:@font-size; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif; background-color: @color-bg;} 38 | .ztree { 39 | margin:0; padding:5px; color:@color-normal; background-color: @color-bg; 40 | li { 41 | padding:0; margin:0; list-style:none; line-height:17px; text-align:left; white-space:nowrap; outline:0; 42 | ul { 43 | margin: 0px; padding:0 0 0 18px; 44 | } 45 | ul.line { } 46 | a {padding-right:3px; margin:0; cursor:pointer; height:@h; color:@color-normal; background-color: transparent; 47 | text-decoration:none; vertical-align:top; display: inline-block; 48 | input.rename {height:14px; width:80px; padding:0; margin:0; 49 | color: @color-bg; background-color: @color-normal; 50 | font-size:@font-size; border:1px #585956 solid; *border:0px} 51 | } 52 | a:hover {text-decoration:underline} 53 | a.curSelectedNode {padding-top:0px; background-color:#af4040; color:@color-highlight; height:@h; opacity:0.8;} 54 | a.curSelectedNode_Edit {padding-top:0px; background-color:transparent; color:@color-highlight; height:@h; border:1px #666 solid; opacity:0.8;} 55 | a.tmpTargetNode_inner {padding-top:0px; background-color:#aaa; color:@color-highlight; height:@h; border:1px #666 solid; 56 | opacity:0.8; filter:alpha(opacity=80)} 57 | a.tmpTargetNode_prev {} 58 | a.tmpTargetNode_next {} 59 | span {line-height:@h; margin-right:2px; background-color:transparent;} 60 | span.button {line-height:0; margin:0; padding: 0; width:@w; height:@h; display: inline-block; vertical-align:top; 61 | border:0px solid; cursor: pointer;outline:none; 62 | background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; 63 | 64 | &::before{color: @color-normal; font-family: FontAwesome; padding-top:@pad-top;} 65 | &.chk { margin:0px; cursor: auto; width: 12px; 66 | display: inline-block;padding-top:@pad-top;padding-left:@pad-left; 67 | 68 | &.checkbox_false_full::before {content: @fa-square-o;} 69 | &.checkbox_false_full_focus::before {content: @fa-square-o; color:@color-highlight;} 70 | &.checkbox_false_part::before {content: @fa-square-o;color: @color-partial;} 71 | &.checkbox_false_part_focus::before {content: @fa-square-o; color:@color-partfocus;} 72 | &.checkbox_false_disable::before {content: @fa-square-o; color:@color-disabled;} 73 | &.checkbox_true_full::before {content: @fa-check-square-o;} 74 | &.checkbox_true_full_focus::before {content: @fa-check-square-o;} 75 | &.checkbox_true_part::before {content: @fa-check-square;} 76 | &.checkbox_true_part_focus::before {content: @fa-check-square; color: @color-highlight} 77 | &.checkbox_true_full_focus::before {content: @fa-check-square-o; color: @color-highlight} 78 | &.checkbox_true_part::before {content: @fa-check-square-o;color: @color-partial} 79 | &.checkbox_true_part_focus::before {content: @fa-check-square-o;color: @color-partfocus;} 80 | &.checkbox_true_disable::before {content: @fa-check-square-o;color: @color-disabled} 81 | 82 | &.radio_false_full::before {content: @fa-circle-o;} 83 | &.radio_false_full_focus::before {content: @fa-circle-o;color: @color-highlight} 84 | &.radio_false_part::before {content: @fa-circle-o;color: @color-partial} 85 | &.radio_false_part_focus::before {content: @fa-circle-o;color: @color-highlight} 86 | &.radio_false_disable::before {content: @fa-circle-thin;color: @color-disabled} 87 | &.radio_true_full::before {content: @fa-dot-circle-o;} 88 | &.radio_true_full_focus::before {content: @fa-dot-circle-o;color: @color-highlight} 89 | &.radio_true_part::before {content: @fa-dot-circle-o;color: @color-partial} 90 | &.radio_true_part_focus::before {content: @fa-dot-circle-o;color: @color-partial;} 91 | &.radio_true_disable::before {content: @fa-circle-thin;color: @color-disabled} 92 | 93 | } 94 | &.switch {width:@w; height:@h} 95 | &.root_open::before{content: @fa-chevron-down;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 96 | &.root_close::before{content: @fa-folder-open-o;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 97 | &.roots_open::before{content: @fa-chevron-down;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 98 | &.roots_close::before{content: @fa-chevron-right;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 99 | &.center_open::before{content: @fa-chevron-down;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 100 | &.center_close::before{content: @fa-chevron-right;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 101 | &.bottom_open::before{content: @fa-chevron-down;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 102 | &.bottom_close::before{content: @fa-chevron-right;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 103 | &.noline_open{} 104 | &.noline_close{} 105 | &.root_docu{ background:none;} 106 | &.roots_docu::before{content: @fa-list-alt;padding-left:@pad-left;display: inline-block;color:@color-normal;} 107 | &.center_docu::before{padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;} 108 | &.bottom_docu::before{padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;} 109 | &.noline_docu{ background:none;} 110 | 111 | &.ico_open::before {content: @fa-folder-open-o;font-family: FontAwesome;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;} 112 | &.ico_close::before {content: @fa-folder-o;font-family: FontAwesome;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;} 113 | &.ico_docu::before{content: @fa-list-alt;font-family: FontAwesome;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;} 114 | 115 | &.edit {margin-left:4px; margin-right: -1px; vertical-align:top; *vertical-align:middle;padding-top:@pad-top;} 116 | &.edit::before{content: @fa-pencil-square-o;font-family: FontAwesome;} 117 | 118 | &.remove {margin-left:4px; margin-right: -1px; vertical-align:top; *vertical-align:middle;padding-top:@pad-top;} 119 | &.remove::before{content: @fa-trash;font-family: FontAwesome;} 120 | 121 | 122 | &.add {margin-left:4px; margin-right: -1px; vertical-align:top; *vertical-align:middle;padding-top:@pad-top;} 123 | &.add::before{content: @fa-plus;font-family: FontAwesome;} 124 | 125 | &.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle} 126 | } 127 | 128 | } 129 | } 130 | 131 | 132 | ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)} 133 | 134 | // this is the arrow that moves 135 | span.tmpzTreeMove_arrow{width:16px; height:@h; display: inline-block; 136 | padding:0; margin:2px 0 0 1px; border:0 none; position:absolute; 137 | background-color:transparent; background-attachment: scroll; 138 | } 139 | span.tmpzTreeMove_arrow::before{content: @fa-play;font-family: FontAwesome;color: @color-highlight; 140 | } 141 | // outline 142 | 143 | ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; 144 | background-color:#cfcfcf; border:1px @color-highlight dotted; opacity:0.8; filter:alpha(opacity=80)} 145 | .ztreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute} 146 | 147 | -------------------------------------------------------------------------------- /template/statics/plugin/layui/css/layui.mobile.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | blockquote,body,button,dd,div,dl,dt,form,h1,h2,h3,h4,h5,h6,input,legend,li,ol,p,td,textarea,th,ul{margin:0;padding:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}html{font:12px 'Helvetica Neue','PingFang SC',STHeitiSC-Light,Helvetica,Arial,sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}a,button,input{-webkit-tap-highlight-color:rgba(255,0,0,0)}a{text-decoration:none;background:0 0}a:active,a:hover{outline:0}table{border-collapse:collapse;border-spacing:0}li{list-style:none}b,strong{font-weight:700}h1,h2,h3,h4,h5,h6{font-weight:500}address,cite,dfn,em,var{font-style:normal}dfn{font-style:italic}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}img{border:0;vertical-align:bottom}.layui-inline,input,label{vertical-align:middle}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;outline:0}button,select{text-transform:none}select{-webkit-appearance:none;border:none}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}@font-face{font-family:layui-icon;src:url(../font/iconfont.eot?v=1.0.7);src:url(../font/iconfont.eot?v=1.0.7#iefix) format('embedded-opentype'),url(../font/iconfont.woff?v=1.0.7) format('woff'),url(../font/iconfont.ttf?v=1.0.7) format('truetype'),url(../font/iconfont.svg?v=1.0.7#iconfont) format('svg')}.layui-icon{font-family:layui-icon!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.layui-box,.layui-box *{-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important;box-sizing:content-box!important}.layui-border-box,.layui-border-box *{-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;box-sizing:border-box!important}.layui-inline{position:relative;display:inline-block;*display:inline;*zoom:1}.layui-edge,.layui-upload-iframe{position:absolute;width:0;height:0}.layui-edge{border-style:dashed;border-color:transparent;overflow:hidden}.layui-elip{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-unselect{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-disabled,.layui-disabled:active{background-color:#d2d2d2!important;color:#fff!important;cursor:not-allowed!important}.layui-circle{border-radius:100%}.layui-show{display:block!important}.layui-hide{display:none!important}.layui-upload-iframe{border:0;visibility:hidden}.layui-upload-enter{border:1px solid #009E94;background-color:#009E94;color:#fff;-webkit-transform:scale(1.1);transform:scale(1.1)}@-webkit-keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.layui-m-anim-scale{animation-name:layui-m-anim-scale;-webkit-animation-name:layui-m-anim-scale}@-webkit-keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.layui-m-anim-up{-webkit-animation-name:layui-m-anim-up;animation-name:layui-m-anim-up}@-webkit-keyframes layui-m-anim-left{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes layui-m-anim-left{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.layui-m-anim-left{-webkit-animation-name:layui-m-anim-left;animation-name:layui-m-anim-left}@-webkit-keyframes layui-m-anim-right{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes layui-m-anim-right{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.layui-m-anim-right{-webkit-animation-name:layui-m-anim-right;animation-name:layui-m-anim-right}@-webkit-keyframes layui-m-anim-lout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes layui-m-anim-lout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.layui-m-anim-lout{-webkit-animation-name:layui-m-anim-lout;animation-name:layui-m-anim-lout}@-webkit-keyframes layui-m-anim-rout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes layui-m-anim-rout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(100%);transform:translateX(100%)}}.layui-m-anim-rout{-webkit-animation-name:layui-m-anim-rout;animation-name:layui-m-anim-rout}.layui-m-layer{position:relative;z-index:19891014}.layui-m-layer *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.layui-m-layermain,.layui-m-layershade{position:fixed;left:0;top:0;width:100%;height:100%}.layui-m-layershade{background-color:rgba(0,0,0,.7);pointer-events:auto}.layui-m-layermain{display:table;font-family:Helvetica,arial,sans-serif;pointer-events:none}.layui-m-layermain .layui-m-layersection{display:table-cell;vertical-align:middle;text-align:center}.layui-m-layerchild{position:relative;display:inline-block;text-align:left;background-color:#fff;font-size:14px;border-radius:5px;box-shadow:0 0 8px rgba(0,0,0,.1);pointer-events:auto;-webkit-overflow-scrolling:touch;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}.layui-m-layer0 .layui-m-layerchild{width:90%;max-width:640px}.layui-m-layer1 .layui-m-layerchild{border:none;border-radius:0}.layui-m-layer2 .layui-m-layerchild{width:auto;max-width:260px;min-width:40px;border:none;background:0 0;box-shadow:none;color:#fff}.layui-m-layerchild h3{padding:0 10px;height:60px;line-height:60px;font-size:16px;font-weight:400;border-radius:5px 5px 0 0;text-align:center}.layui-m-layerbtn span,.layui-m-layerchild h3{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-m-layercont{padding:50px 30px;line-height:22px;text-align:center}.layui-m-layer1 .layui-m-layercont{padding:0;text-align:left}.layui-m-layer2 .layui-m-layercont{text-align:center;padding:0;line-height:0}.layui-m-layer2 .layui-m-layercont i{width:25px;height:25px;margin-left:8px;display:inline-block;background-color:#fff;border-radius:100%;-webkit-animation:layui-m-anim-loading 1.4s infinite ease-in-out;animation:layui-m-anim-loading 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.layui-m-layerbtn,.layui-m-layerbtn span{position:relative;text-align:center;border-radius:0 0 5px 5px}.layui-m-layer2 .layui-m-layercont p{margin-top:20px}@-webkit-keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}@keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.layui-m-layer2 .layui-m-layercont i:first-child{margin-left:0;-webkit-animation-delay:-.32s;animation-delay:-.32s}.layui-m-layer2 .layui-m-layercont i.layui-m-layerload{-webkit-animation-delay:-.16s;animation-delay:-.16s}.layui-m-layer2 .layui-m-layercont>div{line-height:22px;padding-top:7px;margin-bottom:20px;font-size:14px}.layui-m-layerbtn{display:box;display:-moz-box;display:-webkit-box;width:100%;height:50px;line-height:50px;font-size:0;border-top:1px solid #D0D0D0;background-color:#F2F2F2}.layui-m-layerbtn span{display:block;-moz-box-flex:1;box-flex:1;-webkit-box-flex:1;font-size:14px;cursor:pointer}.layui-m-layerbtn span[yes]{color:#40AFFE}.layui-m-layerbtn span[no]{border-right:1px solid #D0D0D0;border-radius:0 0 0 5px}.layui-m-layerbtn span:active{background-color:#F6F6F6}.layui-m-layerend{position:absolute;right:7px;top:10px;width:30px;height:30px;border:0;font-weight:400;background:0 0;cursor:pointer;-webkit-appearance:none;font-size:30px}.layui-m-layerend::after,.layui-m-layerend::before{position:absolute;left:5px;top:15px;content:'';width:18px;height:1px;background-color:#999;transform:rotate(45deg);-webkit-transform:rotate(45deg);border-radius:3px}.layui-m-layerend::after{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}body .layui-m-layer .layui-m-layer-footer{position:fixed;width:95%;max-width:100%;margin:0 auto;left:0;right:0;bottom:10px;background:0 0}.layui-m-layer-footer .layui-m-layercont{padding:20px;border-radius:5px 5px 0 0;background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn{display:block;height:auto;background:0 0;border-top:none}.layui-m-layer-footer .layui-m-layerbtn span{background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn span[no]{color:#FD482C;border-top:1px solid #c2c2c2;border-radius:0 0 5px 5px}.layui-m-layer-footer .layui-m-layerbtn span[yes]{margin-top:10px;border-radius:5px}body .layui-m-layer .layui-m-layer-msg{width:auto;max-width:90%;margin:0 auto;bottom:-150px;background-color:rgba(0,0,0,.7);color:#fff}.layui-m-layer-msg .layui-m-layercont{padding:10px 20px} -------------------------------------------------------------------------------- /template/statics/plugin/zTree/css/awesomeStyle/awesome.css: -------------------------------------------------------------------------------- 1 | /*------------------------------------- 2 | zTree Style using fontawesome instead of images 3 | 4 | version: 1.1 5 | author: Mike King 6 | email: mikkelking @ hotmail . com 7 | website: http://code.google.com/p/jquerytree/ 8 | 9 | -------------------------------------*/ 10 | /* Definitions ----------------------*/ 11 | /* End of Definitions ---------------*/ 12 | /* Imports -------------------------*/ 13 | /* End of Imports ------------------*/ 14 | .ztree * { 15 | padding: 0; 16 | margin: 0; 17 | font-size: 12px; 18 | font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif; 19 | background-color: #af0000; 20 | } 21 | .ztree { 22 | margin: 0; 23 | padding: 5px; 24 | color: #ffffff; 25 | background-color: #af0000; 26 | } 27 | .ztree li { 28 | padding: 0; 29 | margin: 0; 30 | list-style: none; 31 | line-height: 17px; 32 | text-align: left; 33 | white-space: nowrap; 34 | outline: 0; 35 | } 36 | .ztree li ul { 37 | margin: 0px; 38 | padding: 0 0 0 18px; 39 | } 40 | .ztree li a { 41 | padding-right: 3px; 42 | margin: 0; 43 | cursor: pointer; 44 | height: 17px; 45 | color: #ffffff; 46 | background-color: transparent; 47 | text-decoration: none; 48 | vertical-align: top; 49 | display: inline-block; 50 | } 51 | .ztree li a input.rename { 52 | height: 14px; 53 | width: 80px; 54 | padding: 0; 55 | margin: 0; 56 | color: #af0000; 57 | background-color: #ffffff; 58 | font-size: 12px; 59 | border: 1px #585956 solid; 60 | *border: 0px; 61 | } 62 | .ztree li a:hover { 63 | text-decoration: underline; 64 | } 65 | .ztree li a.curSelectedNode { 66 | padding-top: 0px; 67 | background-color: #af4040; 68 | color: #ffff00; 69 | height: 17px; 70 | opacity: 0.8; 71 | } 72 | .ztree li a.curSelectedNode_Edit { 73 | padding-top: 0px; 74 | background-color: transparent; 75 | color: #ffff00; 76 | height: 17px; 77 | border: 1px #666 solid; 78 | opacity: 0.8; 79 | } 80 | .ztree li a.tmpTargetNode_inner { 81 | padding-top: 0px; 82 | background-color: #aaa; 83 | color: #ffff00; 84 | height: 17px; 85 | border: 1px #666 solid; 86 | opacity: 0.8; 87 | filter: alpha(opacity=80); 88 | } 89 | .ztree li span { 90 | line-height: 17px; 91 | margin-right: 2px; 92 | background-color: transparent; 93 | } 94 | .ztree li span.button { 95 | line-height: 0; 96 | margin: 0; 97 | padding: 0; 98 | width: 15px; 99 | height: 17px; 100 | display: inline-block; 101 | vertical-align: top; 102 | border: 0px solid; 103 | cursor: pointer; 104 | outline: none; 105 | background-color: transparent; 106 | background-repeat: no-repeat; 107 | background-attachment: scroll; 108 | } 109 | .ztree li span.button::before { 110 | color: #ffffff; 111 | font-family: FontAwesome; 112 | padding-top: 10px; 113 | } 114 | .ztree li span.button.chk { 115 | margin: 0px; 116 | cursor: auto; 117 | width: 12px; 118 | display: inline-block; 119 | padding-top: 10px; 120 | padding-left: 2px; 121 | } 122 | .ztree li span.button.chk.checkbox_false_full::before { 123 | content: "\f096"; 124 | } 125 | .ztree li span.button.chk.checkbox_false_full_focus::before { 126 | content: "\f096"; 127 | color: #ffff00; 128 | } 129 | .ztree li span.button.chk.checkbox_false_part::before { 130 | content: "\f096"; 131 | color: #aaaaaa; 132 | } 133 | .ztree li span.button.chk.checkbox_false_part_focus::before { 134 | content: "\f096"; 135 | color: #cad96c; 136 | } 137 | .ztree li span.button.chk.checkbox_false_disable::before { 138 | content: "\f096"; 139 | color: #808080; 140 | } 141 | .ztree li span.button.chk.checkbox_true_full::before { 142 | content: "\f046"; 143 | } 144 | .ztree li span.button.chk.checkbox_true_full_focus::before { 145 | content: "\f046"; 146 | } 147 | .ztree li span.button.chk.checkbox_true_part::before { 148 | content: "\f14a"; 149 | } 150 | .ztree li span.button.chk.checkbox_true_part_focus::before { 151 | content: "\f14a"; 152 | color: #ffff00; 153 | } 154 | .ztree li span.button.chk.checkbox_true_full_focus::before { 155 | content: "\f046"; 156 | color: #ffff00; 157 | } 158 | .ztree li span.button.chk.checkbox_true_part::before { 159 | content: "\f046"; 160 | color: #aaaaaa; 161 | } 162 | .ztree li span.button.chk.checkbox_true_part_focus::before { 163 | content: "\f046"; 164 | color: #cad96c; 165 | } 166 | .ztree li span.button.chk.checkbox_true_disable::before { 167 | content: "\f046"; 168 | color: #808080; 169 | } 170 | .ztree li span.button.chk.radio_false_full::before { 171 | content: "\f10c"; 172 | } 173 | .ztree li span.button.chk.radio_false_full_focus::before { 174 | content: "\f10c"; 175 | color: #ffff00; 176 | } 177 | .ztree li span.button.chk.radio_false_part::before { 178 | content: "\f10c"; 179 | color: #aaaaaa; 180 | } 181 | .ztree li span.button.chk.radio_false_part_focus::before { 182 | content: "\f10c"; 183 | color: #ffff00; 184 | } 185 | .ztree li span.button.chk.radio_false_disable::before { 186 | content: "\f1db"; 187 | color: #808080; 188 | } 189 | .ztree li span.button.chk.radio_true_full::before { 190 | content: "\f192"; 191 | } 192 | .ztree li span.button.chk.radio_true_full_focus::before { 193 | content: "\f192"; 194 | color: #ffff00; 195 | } 196 | .ztree li span.button.chk.radio_true_part::before { 197 | content: "\f192"; 198 | color: #aaaaaa; 199 | } 200 | .ztree li span.button.chk.radio_true_part_focus::before { 201 | content: "\f192"; 202 | color: #aaaaaa; 203 | } 204 | .ztree li span.button.chk.radio_true_disable::before { 205 | content: "\f1db"; 206 | color: #808080; 207 | } 208 | .ztree li span.button.switch { 209 | width: 15px; 210 | height: 17px; 211 | } 212 | .ztree li span.button.root_open::before { 213 | content: "\f078"; 214 | padding-top: 10px; 215 | padding-left: 2px; 216 | display: inline-block; 217 | } 218 | .ztree li span.button.root_close::before { 219 | content: "\f115"; 220 | padding-top: 10px; 221 | padding-left: 2px; 222 | display: inline-block; 223 | } 224 | .ztree li span.button.roots_open::before { 225 | content: "\f078"; 226 | padding-top: 10px; 227 | padding-left: 2px; 228 | display: inline-block; 229 | } 230 | .ztree li span.button.roots_close::before { 231 | content: "\f054"; 232 | padding-top: 10px; 233 | padding-left: 2px; 234 | display: inline-block; 235 | } 236 | .ztree li span.button.center_open::before { 237 | content: "\f078"; 238 | padding-top: 10px; 239 | padding-left: 2px; 240 | display: inline-block; 241 | } 242 | .ztree li span.button.center_close::before { 243 | content: "\f054"; 244 | padding-top: 10px; 245 | padding-left: 2px; 246 | display: inline-block; 247 | } 248 | .ztree li span.button.bottom_open::before { 249 | content: "\f078"; 250 | padding-top: 10px; 251 | padding-left: 2px; 252 | display: inline-block; 253 | } 254 | .ztree li span.button.bottom_close::before { 255 | content: "\f054"; 256 | padding-top: 10px; 257 | padding-left: 2px; 258 | display: inline-block; 259 | } 260 | .ztree li span.button.root_docu { 261 | background: none; 262 | } 263 | .ztree li span.button.roots_docu::before { 264 | content: "\f022"; 265 | padding-left: 2px; 266 | display: inline-block; 267 | color: #ffffff; 268 | } 269 | .ztree li span.button.center_docu::before { 270 | padding-top: 10px; 271 | padding-left: 2px; 272 | display: inline-block; 273 | color: #ffffff; 274 | } 275 | .ztree li span.button.bottom_docu::before { 276 | padding-top: 10px; 277 | padding-left: 2px; 278 | display: inline-block; 279 | color: #ffffff; 280 | } 281 | .ztree li span.button.noline_docu { 282 | background: none; 283 | } 284 | .ztree li span.button.ico_open::before { 285 | content: "\f115"; 286 | font-family: FontAwesome; 287 | padding-top: 10px; 288 | padding-left: 2px; 289 | display: inline-block; 290 | color: #ffffff; 291 | } 292 | .ztree li span.button.ico_close::before { 293 | content: "\f114"; 294 | font-family: FontAwesome; 295 | padding-top: 10px; 296 | padding-left: 2px; 297 | display: inline-block; 298 | color: #ffffff; 299 | } 300 | .ztree li span.button.ico_docu::before { 301 | content: "\f022"; 302 | font-family: FontAwesome; 303 | padding-top: 10px; 304 | padding-left: 2px; 305 | display: inline-block; 306 | color: #ffffff; 307 | } 308 | .ztree li span.button.edit { 309 | margin-left: 4px; 310 | margin-right: -1px; 311 | vertical-align: top; 312 | *vertical-align: middle; 313 | padding-top: 10px; 314 | } 315 | .ztree li span.button.edit::before { 316 | content: "\f044"; 317 | font-family: FontAwesome; 318 | } 319 | .ztree li span.button.remove { 320 | margin-left: 4px; 321 | margin-right: -1px; 322 | vertical-align: top; 323 | *vertical-align: middle; 324 | padding-top: 10px; 325 | } 326 | .ztree li span.button.remove::before { 327 | content: "\f1f8"; 328 | font-family: FontAwesome; 329 | } 330 | .ztree li span.button.add { 331 | margin-left: 4px; 332 | margin-right: -1px; 333 | vertical-align: top; 334 | *vertical-align: middle; 335 | padding-top: 10px; 336 | } 337 | .ztree li span.button.add::before { 338 | content: "\f067"; 339 | font-family: FontAwesome; 340 | } 341 | .ztree li span.button.ico_loading { 342 | margin-right: 2px; 343 | background: url(./img/loading.gif) no-repeat scroll 0 0 transparent; 344 | vertical-align: top; 345 | *vertical-align: middle; 346 | } 347 | ul.tmpTargetzTree { 348 | background-color: #FFE6B0; 349 | opacity: 0.8; 350 | filter: alpha(opacity=80); 351 | } 352 | span.tmpzTreeMove_arrow { 353 | width: 16px; 354 | height: 17px; 355 | display: inline-block; 356 | padding: 0; 357 | margin: 2px 0 0 1px; 358 | border: 0 none; 359 | position: absolute; 360 | background-color: transparent; 361 | background-attachment: scroll; 362 | } 363 | span.tmpzTreeMove_arrow::before { 364 | content: "\f04b"; 365 | font-family: FontAwesome; 366 | color: #ffff00; 367 | } 368 | ul.ztree.zTreeDragUL { 369 | margin: 0; 370 | padding: 0; 371 | position: absolute; 372 | width: auto; 373 | height: auto; 374 | overflow: hidden; 375 | background-color: #cfcfcf; 376 | border: 1px #ffff00 dotted; 377 | opacity: 0.8; 378 | filter: alpha(opacity=80); 379 | } 380 | .ztreeMask { 381 | z-index: 10000; 382 | background-color: #cfcfcf; 383 | opacity: 0.0; 384 | filter: alpha(opacity=0); 385 | position: absolute; 386 | } 387 | -------------------------------------------------------------------------------- /template/statics/plugin/zTree/js/jquery.ztree.excheck.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * JQuery zTree excheck v3.5.29 3 | * http://treejs.cn/ 4 | * 5 | * Copyright (c) 2010 Hunter.z 6 | * 7 | * Licensed same as jquery - MIT License 8 | * http://www.opensource.org/licenses/mit-license.php 9 | * 10 | * email: hunter.z@263.net 11 | * Date: 2017-06-19 12 | */ 13 | (function(m){var p,q,r,o={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{STYLE:"checkbox",DEFAULT:"chk",DISABLED:"disable",FALSE:"false",TRUE:"true",FULL:"full",PART:"part",FOCUS:"focus"},radio:{STYLE:"radio",TYPE_ALL:"all",TYPE_LEVEL:"level"}},v={check:{enable:!1,autoCheckTrigger:!1,chkStyle:o.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:o.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}};p=function(c, 14 | a){if(a.chkDisabled===!0)return!1;var b=g.getSetting(c.data.treeId),d=b.data.key.checked;if(k.apply(b.callback.beforeCheck,[b.treeId,a],!0)==!1)return!0;a[d]=!a[d];e.checkNodeRelation(b,a);d=n(a,j.id.CHECK,b);e.setChkClass(b,d,a);e.repairParentChkClassWithSelf(b,a);b.treeObj.trigger(j.event.CHECK,[c,b.treeId,a]);return!0};q=function(c,a){if(a.chkDisabled===!0)return!1;var b=g.getSetting(c.data.treeId),d=n(a,j.id.CHECK,b);a.check_Focus=!0;e.setChkClass(b,d,a);return!0};r=function(c,a){if(a.chkDisabled=== 15 | !0)return!1;var b=g.getSetting(c.data.treeId),d=n(a,j.id.CHECK,b);a.check_Focus=!1;e.setChkClass(b,d,a);return!0};m.extend(!0,m.fn.zTree.consts,o);m.extend(!0,m.fn.zTree._z,{tools:{},view:{checkNodeRelation:function(c,a){var b,d,h,i=c.data.key.children,l=c.data.key.checked;b=j.radio;if(c.check.chkStyle==b.STYLE){var f=g.getRadioCheckedList(c);if(a[l])if(c.check.radioType==b.TYPE_ALL){for(d=f.length-1;d>=0;d--)b=f[d],b[l]&&b!=a&&(b[l]=!1,f.splice(d,1),e.setChkClass(c,n(b,j.id.CHECK,c),b),b.parentTId!= 16 | a.parentTId&&e.repairParentChkClassWithSelf(c,b));f.push(a)}else{f=a.parentTId?a.getParentNode():g.getRoot(c);for(d=0,h=f[i].length;d-1)&&e.setSonNodeCheckBox(c,a,!0),!a[l]&&(!a[i]||a[i].length==0||c.check.chkboxType.N.indexOf("s")>-1)&&e.setSonNodeCheckBox(c, 17 | a,!1),a[l]&&c.check.chkboxType.Y.indexOf("p")>-1&&e.setParentNodeCheckBox(c,a,!0),!a[l]&&c.check.chkboxType.N.indexOf("p")>-1&&e.setParentNodeCheckBox(c,a,!1)},makeChkClass:function(c,a){var b=c.data.key.checked,d=j.checkbox,h=j.radio,i="",i=a.chkDisabled===!0?d.DISABLED:a.halfCheck?d.PART:c.check.chkStyle==h.STYLE?a.check_Child_State<1?d.FULL:d.PART:a[b]?a.check_Child_State===2||a.check_Child_State===-1?d.FULL:d.PART:a.check_Child_State<1?d.FULL:d.PART,b=c.check.chkStyle+"_"+(a[b]?d.TRUE:d.FALSE)+ 18 | "_"+i,b=a.check_Focus&&a.chkDisabled!==!0?b+"_"+d.FOCUS:b;return j.className.BUTTON+" "+d.DEFAULT+" "+b},repairAllChk:function(c,a){if(c.check.enable&&c.check.chkStyle===j.checkbox.STYLE)for(var b=c.data.key.checked,d=c.data.key.children,h=g.getRoot(c),i=0,l=h[d].length;i0?e.repairParentChkClass(c,a[b][0]):e.repairParentChkClass(c,a)}},repairSonChkDisabled:function(c,a,b,d){if(a){var h=c.data.key.children;if(a.chkDisabled!=b)a.chkDisabled=b;e.repairChkClass(c,a);if(a[h]&&d)for(var i=0,l=a[h].length;i0){l=!1;break}l&&e.setParentNodeCheckBox(c,a.getParentNode(),b,d)}},setSonNodeCheckBox:function(c,a,b,d){if(a){var h=c.data.key.children,i=c.data.key.checked,l=n(a,j.id.CHECK,c);d||(d=a);var f=!1;if(a[h])for(var k=0,m=a[h].length;k0?b?2:0:-1}else a.check_Child_State=-1;e.setChkClass(c,l,a);c.check.autoCheckTrigger&&a!=d&&a.nocheck!==!0&&a.chkDisabled!==!0&&c.treeObj.trigger(j.event.CHECK,[null,c.treeId,a])}}}},event:{},data:{getRadioCheckedList:function(c){for(var a=g.getRoot(c).radioCheckedList,b=0,d=a.length;b-1&&a.check_Child_State<2:a.check_Child_State>0}},getTreeCheckedNodes:function(c,a,b,d){if(!a)return[];for(var h=c.data.key.children,i=c.data.key.checked,e=b&&c.check.chkStyle==j.radio.STYLE&&c.check.radioType==j.radio.TYPE_ALL,d=!d?[]:d, 24 | f=0,k=a.length;f0)break}return d},getTreeChangeCheckedNodes:function(c,a,b){if(!a)return[];for(var d=c.data.key.children,h=c.data.key.checked,b=!b?[]:b,i=0,e=a.length;i0?2:0,g==2){h=2;break}else g==0&&(h=0);else if(c.check.chkStyle==j.checkbox.STYLE)if(g=f.nocheck===!0||f.chkDisabled===!0?f.check_Child_State:f.halfCheck===!0?1:f[d]?f.check_Child_State===-1||f.check_Child_State===2?2:1:f.check_Child_State>0?1:0,g===1){h=1;break}else if(g=== 26 | 2&&h>-1&&i>0&&g!==h){h=1;break}else if(h===2&&g>-1&&g<2){h=1;break}else g>-1&&(h=g)}a.check_Child_State=h}}}});var m=m.fn.zTree,k=m._z.tools,j=m.consts,e=m._z.view,g=m._z.data,n=k.$;g.exSetting(v);g.addInitBind(function(c){c.treeObj.bind(j.event.CHECK,function(a,b,d,h){a.srcEvent=b;k.apply(c.callback.onCheck,[a,d,h])})});g.addInitUnBind(function(c){c.treeObj.unbind(j.event.CHECK)});g.addInitCache(function(){});g.addInitNode(function(c,a,b,d){if(b){a=c.data.key.checked;typeof b[a]=="string"&&(b[a]= 27 | k.eqs(b[a],"true"));b[a]=!!b[a];b.checkedOld=b[a];if(typeof b.nocheck=="string")b.nocheck=k.eqs(b.nocheck,"true");b.nocheck=!!b.nocheck||c.check.nocheckInherit&&d&&!!d.nocheck;if(typeof b.chkDisabled=="string")b.chkDisabled=k.eqs(b.chkDisabled,"true");b.chkDisabled=!!b.chkDisabled||c.check.chkDisabledInherit&&d&&!!d.chkDisabled;if(typeof b.halfCheck=="string")b.halfCheck=k.eqs(b.halfCheck,"true");b.halfCheck=!!b.halfCheck;b.check_Child_State=-1;b.check_Focus=!1;b.getCheckStatus=function(){return g.getCheckStatus(c, 28 | b)};c.check.chkStyle==j.radio.STYLE&&c.check.radioType==j.radio.TYPE_ALL&&b[a]&&g.getRoot(c).radioCheckedList.push(b)}});g.addInitProxy(function(c){var a=c.target,b=g.getSetting(c.data.treeId),d="",h=null,e="",l=null;if(k.eqs(c.type,"mouseover")){if(b.check.enable&&k.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+j.id.CHECK)!==null)d=k.getNodeMainDom(a).id,e="mouseoverCheck"}else if(k.eqs(c.type,"mouseout")){if(b.check.enable&&k.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+j.id.CHECK)!==null)d= 29 | k.getNodeMainDom(a).id,e="mouseoutCheck"}else if(k.eqs(c.type,"click")&&b.check.enable&&k.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+j.id.CHECK)!==null)d=k.getNodeMainDom(a).id,e="checkNode";if(d.length>0)switch(h=g.getNodeCache(b,d),e){case "checkNode":l=p;break;case "mouseoverCheck":l=q;break;case "mouseoutCheck":l=r}return{stop:e==="checkNode",node:h,nodeEventType:e,nodeEventCallback:l,treeEventType:"",treeEventCallback:null}},!0);g.addInitRoot(function(c){g.getRoot(c).radioCheckedList=[]}); 30 | g.addBeforeA(function(c,a,b){c.check.enable&&(g.makeChkFlag(c,a),b.push(""))});g.addZTreeTools(function(c,a){a.checkNode=function(a,b,c,g){var f=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[f]),g=!!g,(a[f]!==b||c)&&!(g&&k.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0)==!1)&&k.uCanDo(this.setting)&&this.setting.check.enable&& 31 | a.nocheck!==!0))a[f]=b,b=n(a,j.id.CHECK,this.setting),(c||this.setting.check.chkStyle===j.radio.STYLE)&&e.checkNodeRelation(this.setting,a),e.setChkClass(this.setting,b,a),e.repairParentChkClassWithSelf(this.setting,a),g&&this.setting.treeObj.trigger(j.event.CHECK,[null,this.setting.treeId,a])};a.checkAllNodes=function(a){e.repairAllChk(this.setting,!!a)};a.getCheckedNodes=function(a){var b=this.setting.data.key.children;return g.getTreeCheckedNodes(this.setting,g.getRoot(this.setting)[b],a!==!1)}; 32 | a.getChangeCheckedNodes=function(){var a=this.setting.data.key.children;return g.getTreeChangeCheckedNodes(this.setting,g.getRoot(this.setting)[a])};a.setChkDisabled=function(a,b,c,g){b=!!b;c=!!c;e.repairSonChkDisabled(this.setting,a,b,!!g);e.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var b=a.updateNode;a.updateNode=function(c,g){b&&b.apply(a,arguments);if(c&&this.setting.check.enable&&n(c,this.setting).get(0)&&k.uCanDo(this.setting)){var i=n(c,j.id.CHECK,this.setting);(g==!0||this.setting.check.chkStyle=== 33 | j.radio.STYLE)&&e.checkNodeRelation(this.setting,c);e.setChkClass(this.setting,i,c);e.repairParentChkClassWithSelf(this.setting,c)}}});var s=e.createNodes;e.createNodes=function(c,a,b,d,g){s&&s.apply(e,arguments);b&&e.repairParentChkClassWithSelf(c,d)};var t=e.removeNode;e.removeNode=function(c,a){var b=a.getParentNode();t&&t.apply(e,arguments);a&&b&&(e.repairChkClass(c,b),e.repairParentChkClass(c,b))};var u=e.appendNodes;e.appendNodes=function(c,a,b,d,h,i,j){var f="";u&&(f=u.apply(e,arguments)); 34 | d&&g.makeChkFlag(c,d);return f}})(jQuery); 35 | -------------------------------------------------------------------------------- /template/statics/plugin/layui/lay/modules/layedit.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | ;layui.define(["layer","form"],function(t){"use strict";var e=layui.$,i=layui.layer,a=layui.form,l=(layui.hint(),layui.device()),n="layedit",o="layui-show",r="layui-disabled",c=function(){var t=this;t.index=0,t.config={tool:["strong","italic","underline","del","|","left","center","right","|","link","unlink","face","image"],hideTool:[],height:280}};c.prototype.set=function(t){var i=this;return e.extend(!0,i.config,t),i},c.prototype.on=function(t,e){return layui.onevent(n,t,e)},c.prototype.build=function(t,i){i=i||{};var a=this,n=a.config,r="layui-layedit",c=e("string"==typeof t?"#"+t:t),u="LAY_layedit_"+ ++a.index,d=c.next("."+r),y=e.extend({},n,i),f=function(){var t=[],e={};return layui.each(y.hideTool,function(t,i){e[i]=!0}),layui.each(y.tool,function(i,a){C[a]&&!e[a]&&t.push(C[a])}),t.join("")}(),m=e(['
      ','
      '+f+"
      ",'
      ','',"
      ","
      "].join(""));return l.ie&&l.ie<8?c.removeClass("layui-hide").addClass(o):(d[0]&&d.remove(),s.call(a,m,c[0],y),c.addClass("layui-hide").after(m),a.index)},c.prototype.getContent=function(t){var e=u(t);if(e[0])return d(e[0].document.body.innerHTML)},c.prototype.getText=function(t){var i=u(t);if(i[0])return e(i[0].document.body).text()},c.prototype.setContent=function(t,i,a){var l=u(t);l[0]&&(a?e(l[0].document.body).append(i):e(l[0].document.body).html(i),layedit.sync(t))},c.prototype.sync=function(t){var i=u(t);if(i[0]){var a=e("#"+i[1].attr("textarea"));a.val(d(i[0].document.body.innerHTML))}},c.prototype.getSelection=function(t){var e=u(t);if(e[0]){var i=m(e[0].document);return document.selection?i.text:i.toString()}};var s=function(t,i,a){var l=this,n=t.find("iframe");n.css({height:a.height}).on("load",function(){var o=n.contents(),r=n.prop("contentWindow"),c=o.find("head"),s=e([""].join("")),u=o.find("body");c.append(s),u.attr("contenteditable","true").css({"min-height":a.height}).html(i.value||""),y.apply(l,[r,n,i,a]),g.call(l,r,t,a)})},u=function(t){var i=e("#LAY_layedit_"+t),a=i.prop("contentWindow");return[a,i]},d=function(t){return 8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),t},y=function(t,a,n,o){var r=t.document,c=e(r.body);c.on("keydown",function(t){var e=t.keyCode;if(13===e){var a=m(r),l=p(a),n=l.parentNode;if("pre"===n.tagName.toLowerCase()){if(t.shiftKey)return;return i.msg("请暂时用shift+enter"),!1}r.execCommand("formatBlock",!1,"

      ")}}),e(n).parents("form").on("submit",function(){var t=c.html();8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),n.value=t}),c.on("paste",function(e){r.execCommand("formatBlock",!1,"

      "),setTimeout(function(){f.call(t,c),n.value=c.html()},100)})},f=function(t){var i=this;i.document;t.find("*[style]").each(function(){var t=this.style.textAlign;this.removeAttribute("style"),e(this).css({"text-align":t||""})}),t.find("table").addClass("layui-table"),t.find("script,link").remove()},m=function(t){return t.selection?t.selection.createRange():t.getSelection().getRangeAt(0)},p=function(t){return t.endContainer||t.parentElement().childNodes[0]},v=function(t,i,a){var l=this.document,n=document.createElement(t);for(var o in i)n.setAttribute(o,i[o]);if(n.removeAttribute("text"),l.selection){var r=a.text||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.pasteHTML(e(n).prop("outerHTML")),a.select()}else{var r=a.toString()||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.deleteContents(),a.insertNode(n)}},h=function(t,i){var a=this.document,l="layedit-tool-active",n=p(m(a)),o=function(e){return t.find(".layedit-tool-"+e)};i&&i[i.hasClass(l)?"removeClass":"addClass"](l),t.find(">i").removeClass(l),o("unlink").addClass(r),e(n).parents().each(function(){var t=this.tagName.toLowerCase(),e=this.style.textAlign;"b"!==t&&"strong"!==t||o("b").addClass(l),"i"!==t&&"em"!==t||o("i").addClass(l),"u"===t&&o("u").addClass(l),"strike"===t&&o("d").addClass(l),"p"===t&&("center"===e?o("center").addClass(l):"right"===e?o("right").addClass(l):o("left").addClass(l)),"a"===t&&(o("link").addClass(l),o("unlink").removeClass(r))})},g=function(t,a,l){var n=t.document,o=e(n.body),c={link:function(i){var a=p(i),l=e(a).parent();b.call(o,{href:l.attr("href"),target:l.attr("target")},function(e){var a=l[0];"A"===a.tagName?a.href=e.url:v.call(t,"a",{target:e.target,href:e.url,text:e.url},i)})},unlink:function(t){n.execCommand("unlink")},face:function(e){x.call(this,function(i){v.call(t,"img",{src:i.src,alt:i.alt},e)})},image:function(a){var n=this;layui.use("upload",function(o){var r=l.uploadImage||{};o.render({url:r.url,method:r.type,elem:e(n).find("input")[0],done:function(e){0==e.code?(e.data=e.data||{},v.call(t,"img",{src:e.data.src,alt:e.data.title},a)):i.msg(e.msg||"上传失败")}})})},code:function(e){k.call(o,function(i){v.call(t,"pre",{text:i.code,"lay-lang":i.lang},e)})},help:function(){i.open({type:2,title:"帮助",area:["600px","380px"],shadeClose:!0,shade:.1,skin:"layui-layer-msg",content:["http://www.layui.com/about/layedit/help.html","no"]})}},s=a.find(".layui-layedit-tool"),u=function(){var i=e(this),a=i.attr("layedit-event"),l=i.attr("lay-command");if(!i.hasClass(r)){o.focus();var u=m(n);u.commonAncestorContainer;l?(n.execCommand(l),/justifyLeft|justifyCenter|justifyRight/.test(l)&&n.execCommand("formatBlock",!1,"

      "),setTimeout(function(){o.focus()},10)):c[a]&&c[a].call(this,u),h.call(t,s,i)}},d=/image/;s.find(">i").on("mousedown",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)||u.call(this)}).on("click",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)&&u.call(this)}),o.on("click",function(){h.call(t,s),i.close(x.index)})},b=function(t,e){var l=this,n=i.open({type:1,id:"LAY_layedit_link",area:"350px",shade:.05,shadeClose:!0,moveType:1,title:"超链接",skin:"layui-layer-msg",content:['

        ','
      • ','','
        ','',"
        ","
      • ",'
      • ','','
        ','",'","
        ","
      • ",'
      • ','','',"
      • ","
      "].join(""),success:function(t,n){var o="submit(layedit-link-yes)";a.render("radio"),t.find(".layui-btn-primary").on("click",function(){i.close(n),l.focus()}),a.on(o,function(t){i.close(b.index),e&&e(t.field)})}});b.index=n},x=function(t){var a=function(){var t=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],e={};return layui.each(t,function(t,i){e[i]=layui.cache.dir+"images/face/"+t+".gif"}),e}();return x.hide=x.hide||function(t){"face"!==e(t.target).attr("layedit-event")&&i.close(x.index)},x.index=i.tips(function(){var t=[];return layui.each(a,function(e,i){t.push('
    • '+e+'
    • ')}),'
        '+t.join("")+"
      "}(),this,{tips:1,time:0,skin:"layui-box layui-util-face",maxWidth:500,success:function(l,n){l.css({marginTop:-4,marginLeft:-10}).find(".layui-clear>li").on("click",function(){t&&t({src:a[this.title],alt:this.title}),i.close(n)}),e(document).off("click",x.hide).on("click",x.hide)}})},k=function(t){var e=this,l=i.open({type:1,id:"LAY_layedit_code",area:"550px",shade:.05,shadeClose:!0,moveType:1,title:"插入代码",skin:"layui-layer-msg",content:['
        ','
      • ','','
        ','","
        ","
      • ",'
      • ','','
        ','',"
        ","
      • ",'
      • ','','',"
      • ","
      "].join(""),success:function(l,n){var o="submit(layedit-code-yes)";a.render("select"),l.find(".layui-btn-primary").on("click",function(){i.close(n),e.focus()}),a.on(o,function(e){i.close(k.index),t&&t(e.field)})}});k.index=l},C={html:'',strong:'',italic:'',underline:'',del:'',"|":'',left:'',center:'',right:'',link:'',unlink:'',face:'',image:'',code:'',help:''},w=new c;t(n,w)}); --------------------------------------------------------------------------------