├── README.md ├── assets └── images │ ├── avatar.png │ ├── favicon.ico │ ├── help.png │ ├── index.png │ ├── liuliang.png │ ├── logo.png │ ├── logo@1x.png │ └── logo@2x.png ├── bundle.css ├── bundle1.css ├── bundle2.js ├── bundle3.js ├── cfblog ├── admin │ ├── edit.html │ └── index.html ├── articleList.html ├── articleListItem.html ├── articleListItemCategory.html ├── articleListItemImg.html ├── articleListItemTags.html ├── articleListNewer.html ├── articleListOlder.html ├── articleSingle.html ├── articleSingleArticle.html ├── articleSingleArticleCategory.html ├── articleSingleArticleTags.html ├── articleSingleComment.html ├── articleSingleNewer.html ├── articleSingleOlder.html ├── favicon.ico ├── index.html ├── jingtaiboke │ └── js.js ├── widgetCategory.html ├── widgetCategoryItem.html ├── widgetMenu.html ├── widgetMenuItem.html ├── widgetRecently.html ├── widgetRecentlyItem.html ├── widgetTags.html ├── widgetTagsItem.html ├── wp-embed.min.js └── wp-emoji-release.min.js ├── favicon-32x32.png ├── favicon.ico ├── favicon1.ico ├── index.html ├── js ├── bundle.js ├── bundle1.js ├── bundle10.js ├── bundle11.js ├── bundle2.js ├── bundle3.js ├── bundle4.js ├── bundle5.js ├── bundle6.js ├── bundle7.js ├── bundle8.js ├── bundle9.js └── js.js ├── js3 ├── logo@1x.png ├── logo@2x.png ├── naotu ├── api │ └── demo.json ├── favicon.ico ├── reanme.md └── static │ ├── files │ └── trial.jm │ ├── scripts │ ├── index.js │ ├── index001.js │ ├── libs │ │ └── jsmind │ │ │ ├── jsmind.draggable.js │ │ │ ├── jsmind.js │ │ │ ├── jsmind.menu.js │ │ │ └── jsmind.screenshot.js │ ├── mind.js │ └── mind001.js │ └── styles │ ├── index.css │ ├── libs │ └── jsmind │ │ └── jsmind.css │ └── mind.css ├── opensearch.xml ├── tree ├── bootstrapStyle │ ├── bootstrapStyle.css │ ├── img │ │ ├── bootstrap.gif │ │ ├── bootstrap.png │ │ ├── line_conn.gif │ │ ├── line_conn.png │ │ ├── loading.gif │ │ ├── zTreeStandard.gif │ │ └── zTreeStandard.png │ └── zTreeStyle.css ├── demo.css ├── fuzzysearch.js ├── img │ ├── line_conn.gif │ ├── loading.gif │ ├── readme.md │ └── zTreeStandard.png ├── index.html ├── jquery-1.4.4.min.js ├── jquery.min.js ├── jquery.ztree.all.js ├── jquery.ztree.all.min.js ├── jquery.ztree.core.js ├── jquery.ztree.core.min.js ├── jquery.ztree.excheck.js ├── jquery.ztree.excheck.min.js ├── jquery.ztree.exedit.js ├── jquery.ztree.exedit.min.js ├── jquery.ztree.exhide.js ├── jquery.ztree.exhide.min.js └── zTreeStyle.css ├── vendors.css ├── vendors.js └── 资源收录.md /README.md: -------------------------------------------------------------------------------- 1 | # 各种VIP (原 ZhaoPP ) 2 |

3 | 4 | 5 | #### 一个基于`ElasticSearch`的Google Drive 搜索引擎,**快速**,**高效**,关键:`可直接下载` 6 | 7 | *** 8 | ## 开发背景 9 | 由于gd现在转存受限于1.5T限制,大家都在摸索一个新的资源分享方式; 10 | 11 | 本搜索引擎,可搜索,可下载,虽然不能解决`收藏`的需求,但是基本满足大家`用`文件的需求 12 | 13 | 其实`收藏`了几个P的资源,真正`用`到的又有多少?包括我在内,好多人陷入`松鼠病`不能自拔 14 | 15 | ## 文件收录: 16 | 17 | **70**个团队盘; **1100**万文件; **5**P资源 18 | 19 | 20 | ## 贡献资源 21 | 资源的壮大,离不开大家的分享 22 | 23 | 只需一步:将`gd-utils@googlegroups.com`加入你的团队盘; 24 | 25 | 爬虫一小时左右会光临 26 | 27 | #### 贡献资源的好处 28 | 29 | - 搜索结果直接指向你的gd文件夹,使用更方便 30 | - 解锁大文件下载限制 31 | ## 私有化部署 32 | 公共搜索经常超出配额不能下载,可联系站长**私有化部署** 33 | 34 | 打造你的个人专属搜索引擎 [@haopian](https://t.me/haopian "@haopian") 35 | ## 功能 36 | - 可搜索, 可排除关键字 37 | - 可定义超链接前缀,比如链接到自己的GDindex 38 | - 可定义文件大小范围 39 | - 最后、最后----**可直接下载** 40 | 41 |

42 | 43 | 44 | ### 鸣谢 45 | * [sov2ex](https://github.com/Bynil/sov2ex "sov2ex") 46 | * [elasticsearch](https://github.com/elastic/elasticsearch "elasticsearch") 47 | 48 | ### 联系我 49 | * [@haopian](https://t.me/haopian "@haopian") 50 | * 群组:[@zhaopp](https://t.me/zhaopp "@zhaopp") 51 | 52 | 53 | ### 捐赠 54 | 55 | 不得不说,这个是烧钱的项目,对服务器、CDN要求都很高 56 | 57 | 今天(2020/10/12)的流量已经破【7T】 58 | 59 | 60 | 61 |

62 | -------------------------------------------------------------------------------- /assets/images/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdtool/zhaopp/441fce56ebd81e6e0ed57055c48b8cbd078dc40c/assets/images/avatar.png -------------------------------------------------------------------------------- /assets/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdtool/zhaopp/441fce56ebd81e6e0ed57055c48b8cbd078dc40c/assets/images/favicon.ico -------------------------------------------------------------------------------- /assets/images/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdtool/zhaopp/441fce56ebd81e6e0ed57055c48b8cbd078dc40c/assets/images/help.png -------------------------------------------------------------------------------- /assets/images/index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdtool/zhaopp/441fce56ebd81e6e0ed57055c48b8cbd078dc40c/assets/images/index.png -------------------------------------------------------------------------------- /assets/images/liuliang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdtool/zhaopp/441fce56ebd81e6e0ed57055c48b8cbd078dc40c/assets/images/liuliang.png -------------------------------------------------------------------------------- /assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdtool/zhaopp/441fce56ebd81e6e0ed57055c48b8cbd078dc40c/assets/images/logo.png -------------------------------------------------------------------------------- /assets/images/logo@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdtool/zhaopp/441fce56ebd81e6e0ed57055c48b8cbd078dc40c/assets/images/logo@1x.png -------------------------------------------------------------------------------- /assets/images/logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdtool/zhaopp/441fce56ebd81e6e0ed57055c48b8cbd078dc40c/assets/images/logo@2x.png -------------------------------------------------------------------------------- /cfblog/admin/edit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 编辑文章 - CF-blog后台 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 34 |
35 | 36 |
37 |

编辑文章

38 | 39 |
40 | 41 |
42 | 43 | 44 |
45 |
46 | 47 | 48 |
49 |
50 | 51 | 52 |
53 |
54 | 55 | 56 |
57 |
58 | 59 | 61 |
62 |
63 | 64 | 65 |
66 | 保存 67 | 删除 68 |
69 |
70 |
71 | 72 |
73 | 74 | 75 | 138 | 139 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /cfblog/admin/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CF-blog后台 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 47 |
48 |
49 |
50 | 51 | 52 |
ID标题创建日期
53 | 54 | 加载更多... 55 |
56 |
57 |
58 |
59 |

新增

60 |
61 |
62 | 63 | 64 |
65 |
66 | 67 | 68 |
69 |
70 | 71 | 72 |
73 |
74 | 75 | 76 |
77 |
78 | 79 | 81 |
82 |
83 | 84 | 85 |
86 | 保存 87 | 88 |
89 |
90 |
91 |
92 | 93 |
94 | 95 |
96 |
97 |
98 | 99 | 100 |
101 | 102 |
103 | 104 | 108 |
109 | 保存 110 |
111 | 112 | 113 |
114 |
115 |
116 | 117 | 118 | 258 | 259 | 260 | 261 | 262 | 263 | -------------------------------------------------------------------------------- /cfblog/articleList.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 8 | 9 |
-------------------------------------------------------------------------------- /cfblog/articleListItem.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 |
5 | 6 |
7 | 8 |

继续阅读 »

