Set mentioned flag on mention
[blerg.git] / www / jssrc / blerg / Link.js
1 enyo.kind({
2     name: "blerg.Link",
3     kind: "Control",
4     tag: "a",
5     published: {
6         href: "#",
7     },
8     handlers: {
9         onclick: "muteLink",
10     },
11     create: function() {
12         this.inherited(arguments);
13         this.hrefChanged();
14     },
15     hrefChanged: function() {
16         this.setAttribute('href', this.href);
17     },
18     muteLink: function(inSender, inEvent) {
19         if (inEvent.which > 1)
20             return;
21         inEvent.preventDefault();
22         if (this.href != '#')
23             location.href = this.href;
24         this.bubble('onNavigate');
25         return true;
26     }
27 });