webgui/www/extras/yui/examples/treeview/js/CheckOnClickNode.js
JT Smith 4f68a0933c added YUI and YUI-ext
fixed the resizable text area with IE problem
fixed the ad space with IE problem
merged the 7.2.0 and 7.1.4 change logs
2006-11-07 23:15:57 +00:00

23 lines
750 B
JavaScript

/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
YAHOO.example.CheckOnClickNode = function(oData, oParent, expanded, checked) {
if (oParent) {
this.init(oData, oParent, expanded);
this.setUpLabel(oData);
this.checked = checked;
}
};
YAHOO.example.CheckOnClickNode.prototype = new YAHOO.widget.TaskNode();
YAHOO.example.CheckOnClickNode.prototype.getCheckLink = function() {
return "var n=YAHOO.widget.TreeView.getNode(\'" + this.tree.id + "\'," +
this.index + "); " +
"var r = n.checkClick(); " +
"YAHOO.example.customCheckClickFunction(n);" +
"return r;";
};
YAHOO.example.customCheckClickFunction = function(node) {
alert(node.checked + "(" + node.checkState + ")");
};