9 |
10 | 11 | 23 | 24 |
25 | -------------------------------------------------------------------------------- /cfblog/articleListItemCategory.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cfblog/articleListItemImg.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
-------------------------------------------------------------------------------- /cfblog/articleListItemTags.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cfblog/articleListNewer.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /cfblog/articleListOlder.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cfblog/articleSingle.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | -------------------------------------------------------------------------------- /cfblog/articleSingleArticle.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 |
5 |
6 | By 7 | 8 | | 9 | 10 |
11 |
12 | 13 |
14 | 15 |
16 | 17 |
18 | 19 | 27 | 28 |
-------------------------------------------------------------------------------- /cfblog/articleSingleArticleCategory.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cfblog/articleSingleArticleTags.html: -------------------------------------------------------------------------------- 1 | , -------------------------------------------------------------------------------- /cfblog/articleSingleComment.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 | 6 |
-------------------------------------------------------------------------------- /cfblog/articleSingleNewer.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cfblog/articleSingleOlder.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cfblog/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdtool/zhaopp/441fce56ebd81e6e0ed57055c48b8cbd078dc40c/cfblog/favicon.ico -------------------------------------------------------------------------------- /cfblog/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | <!--{opt.siteName}--> 18 | 20 | 21 | 22 | 26 | 40 | 41 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 76 | 77 | 78 | 79 | 80 |
81 | 92 | 93 |
94 |
95 | 96 | 97 | 98 |
99 | 100 | 112 | 113 |
114 | 115 | 116 |
117 | 118 |
119 | 120 |
121 |
122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | -------------------------------------------------------------------------------- /cfblog/widgetCategory.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cfblog/widgetCategoryItem.html: -------------------------------------------------------------------------------- 1 |
  • -------------------------------------------------------------------------------- /cfblog/widgetMenu.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cfblog/widgetMenuItem.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /cfblog/widgetRecently.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cfblog/widgetRecentlyItem.html: -------------------------------------------------------------------------------- 1 |
  • -------------------------------------------------------------------------------- /cfblog/widgetTags.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cfblog/widgetTagsItem.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /cfblog/wp-embed.min.js: -------------------------------------------------------------------------------- 1 | /*! This file is auto-generated */ 2 | !function(d, l) { 3 | "use strict"; 4 | var e = !1 5 | , o = !1; 6 | if (l.querySelector) 7 | if (d.addEventListener) 8 | e = !0; 9 | if (d.wp = d.wp || {}, 10 | !d.wp.receiveEmbedMessage) 11 | if (d.wp.receiveEmbedMessage = function(e) { 12 | var t = e.data; 13 | if (t) 14 | if (t.secret || t.message || t.value) 15 | if (!/[^a-zA-Z0-9]/.test(t.secret)) { 16 | var r, a, i, s, n, o = l.querySelectorAll('iframe[data-secret="' + t.secret + '"]'), c = l.querySelectorAll('blockquote[data-secret="' + t.secret + '"]'); 17 | for (r = 0; r < c.length; r++) 18 | c[r].style.display = "none"; 19 | for (r = 0; r < o.length; r++) 20 | if (a = o[r], 21 | e.source === a.contentWindow) { 22 | if (a.removeAttribute("style"), 23 | "height" === t.message) { 24 | if (1e3 < (i = parseInt(t.value, 10))) 25 | i = 1e3; 26 | else if (~~i < 200) 27 | i = 200; 28 | a.height = i 29 | } 30 | if ("link" === t.message) 31 | if (s = l.createElement("a"), 32 | n = l.createElement("a"), 33 | s.href = a.getAttribute("src"), 34 | n.href = t.value, 35 | n.host === s.host) 36 | if (l.activeElement === a) 37 | d.top.location.href = t.value 38 | } 39 | } 40 | } 41 | , 42 | e) 43 | d.addEventListener("message", d.wp.receiveEmbedMessage, !1), 44 | l.addEventListener("DOMContentLoaded", t, !1), 45 | d.addEventListener("load", t, !1); 46 | function t() { 47 | if (!o) { 48 | o = !0; 49 | var e, t, r, a, i = -1 !== navigator.appVersion.indexOf("MSIE 10"), s = !!navigator.userAgent.match(/Trident.*rv:11\./), n = l.querySelectorAll("iframe.wp-embedded-content"); 50 | for (t = 0; t < n.length; t++) { 51 | if (!(r = n[t]).getAttribute("data-secret")) 52 | a = Math.random().toString(36).substr(2, 10), 53 | r.src += "#?secret=" + a, 54 | r.setAttribute("data-secret", a); 55 | if (i || s) 56 | (e = r.cloneNode(!0)).removeAttribute("security"), 57 | r.parentNode.replaceChild(e, r) 58 | } 59 | } 60 | } 61 | }(window, document); 62 | -------------------------------------------------------------------------------- /cfblog/wp-emoji-release.min.js: -------------------------------------------------------------------------------- 1 | /*! This file is auto-generated */ 2 | // Source: wp-includes/js/twemoji.min.js 3 | var twemoji = function() { 4 | "use strict"; 5 | var f = { 6 | base: "https://twemoji.maxcdn.com/v/13.0.1/", 7 | ext: ".png", 8 | size: "72x72", 9 | className: "emoji", 10 | convert: { 11 | fromCodePoint: function(d) { 12 | var u = "string" == typeof d ? parseInt(d, 16) : d; 13 | if (u < 65536) 14 | return a(u); 15 | return a(55296 + ((u -= 65536) >> 10), 56320 + (1023 & u)) 16 | }, 17 | toCodePoint: i 18 | }, 19 | onerror: function() { 20 | this.parentNode && this.parentNode.replaceChild(C(this.alt, !1), this) 21 | }, 22 | parse: function(d, u) { 23 | u && "function" != typeof u || (u = { 24 | callback: u 25 | }); 26 | return ("string" == typeof d ? function(d, b) { 27 | return o(d, function(d) { 28 | var u, f, c = d, e = N(d), a = b.callback(e, b); 29 | if (e && a) { 30 | for (f in c = "") 34 | } 35 | return c 36 | }) 37 | } 38 | : function(d, u) { 39 | var f, c, e, a, b, t, r, n, o, i, s, l, p, m = function d(u, f) { 40 | var c, e, a = u.childNodes, b = a.length; 41 | for (; b--; ) 42 | c = a[b], 43 | 3 === (e = c.nodeType) ? f.push(c) : 1 !== e || "ownerSVGElement"in c || x.test(c.nodeName.toLowerCase()) || d(c, f); 44 | return f 45 | }(d, []), h = m.length; 46 | for (; h--; ) { 47 | for (e = !1, 48 | a = document.createDocumentFragment(), 49 | b = m[h], 50 | t = b.nodeValue, 51 | n = 0; r = g.exec(t); ) { 52 | if ((o = r.index) !== n && a.appendChild(C(t.slice(n, o), !0)), 53 | s = r[0], 54 | l = N(s), 55 | n = o + s.length, 56 | p = u.callback(l, u), 57 | l && p) { 58 | for (c in (i = new Image).onerror = u.onerror, 59 | i.setAttribute("draggable", "false"), 60 | f = u.attributes(s, l)) 61 | f.hasOwnProperty(c) && 0 !== c.indexOf("on") && !i.hasAttribute(c) && i.setAttribute(c, f[c]); 62 | i.className = u.className, 63 | i.alt = s, 64 | i.src = p, 65 | e = !0, 66 | a.appendChild(i) 67 | } 68 | i || a.appendChild(C(s, !1)), 69 | i = null 70 | } 71 | e && (n < t.length && a.appendChild(C(t.slice(n), !0)), 72 | b.parentNode.replaceChild(a, b)) 73 | } 74 | return d 75 | } 76 | )(d, { 77 | callback: u.callback || b, 78 | attributes: "function" == typeof u.attributes ? u.attributes : n, 79 | base: "string" == typeof u.base ? u.base : f.base, 80 | ext: u.ext || f.ext, 81 | size: u.folder || function(d) { 82 | return "number" == typeof d ? d + "x" + d : d 83 | }(u.size || f.size), 84 | className: u.className || f.className, 85 | onerror: u.onerror || f.onerror 86 | }) 87 | }, 88 | replace: o, 89 | test: function(d) { 90 | g.lastIndex = 0; 91 | var u = g.test(d); 92 | return g.lastIndex = 0, 93 | u 94 | } 95 | } 96 | , u = { 97 | "&": "&", 98 | "<": "<", 99 | ">": ">", 100 | "'": "'", 101 | '"': """ 102 | } 103 | , g = /(?:\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d])|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[\xa9\xae\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd-\uddcf\uddd1-\udddd]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded7\udeeb\udeec\udef4-\udefc\udfe0-\udfeb]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd1d\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd76\udd78\udd7a-\uddb4\uddb7\uddba\uddbc-\uddcb\uddd0\uddde-\uddff\ude70-\ude74\ude78-\ude7a\ude80-\ude86\ude90-\udea8\udeb0-\udeb6\udec0-\udec2\uded0-\uded6]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g 104 | , c = /\uFE0F/g 105 | , e = String.fromCharCode(8205) 106 | , t = /[&<>'"]/g 107 | , x = /^(?:iframe|noframes|noscript|script|select|style|textarea)$/ 108 | , a = String.fromCharCode; 109 | return f; 110 | function C(d, u) { 111 | return document.createTextNode(u ? d.replace(c, "") : d) 112 | } 113 | function b(d, u) { 114 | return "".concat(u.base, u.size, "/", d, u.ext) 115 | } 116 | function N(d) { 117 | return i(d.indexOf(e) < 0 ? d.replace(c, "") : d) 118 | } 119 | function r(d) { 120 | return u[d] 121 | } 122 | function n() { 123 | return null 124 | } 125 | function o(d, u) { 126 | return String(d).replace(g, u) 127 | } 128 | function i(d, u) { 129 | for (var f = [], c = 0, e = 0, a = 0; a < d.length; ) 130 | c = d.charCodeAt(a++), 131 | e ? (f.push((65536 + (e - 55296 << 10) + (c - 56320)).toString(16)), 132 | e = 0) : 55296 <= c && c <= 56319 ? e = c : f.push(c.toString(16)); 133 | return f.join(u || "-") 134 | } 135 | }(); 136 | // Source: wp-includes/js/wp-emoji.min.js 137 | !function(c, l) { 138 | c.wp = c.wp || {}, 139 | c.wp.emoji = new function() { 140 | var n, u, e = c.MutationObserver || c.WebKitMutationObserver || c.MozMutationObserver, a = c.document, t = !1, r = 0, o = 0 < c.navigator.userAgent.indexOf("Trident/7.0"); 141 | function i() { 142 | return !a.implementation.hasFeature || a.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image", "1.1") 143 | } 144 | function s() { 145 | if (!t) { 146 | if (void 0 === c.twemoji) { 147 | if (600 < r) 148 | return; 149 | return c.clearTimeout(u), 150 | u = c.setTimeout(s, 50), 151 | void r++ 152 | } 153 | n = c.twemoji, 154 | t = !0, 155 | e && new e(function(u) { 156 | for (var e, t, n, a, r = u.length; r--; ) { 157 | if (e = u[r].addedNodes, 158 | t = u[r].removedNodes, 159 | 1 === (n = e.length) && 1 === t.length && 3 === e[0].nodeType && "IMG" === t[0].nodeName && e[0].data === t[0].alt && "load-failed" === t[0].getAttribute("data-error")) 160 | return; 161 | for (; n--; ) { 162 | if (3 === (a = e[n]).nodeType) { 163 | if (!a.parentNode) 164 | continue; 165 | if (o) 166 | for (; a.nextSibling && 3 === a.nextSibling.nodeType; ) 167 | a.nodeValue = a.nodeValue + a.nextSibling.nodeValue, 168 | a.parentNode.removeChild(a.nextSibling); 169 | a = a.parentNode 170 | } 171 | !a || 1 !== a.nodeType || a.className && "string" == typeof a.className && -1 !== a.className.indexOf("wp-exclude-emoji") || d(a.textContent) && f(a) 172 | } 173 | } 174 | } 175 | ).observe(a.body, { 176 | childList: !0, 177 | subtree: !0 178 | }), 179 | f(a.body) 180 | } 181 | } 182 | function d(u) { 183 | return !!u && (/[\uDC00-\uDFFF]/.test(u) || /[\u203C\u2049\u20E3\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2300\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692\u2693\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753\u2754\u2755\u2757\u2763\u2764\u2795\u2796\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05\u2B06\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]/.test(u)) 184 | } 185 | function f(u, e) { 186 | var t; 187 | return !l.supports.everything && n && u && ("string" == typeof u || u.childNodes && u.childNodes.length) ? (e = e || {}, 188 | t = { 189 | base: i() ? l.svgUrl : l.baseUrl, 190 | ext: i() ? l.svgExt : l.ext, 191 | className: e.className || "emoji", 192 | callback: function(u, e) { 193 | switch (u) { 194 | case "a9": 195 | case "ae": 196 | case "2122": 197 | case "2194": 198 | case "2660": 199 | case "2663": 200 | case "2665": 201 | case "2666": 202 | return !1 203 | } 204 | return !(l.supports.everythingExceptFlag && !/^1f1(?:e[6-9a-f]|f[0-9a-f])-1f1(?:e[6-9a-f]|f[0-9a-f])$/.test(u) && !/^(1f3f3-fe0f-200d-1f308|1f3f4-200d-2620-fe0f)$/.test(u)) && "".concat(e.base, u, e.ext) 205 | }, 206 | attributes: function() { 207 | return { 208 | role: "img" 209 | } 210 | }, 211 | onerror: function() { 212 | n.parentNode && (this.setAttribute("data-error", "load-failed"), 213 | n.parentNode.replaceChild(a.createTextNode(n.alt), n)) 214 | } 215 | }, 216 | "object" == typeof e.imgAttr && (t.attributes = function() { 217 | return e.imgAttr 218 | } 219 | ), 220 | n.parse(u, t)) : u 221 | } 222 | return l && (l.DOMReady ? s() : l.readyCallback = s), 223 | { 224 | parse: f, 225 | test: d 226 | } 227 | } 228 | }(window, window._wpemojiSettings); 229 | -------------------------------------------------------------------------------- /favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdtool/zhaopp/441fce56ebd81e6e0ed57055c48b8cbd078dc40c/favicon-32x32.png -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdtool/zhaopp/441fce56ebd81e6e0ed57055c48b8cbd078dc40c/favicon.ico -------------------------------------------------------------------------------- /favicon1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdtool/zhaopp/441fce56ebd81e6e0ed57055c48b8cbd078dc40c/favicon1.ico -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 找PP-Google Drive搜索引擎 13 | 14 |
    15 | 16 | 17 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /logo@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdtool/zhaopp/441fce56ebd81e6e0ed57055c48b8cbd078dc40c/logo@1x.png -------------------------------------------------------------------------------- /logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdtool/zhaopp/441fce56ebd81e6e0ed57055c48b8cbd078dc40c/logo@2x.png -------------------------------------------------------------------------------- /naotu/api/demo.json: -------------------------------------------------------------------------------- 1 | {"meta":{"name":"ggg","author":"","version":"0.2"},"format":"node_tree","data":{"id":"root","topic":"ggg","expanded":true,"children":[{"id":"659ca2a756aab1ef","topic":"一级","expanded":true,"direction":"right"},{"id":"659ca5c23cdb723c","topic":"一级左边?","expanded":true,"direction":"right"},{"id":"659ca421f47d3127","topic":"一级2","expanded":true,"direction":"right"}]}} -------------------------------------------------------------------------------- /naotu/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdtool/zhaopp/441fce56ebd81e6e0ed57055c48b8cbd078dc40c/naotu/favicon.ico -------------------------------------------------------------------------------- /naotu/reanme.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /naotu/static/files/trial.jm: -------------------------------------------------------------------------------- 1 | {"meta":{"name":"脑图啪啪演示","author":"https://naotu.pp.ua","version":"0.2e"},"format":"node_tree","data":{"id":"root","topic":"脑图啪啪","expanded":true,"foreground-color":"#FFF","background-color":"#0F0","children":[{"id":"1de91caa36875b35","topic":"鼠标操作","expanded":false,"direction":"right","background-color":"#F00","children":[{"id":"1de92859d2f0d27d","topic":"单击:选中节点","expanded":true},{"id":"1de9727afcf84c7d","topic":"双击:编辑节点","expanded":true},{"id":"1de9751f94fa9bc0","topic":"拖动:摆放节点","expanded":true},{"id":"1de97fe35a9b5ad8","topic":"点小圆圈:收起/展开子节点","expanded":true}]},{"id":"1de9a8b7b2c50b5c","topic":"键盘操作","expanded":false,"direction":"right","background-color":null,"foreground-color":null,"children":[{"id":"1de9ac3960d81007","topic":"Enter:添加同级节点","expanded":true},{"id":"1de9b391a1f9f389","topic":"Tab:添加下级节点","expanded":true},{"id":"1de9bb5d51409b69","topic":"F2:编辑节点","expanded":true},{"id":"1de9c867815d15e3","topic":"Delete:删除节点","expanded":true},{"id":"1de9c433f1a91565","topic":"空格:收起/展开子节点","expanded":true}]},{"id":"1de9eb1758d1d974","topic":"其他功能","expanded":true,"direction":"right","foreground-color":"#FFF","background-color":"#00F","children":[{"id":"65f0e573e2ed9c13","topic":"手机支持","expanded":false,"children":[{"id":"65f287b4599c6e8d","topic":"","expanded":true}]},{"id":"1de777b5098d5e48","topic":"支持HTML","expanded":false,"children":[{"id":"65f080d212569a68","topic":"

    这是一个标题

    ","expanded":true},{"id":"65f05a1dd226f87f","topic":"这是个表格:
    100 200 300
    400 500 600
    ","expanded":true},{"id":"65f06a16742a6b19","topic":"这是个列表:
    1. Coffee
    2. Tea
    3. Milk
    ","expanded":true}]},{"id":"1dea14668967693b","topic":"右键打开超链接","expanded":false,"foreground-color":null,"background-color":null,"children":[{"id":"65f088f4731878aa","topic":"https://www.baidu.com/s?wd=右键打开","expanded":true}]},{"id":"1dea38434c6c0643","topic":"每个历史版本","expanded":true,"children":[{"id":"65efc23d582234e6","topic":"不怕犯错,错了再改","expanded":true},{"id":"65f0ab2df60d84ee","topic":"\"rnSkP1.png\"","expanded":true}]},{"id":"65f0c1030d225df0","topic":"提需求","expanded":true,"background-color":"#000","foreground-color":"#FFF"}]}]}} -------------------------------------------------------------------------------- /naotu/static/scripts/index.js: -------------------------------------------------------------------------------- 1 | (function($w){ 2 | var CONTAINER_ID = 'jsmind_container'; 3 | var $container = $w.document.getElementById(CONTAINER_ID); 4 | var options = { 5 | container:CONTAINER_ID, 6 | editable:true, 7 | theme:'primary', 8 | shortcut:{ 9 | enable:true, // 是否启用快捷键 10 | handles:{}, // 命名的快捷键事件处理器 11 | mapping:{ // 快捷键映射 12 | addchild : 9, // 13 | addbrother : 13, // 14 | editnode : 113, // 15 | delnode : 46, // 16 | toggle : 32, // 17 | left : 37, // 18 | up : 38, // 19 | right : 39, // 20 | down : 40, // 21 | } 22 | }, 23 | menuOpts:{ 24 | showMenu: true, 25 | injectionList: [ 26 | {target:'edit',text: '编辑节点'}, 27 | {target:'addChild',text: '添加子节点'}, 28 | {target:'addBrother',text: '添加同级节点'}, 29 | {target:'openURL',text: '打开超链接'}, 30 | ], 31 | } 32 | }; 33 | var _jm = new jsMind(options); 34 | 35 | var page_load = function(){ 36 | set_container_size(); 37 | jsMind.util.dom.add_event($w,'resize',reset_container_size); 38 | jsMind.util.ajax.get('/static/files/trial.jm',function(mind){ 39 | _jm.show(mind); 40 | }); 41 | }; 42 | 43 | var set_container_size = function(){ 44 | var cw = $w.innerWidth-40; 45 | $container.style.width = cw+'px'; 46 | }; 47 | 48 | var _resize_timeout_id = -1; 49 | var reset_container_size = function(){ 50 | if(_resize_timeout_id != -1){ 51 | clearTimeout(_resize_timeout_id); 52 | } 53 | _resize_timeout_id = setTimeout(function(){ 54 | _resize_timeout_id = -1; 55 | set_container_size(); 56 | _jm.resize(); 57 | },300); 58 | }; 59 | 60 | page_load(); 61 | })(window); 62 | -------------------------------------------------------------------------------- /naotu/static/scripts/index001.js: -------------------------------------------------------------------------------- 1 | (function($w){ 2 | var CONTAINER_ID = 'jsmind_container'; 3 | var $container = $w.document.getElementById(CONTAINER_ID); 4 | var options = { 5 | container:CONTAINER_ID, 6 | editable:true, 7 | theme:'primary', 8 | shortcut:{ 9 | enable:true, // 是否启用快捷键 10 | handles:{}, // 命名的快捷键事件处理器 11 | mapping:{ // 快捷键映射 12 | addchild : 9, // 13 | addbrother : 13, // 14 | editnode : 113, // 15 | delnode : 46, // 16 | toggle : 32, // 17 | left : 37, // 18 | up : 38, // 19 | right : 39, // 20 | down : 40, // 21 | } 22 | }, 23 | menuOpts:{ 24 | showMenu: true, 25 | injectionList: [ 26 | {target:'edit',text: '编辑节点'}, 27 | {target:'addChild',text: '添加子节点'}, 28 | {target:'addBrother',text: '添加同级节点'}, 29 | {target:'openURL',text: '打开超链接'}, 30 | ], 31 | } 32 | }; 33 | var _jm = new jsMind(options); 34 | 35 | var page_load = function(){ 36 | set_container_size(); 37 | jsMind.util.dom.add_event($w,'resize',reset_container_size); 38 | jsMind.util.ajax.get('/static/files/trial.jm',function(mind){ 39 | _jm.show(mind); 40 | }); 41 | }; 42 | 43 | var set_container_size = function(){ 44 | var cw = $w.innerWidth-40; 45 | $container.style.width = cw+'px'; 46 | }; 47 | 48 | var _resize_timeout_id = -1; 49 | var reset_container_size = function(){ 50 | if(_resize_timeout_id != -1){ 51 | clearTimeout(_resize_timeout_id); 52 | } 53 | _resize_timeout_id = setTimeout(function(){ 54 | _resize_timeout_id = -1; 55 | set_container_size(); 56 | _jm.resize(); 57 | },300); 58 | }; 59 | 60 | page_load(); 61 | })(window); 62 | -------------------------------------------------------------------------------- /naotu/static/scripts/libs/jsmind/jsmind.draggable.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Released under BSD License 3 | * Copyright (c) 2014-2015 hizzgdev@163.com 4 | * 5 | * Project Home: 6 | * https://github.com/hizzgdev/jsmind/ 7 | */ 8 | 9 | (function($w){ 10 | 'use strict'; 11 | var $d = $w.document; 12 | var __name__ = 'jsMind'; 13 | var jsMind = $w[__name__]; 14 | if(!jsMind){return;} 15 | if(typeof jsMind.draggable != 'undefined'){return;} 16 | 17 | var jdom = jsMind.util.dom; 18 | var jcanvas = jsMind.util.canvas; 19 | 20 | var clear_selection = 'getSelection' in $w ? function(){ 21 | $w.getSelection().removeAllRanges(); 22 | } : function(){ 23 | $d.selection.empty(); 24 | }; 25 | 26 | var options = { 27 | line_width : 5, 28 | lookup_delay : 500, 29 | lookup_interval : 80 30 | }; 31 | 32 | jsMind.draggable = function(jm){ 33 | this.jm = jm; 34 | this.e_canvas = null; 35 | this.canvas_ctx = null; 36 | this.shadow = null; 37 | this.shadow_w = 0; 38 | this.shadow_h = 0; 39 | this.active_node = null; 40 | this.target_node = null; 41 | this.target_direct = null; 42 | this.client_w = 0; 43 | this.client_h = 0; 44 | this.offset_x = 0; 45 | this.offset_y = 0; 46 | this.hlookup_delay = 0; 47 | this.hlookup_timer = 0; 48 | this.capture = false; 49 | this.moved = false; 50 | }; 51 | 52 | jsMind.draggable.prototype = { 53 | init:function(){ 54 | this._create_canvas(); 55 | this._create_shadow(); 56 | this._event_bind(); 57 | }, 58 | 59 | resize:function(){ 60 | this.jm.view.e_nodes.appendChild(this.shadow); 61 | this.e_canvas.width=this.jm.view.size.w; 62 | this.e_canvas.height=this.jm.view.size.h; 63 | }, 64 | 65 | _create_canvas:function(){ 66 | var c = $d.createElement('canvas'); 67 | this.jm.view.e_panel.appendChild(c); 68 | var ctx = c.getContext('2d'); 69 | this.e_canvas = c; 70 | this.canvas_ctx = ctx; 71 | }, 72 | 73 | _create_shadow:function(){ 74 | var s = $d.createElement('jmnode'); 75 | s.style.visibility = 'hidden'; 76 | s.style.zIndex = '3'; 77 | s.style.cursor = 'move'; 78 | s.style.opacity= '0.7'; 79 | this.shadow = s; 80 | }, 81 | 82 | reset_shadow:function(el){ 83 | var s = this.shadow.style; 84 | this.shadow.innerHTML = el.innerHTML; 85 | s.left = el.style.left; 86 | s.top = el.style.top; 87 | s.width = el.style.width; 88 | s.height = el.style.height; 89 | s.backgroundImage = el.style.backgroundImage; 90 | s.backgroundSize = el.style.backgroundSize; 91 | s.transform = el.style.transform; 92 | this.shadow_w = this.shadow.clientWidth; 93 | this.shadow_h = this.shadow.clientHeight; 94 | 95 | }, 96 | 97 | show_shadow:function(){ 98 | if(!this.moved){ 99 | this.shadow.style.visibility = 'visible'; 100 | } 101 | }, 102 | 103 | hide_shadow:function(){ 104 | this.shadow.style.visibility = 'hidden'; 105 | }, 106 | 107 | clear_lines:function(){ 108 | jcanvas.clear(this.canvas_ctx, 0, 0, this.jm.view.size.w, this.jm.view.size.h); 109 | }, 110 | 111 | _magnet_shadow:function(node){ 112 | if(!!node){ 113 | this.canvas_ctx.lineWidth = options.line_width; 114 | this.canvas_ctx.strokeStyle = 'rgba(0,0,0,0.3)'; 115 | this.canvas_ctx.lineCap = 'round'; 116 | this.clear_lines(); 117 | jcanvas.lineto(this.canvas_ctx, 118 | node.sp.x, 119 | node.sp.y, 120 | node.np.x, 121 | node.np.y); 122 | } 123 | }, 124 | 125 | _lookup_close_node:function(){ 126 | var root = this.jm.get_root(); 127 | var root_location = root.get_location(); 128 | var root_size = root.get_size(); 129 | var root_x = root_location.x + root_size.w/2; 130 | 131 | var sw = this.shadow_w; 132 | var sh = this.shadow_h; 133 | var sx = this.shadow.offsetLeft; 134 | var sy = this.shadow.offsetTop; 135 | 136 | var ns,nl; 137 | 138 | var direct = (sx + sw/2)>=root_x ? 139 | jsMind.direction.right : jsMind.direction.left; 140 | var nodes = this.jm.mind.nodes; 141 | var node = null; 142 | var min_distance = Number.MAX_VALUE; 143 | var distance = 0; 144 | var closest_node = null; 145 | var closest_p = null; 146 | var shadow_p = null; 147 | for(var nodeid in nodes){ 148 | var np,sp; 149 | node = nodes[nodeid]; 150 | if(node.isroot || node.direction == direct){ 151 | if(node.id == this.active_node.id){ 152 | continue; 153 | } 154 | ns = node.get_size(); 155 | nl = node.get_location(); 156 | if(direct == jsMind.direction.right){ 157 | if(sx-nl.x-ns.w<=0){continue;} 158 | distance = Math.abs(sx-nl.x-ns.w) + Math.abs(sy+sh/2-nl.y-ns.h/2); 159 | np = {x:nl.x+ns.w-options.line_width,y:nl.y+ns.h/2}; 160 | sp = {x:sx+options.line_width,y:sy+sh/2}; 161 | }else{ 162 | if(nl.x-sx-sw<=0){continue;} 163 | distance = Math.abs(sx+sw-nl.x) + Math.abs(sy+sh/2-nl.y-ns.h/2); 164 | np = {x:nl.x+options.line_width,y:nl.y+ns.h/2}; 165 | sp = {x:sx+sw-options.line_width,y:sy+sh/2}; 166 | } 167 | if(distance < min_distance){ 168 | closest_node = node; 169 | closest_p = np; 170 | shadow_p = sp; 171 | min_distance = distance; 172 | } 173 | } 174 | } 175 | var result_node = null; 176 | if(!!closest_node){ 177 | result_node = { 178 | node:closest_node, 179 | direction:direct, 180 | sp:shadow_p, 181 | np:closest_p 182 | }; 183 | } 184 | return result_node; 185 | }, 186 | 187 | lookup_close_node:function(){ 188 | var node_data = this._lookup_close_node(); 189 | if(!!node_data){ 190 | this._magnet_shadow(node_data); 191 | this.target_node = node_data.node; 192 | this.target_direct = node_data.direction; 193 | } 194 | }, 195 | 196 | _event_bind:function(){ 197 | var jd = this; 198 | var container = this.jm.view.container; 199 | jdom.add_event(container,'mousedown',function(e){ 200 | var evt = e || event; 201 | jd.dragstart.call(jd,evt); 202 | }); 203 | jdom.add_event(container,'mousemove',function(e){ 204 | var evt = e || event; 205 | jd.drag.call(jd,evt); 206 | }); 207 | jdom.add_event(container,'mouseup',function(e){ 208 | var evt = e || event; 209 | jd.dragend.call(jd,evt); 210 | }); 211 | jdom.add_event(container,'touchstart',function(e){ 212 | var evt = e || event; 213 | jd.dragstart.call(jd,evt); 214 | }); 215 | jdom.add_event(container,'touchmove',function(e){ 216 | var evt = e || event; 217 | jd.drag.call(jd,evt); 218 | }); 219 | jdom.add_event(container,'touchend',function(e){ 220 | var evt = e || event; 221 | jd.dragend.call(jd,evt); 222 | }); 223 | }, 224 | 225 | dragstart:function(e){ 226 | if(!this.jm.get_editable()){return;} 227 | if(this.capture){return;} 228 | this.active_node = null; 229 | 230 | var jview = this.jm.view; 231 | var el = e.target || event.srcElement; 232 | if(el.tagName.toLowerCase() != 'jmnode'){return;} 233 | var nodeid = jview.get_binded_nodeid(el); 234 | if(!!nodeid){ 235 | var node = this.jm.get_node(nodeid); 236 | if(!node.isroot){ 237 | this.reset_shadow(el); 238 | this.active_node = node; 239 | this.offset_x = (e.clientX || e.touches[0].clientX) - el.offsetLeft; 240 | this.offset_y = (e.clientY || e.touches[0].clientY) - el.offsetTop; 241 | this.client_hw = Math.floor(el.clientWidth/2); 242 | this.client_hh = Math.floor(el.clientHeight/2); 243 | if(this.hlookup_delay != 0){ 244 | $w.clearTimeout(this.hlookup_delay); 245 | } 246 | if(this.hlookup_timer != 0){ 247 | $w.clearInterval(this.hlookup_timer); 248 | } 249 | var jd = this; 250 | this.hlookup_delay = $w.setTimeout(function(){ 251 | jd.hlookup_delay = 0; 252 | jd.hlookup_timer = $w.setInterval(function(){ 253 | jd.lookup_close_node.call(jd); 254 | },options.lookup_interval); 255 | },options.lookup_delay); 256 | this.capture = true; 257 | } 258 | } 259 | }, 260 | 261 | drag:function(e){ 262 | if(!this.jm.get_editable()){return;} 263 | if(this.capture){ 264 | e.preventDefault(); 265 | this.show_shadow(); 266 | this.moved = true; 267 | clear_selection(); 268 | var px = (e.clientX || e.touches[0].clientX) - this.offset_x; 269 | var py = (e.clientY || e.touches[0].clientY) - this.offset_y; 270 | var cx = px + this.client_hw; 271 | var cy = py + this.client_hh; 272 | this.shadow.style.left = px + 'px'; 273 | this.shadow.style.top = py + 'px'; 274 | clear_selection(); 275 | } 276 | }, 277 | 278 | dragend:function(e){ 279 | if(!this.jm.get_editable()){return;} 280 | if(this.capture){ 281 | if(this.hlookup_delay != 0){ 282 | $w.clearTimeout(this.hlookup_delay); 283 | this.hlookup_delay = 0; 284 | this.clear_lines(); 285 | } 286 | if(this.hlookup_timer != 0){ 287 | $w.clearInterval(this.hlookup_timer); 288 | this.hlookup_timer = 0; 289 | this.clear_lines(); 290 | } 291 | if(this.moved){ 292 | var src_node = this.active_node; 293 | var target_node = this.target_node; 294 | var target_direct = this.target_direct; 295 | this.move_node(src_node,target_node,target_direct); 296 | } 297 | this.hide_shadow(); 298 | } 299 | this.moved = false; 300 | this.capture = false; 301 | }, 302 | 303 | move_node:function(src_node,target_node,target_direct){ 304 | var shadow_h = this.shadow.offsetTop; 305 | if(!!target_node && !!src_node && !jsMind.node.inherited(src_node, target_node)){ 306 | // lookup before_node 307 | var sibling_nodes = target_node.children; 308 | var sc = sibling_nodes.length; 309 | var node = null; 310 | var delta_y = Number.MAX_VALUE; 311 | var node_before = null; 312 | var beforeid = '_last_'; 313 | while(sc--){ 314 | node = sibling_nodes[sc]; 315 | if(node.direction == target_direct && node.id != src_node.id){ 316 | var dy = node.get_location().y - shadow_h; 317 | if(dy > 0 && dy < delta_y){ 318 | delta_y = dy; 319 | node_before = node; 320 | beforeid = '_first_'; 321 | } 322 | } 323 | } 324 | if(!!node_before){beforeid = node_before.id;} 325 | this.jm.move_node(src_node.id, beforeid, target_node.id, target_direct); 326 | } 327 | this.active_node = null; 328 | this.target_node = null; 329 | this.target_direct = null; 330 | }, 331 | 332 | jm_event_handle:function(type,data){ 333 | if(type === jsMind.event_type.resize){ 334 | this.resize(); 335 | } 336 | } 337 | }; 338 | 339 | var draggable_plugin = new jsMind.plugin('draggable',function(jm){ 340 | var jd = new jsMind.draggable(jm); 341 | jd.init(); 342 | jm.add_event_listener(function(type,data){ 343 | jd.jm_event_handle.call(jd,type,data); 344 | }); 345 | }); 346 | 347 | jsMind.register_plugin(draggable_plugin); 348 | 349 | })(window); 350 | -------------------------------------------------------------------------------- /naotu/static/scripts/libs/jsmind/jsmind.menu.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Released under BSD License 3 | * Copyright (c) 2019-2020 Allen_sun_js@hotmail.com 4 | * 5 | * Project Home: 6 | * https://github.com/allensunjian 7 | */ 8 | 9 | (function ($w, temp) { 10 | 11 | var Jm = $w[temp], 12 | 13 | name = 'menu', 14 | 15 | $d = $w['document'], 16 | 17 | menuEvent = 'oncontextmenu', 18 | 19 | clickEvent = 'onclick', 20 | 21 | overEvent = 'mouseover', 22 | 23 | $c = function (tag) { return $d.createElement(tag); }, 24 | 25 | _noop = function () { }, 26 | 27 | logger = (typeof console === 'undefined') ? { 28 | 29 | log: _noop, debug: _noop, error: _noop, warn: _noop, info: _noop 30 | 31 | } : console; 32 | 33 | var $t = function (n, t) { if (n.hasChildNodes()) { n.firstChild.nodeValue = t; } else { n.appendChild($d.createTextNode(t)); } }; 34 | 35 | var $h = function (n, t) { 36 | if (t instanceof HTMLElement) { 37 | t.innerHTML = ""; 38 | n.appendChild(t) 39 | } else { 40 | n.innerHTML = t; 41 | } 42 | }; 43 | 44 | if (!Jm || Jm[name]) return; 45 | 46 | Jm.menu = function (_jm) { 47 | 48 | this._get_menu_options(_jm, function () { 49 | 50 | this.init(_jm); 51 | 52 | this._mount_events() 53 | }) 54 | } 55 | Jm.menu.prototype = { 56 | 57 | defaultDataMap: { 58 | funcMap: { 59 | edit: { 60 | isDepNode: true, 61 | // defaultFn不受到中台变量的控制,始终会先于fn去执行 62 | defaultFn: function (node) { 63 | console.log(node); 64 | var f = this._menu_default_mind_methods._menu_begin_edit.call(this.jm); 65 | f && this._menu_default_mind_methods._menu_edit_node_begin(this.jm.view, node); 66 | }, 67 | fn: _noop, 68 | text: 'edit node' 69 | }, 70 | openURL: { 71 | isDepNode: true, 72 | // defaultFn不受到中台变量的控制,始终会先于fn去执行 73 | defaultFn: function (node) { 74 | console.log(node); 75 | var url = node.topic; 76 | window.open(url); 77 | // if(url.toLowerCase().startsWith("http") || url.toLowerCase().startsWith("http")){ 78 | 79 | 80 | // } 81 | 82 | }, 83 | fn: _noop, 84 | text: 'open URL' 85 | }, 86 | addChild: { 87 | isDepNode: true, 88 | fn: function (nodeid,text) { 89 | 90 | var selected_node = this.get_selected_node(); 91 | if (!!selected_node) { 92 | var node = this.add_node(selected_node, nodeid, text); 93 | if (!!node) { 94 | this.select_node(nodeid); 95 | this.begin_edit(nodeid); 96 | } 97 | } 98 | }, 99 | text: 'append child' 100 | }, 101 | addBrother: { 102 | isDepNode: true, 103 | fn: function (nodeid,text) { 104 | var selected_node = this.get_selected_node(); 105 | if (!!selected_node && !selected_node.isroot) { 106 | var node = this.insert_node_after(selected_node, nodeid, text); 107 | if (!!node) { 108 | this.select_node(nodeid); 109 | this.begin_edit(nodeid); 110 | } 111 | } 112 | }, 113 | text: 'append brother' 114 | }, 115 | delete: { 116 | isDepNode: true, 117 | fn: function () { 118 | this.shortcut.handle_delnode.call(this.shortcut, this); 119 | }, 120 | text: 'delete node' 121 | }, 122 | showAll: { 123 | sDepNode: false, 124 | fn: function () { 125 | this.expand_all(this) 126 | }, 127 | text: 'show all' 128 | }, 129 | hideAll: { 130 | isDepNode: false, 131 | fn: function () { 132 | this.collapse_all(this) 133 | }, 134 | text: 'hide all' 135 | }, 136 | screenshot: { 137 | isDepNode: false, 138 | fn: function () { 139 | if (!this.screenshot) { 140 | logger.error('[jsmind] screenshot dependent on jsmind.screenshot.js !'); 141 | return; 142 | } 143 | this.screenshot.shootDownload(); 144 | }, 145 | text: 'load mind picture' 146 | }, 147 | showNode: { 148 | isDepNode: true, 149 | fn: function (node) { 150 | this.expand_node(node); 151 | }, 152 | text: 'show target node' 153 | }, 154 | hideNode: { 155 | isDepNode: true, 156 | fn: function (node) { 157 | this.collapse_node(node); 158 | }, 159 | text: 'hide target node' 160 | }, 161 | }, 162 | menuStl: { 163 | 'width': '150px', 164 | 'padding': '12px 0', 165 | 'position': 'fixed', 166 | 'z-index': '10', 167 | 'background': '#fff', 168 | 'box-shadow': '0 2px 12px 0 rgba(0,0,0,0.1)', 169 | 'border-radius': '5px', 170 | 'font-size': '12px', 171 | 'display': 'none' 172 | }, 173 | menuItemStl:{ 174 | padding: '5px 15px', 175 | cursor: 'pointer', 176 | display: 'block', 177 | 'text-align': 'center', 178 | 'transition':'all .2s' 179 | }, 180 | injectionList:['edit','addChild','delete'] 181 | }, 182 | 183 | init: function (_jm) { 184 | this._create_menu(_jm); 185 | this._get_injectionList(_jm); 186 | this.menuOpts.switchMidStage && Jm.util.dom.add_event(_jm.view.e_editor , 'blur', function (e) { 187 | this._menu_default_mind_methods._menu_edit_node_end.call(_jm.view); 188 | if(typeof this.menuOpts.editCaller == 'function') { 189 | this.menuOpts.editCaller($w.menu._update_node_info, this._menu_default_mind_methods._menu_update_edit_node) 190 | return 191 | } 192 | this._menu_default_mind_methods._menu_update_edit_node(); 193 | }.bind(this)); 194 | }, 195 | 196 | _event_contextMenu (e) { 197 | e.preventDefault(); 198 | this.menu.style.left = e.clientX + 'px'; 199 | this.menu.style.top = e.clientY + 'px'; 200 | this.menu.style.display = 'block'; 201 | this.selected_node = this.jm.get_selected_node(); 202 | } , 203 | 204 | _event_hideMenu() { 205 | this.menu.style.display = 'none' 206 | }, 207 | 208 | _mount_events () { 209 | $w[menuEvent] = this._event_contextMenu.bind(this); 210 | $w[clickEvent] = this._event_hideMenu.bind(this); 211 | }, 212 | 213 | _create_menu (_jm) { 214 | var d = $c('menu'); 215 | this._set_menu_wrap_syl(d); 216 | this.menu = d; 217 | this.e_panel = _jm.view.e_panel; 218 | this.e_panel.appendChild(d); 219 | }, 220 | 221 | _create_menu_item (j, text, fn, isDepNode,cb, defaultFn) { 222 | var d = $c('menu-item'),_this = this; 223 | this._set_menu_item_syl(d); 224 | d.innerText = text; 225 | d.addEventListener('click', function () { 226 | if (this.selected_node || !isDepNode) { 227 | defaultFn.call(_this, this.selected_node); 228 | if (!_this._get_mid_opts()) { 229 | cb(this.selected_node, _noop) 230 | fn.call(j,Jm.util.uuid.newid(), this.menuOpts.newNodeText || 'New Node'); 231 | return; 232 | } 233 | cb(this.selected_node,_this._mid_stage_next(function () { 234 | var retArgs = [this.selected_node], 235 | argus = Array.prototype.slice.call(arguments[0],0); 236 | argus[1] = this.menuOpts.newNodeText || 'New Node'; 237 | if (argus[0]) { 238 | retArgs = argus 239 | } 240 | fn.apply(j,retArgs); 241 | }.bind(this))) 242 | return 243 | } 244 | alert(this.menuOpts.tipContent || 'Continue with node selected!') 245 | }.bind(this)) 246 | d.addEventListener('mouseover', function () { 247 | d.style.background = 'rgb(179, 216, 255)' 248 | }.bind(this)) 249 | d.addEventListener('mouseleave', function () { 250 | d.style.background = '#fff' 251 | }.bind(this)) 252 | return d 253 | }, 254 | 255 | _set_menu_wrap_syl (d) { 256 | var os = this._get_option_sty('menu',this._get_mixin_sty); 257 | d.style.cssText = this._format_cssText(os); 258 | }, 259 | 260 | _set_menu_item_syl (d) { 261 | var os = this._get_option_sty('menuItem',this._get_mixin_sty); 262 | d.style.cssText = this._format_cssText(os) 263 | }, 264 | 265 | _format_cssText (o) { 266 | var text = ''; 267 | Object.keys(o).forEach(function (k) { 268 | text += k +':'+o[k] +';' 269 | }) 270 | return text; 271 | }, 272 | 273 | _empty_object (o) { 274 | return Object.keys(o).length == 0? true :false 275 | }, 276 | 277 | _get_option_sty (type, fn) { 278 | var sty = this.menuOpts.style, 279 | menu = this.defaultDataMap.menuStl, 280 | menuItem = this.defaultDataMap.menuItemStl, 281 | o = {menu,menuItem} 282 | if (!sty) return o[type]; 283 | if (!sty[type]) return o[type]; 284 | if (!sty[type] || this._empty_object(sty[type])) return o[type]; 285 | return fn( o[type],sty[type]) 286 | }, 287 | 288 | _get_mixin_sty (dSty, oSty) { 289 | var o = {}; 290 | Object.keys(oSty).forEach(function (k) { 291 | o[k] = oSty[k]; 292 | }) 293 | Object.keys(dSty).forEach(function (k) { 294 | if (!o[k]) o[k] = dSty[k]; 295 | }) 296 | return o 297 | }, 298 | 299 | _get_menu_options (j, fn) { 300 | var options = j.options; 301 | if (!options.menuOpts) return; 302 | if (!options.menuOpts.showMenu) return; 303 | this.menuOpts = j.options.menuOpts 304 | fn.call(this) 305 | }, 306 | 307 | _get_injectionDetail () { 308 | var iLs = this.menuOpts.injectionList, 309 | dLs = this.defaultDataMap.injectionList; 310 | if (!iLs) return dLs; 311 | if (!Array.isArray(iLs)) { 312 | logger.error('[jsmind] injectionList must be a Array'); 313 | return; 314 | } 315 | if (iLs.length == 0) return dLs; 316 | return iLs 317 | }, 318 | 319 | _get_injectionList (j) { 320 | var list = this._get_injectionDetail(), 321 | _this = this; 322 | list.forEach(function (k) { 323 | var o = null, 324 | text = "", 325 | callback = _noop, 326 | defaultFn = _noop; 327 | 328 | if (typeof k == 'object') { 329 | o = _this.defaultDataMap.funcMap[k.target]; 330 | text = k.text; 331 | k.callback && (callback = k.callback); 332 | } else { 333 | o = _this.defaultDataMap.funcMap[k]; 334 | text = o.text; 335 | } 336 | 337 | if (o.defaultFn) defaultFn = o.defaultFn; 338 | _this.menu.appendChild(_this._create_menu_item(j ,text, o.fn, o.isDepNode,callback, defaultFn)); 339 | }) 340 | }, 341 | 342 | _get_mid_opts () { 343 | var b = this.menuOpts.switchMidStage; 344 | if (!b) return false; 345 | if (typeof b !== 'boolean') { 346 | logger.error('[jsmind] switchMidStage must be Boolean'); 347 | return false; 348 | } 349 | return b 350 | }, 351 | 352 | _switch_view_db_event (b, jm) { 353 | Jm.prototype.dblclick_handle = _noop; 354 | Jm.shortcut_provider.prototype.handler = _noop; 355 | Jm.view_provider.prototype.edit_node_end = _noop; 356 | }, 357 | 358 | _mid_stage_next (fn) { 359 | return function () { 360 | fn(arguments); 361 | } 362 | }, 363 | 364 | _reset_mind_event_edit () {}, 365 | 366 | _menu_default_mind_methods: { 367 | _menu_begin_edit: function () { 368 | var f = this.get_editable(); 369 | if (!f) { 370 | logger.error('fail, this mind map is not editable.'); 371 | }; 372 | return f; 373 | }, 374 | _menu_edit_node_begin (scope, node) { 375 | if (!node.topic) { 376 | logger.warn("don't edit image nodes"); 377 | return; 378 | } 379 | if (scope.editing_node != null) { 380 | this._menu_default_mind_methods._menu_edit_node_end.call(scope); 381 | } 382 | scope.editing_node = node; 383 | var view_data = node._data.view; 384 | var element = view_data.element; 385 | var topic = node.topic; 386 | var ncs = getComputedStyle(element); 387 | scope.e_editor.value = topic; 388 | scope.e_editor.style.width = (element.clientWidth - parseInt(ncs.getPropertyValue('padding-left')) - parseInt(ncs.getPropertyValue('padding-right'))) + 'px'; 389 | element.innerHTML = ''; 390 | element.appendChild(scope.e_editor); 391 | element.style.zIndex = 5; 392 | scope.e_editor.focus(); 393 | scope.e_editor.select(); 394 | }, 395 | _menu_edit_node_end: function () { 396 | if (this.editing_node != null) { 397 | var node = this.editing_node; 398 | this.editing_node = null; 399 | var view_data = node._data.view; 400 | var element = view_data.element; 401 | var topic = this.e_editor.value; 402 | element.style.zIndex = 'auto'; 403 | element.removeChild(this.e_editor); 404 | $w.menu._update_node_info = {id: node.id, topic: topic}; 405 | if (Jm.util.text.is_empty(topic) || node.topic === topic) { 406 | if (this.opts.support_html) { 407 | $h(element, node.topic); 408 | } else { 409 | $t(element, node.topic); 410 | } 411 | } 412 | } 413 | }, 414 | _menu_update_edit_node: function () { 415 | var info = $w.menu._update_node_info; 416 | $w.menu.jm.update_node(info.id, info.topic); 417 | } 418 | } 419 | 420 | } 421 | var plugin = new Jm.plugin('menu',function (_jm) { 422 | 423 | $w.menu = new Jm.menu(_jm); 424 | 425 | menu.jm = _jm; 426 | 427 | if(menu.menuOpts) _jm.menu = menu; 428 | 429 | }) 430 | 431 | Jm.register_plugin(plugin) 432 | 433 | function preventMindEventDefault() { 434 | 435 | Jm.menu.prototype._switch_view_db_event(); 436 | 437 | } 438 | Jm.preventMindEventDefault = preventMindEventDefault 439 | 440 | })(window, 'jsMind') 441 | -------------------------------------------------------------------------------- /naotu/static/scripts/libs/jsmind/jsmind.screenshot.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Released under BSD License 3 | * Copyright (c) 2014-2015 hizzgdev@163.com 4 | * 5 | * Project Home: 6 | * https://github.com/hizzgdev/jsmind/ 7 | */ 8 | 9 | (function($w){ 10 | 'use strict'; 11 | 12 | var __name__ = 'jsMind'; 13 | var jsMind = $w[__name__]; 14 | if(!jsMind){return;} 15 | if(typeof jsMind.screenshot != 'undefined'){return;} 16 | 17 | var $d = $w.document; 18 | var $c = function(tag){return $d.createElement(tag);}; 19 | 20 | var css = function(cstyle,property_name){ 21 | return cstyle.getPropertyValue(property_name); 22 | }; 23 | var is_visible = function(cstyle){ 24 | var visibility = css(cstyle,'visibility'); 25 | var display = css(cstyle,'display'); 26 | return (visibility !== 'hidden' && display !== 'none'); 27 | }; 28 | var jcanvas = jsMind.util.canvas; 29 | jcanvas.rect = function (ctx,x,y,w,h,r) { 30 | if (w < 2 * r) r = w / 2; 31 | if (h < 2 * r) r = h / 2; 32 | ctx.moveTo(x+r, y); 33 | ctx.arcTo(x+w, y, x+w, y+h, r); 34 | ctx.arcTo(x+w, y+h, x, y+h, r); 35 | ctx.arcTo(x, y+h, x, y, r); 36 | ctx.arcTo(x, y, x+w, y, r); 37 | }; 38 | 39 | jcanvas.text_multiline = function(ctx,text,x,y,w,h,lineheight){ 40 | var line = ''; 41 | var text_len = text.length; 42 | var chars = text.split(''); 43 | var test_line = null; 44 | ctx.textAlign = 'left'; 45 | ctx.textBaseline = 'top'; 46 | for(var i=0;i w && i>0){ 49 | ctx.fillText(line,x,y); 50 | line = chars[i]; 51 | y += lineheight; 52 | }else{ 53 | line = test_line; 54 | } 55 | } 56 | ctx.fillText(line,x,y); 57 | }; 58 | 59 | jcanvas.text_ellipsis = function(ctx,text,x,y,w,h){ 60 | var center_y = y+h/2; 61 | var text = jcanvas.fittingString(ctx,text,w); 62 | ctx.textAlign = 'left'; 63 | ctx.textBaseline = 'middle'; 64 | ctx.fillText(text,x,center_y,w); 65 | }; 66 | 67 | jcanvas.fittingString = function(ctx,text,max_width) { 68 | var width = ctx.measureText(text).width; 69 | var ellipsis = '…' 70 | var ellipsis_width = ctx.measureText(ellipsis).width; 71 | if (width<=max_width || width<=ellipsis_width) { 72 | return text; 73 | } else { 74 | var len = text.length; 75 | while (width>=max_width-ellipsis_width && len-->0) { 76 | text = text.substring(0, len); 77 | width = ctx.measureText(text).width; 78 | } 79 | return text+ellipsis; 80 | } 81 | }; 82 | 83 | jcanvas.image = function(ctx,backgroundUrl,x,y,w,h,r,rotation,callback){ 84 | var img = new Image(); 85 | img.onload = function () { 86 | ctx.save(); 87 | ctx.translate(x,y); 88 | ctx.save(); 89 | ctx.beginPath(); 90 | jcanvas.rect(ctx,0,0,w,h,r); 91 | ctx.closePath(); 92 | ctx.clip(); 93 | ctx.translate(w/2,h/2); 94 | ctx.rotate(rotation*Math.PI/180); 95 | ctx.drawImage(img,-w/2,-h/2); 96 | ctx.restore(); 97 | ctx.restore(); 98 | callback(); 99 | } 100 | img.src = backgroundUrl; 101 | }; 102 | 103 | jsMind.screenshot = function(jm){ 104 | this.jm = jm; 105 | this.canvas_elem = null; 106 | this.canvas_ctx = null; 107 | this._inited = false; 108 | }; 109 | 110 | jsMind.screenshot.prototype = { 111 | init:function(){ 112 | if(this._inited){return;} 113 | console.log('init'); 114 | var c = $c('canvas'); 115 | var ctx = c.getContext('2d'); 116 | 117 | this.canvas_elem = c; 118 | this.canvas_ctx = ctx; 119 | this.jm.view.e_panel.appendChild(c); 120 | this._inited = true; 121 | this.resize(); 122 | }, 123 | 124 | shoot:function(callback){ 125 | this.init(); 126 | this._watermark(); 127 | var jms = this; 128 | this._draw(function(){ 129 | if(!!callback){ 130 | callback(jms); 131 | } 132 | jms.clean(); 133 | }); 134 | }, 135 | 136 | shootDownload: function(){ 137 | this.shoot(function(jms){ 138 | jms._download(); 139 | }); 140 | }, 141 | 142 | shootAsDataURL: function(callback){ 143 | this.shoot(function(jms){ 144 | callback(jms.canvas_elem.toDataURL()); 145 | }); 146 | }, 147 | 148 | resize:function(){ 149 | if(this._inited){ 150 | this.canvas_elem.width=this.jm.view.size.w; 151 | this.canvas_elem.height=this.jm.view.size.h; 152 | } 153 | }, 154 | 155 | clean:function(){ 156 | var c = this.canvas_elem; 157 | this.canvas_ctx.clearRect(0,0,c.width,c.height); 158 | }, 159 | 160 | _draw:function(callback){ 161 | var ctx = this.canvas_ctx; 162 | ctx.textAlign = 'left'; 163 | ctx.textBaseline = 'top'; 164 | this._draw_lines(); 165 | this._draw_nodes(callback); 166 | }, 167 | 168 | _watermark:function(){ 169 | var c = this.canvas_elem; 170 | var ctx = this.canvas_ctx; 171 | ctx.textAlign='right'; 172 | ctx.textBaseline='bottom'; 173 | ctx.fillStyle='#000'; 174 | ctx.font='11px Verdana,Arial,Helvetica,sans-serif'; 175 | ctx.fillText('hizzgdev.github.io/jsmind',c.width-5.5,c.height-2.5); 176 | ctx.textAlign='left'; 177 | ctx.fillText($w.location,5.5,c.height-2.5); 178 | }, 179 | 180 | _draw_lines:function(){ 181 | this.jm.view.show_lines(this.canvas_ctx); 182 | }, 183 | 184 | _draw_nodes:function(callback){ 185 | var nodes = this.jm.mind.nodes; 186 | var node; 187 | for(var nodeid in nodes){ 188 | node = nodes[nodeid]; 189 | this._draw_node(node); 190 | } 191 | 192 | function check_nodes_ready() { 193 | console.log('check_node_ready'+new Date()); 194 | var allOk = true; 195 | for(var nodeid in nodes){ 196 | node = nodes[nodeid]; 197 | allOk = allOk & node.ready; 198 | } 199 | 200 | if(!allOk) { 201 | $w.setTimeout(check_nodes_ready, 200); 202 | } else { 203 | $w.setTimeout(callback, 200); 204 | } 205 | } 206 | check_nodes_ready(); 207 | }, 208 | 209 | _draw_node:function(node){ 210 | var ctx = this.canvas_ctx; 211 | var view_data = node._data.view; 212 | var node_element = view_data.element; 213 | var ncs = getComputedStyle(node_element); 214 | if(!is_visible(ncs)){ 215 | node.ready = true; 216 | return; 217 | } 218 | 219 | var bgcolor = css(ncs,'background-color'); 220 | var round_radius = parseInt(css(ncs,'border-top-left-radius')); 221 | var color = css(ncs,'color'); 222 | var padding_left = parseInt(css(ncs,'padding-left')); 223 | var padding_right = parseInt(css(ncs,'padding-right')); 224 | var padding_top = parseInt(css(ncs,'padding-top')); 225 | var padding_bottom = parseInt(css(ncs,'padding-bottom')); 226 | var text_overflow = css(ncs,'text-overflow'); 227 | var font = css(ncs,'font-style')+' '+ 228 | css(ncs,'font-variant')+' '+ 229 | css(ncs,'font-weight')+' '+ 230 | css(ncs,'font-size')+'/'+css(ncs,'line-height')+' '+ 231 | css(ncs,'font-family'); 232 | 233 | var rb = {x:view_data.abs_x, 234 | y:view_data.abs_y, 235 | w:view_data.width+1, 236 | h:view_data.height+1}; 237 | var tb = {x:rb.x+padding_left, 238 | y:rb.y+padding_top, 239 | w:rb.w-padding_left-padding_right, 240 | h:rb.h-padding_top-padding_bottom}; 241 | 242 | ctx.font=font; 243 | ctx.fillStyle = bgcolor; 244 | ctx.beginPath(); 245 | jcanvas.rect(ctx, rb.x, rb.y, rb.w, rb.h, round_radius); 246 | ctx.closePath(); 247 | ctx.fill(); 248 | 249 | ctx.fillStyle = color; 250 | if ('background-image' in node.data) { 251 | var backgroundUrl = css(ncs,'background-image').slice(5, -2); 252 | node.ready = false; 253 | var rotation = 0; 254 | if ('background-rotation' in node.data) { 255 | rotation = node.data['background-rotation']; 256 | } 257 | jcanvas.image(ctx, backgroundUrl, rb.x, rb.y, rb.w, rb.h, round_radius, rotation, 258 | function() { 259 | node.ready = true; 260 | }); 261 | } 262 | if (!!node.topic) { 263 | if(text_overflow === 'ellipsis'){ 264 | jcanvas.text_ellipsis(ctx, node.topic, tb.x, tb.y, tb.w, tb.h); 265 | }else{ 266 | var line_height = parseInt(css(ncs,'line-height')); 267 | jcanvas.text_multiline(ctx, node.topic, tb.x, tb.y, tb.w, tb.h,line_height); 268 | } 269 | } 270 | if(!!view_data.expander){ 271 | this._draw_expander(view_data.expander); 272 | } 273 | if (!('background-image' in node.data)) { 274 | node.ready = true; 275 | } 276 | }, 277 | 278 | _draw_expander:function(expander){ 279 | var ctx = this.canvas_ctx; 280 | var ncs = getComputedStyle(expander); 281 | if(!is_visible(ncs)){ return; } 282 | 283 | var style_left = css(ncs,'left'); 284 | var style_top = css(ncs,'top'); 285 | var font = css(ncs,'font'); 286 | var left = parseInt(style_left); 287 | var top = parseInt(style_top); 288 | var is_plus = expander.innerHTML === '+'; 289 | 290 | ctx.lineWidth = 1; 291 | 292 | ctx.beginPath(); 293 | ctx.arc(left+7,top+7,5,0,Math.PI*2,true); 294 | ctx.moveTo(left+10,top+7); 295 | ctx.lineTo(left+4,top+7); 296 | if(is_plus){ 297 | ctx.moveTo(left+7,top+4); 298 | ctx.lineTo(left+7,top+10); 299 | } 300 | ctx.closePath(); 301 | ctx.stroke(); 302 | }, 303 | 304 | _download:function(){ 305 | var c = this.canvas_elem; 306 | var name = this.jm.mind.name+'.png'; 307 | 308 | if (navigator.msSaveBlob && (!!c.msToBlob)) { 309 | var blob = c.msToBlob(); 310 | navigator.msSaveBlob(blob,name); 311 | } else { 312 | var bloburl = this.canvas_elem.toDataURL(); 313 | var anchor = $c('a'); 314 | if ('download' in anchor) { 315 | anchor.style.visibility = 'hidden'; 316 | anchor.href = bloburl; 317 | anchor.download = name; 318 | $d.body.appendChild(anchor); 319 | var evt = $d.createEvent('MouseEvents'); 320 | evt.initEvent('click', true, true); 321 | anchor.dispatchEvent(evt); 322 | $d.body.removeChild(anchor); 323 | } else { 324 | location.href = bloburl; 325 | } 326 | } 327 | }, 328 | 329 | jm_event_handle:function(type,data){ 330 | if(type === jsMind.event_type.resize){ 331 | this.resize(); 332 | } 333 | } 334 | }; 335 | 336 | var screenshot_plugin = new jsMind.plugin('screenshot',function(jm){ 337 | var jss = new jsMind.screenshot(jm); 338 | jm.screenshot = jss; 339 | jm.shoot = function(){ 340 | jss.shoot(); 341 | }; 342 | jm.add_event_listener(function(type,data){ 343 | jss.jm_event_handle.call(jss,type,data); 344 | }); 345 | }); 346 | 347 | jsMind.register_plugin(screenshot_plugin); 348 | 349 | })(window); 350 | -------------------------------------------------------------------------------- /naotu/static/scripts/mind.js: -------------------------------------------------------------------------------- 1 | (function($,$w){ 2 | function getQueryVariable(variable) 3 | { 4 | var query = window.location.search.substring(1); 5 | var vars = query.split("&"); 6 | for (var i=0;i 27 | addbrother : 13, // 28 | editnode : 113, // 29 | delnode : 46, // 30 | toggle : 32, // 31 | left : 37, // 32 | up : 38, // 33 | right : 39, // 34 | down : 40, // 35 | } 36 | }, 37 | menuOpts:{ 38 | showMenu: true, 39 | injectionList: [ 40 | {target:'edit',text: '编辑节点'}, 41 | {target:'addChild',text: '添加子节点'}, 42 | {target:'addBrother',text: '添加同级节点'}, 43 | {target:'openURL',text: '打开超链接'}, 44 | ], 45 | } 46 | }; 47 | var _jm = new jsMind(options); 48 | 49 | var get_mind_id = function(){ 50 | return getQueryVariable('mindid'); 51 | //return location.href.match(/([a-zA-Z0-9]{32})(#.*)?$/)[1]; 52 | }; 53 | 54 | var get_mind_url = function(){ 55 | var mindid=getQueryVariable('mindid'); 56 | var ver=getQueryVariable('ver'); 57 | return "./api/getmind.php?mindid="+mindid+"&ver="+ver; 58 | }; 59 | var delete_mind_url = function(){ 60 | var mindid=getQueryVariable('mindid'); 61 | var ver=getQueryVariable('ver'); 62 | return "./api/deletemind.php?mindid="+mindid+"&ver="+ver; 63 | }; 64 | var save_mind_url = function(){ 65 | var mindid=getQueryVariable('mindid'); 66 | var ver=getQueryVariable('ver'); 67 | return "./api/savemind.php?mindid="+mindid+"&ver="+ver; 68 | }; 69 | var load_ajax_mind = function(url){ 70 | jsMind.util.ajax.get(url,function(mind){ 71 | _jm.show(mind); 72 | }); 73 | }; 74 | 75 | var on_mind_saved = function(data){ 76 | if(data.success){ 77 | $('#save_map_btn').popover({ 78 | delay: {'hide': 2000}, 79 | content: '保存成功', 80 | placement: 'bottom', 81 | trigger: 'focus', 82 | container: 'body' 83 | }).popover('show'); 84 | 85 | var url="mind.php?mindid="+getQueryVariable('mindid'); 86 | window.open(url,"_self"); 87 | 88 | } 89 | else{ 90 | $('#save_map_btn').popover({ 91 | delay: {'hide': 500}, 92 | content: "失败--:"+data.message, 93 | placement: 'bottom', 94 | trigger: 'focus', 95 | container: 'body' 96 | }).popover('show'); 97 | } 98 | }; 99 | 100 | var on_mind_name_changed = function(data){ 101 | if(data.success){ 102 | var mind_name = $('#mind_name_input').val(); 103 | $('#mind_name_link').text(mind_name); 104 | } 105 | else{ 106 | alert("重命名失败:" + data.messege); 107 | 108 | } 109 | toggle_edit_mind_name(); 110 | }; 111 | 112 | var on_mind_deleted = function(data){ 113 | if(data.success){ 114 | // back_to_list(); 115 | var url="mind.php?mindid="+getQueryVariable('mindid'); 116 | // window.open(url,"_self"); 117 | location.href=url; 118 | } 119 | }; 120 | 121 | var toggle_edit_mind_name = function(e){ 122 | $('#mind_name_link, #mind_name_edit_panel').toggleClass('hidden'); 123 | return false; 124 | }; 125 | 126 | 127 | var change_mind_name = function(e){ 128 | var mind_id = get_mind_id(); 129 | var origin_mind_name = $('#mind_name_link').text(); 130 | var mind_name = $('#mind_name_input').val(); 131 | if(origin_mind_name == mind_name){ 132 | toggle_edit_mind_name(); 133 | return false; 134 | } 135 | $.ajax({ 136 | url : '/api/rename.php', 137 | type : 'POST', 138 | data: {"mindid":mind_id,"mindname":mind_name}, 139 | success : on_mind_name_changed 140 | }); 141 | return false; 142 | }; 143 | 144 | var save_map = function(e){ 145 | $.ajax({ 146 | url : save_mind_url(), 147 | type : 'POST', 148 | data: JSON.stringify(_jm.get_data()), 149 | contentType: "application/json; charset=utf-8", 150 | dataType : "json", 151 | success : on_mind_saved 152 | }); 153 | return false; 154 | }; 155 | 156 | var add_sibling_node = function(e){ 157 | _jm.shortcut.handles['addbrother'](_jm, e); 158 | return false; 159 | }; 160 | var edit_node = function(e){ 161 | _jm.shortcut.handles['editnode'](_jm, e); 162 | return false; 163 | }; 164 | var add_child_node = function(e){ 165 | _jm.shortcut.handles['addchild'](_jm, e); 166 | return false; 167 | }; 168 | 169 | // var remove_node = function(e){ 170 | // _jm.shortcut.handles['delnode'](_jm, e); 171 | // return false; 172 | // }; 173 | function remove_node(){ 174 | var selected_id = get_selected_nodeid(); 175 | if(!selected_id){prompt_info('please select a node first.');return;} 176 | 177 | _jm.remove_node(selected_id); 178 | } 179 | function get_selected_nodeid(){ 180 | var selected_node = _jm.get_selected_node(); 181 | if(!!selected_node){ 182 | return selected_node.id; 183 | }else{ 184 | return null; 185 | } 186 | } 187 | 188 | function change_color_text_hong(){ 189 | var selected_id = get_selected_nodeid(); 190 | if(!selected_id){return;} 191 | 192 | _jm.set_node_color(selected_id, null, "#F00"); 193 | } 194 | function change_color_text_lv(){ 195 | var selected_id = get_selected_nodeid(); 196 | if(!selected_id){return;} 197 | 198 | _jm.set_node_color(selected_id, null, "#0F0"); 199 | } 200 | function change_color_text_lan(){ 201 | var selected_id = get_selected_nodeid(); 202 | if(!selected_id){return;} 203 | 204 | _jm.set_node_color(selected_id, null, "#00F"); 205 | } 206 | function change_color_text_hei(){ 207 | var selected_id = get_selected_nodeid(); 208 | if(!selected_id){return;} 209 | 210 | _jm.set_node_color(selected_id, null, "#000"); 211 | } 212 | function change_color_text_bai(){ 213 | var selected_id = get_selected_nodeid(); 214 | if(!selected_id){return;} 215 | 216 | _jm.set_node_color(selected_id, null, "#FFF"); 217 | } 218 | 219 | 220 | function change_color_bg_hong(){ 221 | var selected_id = get_selected_nodeid(); 222 | if(!selected_id){return;} 223 | 224 | _jm.set_node_color(selected_id, "#F00", null); 225 | } 226 | function change_color_bg_lv(){ 227 | var selected_id = get_selected_nodeid(); 228 | if(!selected_id){return;} 229 | 230 | _jm.set_node_color(selected_id, "#0F0", null); 231 | } 232 | function change_color_bg_lan(){ 233 | var selected_id = get_selected_nodeid(); 234 | if(!selected_id){return;} 235 | 236 | _jm.set_node_color(selected_id, "#00F", null); 237 | } 238 | function change_color_bg_hei(){ 239 | var selected_id = get_selected_nodeid(); 240 | if(!selected_id){return;} 241 | 242 | _jm.set_node_color(selected_id, "#000", null); 243 | } 244 | function change_color_bg_bai(){ 245 | var selected_id = get_selected_nodeid(); 246 | if(!selected_id){return;} 247 | 248 | _jm.set_node_color(selected_id, "#FFF", null); 249 | } 250 | function change_color_null(){ 251 | var selected_id = get_selected_nodeid(); 252 | if(!selected_id){return;} 253 | 254 | _jm.set_node_color(selected_id, null, null); 255 | } 256 | var clear_map = function(e){ 257 | curr_mind = _jm.mind; 258 | _jm.show(); 259 | _jm.mind.author = curr_mind.author; 260 | _jm.begin_edit(_jm.mind.root); 261 | return false; 262 | }; 263 | 264 | var destory_map = function(e){ 265 | if(confirm("确实要删除吗?")){ 266 | $.ajax({ 267 | url : delete_mind_url(), 268 | type : 'POST', 269 | contentType: "application/json; charset=utf-8", 270 | dataType : "json", 271 | success : on_mind_deleted 272 | }); 273 | return false; 274 | } 275 | 276 | }; 277 | 278 | var back_to_list = function(e){ 279 | location.href='/list.php'; 280 | return false; 281 | }; 282 | 283 | var set_container_size = function(){ 284 | var ch = $w.innerHeight-_h_header; 285 | var cw = $w.innerWidth; 286 | $container.style.height = ch+'px'; 287 | $container.style.width = cw+'px'; 288 | }; 289 | 290 | var _resize_timeout_id = -1; 291 | var reset_container_size = function(){ 292 | if(_resize_timeout_id != -1){ 293 | clearTimeout(_resize_timeout_id); 294 | } 295 | _resize_timeout_id = setTimeout(function(){ 296 | _resize_timeout_id = -1; 297 | set_container_size(); 298 | _jm.resize(); 299 | },300); 300 | }; 301 | 302 | var register_event = function(){ 303 | jsMind.util.dom.add_event($w,'resize',reset_container_size); 304 | }; 305 | 306 | var init_action_menu = function(){ 307 | $('#mind_name_link').click(toggle_edit_mind_name); 308 | $('#change_mind_name_btn').click(change_mind_name); 309 | $('#save_map_btn').click(save_map); 310 | $('#add_sibling_node_btn').click(add_sibling_node); 311 | $('#edit_node_btn').click(edit_node); 312 | $('#add_child_node_btn').click(add_child_node); 313 | $('#remove_node_btn').click(remove_node); 314 | $('#clear_map_btn').click(clear_map); 315 | $('#destory_map_btn').click(destory_map); 316 | $('#back_to_list_btn').click(back_to_list); 317 | 318 | $('#change_color_text_hong_btn').click(change_color_text_hong); 319 | $('#change_color_text_lv_btn').click(change_color_text_lv); 320 | $('#change_color_text_lan_btn').click(change_color_text_lan); 321 | $('#change_color_text_bai_btn').click(change_color_text_bai); 322 | $('#change_color_text_hei_btn').click(change_color_text_hei); 323 | 324 | $('#change_color_bg_hong_btn').click(change_color_bg_hong); 325 | $('#change_color_bg_lv_btn').click(change_color_bg_lv); 326 | $('#change_color_bg_lan_btn').click(change_color_bg_lan); 327 | $('#change_color_bg_bai_btn').click(change_color_bg_bai); 328 | $('#change_color_bg_hei_btn').click(change_color_bg_hei); 329 | $('#change_color_null_btn').click(change_color_null); 330 | 331 | 332 | $('#add_sibling_node_btn0').click(add_sibling_node); 333 | $('#edit_node_btn0').click(edit_node); 334 | $('#add_child_node_btn0').click(add_child_node); 335 | $('#remove_node_btn0').click(remove_node); 336 | $('#change_color_text_hong_btn0').click(change_color_text_hong); 337 | $('#change_color_bg_hong_btn0').click(change_color_bg_hong); 338 | $('#change_color_null_btn0').click(change_color_null); 339 | }; 340 | 341 | var page_load = function(){ 342 | register_event(); 343 | set_container_size(); 344 | load_ajax_mind(get_mind_url()); 345 | init_action_menu(); 346 | }; 347 | 348 | page_load(); 349 | })(jQuery,window); 350 | -------------------------------------------------------------------------------- /naotu/static/scripts/mind001.js: -------------------------------------------------------------------------------- 1 | (function($,$w){ 2 | function getQueryVariable(variable) 3 | { 4 | var query = window.location.search.substring(1); 5 | var vars = query.split("&"); 6 | for (var i=0;i 27 | addbrother : 13, // 28 | editnode : 113, // 29 | delnode : 46, // 30 | toggle : 32, // 31 | left : 37, // 32 | up : 38, // 33 | right : 39, // 34 | down : 40, // 35 | } 36 | }, 37 | menuOpts:{ 38 | showMenu: true, 39 | injectionList: [ 40 | {target:'edit',text: '编辑节点'}, 41 | {target:'addChild',text: '添加子节点'}, 42 | {target:'addBrother',text: '添加同级节点'}, 43 | {target:'openURL',text: '打开超链接'}, 44 | ], 45 | } 46 | }; 47 | var _jm = new jsMind(options); 48 | 49 | var get_mind_id = function(){ 50 | return getQueryVariable('mindid'); 51 | //return location.href.match(/([a-zA-Z0-9]{32})(#.*)?$/)[1]; 52 | }; 53 | 54 | var get_mind_url = function(){ 55 | var mindid=getQueryVariable('mindid'); 56 | var ver=getQueryVariable('ver'); 57 | return "./api/getmind.php?mindid="+mindid+"&ver="+ver; 58 | }; 59 | var delete_mind_url = function(){ 60 | var mindid=getQueryVariable('mindid'); 61 | var ver=getQueryVariable('ver'); 62 | return "./api/deletemind.php?mindid="+mindid+"&ver="+ver; 63 | }; 64 | var save_mind_url = function(){ 65 | var mindid=getQueryVariable('mindid'); 66 | var ver=getQueryVariable('ver'); 67 | return "./api/savemind.php?mindid="+mindid+"&ver="+ver; 68 | }; 69 | var load_ajax_mind = function(url){ 70 | jsMind.util.ajax.get(url,function(mind){ 71 | _jm.show(mind); 72 | }); 73 | }; 74 | 75 | var on_mind_saved = function(data){ 76 | if(data.success){ 77 | $('#save_map_btn').popover({ 78 | delay: {'hide': 2000}, 79 | content: '保存成功', 80 | placement: 'bottom', 81 | trigger: 'focus', 82 | container: 'body' 83 | }).popover('show'); 84 | 85 | var url="mind.php?mindid="+getQueryVariable('mindid'); 86 | window.open(url,"_self"); 87 | 88 | } 89 | else{ 90 | $('#save_map_btn').popover({ 91 | delay: {'hide': 500}, 92 | content: "失败--:"+data.message, 93 | placement: 'bottom', 94 | trigger: 'focus', 95 | container: 'body' 96 | }).popover('show'); 97 | } 98 | }; 99 | 100 | var on_mind_name_changed = function(data){ 101 | if(data.success){ 102 | var mind_name = $('#mind_name_input').val(); 103 | $('#mind_name_link').text(mind_name); 104 | } 105 | else{ 106 | alert("重命名失败:" + data.messege); 107 | 108 | } 109 | toggle_edit_mind_name(); 110 | }; 111 | 112 | var on_mind_deleted = function(data){ 113 | if(data.success){ 114 | // back_to_list(); 115 | var url="mind.php?mindid="+getQueryVariable('mindid'); 116 | // window.open(url,"_self"); 117 | location.href=url; 118 | } 119 | }; 120 | 121 | var toggle_edit_mind_name = function(e){ 122 | $('#mind_name_link, #mind_name_edit_panel').toggleClass('hidden'); 123 | return false; 124 | }; 125 | 126 | 127 | var change_mind_name = function(e){ 128 | var mind_id = get_mind_id(); 129 | var origin_mind_name = $('#mind_name_link').text(); 130 | var mind_name = $('#mind_name_input').val(); 131 | if(origin_mind_name == mind_name){ 132 | toggle_edit_mind_name(); 133 | return false; 134 | } 135 | $.ajax({ 136 | url : '/api/rename.php', 137 | type : 'POST', 138 | data: {"mindid":mind_id,"mindname":mind_name}, 139 | success : on_mind_name_changed 140 | }); 141 | return false; 142 | }; 143 | 144 | var save_map = function(e){ 145 | $.ajax({ 146 | url : save_mind_url(), 147 | type : 'POST', 148 | data: JSON.stringify(_jm.get_data()), 149 | contentType: "application/json; charset=utf-8", 150 | dataType : "json", 151 | success : on_mind_saved 152 | }); 153 | return false; 154 | }; 155 | 156 | var add_sibling_node = function(e){ 157 | _jm.shortcut.handles['addbrother'](_jm, e); 158 | return false; 159 | }; 160 | var edit_node = function(e){ 161 | _jm.shortcut.handles['editnode'](_jm, e); 162 | return false; 163 | }; 164 | var add_child_node = function(e){ 165 | _jm.shortcut.handles['addchild'](_jm, e); 166 | return false; 167 | }; 168 | function save_file(){ 169 | var mind_data = _jm.get_data(); 170 | var mind_name = mind_data.meta.name; 171 | var mind_str = jsMind.util.json.json2string(mind_data); 172 | jsMind.util.file.save(mind_str,'text/jsmind',mind_name+'.jm'); 173 | } 174 | // var remove_node = function(e){ 175 | // _jm.shortcut.handles['delnode'](_jm, e); 176 | // return false; 177 | // }; 178 | function remove_node(){ 179 | var selected_id = get_selected_nodeid(); 180 | if(!selected_id){prompt_info('please select a node first.');return;} 181 | 182 | _jm.remove_node(selected_id); 183 | } 184 | function get_selected_nodeid(){ 185 | var selected_node = _jm.get_selected_node(); 186 | if(!!selected_node){ 187 | return selected_node.id; 188 | }else{ 189 | return null; 190 | } 191 | } 192 | 193 | function change_color_text_hong(){ 194 | var selected_id = get_selected_nodeid(); 195 | if(!selected_id){return;} 196 | 197 | _jm.set_node_color(selected_id, null, "#F00"); 198 | } 199 | function change_color_text_lv(){ 200 | var selected_id = get_selected_nodeid(); 201 | if(!selected_id){return;} 202 | 203 | _jm.set_node_color(selected_id, null, "#0F0"); 204 | } 205 | function change_color_text_lan(){ 206 | var selected_id = get_selected_nodeid(); 207 | if(!selected_id){return;} 208 | 209 | _jm.set_node_color(selected_id, null, "#00F"); 210 | } 211 | function change_color_text_hei(){ 212 | var selected_id = get_selected_nodeid(); 213 | if(!selected_id){return;} 214 | 215 | _jm.set_node_color(selected_id, null, "#000"); 216 | } 217 | function change_color_text_bai(){ 218 | var selected_id = get_selected_nodeid(); 219 | if(!selected_id){return;} 220 | 221 | _jm.set_node_color(selected_id, null, "#FFF"); 222 | } 223 | 224 | 225 | function change_color_bg_hong(){ 226 | var selected_id = get_selected_nodeid(); 227 | if(!selected_id){return;} 228 | 229 | _jm.set_node_color(selected_id, "#F00", null); 230 | } 231 | function change_color_bg_lv(){ 232 | var selected_id = get_selected_nodeid(); 233 | if(!selected_id){return;} 234 | 235 | _jm.set_node_color(selected_id, "#0F0", null); 236 | } 237 | function change_color_bg_lan(){ 238 | var selected_id = get_selected_nodeid(); 239 | if(!selected_id){return;} 240 | 241 | _jm.set_node_color(selected_id, "#00F", null); 242 | } 243 | function change_color_bg_hei(){ 244 | var selected_id = get_selected_nodeid(); 245 | if(!selected_id){return;} 246 | 247 | _jm.set_node_color(selected_id, "#000", null); 248 | } 249 | function change_color_bg_bai(){ 250 | var selected_id = get_selected_nodeid(); 251 | if(!selected_id){return;} 252 | 253 | _jm.set_node_color(selected_id, "#FFF", null); 254 | } 255 | function change_color_null(){ 256 | var selected_id = get_selected_nodeid(); 257 | if(!selected_id){return;} 258 | 259 | _jm.set_node_color(selected_id, null, null); 260 | } 261 | var clear_map = function(e){ 262 | curr_mind = _jm.mind; 263 | _jm.show(); 264 | _jm.mind.author = curr_mind.author; 265 | _jm.begin_edit(_jm.mind.root); 266 | return false; 267 | }; 268 | 269 | var destory_map = function(e){ 270 | if(confirm("确实要删除吗?")){ 271 | $.ajax({ 272 | url : delete_mind_url(), 273 | type : 'POST', 274 | contentType: "application/json; charset=utf-8", 275 | dataType : "json", 276 | success : on_mind_deleted 277 | }); 278 | return false; 279 | } 280 | 281 | }; 282 | 283 | var back_to_list = function(e){ 284 | location.href='/list.php'; 285 | return false; 286 | }; 287 | 288 | var set_container_size = function(){ 289 | var ch = $w.innerHeight-_h_header; 290 | var cw = $w.innerWidth; 291 | $container.style.height = ch+'px'; 292 | $container.style.width = cw+'px'; 293 | }; 294 | 295 | var _resize_timeout_id = -1; 296 | var reset_container_size = function(){ 297 | if(_resize_timeout_id != -1){ 298 | clearTimeout(_resize_timeout_id); 299 | } 300 | _resize_timeout_id = setTimeout(function(){ 301 | _resize_timeout_id = -1; 302 | set_container_size(); 303 | _jm.resize(); 304 | },300); 305 | }; 306 | 307 | var register_event = function(){ 308 | jsMind.util.dom.add_event($w,'resize',reset_container_size); 309 | }; 310 | 311 | var init_action_menu = function(){ 312 | $('#mind_name_link').click(toggle_edit_mind_name); 313 | $('#change_mind_name_btn').click(change_mind_name); 314 | $('#save_map_btn').click(save_map); 315 | $('#add_sibling_node_btn').click(add_sibling_node); 316 | $('#edit_node_btn').click(edit_node); 317 | $('#add_child_node_btn').click(add_child_node); 318 | $('#remove_node_btn').click(remove_node); 319 | $('#clear_map_btn').click(clear_map); 320 | $('#destory_map_btn').click(destory_map); 321 | $('#back_to_list_btn').click(back_to_list); 322 | 323 | $('#change_color_text_hong_btn').click(change_color_text_hong); 324 | $('#change_color_text_lv_btn').click(change_color_text_lv); 325 | $('#change_color_text_lan_btn').click(change_color_text_lan); 326 | $('#change_color_text_bai_btn').click(change_color_text_bai); 327 | $('#change_color_text_hei_btn').click(change_color_text_hei); 328 | 329 | $('#change_color_bg_hong_btn').click(change_color_bg_hong); 330 | $('#change_color_bg_lv_btn').click(change_color_bg_lv); 331 | $('#change_color_bg_lan_btn').click(change_color_bg_lan); 332 | $('#change_color_bg_bai_btn').click(change_color_bg_bai); 333 | $('#change_color_bg_hei_btn').click(change_color_bg_hei); 334 | $('#change_color_null_btn').click(change_color_null); 335 | 336 | 337 | $('#save_file_btn').click(save_file); 338 | $('#add_sibling_node_btn0').click(add_sibling_node); 339 | $('#edit_node_btn0').click(edit_node); 340 | $('#add_child_node_btn0').click(add_child_node); 341 | $('#remove_node_btn0').click(remove_node); 342 | $('#change_color_text_hong_btn0').click(change_color_text_hong); 343 | $('#change_color_bg_hong_btn0').click(change_color_bg_hong); 344 | $('#change_color_null_btn0').click(change_color_null); 345 | }; 346 | 347 | var page_load = function(){ 348 | register_event(); 349 | set_container_size(); 350 | load_ajax_mind(get_mind_url()); 351 | init_action_menu(); 352 | }; 353 | 354 | page_load(); 355 | })(jQuery,window); 356 | -------------------------------------------------------------------------------- /naotu/static/styles/index.css: -------------------------------------------------------------------------------- 1 | body{ 2 | font-family: 'Helvetica Neue', Helvetica, Arial, 'Hiragino Sans GB', 'Hiragino Sans GB W3', 'WenQuanYi Micro Hei', 'Microsoft YaHei UI', 'Microsoft YaHei', sans-serif; 3 | } 4 | .cover{ 5 | margin: 80px auto; 6 | width:80%; 7 | text-align: center; 8 | } 9 | 10 | .cover h1{ 11 | font-family: inherit; 12 | font-size: 64px; 13 | font-weight: normal; 14 | line-height: 2; 15 | text-align: center; 16 | } 17 | 18 | .cover p{ 19 | margin-bottom: 20px; 20 | } 21 | 22 | .cover .intro{ 23 | font-family: inherit; 24 | font-size: 32px; 25 | font-weight: normal; 26 | line-height: 1.2; 27 | } 28 | 29 | .jsmind-trial{ 30 | background-color:#eee; 31 | } 32 | 33 | .jsmind-container{ 34 | margin:0 auto; 35 | height:700px; 36 | } 37 | 38 | .jsmind-container jmexpander{ 39 | width:13px; 40 | height:13px; 41 | } 42 | 43 | .footer{ 44 | padding-top:40px; 45 | height: 200px; 46 | } 47 | 48 | .signup{ 49 | font-family: inherit; 50 | padding-top: 60px; 51 | margin: auto; 52 | width: 50%; 53 | } 54 | 55 | .signup h1{ 56 | font-family: inherit; 57 | margin-bottom: 30px; 58 | } 59 | 60 | .signup .form-group{ 61 | font-size: 20px; 62 | } 63 | .signup label{ 64 | font-weight: normal; 65 | } 66 | .signup input{ 67 | font-size: 16px; 68 | height: 40px; 69 | } 70 | .signup p{ 71 | font-size: 16px; 72 | } 73 | -------------------------------------------------------------------------------- /naotu/static/styles/libs/jsmind/jsmind.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Released under BSD License 3 | * Copyright (c) 2014-2015 hizzgdev@163.com 4 | * 5 | * Project Home: 6 | * https://github.com/hizzgdev/jsmind/ 7 | */ 8 | 9 | /* important section */ 10 | .jsmind-inner{position:relative;overflow:auto;width:100%;height:100%;}/*box-shadow:0 0 2px #000;*/ 11 | .jsmind-inner{ 12 | moz-user-select:-moz-none; 13 | -moz-user-select:none; 14 | -o-user-select:none; 15 | -khtml-user-select:none; 16 | -webkit-user-select:none; 17 | -ms-user-select:none; 18 | user-select:none; 19 | } 20 | 21 | /* z-index:1 */ 22 | canvas{position:absolute;z-index:1;} 23 | 24 | /* z-index:2 */ 25 | jmnodes{position:absolute;z-index:2;background-color:rgba(0,0,0,0);}/*background color is necessary*/ 26 | jmnode{position:absolute;cursor:default;max-width:400px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;} 27 | jmexpander{position:absolute;width:11px;height:11px;display:block;overflow:hidden;line-height:12px;font-size:12px;text-align:center;border-radius:6px;border-width:1px;border-style:solid;cursor:pointer;} 28 | 29 | /* default theme */ 30 | jmnode{padding:10px;background-color:#fff;color:#333;border-radius:5px;box-shadow:1px 1px 1px #666;font:16px/1.125 Verdana,Arial,Helvetica,sans-serif;} 31 | jmnode:hover{box-shadow:2px 2px 8px #000;background-color:#ebebeb;color:#333;} 32 | jmnode.selected{background-color:#11f;color:#fff;box-shadow:2px 2px 8px #000;} 33 | jmnode.root{font-size:24px;} 34 | jmexpander{border-color:gray;} 35 | jmexpander:hover{border-color:#000;} 36 | 37 | @media screen and (max-device-width: 1024px) { 38 | jmnode{padding:5px;border-radius:3px;font-size:14px;} 39 | jmnode.root{font-size:21px;} 40 | } 41 | /* primary theme */ 42 | jmnodes.theme-primary jmnode{background-color:#428bca;color:#fff;border-color:#357ebd;} 43 | jmnodes.theme-primary jmnode:hover{background-color:#3276b1;border-color:#285e8e;} 44 | jmnodes.theme-primary jmnode.selected{background-color:#f1c40f;color:#fff;} 45 | jmnodes.theme-primary jmnode.root{} 46 | jmnodes.theme-primary jmexpander{} 47 | jmnodes.theme-primary jmexpander:hover{} 48 | 49 | /* warning theme */ 50 | jmnodes.theme-warning jmnode{background-color:#f0ad4e;border-color:#eea236;color:#fff;} 51 | jmnodes.theme-warning jmnode:hover{background-color:#ed9c28;border-color:#d58512;} 52 | jmnodes.theme-warning jmnode.selected{background-color:#11f;color:#fff;} 53 | jmnodes.theme-warning jmnode.root{} 54 | jmnodes.theme-warning jmexpander{} 55 | jmnodes.theme-warning jmexpander:hover{} 56 | 57 | /* danger theme */ 58 | jmnodes.theme-danger jmnode{background-color:#d9534f;border-color:#d43f3a;color:#fff;} 59 | jmnodes.theme-danger jmnode:hover{background-color:#d2322d;border-color:#ac2925;} 60 | jmnodes.theme-danger jmnode.selected{background-color:#11f;color:#fff;} 61 | jmnodes.theme-danger jmnode.root{} 62 | jmnodes.theme-danger jmexpander{} 63 | jmnodes.theme-danger jmexpander:hover{} 64 | 65 | /* success theme */ 66 | jmnodes.theme-success jmnode{background-color:#5cb85c;border-color:#4cae4c;color:#fff;} 67 | jmnodes.theme-success jmnode:hover{background-color:#47a447;border-color:#398439;} 68 | jmnodes.theme-success jmnode.selected{background-color:#11f;color:#fff;} 69 | jmnodes.theme-success jmnode.root{} 70 | jmnodes.theme-success jmexpander{} 71 | jmnodes.theme-success jmexpander:hover{} 72 | 73 | /* info theme */ 74 | jmnodes.theme-info jmnode{background-color:#5dc0de;border-color:#46b8da;;color:#fff;} 75 | jmnodes.theme-info jmnode:hover{background-color:#39b3d7;border-color:#269abc;} 76 | jmnodes.theme-info jmnode.selected{background-color:#11f;color:#fff;} 77 | jmnodes.theme-info jmnode.root{} 78 | jmnodes.theme-info jmexpander{} 79 | jmnodes.theme-info jmexpander:hover{} 80 | 81 | /* greensea theme */ 82 | jmnodes.theme-greensea jmnode{background-color:#1abc9c;color:#fff;} 83 | jmnodes.theme-greensea jmnode:hover{background-color:#16a085;} 84 | jmnodes.theme-greensea jmnode.selected{background-color:#11f;color:#fff;} 85 | jmnodes.theme-greensea jmnode.root{} 86 | jmnodes.theme-greensea jmexpander{} 87 | jmnodes.theme-greensea jmexpander:hover{} 88 | 89 | /* nephrite theme */ 90 | jmnodes.theme-nephrite jmnode{background-color:#2ecc71;color:#fff;} 91 | jmnodes.theme-nephrite jmnode:hover{background-color:#27ae60;} 92 | jmnodes.theme-nephrite jmnode.selected{background-color:#11f;color:#fff;} 93 | jmnodes.theme-nephrite jmnode.root{} 94 | jmnodes.theme-nephrite jmexpander{} 95 | jmnodes.theme-nephrite jmexpander:hover{} 96 | 97 | /* belizehole theme */ 98 | jmnodes.theme-belizehole jmnode{background-color:#3498db;color:#fff;} 99 | jmnodes.theme-belizehole jmnode:hover{background-color:#2980b9;} 100 | jmnodes.theme-belizehole jmnode.selected{background-color:#11f;color:#fff;} 101 | jmnodes.theme-belizehole jmnode.root{} 102 | jmnodes.theme-belizehole jmexpander{} 103 | jmnodes.theme-belizehole jmexpander:hover{} 104 | 105 | /* wisteria theme */ 106 | jmnodes.theme-wisteria jmnode{background-color:#9b59b6;color:#fff;} 107 | jmnodes.theme-wisteria jmnode:hover{background-color:#8e44ad;} 108 | jmnodes.theme-wisteria jmnode.selected{background-color:#11f;color:#fff;} 109 | jmnodes.theme-wisteria jmnode.root{} 110 | jmnodes.theme-wisteria jmexpander{} 111 | jmnodes.theme-wisteria jmexpander:hover{} 112 | 113 | /* asphalt theme */ 114 | jmnodes.theme-asphalt jmnode{background-color:#34495e;color:#fff;} 115 | jmnodes.theme-asphalt jmnode:hover{background-color:#2c3e50;} 116 | jmnodes.theme-asphalt jmnode.selected{background-color:#11f;color:#fff;} 117 | jmnodes.theme-asphalt jmnode.root{} 118 | jmnodes.theme-asphalt jmexpander{} 119 | jmnodes.theme-asphalt jmexpander:hover{} 120 | 121 | /* orange theme */ 122 | jmnodes.theme-orange jmnode{background-color:#f1c40f;color:#fff;} 123 | jmnodes.theme-orange jmnode:hover{background-color:#f39c12;} 124 | jmnodes.theme-orange jmnode.selected{background-color:#11f;color:#fff;} 125 | jmnodes.theme-orange jmnode.root{} 126 | jmnodes.theme-orange jmexpander{} 127 | jmnodes.theme-orange jmexpander:hover{} 128 | 129 | /* pumpkin theme */ 130 | jmnodes.theme-pumpkin jmnode{background-color:#e67e22;color:#fff;} 131 | jmnodes.theme-pumpkin jmnode:hover{background-color:#d35400;} 132 | jmnodes.theme-pumpkin jmnode.selected{background-color:#11f;color:#fff;} 133 | jmnodes.theme-pumpkin jmnode.root{} 134 | jmnodes.theme-pumpkin jmexpander{} 135 | jmnodes.theme-pumpkin jmexpander:hover{} 136 | 137 | /* pomegranate theme */ 138 | jmnodes.theme-pomegranate jmnode{background-color:#e74c3c;color:#fff;} 139 | jmnodes.theme-pomegranate jmnode:hover{background-color:#c0392b;} 140 | jmnodes.theme-pomegranate jmnode.selected{background-color:#11f;color:#fff;} 141 | jmnodes.theme-pomegranate jmnode.root{} 142 | jmnodes.theme-pomegranate jmexpander{} 143 | jmnodes.theme-pomegranate jmexpander:hover{} 144 | 145 | /* clouds theme */ 146 | jmnodes.theme-clouds jmnode{background-color:#ecf0f1;color:#333;} 147 | jmnodes.theme-clouds jmnode:hover{background-color:#bdc3c7;} 148 | jmnodes.theme-clouds jmnode.selected{background-color:#11f;color:#fff;} 149 | jmnodes.theme-clouds jmnode.root{} 150 | jmnodes.theme-clouds jmexpander{} 151 | jmnodes.theme-clouds jmexpander:hover{} 152 | 153 | /* asbestos theme */ 154 | jmnodes.theme-asbestos jmnode{background-color:#95a5a6;color:#fff;} 155 | jmnodes.theme-asbestos jmnode:hover{background-color:#7f8c8d;} 156 | jmnodes.theme-asbestos jmnode.selected{background-color:#11f;color:#fff;} 157 | jmnodes.theme-asbestos jmnode.root{} 158 | jmnodes.theme-asbestos jmexpander{} 159 | jmnodes.theme-asbestos jmexpander:hover{} 160 | -------------------------------------------------------------------------------- /naotu/static/styles/mind.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: 'Helvetica Neue', Helvetica, Arial, 'Hiragino Sans GB', 'Hiragino Sans GB W3', 'WenQuanYi Micro Hei', 'Microsoft YaHei UI', 'Microsoft YaHei', sans-serif; 3 | padding-top: 50px; 4 | } 5 | 6 | .website-header{ 7 | font-family: 'Helvetica Neue', Helvetica, Arial, 'Hiragino Sans GB', 'Hiragino Sans GB W3', 'WenQuanYi Micro Hei', 'Microsoft YaHei UI', 'Microsoft YaHei', sans-serif; 8 | font-weight: normal; 9 | font-size:24px; 10 | } 11 | 12 | .container-mind-list { 13 | margin-top: 20px; 14 | } 15 | 16 | .menu-item-shortcut { 17 | float:right; 18 | } 19 | 20 | @media (min-width: 768px) { 21 | .container-mind-list { 22 | max-width: 730px; 23 | } 24 | } 25 | 26 | jmexpander{ 27 | width:13px; 28 | height:13px; 29 | } 30 | 31 | .copyright{ 32 | position:absolute; 33 | bottom:2px; 34 | right:20px; 35 | z-index:10; 36 | } 37 | -------------------------------------------------------------------------------- /opensearch.xml: -------------------------------------------------------------------------------- 1 | 3 | 搜Google Drive 4 | 搜Google Drive 5 | UTF-8 6 | https://cdn.jsdelivr.net/gh/gdtool/zhaopp/favicon1.ico 7 | 8 | https://zhao.pp.ua/ 9 | 10 | -------------------------------------------------------------------------------- /tree/bootstrapStyle/bootstrapStyle.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:14px; 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/bootstrap.png"); *background-image:url("./img/bootstrap.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 -43px; 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/bootstrap.png"); *background-image:url("./img/bootstrap.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 | -------------------------------------------------------------------------------- /tree/bootstrapStyle/img/bootstrap.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdtool/zhaopp/441fce56ebd81e6e0ed57055c48b8cbd078dc40c/tree/bootstrapStyle/img/bootstrap.gif -------------------------------------------------------------------------------- /tree/bootstrapStyle/img/bootstrap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdtool/zhaopp/441fce56ebd81e6e0ed57055c48b8cbd078dc40c/tree/bootstrapStyle/img/bootstrap.png -------------------------------------------------------------------------------- /tree/bootstrapStyle/img/line_conn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdtool/zhaopp/441fce56ebd81e6e0ed57055c48b8cbd078dc40c/tree/bootstrapStyle/img/line_conn.gif -------------------------------------------------------------------------------- /tree/bootstrapStyle/img/line_conn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdtool/zhaopp/441fce56ebd81e6e0ed57055c48b8cbd078dc40c/tree/bootstrapStyle/img/line_conn.png -------------------------------------------------------------------------------- /tree/bootstrapStyle/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdtool/zhaopp/441fce56ebd81e6e0ed57055c48b8cbd078dc40c/tree/bootstrapStyle/img/loading.gif -------------------------------------------------------------------------------- /tree/bootstrapStyle/img/zTreeStandard.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdtool/zhaopp/441fce56ebd81e6e0ed57055c48b8cbd078dc40c/tree/bootstrapStyle/img/zTreeStandard.gif -------------------------------------------------------------------------------- /tree/bootstrapStyle/img/zTreeStandard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdtool/zhaopp/441fce56ebd81e6e0ed57055c48b8cbd078dc40c/tree/bootstrapStyle/img/zTreeStandard.png -------------------------------------------------------------------------------- /tree/bootstrapStyle/zTreeStyle.css: -------------------------------------------------------------------------------- 1 | .ztree * { 2 | padding: 0; 3 | margin: 0; 4 | font-size: 12px; 5 | font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif 6 | } 7 | 8 | .ztree { 9 | margin: 0; 10 | padding: 5px; 11 | color: #333 12 | } 13 | 14 | .ztree li { 15 | padding: 0; 16 | margin: 0; 17 | list-style: none; 18 | line-height: 14px; 19 | text-align: left; 20 | white-space: nowrap; 21 | outline: 0 22 | } 23 | 24 | .ztree li ul { 25 | margin: 0; 26 | padding: 0 0 0 18px 27 | } 28 | 29 | .ztree li ul.line { 30 | background: url(./img/line_conn.gif) 0 0 repeat-y; 31 | } 32 | 33 | .ztree li a { 34 | padding: 1px 3px 0 0; 35 | margin: 0; 36 | cursor: pointer; 37 | height: 17px; 38 | color: #333; 39 | background-color: transparent; 40 | text-decoration: none; 41 | vertical-align: top; 42 | display: inline-block 43 | } 44 | 45 | .ztree li a:hover { 46 | text-decoration: underline 47 | } 48 | 49 | .ztree li a.curSelectedNode { 50 | padding-top: 0px; 51 | background-color: #FFE6B0; 52 | color: black; 53 | height: 16px; 54 | border: 1px #FFB951 solid; 55 | opacity: 0.8; 56 | } 57 | 58 | .ztree li a.curSelectedNode_Edit { 59 | padding-top: 0px; 60 | background-color: #FFE6B0; 61 | color: black; 62 | height: 16px; 63 | border: 1px #FFB951 solid; 64 | opacity: 0.8; 65 | } 66 | 67 | .ztree li a.tmpTargetNode_inner { 68 | padding-top: 0px; 69 | background-color: #316AC5; 70 | color: white; 71 | height: 16px; 72 | border: 1px #316AC5 solid; 73 | opacity: 0.8; 74 | filter: alpha(opacity=80) 75 | } 76 | 77 | .ztree li a.tmpTargetNode_prev {} 78 | 79 | .ztree li a.tmpTargetNode_next {} 80 | 81 | .ztree li a input.rename { 82 | height: 14px; 83 | width: 80px; 84 | padding: 0; 85 | margin: 0; 86 | font-size: 12px; 87 | border: 1px #7EC4CC solid; 88 | *border: 0px 89 | } 90 | 91 | .ztree li span { 92 | line-height: 16px; 93 | margin-right: 2px 94 | } 95 | 96 | .ztree li span.button { 97 | line-height: 0; 98 | margin: 0; 99 | width: 16px; 100 | height: 16px; 101 | display: inline-block; 102 | vertical-align: middle; 103 | border: 0 none; 104 | cursor: pointer; 105 | outline: none; 106 | background-color: transparent; 107 | background-repeat: no-repeat; 108 | background-attachment: scroll; 109 | background-image: url("./img/zTreeStandard.png"); 110 | *background-image: url("./img/zTreeStandard.gif") 111 | } 112 | 113 | .ztree li span.button.chk { 114 | width: 13px; 115 | height: 13px; 116 | margin: 0 3px 0 0; 117 | cursor: auto 118 | } 119 | 120 | .ztree li span.button.chk.checkbox_false_full { 121 | background-position: 0 0 122 | } 123 | 124 | .ztree li span.button.chk.checkbox_false_full_focus { 125 | background-position: 0 -14px 126 | } 127 | 128 | .ztree li span.button.chk.checkbox_false_part { 129 | background-position: 0 -28px 130 | } 131 | 132 | .ztree li span.button.chk.checkbox_false_part_focus { 133 | background-position: 0 -42px 134 | } 135 | 136 | .ztree li span.button.chk.checkbox_false_disable { 137 | background-position: 0 -56px 138 | } 139 | 140 | .ztree li span.button.chk.checkbox_true_full { 141 | background-position: -14px 0 142 | } 143 | 144 | .ztree li span.button.chk.checkbox_true_full_focus { 145 | background-position: -14px -14px 146 | } 147 | 148 | .ztree li span.button.chk.checkbox_true_part { 149 | background-position: -14px -28px 150 | } 151 | 152 | .ztree li span.button.chk.checkbox_true_part_focus { 153 | background-position: -14px -42px 154 | } 155 | 156 | .ztree li span.button.chk.checkbox_true_disable { 157 | background-position: -14px -56px 158 | } 159 | 160 | .ztree li span.button.chk.radio_false_full { 161 | background-position: -28px 0 162 | } 163 | 164 | .ztree li span.button.chk.radio_false_full_focus { 165 | background-position: -28px -14px 166 | } 167 | 168 | .ztree li span.button.chk.radio_false_part { 169 | background-position: -28px -28px 170 | } 171 | 172 | .ztree li span.button.chk.radio_false_part_focus { 173 | background-position: -28px -42px 174 | } 175 | 176 | .ztree li span.button.chk.radio_false_disable { 177 | background-position: -28px -56px 178 | } 179 | 180 | .ztree li span.button.chk.radio_true_full { 181 | background-position: -42px 0 182 | } 183 | 184 | .ztree li span.button.chk.radio_true_full_focus { 185 | background-position: -42px -14px 186 | } 187 | 188 | .ztree li span.button.chk.radio_true_part { 189 | background-position: -42px -28px 190 | } 191 | 192 | .ztree li span.button.chk.radio_true_part_focus { 193 | background-position: -42px -42px 194 | } 195 | 196 | .ztree li span.button.chk.radio_true_disable { 197 | background-position: -42px -56px 198 | } 199 | 200 | .ztree li span.button.switch { 201 | width: 18px; 202 | height: 18px 203 | } 204 | 205 | .ztree li span.button.root_open { 206 | background-position: -92px -54px 207 | } 208 | 209 | .ztree li span.button.root_close { 210 | background-position: -74px -54px 211 | } 212 | 213 | .ztree li span.button.roots_open { 214 | background-position: -92px 0 215 | } 216 | 217 | .ztree li span.button.roots_close { 218 | background-position: -74px 0 219 | } 220 | 221 | .ztree li span.button.center_open { 222 | background-position: -92px -18px 223 | } 224 | 225 | .ztree li span.button.center_close { 226 | background-position: -74px -18px 227 | } 228 | 229 | .ztree li span.button.bottom_open { 230 | background-position: -92px -36px 231 | } 232 | 233 | .ztree li span.button.bottom_close { 234 | background-position: -74px -36px 235 | } 236 | 237 | .ztree li span.button.noline_open { 238 | background-position: -92px -72px 239 | } 240 | 241 | .ztree li span.button.noline_close { 242 | background-position: -74px -72px 243 | } 244 | 245 | .ztree li span.button.root_docu { 246 | background: none; 247 | } 248 | 249 | .ztree li span.button.roots_docu { 250 | background-position: -56px 0 251 | } 252 | 253 | .ztree li span.button.center_docu { 254 | background-position: -56px -18px 255 | } 256 | 257 | .ztree li span.button.bottom_docu { 258 | background-position: -56px -36px 259 | } 260 | 261 | .ztree li span.button.noline_docu { 262 | background: none; 263 | } 264 | 265 | .ztree li span.button.ico_open { 266 | margin-right: 2px; 267 | background-position: -110px -16px; 268 | vertical-align: top; 269 | *vertical-align: middle 270 | } 271 | 272 | .ztree li span.button.ico_close { 273 | margin-right: 2px; 274 | background-position: -110px 0; 275 | vertical-align: top; 276 | *vertical-align: middle 277 | } 278 | 279 | .ztree li span.button.ico_docu { 280 | margin-right: 2px; 281 | background-position: -110px -32px; 282 | vertical-align: top; 283 | *vertical-align: middle 284 | } 285 | 286 | .ztree li span.button.edit { 287 | margin-right: 2px; 288 | background-position: -110px -48px; 289 | vertical-align: top; 290 | *vertical-align: middle 291 | } 292 | 293 | .ztree li span.button.remove { 294 | margin-right: 2px; 295 | background-position: -110px -64px; 296 | vertical-align: top; 297 | *vertical-align: middle 298 | } 299 | 300 | .ztree li span.button.ico_loading { 301 | margin-right: 2px; 302 | background: url(./img/loading.gif) no-repeat scroll 0 0 transparent; 303 | vertical-align: top; 304 | *vertical-align: middle 305 | } 306 | 307 | ul.tmpTargetzTree { 308 | background-color: #FFE6B0; 309 | opacity: 0.8; 310 | filter: alpha(opacity=80) 311 | } 312 | 313 | span.tmpzTreeMove_arrow { 314 | width: 16px; 315 | height: 16px; 316 | display: inline-block; 317 | padding: 0; 318 | margin: 2px 0 0 1px; 319 | border: 0 none; 320 | position: absolute; 321 | background-color: transparent; 322 | background-repeat: no-repeat; 323 | background-attachment: scroll; 324 | background-position: -110px -80px; 325 | background-image: url("./img/zTreeStandard.png"); 326 | *background-image: url("./img/zTreeStandard.gif") 327 | } 328 | 329 | ul.ztree.zTreeDragUL { 330 | margin: 0; 331 | padding: 0; 332 | position: absolute; 333 | width: auto; 334 | height: auto; 335 | overflow: hidden; 336 | background-color: #cfcfcf; 337 | border: 1px #00B83F dotted; 338 | opacity: 0.8; 339 | filter: alpha(opacity=80) 340 | } 341 | 342 | .zTreeMask { 343 | z-index: 10000; 344 | background-color: #cfcfcf; 345 | opacity: 0.0; 346 | filter: alpha(opacity=0); 347 | position: absolute 348 | } 349 | 350 | 351 | /* level style*/ 352 | 353 | 354 | /*.ztree li span.button.level0 { 355 | display:none; 356 | } 357 | .ztree li ul.level0 { 358 | padding:0; 359 | background:none; 360 | }*/ -------------------------------------------------------------------------------- /tree/demo.css: -------------------------------------------------------------------------------- 1 | html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { 2 | margin: 0;padding: 0;border: 0;outline: 0;font-weight: inherit;font-style: inherit;font-size: 100%;font-family: inherit;vertical-align: baseline;} 3 | body {color: #2f332a;font: 15px/21px Arial, Helvetica, simsun, sans-serif;background: #f0f6e4 \9;} 4 | h1, h2, h3, h4, h5, h6 {color: #2f332a;font-weight: bold;font-family: Helvetica, Arial, sans-serif;padding-bottom: 5px;} 5 | h1 {font-size: 24px;line-height: 34px;text-align: center;} 6 | h2 {font-size: 14px;line-height: 24px;padding-top: 5px;} 7 | h6 {font-weight: normal;font-size: 12px;letter-spacing: 1px;line-height: 24px;text-align: center;} 8 | a {color:#3C6E31;text-decoration: underline;} 9 | a:hover {background-color:#3C6E31;color:white;} 10 | input.radio {margin: 0 2px 0 8px;} 11 | input.radio.first {margin-left:0;} 12 | input.empty {color: lightgray;} 13 | code {color: #2f332a;} 14 | .highlight_red {color:#A60000;} 15 | .highlight_green {color:#A7F43D;} 16 | li {list-style: circle;font-size: 12px;} 17 | li.title {list-style: none;} 18 | ul.list {margin-left: 17px;} 19 | 20 | div.content_wrap {width: 600px;height:380px;} 21 | div.content_wrap div.left{float: left;width: 250px;} 22 | div.content_wrap div.right{float: right;width: 340px;} 23 | div.zTreeDemoBackground {width:250px;height:362px;text-align:left;} 24 | 25 | ul.ztree {margin-top: 10px;border: 1px solid #617775;background: #f0f6e4;width:220px;height:360px;overflow-y:scroll;overflow-x:auto;} 26 | ul.log {border: 1px solid #617775;background: #f0f6e4;width:300px;height:170px;overflow: hidden;} 27 | ul.log.small {height:45px;} 28 | ul.log li {color: #666666;list-style: none;padding-left: 10px;} 29 | ul.log li.dark {background-color: #E3E3E3;} 30 | 31 | /* ruler */ 32 | div.ruler {height:20px; width:220px; background-color:#f0f6e4;border: 1px solid #333; margin-bottom: 5px; cursor: pointer} 33 | div.ruler div.cursor {height:20px; width:30px; background-color:#3C6E31; color:white; text-align: right; padding-right: 5px; cursor: pointer} 34 | #menuTree{background: #af0000;} -------------------------------------------------------------------------------- /tree/fuzzysearch.js: -------------------------------------------------------------------------------- 1 | /* 2 | * email: bigablecat@hotmail.com 3 | * Date: 2018-04-14 4 | */ 5 | 6 | /** 7 | * @param zTreeId the ztree id used to get the ztree object 8 | * @param searchField selector of your input for fuzzy search 9 | * @param isHighLight whether highlight the match words, default true 10 | * @param isExpand whether to expand the node, default false 11 | * 12 | * @returns 13 | */ 14 | function fuzzySearch(zTreeId, searchField, isHighLight, isExpand){ 15 | var zTreeObj = $.fn.zTree.getZTreeObj(zTreeId);//get the ztree object by ztree id 16 | if(!zTreeObj){ 17 | alert("fail to get ztree object"); 18 | } 19 | var nameKey = zTreeObj.setting.data.key.name; //get the key of the node name 20 | isHighLight = isHighLight===false?false:true;//default true, only use false to disable highlight 21 | isExpand = isExpand?true:false; // not to expand in default 22 | zTreeObj.setting.view.nameIsHTML = isHighLight; //allow use html in node name for highlight use 23 | 24 | var metaChar = '[\\[\\]\\\\\^\\$\\.\\|\\?\\*\\+\\(\\)]'; //js meta characters 25 | var rexMeta = new RegExp(metaChar, 'gi');//regular expression to match meta characters 26 | 27 | // keywords filter function 28 | function ztreeFilter(zTreeObj,_keywords,callBackFunc) { 29 | if(!_keywords){ 30 | _keywords =''; //default blank for _keywords 31 | } 32 | 33 | // function to find the matching node 34 | function filterFunc(node) { 35 | if(node && node.oldname && node.oldname.length>0){ 36 | node[nameKey] = node.oldname; //recover oldname of the node if exist 37 | } 38 | zTreeObj.updateNode(node); //update node to for modifications take effect 39 | if (_keywords.length == 0) { 40 | //return true to show all nodes if the keyword is blank 41 | zTreeObj.showNode(node); 42 | zTreeObj.expandNode(node,isExpand); 43 | return true; 44 | } 45 | //transform node name and keywords to lowercase 46 | if (node[nameKey] && node[nameKey].toLowerCase().indexOf(_keywords.toLowerCase())!=-1) { 47 | if(isHighLight){ //highlight process 48 | //a new variable 'newKeywords' created to store the keywords information 49 | //keep the parameter '_keywords' as initial and it will be used in next node 50 | //process the meta characters in _keywords thus the RegExp can be correctly used in str.replace 51 | var newKeywords = _keywords.replace(rexMeta,function(matchStr){ 52 | //add escape character before meta characters 53 | return '\\' + matchStr; 54 | }); 55 | node.oldname = node[nameKey]; //store the old name 56 | var rexGlobal = new RegExp(newKeywords, 'gi');//'g' for global,'i' for ignore case 57 | //use replace(RegExp,replacement) since replace(/substr/g,replacement) cannot be used here 58 | node[nameKey] = node.oldname.replace(rexGlobal, function(originalText){ 59 | //highlight the matching words in node name 60 | var highLightText = 61 | '' 62 | + originalText 63 | +''; 64 | return highLightText; 65 | }); 66 | zTreeObj.updateNode(node); //update node for modifications take effect 67 | } 68 | zTreeObj.showNode(node);//show node with matching keywords 69 | return true; //return true and show this node 70 | } 71 | 72 | zTreeObj.hideNode(node); // hide node that not matched 73 | return false; //return false for node not matched 74 | } 75 | 76 | var nodesShow = zTreeObj.getNodesByFilter(filterFunc); //get all nodes that would be shown 77 | processShowNodes(nodesShow, _keywords);//nodes should be reprocessed to show correctly 78 | } 79 | 80 | /** 81 | * reprocess of nodes before showing 82 | */ 83 | function processShowNodes(nodesShow,_keywords){ 84 | if(nodesShow && nodesShow.length>0){ 85 | //process the ancient nodes if _keywords is not blank 86 | if(_keywords.length>0){ 87 | $.each(nodesShow, function(n,obj){ 88 | var pathOfOne = obj.getPath();//get all the ancient nodes including current node 89 | if(pathOfOne && pathOfOne.length>0){ 90 | //i < pathOfOne.length-1 process every node in path except self 91 | for(var i=0;i=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 | -------------------------------------------------------------------------------- /tree/jquery.ztree.exhide.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($){ 14 | //default init node of exLib 15 | var _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { 16 | if (typeof n.isHidden == "string") n.isHidden = tools.eqs(n.isHidden, "true"); 17 | n.isHidden = !!n.isHidden; 18 | data.initHideForExCheck(setting, n); 19 | }, 20 | //add dom for check 21 | _beforeA = function(setting, node, html) {}, 22 | //update zTreeObj, add method of exLib 23 | _zTreeTools = function(setting, zTreeTools) { 24 | zTreeTools.showNodes = function(nodes, options) { 25 | view.showNodes(setting, nodes, options); 26 | } 27 | zTreeTools.showNode = function(node, options) { 28 | if (!node) { 29 | return; 30 | } 31 | view.showNodes(setting, [node], options); 32 | } 33 | zTreeTools.hideNodes = function(nodes, options) { 34 | view.hideNodes(setting, nodes, options); 35 | } 36 | zTreeTools.hideNode = function(node, options) { 37 | if (!node) { 38 | return; 39 | } 40 | view.hideNodes(setting, [node], options); 41 | } 42 | 43 | var _checkNode = zTreeTools.checkNode; 44 | if (_checkNode) { 45 | zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) { 46 | if (!!node && !!node.isHidden) { 47 | return; 48 | } 49 | _checkNode.apply(zTreeTools, arguments); 50 | } 51 | } 52 | }, 53 | //method of operate data 54 | _data = { 55 | initHideForExCheck: function(setting, n) { 56 | if (n.isHidden && setting.check && setting.check.enable) { 57 | if(typeof n._nocheck == "undefined") { 58 | n._nocheck = !!n.nocheck 59 | n.nocheck = true; 60 | } 61 | n.check_Child_State = -1; 62 | if (view.repairParentChkClassWithSelf) { 63 | view.repairParentChkClassWithSelf(setting, n); 64 | } 65 | } 66 | }, 67 | initShowForExCheck: function(setting, n) { 68 | if (!n.isHidden && setting.check && setting.check.enable) { 69 | if(typeof n._nocheck != "undefined") { 70 | n.nocheck = n._nocheck; 71 | delete n._nocheck; 72 | } 73 | if (view.setChkClass) { 74 | var checkObj = $$(n, consts.id.CHECK, setting); 75 | view.setChkClass(setting, checkObj, n); 76 | } 77 | if (view.repairParentChkClassWithSelf) { 78 | view.repairParentChkClassWithSelf(setting, n); 79 | } 80 | } 81 | } 82 | }, 83 | //method of operate ztree dom 84 | _view = { 85 | clearOldFirstNode: function(setting, node) { 86 | var n = node.getNextNode(); 87 | while(!!n){ 88 | if (n.isFirstNode) { 89 | n.isFirstNode = false; 90 | view.setNodeLineIcos(setting, n); 91 | break; 92 | } 93 | if (n.isLastNode) { 94 | break; 95 | } 96 | n = n.getNextNode(); 97 | } 98 | }, 99 | clearOldLastNode: function(setting, node, openFlag) { 100 | var n = node.getPreNode(); 101 | while(!!n){ 102 | if (n.isLastNode) { 103 | n.isLastNode = false; 104 | if (openFlag) { 105 | view.setNodeLineIcos(setting, n); 106 | } 107 | break; 108 | } 109 | if (n.isFirstNode) { 110 | break; 111 | } 112 | n = n.getPreNode(); 113 | } 114 | }, 115 | makeDOMNodeMainBefore: function(html, setting, node) { 116 | html.push("
  • "); 117 | }, 118 | showNode: function(setting, node, options) { 119 | node.isHidden = false; 120 | data.initShowForExCheck(setting, node); 121 | $$(node, setting).show(); 122 | }, 123 | showNodes: function(setting, nodes, options) { 124 | if (!nodes || nodes.length == 0) { 125 | return; 126 | } 127 | var pList = {}, i, j; 128 | for (i=0, j=nodes.length; i 0 && !parentNode[childKey][0].isHidden) { 172 | parentNode[childKey][0].isFirstNode = true; 173 | } else if (childLength > 0) { 174 | view.setFirstNodeForHide(setting, parentNode[childKey]); 175 | } 176 | }, 177 | setLastNode: function(setting, parentNode) { 178 | var childKey = setting.data.key.children, childLength = parentNode[childKey].length; 179 | if (childLength > 0 && !parentNode[childKey][0].isHidden) { 180 | parentNode[childKey][childLength - 1].isLastNode = true; 181 | } else if (childLength > 0) { 182 | view.setLastNodeForHide(setting, parentNode[childKey]); 183 | } 184 | }, 185 | setFirstNodeForHide: function(setting, nodes) { 186 | var n,i,j; 187 | for (i=0, j=nodes.length; i=0; i--) { 227 | n = nodes[i]; 228 | if (n.isLastNode) { 229 | break; 230 | } 231 | if (!n.isHidden && !n.isLastNode) { 232 | n.isLastNode = true; 233 | view.setNodeLineIcos(setting, n); 234 | break; 235 | } else { 236 | n = null; 237 | } 238 | } 239 | return n; 240 | }, 241 | setLastNodeForShow: function(setting, nodes) { 242 | var n,i,j, last, old; 243 | for (i=nodes.length-1; i>=0; i--) { 244 | n = nodes[i]; 245 | if (!last && !n.isHidden && n.isLastNode) { 246 | last = n; 247 | break; 248 | } else if (!last && !n.isHidden && !n.isLastNode) { 249 | n.isLastNode = true; 250 | last = n; 251 | view.setNodeLineIcos(setting, n); 252 | } else if (last && n.isLastNode) { 253 | n.isLastNode = false; 254 | old = n; 255 | view.setNodeLineIcos(setting, n); 256 | break; 257 | } else { 258 | n = null; 259 | } 260 | } 261 | return {"new":last, "old":old}; 262 | } 263 | }, 264 | 265 | _z = { 266 | view: _view, 267 | data: _data 268 | }; 269 | $.extend(true, $.fn.zTree._z, _z); 270 | 271 | var zt = $.fn.zTree, 272 | tools = zt._z.tools, 273 | consts = zt.consts, 274 | view = zt._z.view, 275 | data = zt._z.data, 276 | event = zt._z.event, 277 | $$ = tools.$; 278 | 279 | data.addInitNode(_initNode); 280 | data.addBeforeA(_beforeA); 281 | data.addZTreeTools(_zTreeTools); 282 | 283 | // Override method in core 284 | var _dInitNode = data.initNode; 285 | data.initNode = function(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag) { 286 | var tmpPNode = (parentNode) ? parentNode: data.getRoot(setting), 287 | children = tmpPNode[setting.data.key.children]; 288 | data.tmpHideFirstNode = view.setFirstNodeForHide(setting, children); 289 | data.tmpHideLastNode = view.setLastNodeForHide(setting, children); 290 | if (openFlag) { 291 | view.setNodeLineIcos(setting, data.tmpHideFirstNode); 292 | view.setNodeLineIcos(setting, data.tmpHideLastNode); 293 | } 294 | isFirstNode = (data.tmpHideFirstNode === node); 295 | isLastNode = (data.tmpHideLastNode === node); 296 | if (_dInitNode) _dInitNode.apply(data, arguments); 297 | if (openFlag && isLastNode) { 298 | view.clearOldLastNode(setting, node, openFlag); 299 | } 300 | }; 301 | 302 | var _makeChkFlag = data.makeChkFlag; 303 | if (!!_makeChkFlag) { 304 | data.makeChkFlag = function(setting, node) { 305 | if (!!node && !!node.isHidden) { 306 | return; 307 | } 308 | _makeChkFlag.apply(data, arguments); 309 | } 310 | } 311 | 312 | var _getTreeCheckedNodes = data.getTreeCheckedNodes; 313 | if (!!_getTreeCheckedNodes) { 314 | data.getTreeCheckedNodes = function(setting, nodes, checked, results) { 315 | if (!!nodes && nodes.length > 0) { 316 | var p = nodes[0].getParentNode(); 317 | if (!!p && !!p.isHidden) { 318 | return []; 319 | } 320 | } 321 | return _getTreeCheckedNodes.apply(data, arguments); 322 | } 323 | } 324 | 325 | var _getTreeChangeCheckedNodes = data.getTreeChangeCheckedNodes; 326 | if (!!_getTreeChangeCheckedNodes) { 327 | data.getTreeChangeCheckedNodes = function(setting, nodes, results) { 328 | if (!!nodes && nodes.length > 0) { 329 | var p = nodes[0].getParentNode(); 330 | if (!!p && !!p.isHidden) { 331 | return []; 332 | } 333 | } 334 | return _getTreeChangeCheckedNodes.apply(data, arguments); 335 | } 336 | } 337 | 338 | var _expandCollapseSonNode = view.expandCollapseSonNode; 339 | if (!!_expandCollapseSonNode) { 340 | view.expandCollapseSonNode = function(setting, node, expandFlag, animateFlag, callback) { 341 | if (!!node && !!node.isHidden) { 342 | return; 343 | } 344 | _expandCollapseSonNode.apply(view, arguments); 345 | } 346 | } 347 | 348 | var _setSonNodeCheckBox = view.setSonNodeCheckBox; 349 | if (!!_setSonNodeCheckBox) { 350 | view.setSonNodeCheckBox = function(setting, node, value, srcNode) { 351 | if (!!node && !!node.isHidden) { 352 | return; 353 | } 354 | _setSonNodeCheckBox.apply(view, arguments); 355 | } 356 | } 357 | 358 | var _repairParentChkClassWithSelf = view.repairParentChkClassWithSelf; 359 | if (!!_repairParentChkClassWithSelf) { 360 | view.repairParentChkClassWithSelf = function(setting, node) { 361 | if (!!node && !!node.isHidden) { 362 | return; 363 | } 364 | _repairParentChkClassWithSelf.apply(view, arguments); 365 | } 366 | } 367 | })(jQuery); -------------------------------------------------------------------------------- /tree/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 | -------------------------------------------------------------------------------- /tree/zTreeStyle.css: -------------------------------------------------------------------------------- 1 | /*------------------------------------- 2 | zTree Style 3 | 4 | version: 3.2 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; 80 | vertical-align:top; *vertical-align:middle} 81 | 82 | ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)} 83 | 84 | span.tmpzTreeMove_arrow {width:16px; height:16px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute; 85 | background-color:white; background-repeat:no-repeat; background-attachment: scroll; 86 | background-position:-110px -80px; background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")} 87 | 88 | ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; 89 | background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)} 90 | 91 | .zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute} 92 | 93 | /* level style*/ 94 | /*.ztree li span.button.level0 { 95 | display:none; 96 | } 97 | .ztree li ul.level0 { 98 | padding:0; 99 | background:none; 100 | }*/ -------------------------------------------------------------------------------- /vendors.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Waves v0.7.5 3 | * http://fian.my.id/Waves 4 | * 5 | * Copyright 2014-2016 Alfiana E. Sibuea and other contributors 6 | * Released under the MIT license 7 | * https://github.com/fians/Waves/blob/master/LICENSE 8 | */.md-waves-effect { 9 | position:relative; 10 | cursor:pointer; 11 | display:inline-block; 12 | overflow:hidden; 13 | -webkit-user-select:none; 14 | -moz-user-select:none; 15 | -ms-user-select:none; 16 | user-select:none; 17 | -webkit-tap-highlight-color:transparent 18 | } 19 | .md-waves-effect .md-waves-ripple { 20 | position:absolute; 21 | border-radius:50%; 22 | width:100px; 23 | height:100px; 24 | margin-top:-50px; 25 | margin-left:-50px; 26 | opacity:0; 27 | background:rgba(0,0,0,.2); 28 | background:radial-gradient(rgba(0,0,0,.2) 0,rgba(0,0,0,.3) 40%,rgba(0,0,0,.4) 50%,rgba(0,0,0,.5) 60%,hsla(0,0%,100%,0) 70%); 29 | transition:all .5s ease-out; 30 | transition-property:transform,opacity; 31 | transform:scale(0) translate(0); 32 | pointer-events:none 33 | } 34 | .md-waves-effect.md-waves-light .md-waves-ripple { 35 | background:hsla(0,0%,100%,.4); 36 | background:radial-gradient(hsla(0,0%,100%,.2) 0,hsla(0,0%,100%,.3) 40%,hsla(0,0%,100%,.4) 50%,hsla(0,0%,100%,.5) 60%,hsla(0,0%,100%,0) 70%) 37 | } 38 | .md-waves-effect.md-waves-classic .md-waves-ripple { 39 | background:rgba(0,0,0,.2) 40 | } 41 | .md-waves-effect.md-waves-classic.md-waves-light .md-waves-ripple { 42 | background:hsla(0,0%,100%,.4) 43 | } 44 | .md-waves-notransition { 45 | transition:none!important 46 | } 47 | .md-waves-button,.md-waves-circle { 48 | transform:translateZ(0); 49 | -webkit-mask-image:-webkit-radial-gradient(circle,#fff 100%,#000 0) 50 | } 51 | .md-waves-button,.md-waves-button-input,.md-waves-button:hover,.md-waves-button:visited { 52 | white-space:nowrap; 53 | vertical-align:middle; 54 | cursor:pointer; 55 | border:none; 56 | outline:none; 57 | color:inherit; 58 | background-color:transparent; 59 | font-size:1em; 60 | line-height:1em; 61 | text-align:center; 62 | text-decoration:none; 63 | z-index:1 64 | } 65 | .md-waves-button { 66 | padding:.85em 1.1em; 67 | border-radius:.2em 68 | } 69 | .md-waves-button-input { 70 | margin:0; 71 | padding:.85em 1.1em 72 | } 73 | .md-waves-input-wrapper { 74 | border-radius:.2em; 75 | vertical-align:bottom 76 | } 77 | .md-waves-input-wrapper.md-waves-button { 78 | padding:0 79 | } 80 | .md-waves-input-wrapper .md-waves-button-input { 81 | position:relative; 82 | top:0; 83 | left:0; 84 | z-index:1 85 | } 86 | .md-waves-circle { 87 | text-align:center; 88 | width:2.5em; 89 | height:2.5em; 90 | line-height:2.5em; 91 | border-radius:50% 92 | } 93 | .md-waves-float { 94 | -webkit-mask-image:none; 95 | box-shadow:0 1px 1.5px 1px rgba(0,0,0,.12); 96 | transition:all .3s 97 | } 98 | .md-waves-float:active { 99 | box-shadow:0 8px 20px 1px rgba(0,0,0,.3) 100 | } 101 | .md-waves-block { 102 | display:block 103 | } 104 | -------------------------------------------------------------------------------- /资源收录.md: -------------------------------------------------------------------------------- 1 | ### 更名通知(2020-10-12) 2 | ZHaoPP 更名为 【各种VIP】 域名更改为 https://gezhong.vip/ 3 | 4 | #### 收录进度 5 | 6 | 目前收录团队盘超70个 资源上千万,5P = 5000T = 5000000G 资源 7 | 8 | 在此感谢那些无私奉献的网友们 9 | --------------------------------------------------------------------------------