JsTemplate/Link.js
authorAlan Knowles <alan@akbkhome.com>
Fri, 16 Jul 2010 07:06:06 +0000 (15:06 +0800)
committerAlan Knowles <alan@akbkhome.com>
Fri, 16 Jul 2010 07:06:06 +0000 (15:06 +0800)
JsTemplate/Link.js

index 87f3cf6..5be54d1 100644 (file)
@@ -202,9 +202,20 @@ Link = XObject.define(
                 
             var outFilePath =  Link.base + filePath;
 
                 
             var outFilePath =  Link.base + filePath;
 
+            if (!this.text) this.text = filePath;
+            return "<a href=\""+outFilePath+"\""+target+">"+this.text+"</a>";
+        },
+        
+          /** very basic link... */
+        _makeFileLink : function(filePath) {
+            var target = (this.targetName)? " target=\""+this.targetName+"\"" : "";
+                
+            var outFilePath =  Link.base + filePath;
+
             if (!this.text) this.text = filePath;
             return "<a href=\""+outFilePath+"\""+target+">"+this.text+"</a>";
         }
             if (!this.text) this.text = filePath;
             return "<a href=\""+outFilePath+"\""+target+">"+this.text+"</a>";
         }
+        
 });
 
 
 });