Author: damoxc

Revision: 4935

Log:
        add support for displaying a checkbox in the tree

Diff:
Modified: trunk/deluge/ui/web/js/ext-all.js
===================================================================
--- trunk/deluge/ui/web/js/ext-all.js   2009-03-30 21:37:16 UTC (rev 4934)
+++ trunk/deluge/ui/web/js/ext-all.js   2009-03-30 21:38:39 UTC (rev 4935)
@@ -50,6 +50,8 @@
         var cols = t.columns;
         var bw = t.borderWidth;
         var c = cols[0];
+        
+        var cb = typeof a.checked == 'boolean';
 
         var buf = [
              '<li class="x-tree-node"><div ext:tree-node-id="',n.id,'" 
class="x-tree-node-el x-tree-node-leaf ', a.cls,'">',
@@ -57,6 +59,7 @@
                     '<span 
class="x-tree-node-indent">',this.indentMarkup,"</span>",
                     '<img src="', this.emptyIcon, '" class="x-tree-ec-icon 
x-tree-elbow">',
                     '<img src="', a.icon || this.emptyIcon, '" 
class="x-tree-node-icon',(a.icon ? " x-tree-node-inline-icon" : ""),(a.iconCls 
? " "+a.iconCls : ""),'" unselectable="on">',
+                    cb ? ('<input class="x-tree-node-cb" type="checkbox" ' + 
(a.checked ? 'checked="checked" />' : '/>')) : '',
                     '<a hidefocus="on" class="x-tree-node-anchor" 
href="',a.href ? a.href : "#",'" tabIndex="1" ',
                     a.hrefTarget ? ' target="'+a.hrefTarget+'"' : "", '>',
                     '<span unselectable="on">', n.text || (c.renderer ? 
c.renderer(a[c.dataIndex], n, a) : a[c.dataIndex]),"</span></a>",



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to