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