Skip to content

Commit

Permalink
Updated to use the new Tree Styling API
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Jekel committed Apr 6, 2012
1 parent 8781a39 commit a508574
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions demos/tree01.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ <h2>Click a checkbox</h2>
"cbtree"
], function( array, connect, dom, ItemFileWriteStore, cbtree ) {

function checkBoxClicked( storeItem, nodeWidget, evt ) {
function checkBoxClicked( item, nodeWidget, evt ) {
var newState = nodeWidget.get("checked" );
var label = this.getItemAttr(storeItem,"label");
var label = this.getItemAttr(item,"label");

if( newState ) {
nodeWidget.set("iconStyle", {border:"solid"} );
nodeWidget.set("labelStyle",{color:"red"});
tree.set("iconStyle", {border:"solid"}, item );
tree.set("labelStyle",{color:"red"}, item );
} else {
nodeWidget.set("iconStyle", {border:"none"} );
nodeWidget.set("labelStyle",{color:"black"});
tree.set("iconStyle", {border:"none"}, item );
tree.set("labelStyle",{color:"black"}, item );
}
alert( "The new state for " + label + " is: " + newState );
}
Expand Down
1 change: 1 addition & 0 deletions demos/tree04.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

<body class="claro">
<div id="CheckboxTree">
<h4>Third Party Widget &lt;TriStateCheckBox&gt; mixed in</h4>
<script type="text/javascript">

require([
Expand Down
Binary file modified themes/claro/images/spriteCheckbox.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified themes/claro/images/spriteCheckbox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a508574

Please sign in to comment.