Add Tag handler. Also convert all tabs to spaces.
[blerg.git] / www / jssrc / blerg / Title.js
1 enyo.kind({
2     name: "blerg.Title",
3     kind: "Control",
4     style: "float: left; width: 40%",
5     published: {
6         section: ""
7     },
8     handlers: {
9         onSetTitle: "setTitle"
10     },
11     components: [
12         {kind: "Image", classes: "logo", src: "images/blerglogo.png", attributes: {width: 125, height: 122}},
13         {tag: "h1", components: [
14             {kind: "blerg.Link", href: "#/", content: "BlĂ«rg!"}
15         ]},
16         {tag: "h2", components: [
17             {name: "section", tag: "span"}
18         ]}
19     ],
20     create: function() {
21         this.inherited(arguments);
22     },
23     sectionChanged: function() {
24         this.$.section.setContent(this.section);
25     },
26     setTitle: function(inSender, inEvent) {
27         if (inEvent.section)
28             this.setSection(inEvent.section);
29     }
30 });