JsTemplate/Link.js
[gnome.introspection-doc-generator] / JsTemplate / Link.js
index fbed0b2..2e2d6f1 100644 (file)
@@ -16,25 +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 : "",
-        /**
-         * source Replacement
-         * eg. '/var/www/xxx:symbol'
-         */
-        srcReplace : false, 
-        
+    
         
         
         target : function(targetName) {
@@ -51,8 +63,6 @@ Link = XObject.define(
         },
         toSrc : function(filename) {
             if (typeof(filename) != 'undefined') this.src = filename;
-            if (this.srcReplace(
-            
             
             return this;
         },
@@ -88,6 +98,9 @@ Link = XObject.define(
                     }
                 );
             }
+            else if (this.url) {
+                linkString = thisLink._makeLink(this.url);
+            }
             else if (this.src) {
                 linkString = thisLink._makeSrcLink(this.src);
             }