Advertisement
patrickc

HeaderView

Jul 7th, 2011
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. /* Copyright 2009-2011 Hewlett-Packard Development Company, L.P. All rights reserved. */
  2. enyo.kind({
  3. name: "HeaderView",
  4. kind: enyo.VFlexBox,
  5. published: {
  6. title: "",
  7. description: ""
  8. },
  9. events: {
  10. onBack: "",
  11. },
  12. headerChrome: [
  13. {kind: "PageHeader", components: [
  14. {kind: "VFlexBox", flex: 1, components: [
  15. {name: "title"},
  16. {name: "description", style: "font-size: 14px"}
  17. ]},
  18. {kind: "Button", caption: "Back", onclick:"backClicked"}
  19. ]}
  20. ],
  21. create: function(inProps) {
  22. this.inherited(arguments);
  23. this.titleChanged();
  24. this.descriptionChanged();
  25. },
  26. initComponents: function() {
  27. this.createChrome(this.headerChrome);
  28. this.inherited(arguments);
  29. },
  30. titleChanged: function() {
  31. this.$.title.setContent(this.title);
  32. },
  33. descriptionChanged: function() {
  34. this.$.description.setContent(this.description);
  35. },
  36. backClicked: function(){
  37. this.doBack();
  38. },
  39. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement