source: branches/comu/html/test/kakinaka/yui/js/CheckOnClickNode.js @ 2

Revision 2, 750 bytes checked in by root, 17 years ago (diff)

new import

Line 
1/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
2
3YAHOO.example.CheckOnClickNode = function(oData, oParent, expanded, checked) {
4    if (oParent) {
5        this.init(oData, oParent, expanded);
6        this.setUpLabel(oData);
7        this.checked = checked;
8    }
9};
10
11YAHOO.example.CheckOnClickNode.prototype = new YAHOO.widget.TaskNode();
12
13YAHOO.example.CheckOnClickNode.prototype.getCheckLink = function() {
14    return "var n=YAHOO.widget.TreeView.getNode(\'" + this.tree.id + "\'," +
15        this.index + "); " +
16        "var r = n.checkClick(); " +
17        "YAHOO.example.customCheckClickFunction(n);" +
18        "return r;";
19};
20
21YAHOO.example.customCheckClickFunction = function(node) {
22    alert(node.checked + "(" + node.checkState + ")");
23};
Note: See TracBrowser for help on using the repository browser.