not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
702 B

  1. // Entry component with image and sound
  2. enyo.kind({
  3. name: "TamTam.Collection",
  4. kind: enyo.Control,
  5. published: { name: "", selection: false },
  6. classes: "collection",
  7. components: [
  8. { name: "collectionImage", classes: "collectionImage", kind: "Image" }
  9. ],
  10. // Constructor
  11. create: function() {
  12. this.inherited(arguments);
  13. this.nameChanged();
  14. this.selectionChanged();
  15. },
  16. // Collection setup
  17. nameChanged: function() {
  18. if (this.selection)
  19. this.$.collectionImage.setAttribute("src", "images/database/"+this.name+"sel.png");
  20. else
  21. this.$.collectionImage.setAttribute("src", "images/database/"+this.name+".png");
  22. },
  23. selectionChanged: function() {
  24. this.nameChanged();
  25. }
  26. });