Skip to content

Commit

Permalink
Add 'onClick' handler only if it's not empty Thanks @afilippov1985
Browse files Browse the repository at this point in the history
  • Loading branch information
zTreeAPI committed Nov 21, 2020
1 parent ddbe178 commit be70dfa
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
jQuery Tree Plugin ---- zTree
============
last verson : 3.5.45
last verson : 3.5.46


**Donate to zTree** : http://www.treejs.cn/v3/donate.php
Expand Down
2 changes: 1 addition & 1 deletion api/API_cn.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<div class="ieSuggest">浏览本网站建议您使用 Chrome、FireFox、Opera、IE9 等浏览器(只要不是 IE6 7 8 就行), 速度会更快,画面会更炫!</div>
<div class="google_plus"><g:plusone></g:plusone></div>
<div class="header-text">
<h1><em>zTree v3.5.45 API 文档</em></h1><p></p>
<h1><em>zTree v3.5.46 API 文档</em></h1><p></p>
<p>all.js = core + excheck + exedit ( 不包括 exhide ); 发现错误请及时通知,谢谢。</p>
</div>
<ul class="shortcuts language" style="top:0;">
Expand Down
2 changes: 1 addition & 1 deletion api/API_en.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<div class="ieSuggest">If you use the Chrome / FireFox / Opera / IE9 browser will be even more dazzling effect!</div>
<div class="google_plus"><g:plusone></g:plusone></div>
<div class="header-text">
<h1><em>zTree v3.5.45 API Document</em></h1><p></p>
<h1><em>zTree v3.5.46 API Document</em></h1><p></p>
<p>all.js = core + excheck + exedit ( without exhide ); if you found some mistakes please contact me.</p>
</div>
<ul class="shortcuts language" style="top:0;">
Expand Down
2 changes: 1 addition & 1 deletion api/apiCss/jquery.ztree.core.js

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions js/jquery.ztree.all.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* JQuery zTree core
* v3.5.45
* v3.5.46
* http://treejs.cn/
*
* Copyright (c) 2010 Hunter.z
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* Date: 2020-11-03
* Date: 2020-11-21
*/

(function ($) {
Expand Down Expand Up @@ -1343,8 +1343,9 @@
}
html.push("<a id='", node.tId, consts.id.A, "' class='", consts.className.LEVEL, node.level,
nodeClasses.add ? ' ' + nodeClasses.add.join(' ') : '',
"' treeNode", consts.id.A, " onclick=\"", (node.click || ''),
"\" ", ((url != null && url.length > 0) ? "href='" + url + "'" : ""), " target='", view.makeNodeTarget(node), "' style='", fontStyle.join(''),
"' treeNode", consts.id.A,
node.click ? " onclick=\"" + node.click + "\"" : "",
((url != null && url.length > 0) ? " href='" + url + "'" : ""), " target='", view.makeNodeTarget(node), "' style='", fontStyle.join(''),
"'");
if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && title) {
html.push("title='", title.replace(/'/g, "&#39;").replace(/</g, '&lt;').replace(/>/g, '&gt;'), "'");
Expand Down Expand Up @@ -2018,15 +2019,15 @@
})(jQuery);
/*
* JQuery zTree excheck
* v3.5.45
* v3.5.46
* http://treejs.cn/
*
* Copyright (c) 2010 Hunter.z
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* Date: 2020-11-03
* Date: 2020-11-21
*/

(function ($) {
Expand Down Expand Up @@ -2670,15 +2671,15 @@
})(jQuery);
/*
* JQuery zTree exedit
* v3.5.45
* v3.5.46
* http://treejs.cn/
*
* Copyright (c) 2010 Hunter.z
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* Date: 2020-11-03
* Date: 2020-11-21
*/

(function ($) {
Expand Down
2 changes: 1 addition & 1 deletion js/jquery.ztree.all.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions js/jquery.ztree.core.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* JQuery zTree core
* v3.5.45
* v3.5.46
* http://treejs.cn/
*
* Copyright (c) 2010 Hunter.z
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* Date: 2020-11-03
* Date: 2020-11-21
*/

(function ($) {
Expand Down Expand Up @@ -2016,4 +2016,4 @@
var zt = $.fn.zTree,
$$ = tools.$,
consts = zt.consts;
})(jQuery);
})(jQuery);
2 changes: 1 addition & 1 deletion js/jquery.ztree.core.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/jquery.ztree.excheck.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* JQuery zTree excheck
* v3.5.45
* v3.5.46
* http://treejs.cn/
*
* Copyright (c) 2010 Hunter.z
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* Date: 2020-11-03
* Date: 2020-11-21
*/

(function ($) {
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.ztree.exedit.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* JQuery zTree exedit
* v3.5.45
* v3.5.46
* http://treejs.cn/
*
* Copyright (c) 2010 Hunter.z
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* Date: 2020-11-03
* Date: 2020-11-21
*/

(function ($) {
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.ztree.exhide.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* JQuery zTree exHideNodes
* v3.5.45
* v3.5.46
* http://treejs.cn/
*
* Copyright (c) 2010 Hunter.z
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* Date: 2020-11-03
* Date: 2020-11-21
*/

(function ($) {
Expand Down
3 changes: 3 additions & 0 deletions log v3.x.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

</font>

*2020.11.21* v3.5.46
* Add 'onClick' handler only if it's not empty Thanks @afilippov1985

*2020.11.03* v3.5.45
* Support attribute('name' & 'title') dynamic rendering using custom function Thanks @imyuyu

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ztree/ztree_v3",
"description": "zTree is a multi-functional 'tree plug-ins.' based on jQuery. The main advantages of zTree includes excellent performance, flexible configuration, and the combination of multiple functions.",
"version": "3.5.45",
"version": "3.5.46",
"homepage": "http://www.treejs.cn/v3/main.php",
"author": "zTree (https://github.com/zTree)",
"licenses": [
Expand Down

0 comments on commit be70dfa

Please sign in to comment.