Redesign user tasks
[blerg.git] / www / jssrc / blerg / Link.js
index 929e1a5..bb2d8d3 100644 (file)
@@ -1,5 +1,20 @@
 enyo.kind({
        name: "blerg.Link",
+       kind: "Control",
        tag: "a",
-       attributes: {href:"#"}
+       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;
+       }
 });