X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=www%2Fjssrc%2Fblerg%2FLink.js;h=bb2d8d3e2400fde4d7308ad7fb0554a31567ed73;hb=55431b133192e59138a51591d7ef4ef20b6ceb52;hp=929e1a582a8b738741d3bcec6c0023467d2c4725;hpb=be0647e6531fec4b4b50a1a0c0d4e826e5e6f16b;p=blerg.git diff --git a/www/jssrc/blerg/Link.js b/www/jssrc/blerg/Link.js index 929e1a5..bb2d8d3 100644 --- a/www/jssrc/blerg/Link.js +++ b/www/jssrc/blerg/Link.js @@ -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; + } });