diff --git a/Application/functions.js b/Application/functions.js
index cdf0af56..a42865d0 100644
--- a/Application/functions.js
+++ b/Application/functions.js
@@ -7,14 +7,6 @@ function constructor(name) {
this.name = name;
}
-
-/**
- * of no use, just to avoid error message
- */
-function onRequest() {
-}
-
-
/**
* return true/false to determine if application is running
*/
@@ -25,4 +17,19 @@ function isActive() {
return true;
}
+/**
+ * Method used by Helma for URL composition.
+ */
+function href(action) {
+ var base = root.href() + this.name + "/";
+ return action ? base + action : base;
+}
+/**
+ * Method used by Helma request path resolution.
+ */
+function getChildElement(name) {
+ if (name == "api")
+ return this.getDoc();
+ return null;
+}
diff --git a/DocApplication/functions.js b/DocApplication/functions.js
index e3769a61..dec28856 100644
--- a/DocApplication/functions.js
+++ b/DocApplication/functions.js
@@ -1,6 +1,6 @@
/**
-* get the prototype of any doc-object (either a prototype, a function or a tag)
-*/
+ * Get the prototype of any doc-object (either a prototype, a function or a tag)
+ */
function getDocPrototype(obj) {
var tmp = obj;
while (tmp != null && tmp.getType() != this.PROTOTYPE) {
@@ -11,12 +11,19 @@ function getDocPrototype(obj) {
/**
- * get a prototype of this docapplication, ie get on of the children of this object
- */
+ * Get a prototype of this docapplication, ie get on of the children of this object
+ */
function getPrototype(name) {
return this.getChildElement("prototype_" + name);
}
+/**
+ * Method used by Helma for URL composition.
+ */
+function href(action) {
+ var base = this.getParentElement().href() + "api/";
+ return action ? base + action : base;
+}
function getDir(dir, obj) {
dir.mkdir();
diff --git a/DocFunction/macros.js b/DocFunction/macros.js
index 9bc3d9ee..9443f0eb 100644
--- a/DocFunction/macros.js
+++ b/DocFunction/macros.js
@@ -129,8 +129,9 @@ function source_macro(param) {
sourcecode = sourcecode.replace(r, "");
var arr = sourcecode.split("
");
+ var line = this.getStartLine ? this.getStartLine() : 1;
for (var i = 0; i < arr.length; i++) {
- res.write('' + (i + 1) + ': ');
+ res.write('' + (line++) + ': ');
if (i < 99) {
res.write(' ');
}
diff --git a/DocPrototype/functions.js b/DocPrototype/functions.js
index b418b24b..ad9ef068 100644
--- a/DocPrototype/functions.js
+++ b/DocPrototype/functions.js
@@ -1,14 +1,3 @@
-///**
-// * utility function for head_macro, rendering link to app and to prototype
-// */
-//function getPath() {
-// var appObj = this.getParentElement ();
-// var str = appObj.getPath();
-// str += '/' + this.name + '';
-// return( str );
-//}
-
-
function translateType(filter) {
if (filter == "actions")
return Packages.helma.doc.DocElement.ACTION;
@@ -24,9 +13,18 @@ function translateType(filter) {
return -1;
}
-
+/**
+ * Get the application we're part of.
+ */
function getApplication() {
return this.getParentElement();
}
-
+/**
+ * Method used by Helma for URL composition.
+ */
+function href(action) {
+ var base = this.getParentElement().href()
+ + this.getElementName() + "/";
+ return action ? base + action : base;
+}
diff --git a/Root/functions.js b/Root/functions.js
index f7043f15..60c9a9b6 100644
--- a/Root/functions.js
+++ b/Root/functions.js
@@ -55,5 +55,11 @@ function getApp(name) {
return appObj;
}
+/**
+ * Method used by Helma path resolution.
+ */
+function getChildElement(name) {
+ return this.getApp(name);
+}
diff --git a/class.properties b/class.properties
index 6a51df81..4f48d3cc 100644
--- a/class.properties
+++ b/class.properties
@@ -21,5 +21,7 @@ helma.framework.core.Application = Application
helma.doc.DocApplication = DocApplication
helma.doc.DocPrototype = DocPrototype
helma.doc.DocFunction = DocFunction
+helma.doc.DocProperties = DocFunction
+helma.doc.DocSkin = DocFunction
helma.doc.DocTag = DocTag