Add Tag handler. Also convert all tabs to spaces.
[blerg.git] / www / jssrc / blerg / Link.js
index bb2d8d3..36cfb30 100644 (file)
@@ -1,20 +1,25 @@
 enyo.kind({
-       name: "blerg.Link",
-       kind: "Control",
-       tag: "a",
-       href: "#",
-       handlers: {
-               onclick: "muteLink",
-       },
-       create: function() {
-               this.inherited(arguments);
-               this.setAttribute('href', this.href);
-       },
-       muteLink: function(inSender, inEvent) {
-               inEvent.preventDefault();
-               if (this.href != '#')
-                       location.href = this.href;
-               this.bubble('onNavigate');
-               return true;
-       }
+    name: "blerg.Link",
+    kind: "Control",
+    tag: "a",
+    published: {
+        href: "#",
+    },
+    handlers: {
+        onclick: "muteLink",
+    },
+    create: function() {
+        this.inherited(arguments);
+        this.hrefChanged();
+    },
+    hrefChanged: function() {
+        this.setAttribute('href', this.href);
+    },
+    muteLink: function(inSender, inEvent) {
+        inEvent.preventDefault();
+        if (this.href != '#')
+            location.href = this.href;
+        this.bubble('onNavigate');
+        return true;
+    }
 });