X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=JsTemplate%2FLink.js;h=2e2d6f1f57f28f1af60e16483a294c8e5a3c0c2e;hp=9782aab51c4808715a18578c7be517678b118784;hb=3af26e7f7a33e18cb4f756df6da99966731753c2;hpb=be6319b4fadb93379b8940da688c6cda2f0913f2 diff --git a/JsTemplate/Link.js b/JsTemplate/Link.js index 9782aab..2e2d6f1 100644 --- a/JsTemplate/Link.js +++ b/JsTemplate/Link.js @@ -16,16 +16,33 @@ Link = XObject.define( /* * constructor */ - function () { + function (opts) { + XObject.extend(this,opts); }, Object, { + /** + * url {String} url for link.. + */ + url: "", + /** + * text {String} text to show on link. + */ + + text : "", + + /** + * alias {String} not sure? + */ alias : "", + /** + * src {String} not sure? + */ src : "", file : "", - text : "", + innerName : "", classLink : false, targetName : "", @@ -47,7 +64,6 @@ Link = XObject.define( toSrc : function(filename) { if (typeof(filename) != 'undefined') this.src = filename; - return this; }, toSymbol : function(alias) { @@ -82,6 +98,9 @@ Link = XObject.define( } ); } + else if (this.url) { + linkString = thisLink._makeLink(this.url); + } else if (this.src) { linkString = thisLink._makeSrcLink(this.src); }