Changeset 163:de4f4b188eef
- Timestamp:
- Jan 6, 2010, 6:38:19 PM (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/class/pf/Application.js
r162 r163 305 305 } 306 306 307 leaf.setTextColor( "red");307 leaf.setTextColor(this.leafFavColor); 308 308 309 309 // Add to the list of favorites … … 329 329 return; 330 330 } 331 leaf.setTextColor( "black");331 leaf.setTextColor(this.leafColor); 332 332 333 333 var entity = leaf.getUserData("entity"); … … 396 396 showIons : true, 397 397 showRadiators : true, 398 399 leafColor : "black", 400 leafFavColor : "red", 398 401 399 402 plasma : null, … … 536 539 537 540 return false; 541 }, 542 543 addEntityLeaf : function(entity, species) 544 { 545 var icon; 546 if (species) { 547 icon = "pf/image/" + species.id + "_small.png"; 548 } else { 549 icon = "pf/image/all_small.png"; 550 } 551 552 var leaf = new qx.ui.tree.TreeFile(entity.name); 553 leaf.setIcon(icon); 554 leaf.addListener("contextmenu", treeMenuCB, this); 555 leaf.setUserData("entity", entity); 556 557 if (species) { 558 leaf.setUserData("species", species); 559 } 560 561 if (this.isFavorite(leaf)) { 562 leaf.setTextColor(this.leafFavColor); 563 } else { 564 leaf.setTextColor(this.leafColor); 565 } 566 567 return leaf; 538 568 }, 539 569 … … 612 642 for (var j = 0; j < sa.length; j++) { 613 643 var s = sa[j]; 614 var icon = "pf/image/" + s.id + "_small.png"; 615 616 leaf = new qx.ui.tree.TreeFile(entity.name); 617 leaf.setIcon(icon); 618 leaf.addListener("contextmenu", treeMenuCB, this); 619 leaf.setUserData("entity", entity); 620 leaf.setUserData("species", s); 621 622 if (this.isFavorite(leaf)) { 623 leaf.setTextColor("red"); 624 } 625 644 leaf = this.addEntityLeaf(entity, s); 626 645 folder.add(leaf); 627 646 } 628 647 break; 629 648 default: 630 leaf = new qx.ui.tree.TreeFile(entity.name); 631 leaf.setIcon("pf/image/all_small.png"); 632 leaf.addListener("contextmenu", treeMenuCB, this); 633 leaf.setUserData("entity", entity); 634 635 if (this.isFavorite(leaf)) { 636 leaf.setTextColor("red"); 637 } 638 649 leaf = this.addEntityLeaf(entity, null); 639 650 folder.add(leaf); 640 651 break;
Note: See TracChangeset
for help on using the changeset viewer.