forked from zTree/zTree_v3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed issue: chkStyle="radio" and radioType="all", updateNode will ch…
…ange the checked.
- Loading branch information
ztree
committed
Jan 5, 2014
1 parent
fbc2ae9
commit 1e8a144
Showing
14 changed files
with
145 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
|
||
/* | ||
* JQuery zTree core v3.5.16-beta.5 | ||
* JQuery zTree core v3.5.16-beta.7 | ||
* http://zTree.me/ | ||
* | ||
* Copyright (c) 2010 Hunter.z | ||
|
@@ -9,7 +9,7 @@ | |
* http://www.opensource.org/licenses/mit-license.php | ||
* | ||
* email: [email protected] | ||
* Date: 2013-12-29 | ||
* Date: 2014-01-05 | ||
*/ | ||
(function($){ | ||
var settings = {}, roots = {}, caches = {}, | ||
|
@@ -1678,7 +1678,7 @@ | |
consts = zt.consts; | ||
})(jQuery); | ||
/* | ||
* JQuery zTree excheck v3.5.16-beta.5 | ||
* JQuery zTree excheck v3.5.16-beta.7 | ||
* http://zTree.me/ | ||
* | ||
* Copyright (c) 2010 Hunter.z | ||
|
@@ -1687,7 +1687,7 @@ | |
* http://www.opensource.org/licenses/mit-license.php | ||
* | ||
* email: [email protected] | ||
* Date: 2013-12-29 | ||
* Date: 2014-01-05 | ||
*/ | ||
(function($){ | ||
//default consts of excheck | ||
|
@@ -2056,12 +2056,14 @@ | |
if (setting.check.radioType == r.TYPE_ALL) { | ||
for (i = checkedList.length-1; i >= 0; i--) { | ||
pNode = checkedList[i]; | ||
pNode[checkedKey] = false; | ||
checkedList.splice(i, 1); | ||
if (pNode[checkedKey] && pNode != node) { | ||
pNode[checkedKey] = false; | ||
checkedList.splice(i, 1); | ||
|
||
view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode); | ||
if (pNode.parentTId != node.parentTId) { | ||
view.repairParentChkClassWithSelf(setting, pNode); | ||
view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode); | ||
if (pNode.parentTId != node.parentTId) { | ||
view.repairParentChkClassWithSelf(setting, pNode); | ||
} | ||
} | ||
} | ||
checkedList.push(node); | ||
|
@@ -2305,7 +2307,7 @@ | |
} | ||
})(jQuery); | ||
/* | ||
* JQuery zTree exedit v3.5.16-beta.5 | ||
* JQuery zTree exedit v3.5.16-beta.7 | ||
* http://zTree.me/ | ||
* | ||
* Copyright (c) 2010 Hunter.z | ||
|
@@ -2314,7 +2316,7 @@ | |
* http://www.opensource.org/licenses/mit-license.php | ||
* | ||
* email: [email protected] | ||
* Date: 2013-12-29 | ||
* Date: 2014-01-05 | ||
*/ | ||
(function($){ | ||
//default consts of exedit | ||
|
@@ -2496,14 +2498,15 @@ | |
zTreeTools.copyNode = function(targetNode, node, moveType, isSilent) { | ||
if (!node) return null; | ||
if (targetNode && !targetNode.isParent && this.setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) return null; | ||
var newNode = tools.clone(node); | ||
var _this = this, | ||
newNode = tools.clone(node); | ||
if (!targetNode) { | ||
targetNode = null; | ||
moveType = consts.move.TYPE_INNER; | ||
} | ||
if (moveType == consts.move.TYPE_INNER) { | ||
function copyCallback() { | ||
view.addNodes(this.setting, targetNode, [newNode], isSilent); | ||
view.addNodes(_this.setting, targetNode, [newNode], isSilent); | ||
} | ||
|
||
if (tools.canAsync(this.setting, targetNode)) { | ||
|
@@ -2531,8 +2534,9 @@ | |
} else if (!targetNode) { | ||
targetNode = null; | ||
} | ||
var _this = this; | ||
function moveCallback() { | ||
view.moveNode(this.setting, targetNode, node, moveType, false, isSilent); | ||
view.moveNode(_this.setting, targetNode, node, moveType, false, isSilent); | ||
} | ||
if (tools.canAsync(this.setting, targetNode) && moveType === consts.move.TYPE_INNER) { | ||
view.asyncNode(this.setting, targetNode, isSilent, moveCallback); | ||
|
Oops, something went wrong.