X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=JsTemplate%2FLink.js;h=2e2d6f1f57f28f1af60e16483a294c8e5a3c0c2e;hp=913d72de3da386619b6076036803c83057736004;hb=3af26e7f7a33e18cb4f756df6da99966731753c2;hpb=ddf9b16d2638ea4f90b11cd1ac1793e4968fc5fe diff --git a/JsTemplate/Link.js b/JsTemplate/Link.js index 913d72d..2e2d6f1 100644 --- a/JsTemplate/Link.js +++ b/JsTemplate/Link.js @@ -16,21 +16,37 @@ 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 : "", - srcReplace : false, - + target : function(targetName) { @@ -47,8 +63,6 @@ Link = XObject.define( }, toSrc : function(filename) { if (typeof(filename) != 'undefined') this.src = filename; - if (this.srcReplace( - return this; }, @@ -84,6 +98,9 @@ Link = XObject.define( } ); } + else if (this.url) { + linkString = thisLink._makeLink(this.url); + } else if (this.src) { linkString = thisLink._makeSrcLink(this.src); }