+
+
">SUMMARY |
+
">INDEX |
+
A|
B|
C|
D|
E|
F|
G|
H|
I|
J|
K|
L|
M|
N|
O|
P|
Q|
R|
S|
T|
U|
V|
W|
X|
Y|
Z|
+
+
+ <% this.functions skin="asIndexItem"
+ separator="![]() |
"
+ %>
+
+
+
">SUMMARY |
+
">INDEX |
+
A|
B|
C|
D|
E|
F|
G|
H|
I|
J|
K|
L|
M|
N|
O|
P|
Q|
R|
S|
T|
U|
V|
W|
X|
Y|
Z|
+
diff --git a/DocApplication/functions.js b/DocApplication/functions.js
new file mode 100644
index 00000000..16dbe089
--- /dev/null
+++ b/DocApplication/functions.js
@@ -0,0 +1,58 @@
+
+
+function getDocPrototype (obj) {
+ var tmp = obj;
+ while (tmp!=null && tmp.getType () != this.PROTOTYPE) {
+ tmp = tmp.getParentElement ();
+ }
+ return tmp;
+}
+
+function getDir (dir, obj) {
+ dir.mkdir ();
+ if (obj.getType () == this.APPLICATION) {
+ return dir;
+ } else if (obj.getType () == this.PROTOTYPE) {
+ var protoObj = this.getDocPrototype (obj);
+ var dir = new File (dir, protoObj.getElementName ());
+ dir.mkdir ();
+ return dir;
+ } else {
+ var protoObj = this.getDocPrototype (obj);
+ var dir = this.getDir (dir, protoObj);
+ dir = new File (dir, obj.getElementName ());
+ dir.mkdir ();
+ return dir;
+ }
+}
+
+
+function storePage (obj, action, backPath) {
+ var str = this.getPage (obj, action, backPath);
+ var appObj = this.getParentElement ();
+ var dir = new File (appObj.getAppDir ().getAbsolutePath (), ".docs");
+ dir = this.getDir (dir, obj);
+ var f = new File (dir, action + ".html");
+ f.remove ();
+ f.open ();
+ f.write (str);
+ f.close ();
+ app.log ("wrote file " + f.toString ());
+}
+
+
+function getPage (obj, action, backPath) {
+ backPath = (backPath==null) ? "" : backPath;
+ res.pushStringBuffer ();
+ eval ("obj." + action + "_action ();");
+ var str = res.popStringBuffer ();
+ var reg = new RegExp ("href=\"" + this.href ("") + "([^\"]+)\"");
+ reg.global = true;
+ str = str.replace (reg, "href=\"" + backPath + "$1.html\"");
+ var reg = new RegExp ("src=\"" + this.href ("") + "([^\"]+)\"");
+ reg.global = true;
+ str = str.replace (reg, "src=\"" + backPath + "$1.html\"");
+ return str;
+}
+
+
diff --git a/DocApplication/indexSeparator.skin b/DocApplication/indexSeparator.skin
new file mode 100644
index 00000000..beb8ee73
--- /dev/null
+++ b/DocApplication/indexSeparator.skin
@@ -0,0 +1,3 @@
+
+<% param.letter %>
+ |
\ No newline at end of file
diff --git a/DocApplication/macros.js b/DocApplication/macros.js
index d14126df..f7b78ccd 100644
--- a/DocApplication/macros.js
+++ b/DocApplication/macros.js
@@ -42,35 +42,42 @@ function hrefRoot_macro (param) {
/**
* list all prototypes of this application
* @param skin name of skin to render on prototype
+ * @param separator
*/
-function prototypes_macro(par) {
- var skin = (par && par.skin&&par.skin!="") ? par.skin : "asPrototypeList";
+function prototypes_macro(param) {
+ var skin = (param.skin) ? param.skin : "asPrototypeList";
+ var separator = (param.separator) ? param.separator : "";
var arr = this.listChildren ();
for ( var i=0; i
Application <% this.headline %>
+
+
+
+
+
+ Application <% this.headline %>
+ |
+
+
+
+">SUMMARY |
+">INDEX |
+
+
<% this.comment encoding="html" %>
+
+
+
+ <% this.prototypes skin="asSummary"
+ separator="![]() |
"
+ %>
+
+
+
+">SUMMARY |
+">INDEX |
+
diff --git a/DocFunction/asIndexItem.skin b/DocFunction/asIndexItem.skin
new file mode 100644
index 00000000..95a998ea
--- /dev/null
+++ b/DocFunction/asIndexItem.skin
@@ -0,0 +1,7 @@
+
+<% this.link handler="false" %>
+- <% this.type %> in <% docprototype.name %>
+
+<% this.comment length="200" %>
+ |
+
diff --git a/DocFunction/asLargeListItem.skin b/DocFunction/asLargeListItem.skin
index 584d72f1..e11013b3 100644
--- a/DocFunction/asLargeListItem.skin
+++ b/DocFunction/asLargeListItem.skin
@@ -3,5 +3,3 @@
<% this.comment length="200" %>
-
-
diff --git a/DocFunction/macros.js b/DocFunction/macros.js
index 679de5ba..7eb66819 100644
--- a/DocFunction/macros.js
+++ b/DocFunction/macros.js
@@ -24,6 +24,7 @@ function link_macro (param) { return renderLink (this, param); }
//// END OF COPIED FUNCTIONS
+
function headline_macro (param) {
var p = this.getParentElement ();
var handler = (p!=null) ? p.getName () : "";
@@ -77,7 +78,9 @@ function parameters_macro (param) {
}
-
+function type_macro (param) {
+ return this.getTypeName ();
+}
/**
diff --git a/DocPrototype/asSummary.skin b/DocPrototype/asSummary.skin
new file mode 100644
index 00000000..5ce50bd5
--- /dev/null
+++ b/DocPrototype/asSummary.skin
@@ -0,0 +1,4 @@
+
+"><% this.name %>
+<% this.comment length="200" %>
+ |
diff --git a/DocPrototype/macros.js b/DocPrototype/macros.js
index 9d509458..b7f852e1 100644
--- a/DocPrototype/macros.js
+++ b/DocPrototype/macros.js
@@ -91,23 +91,32 @@ function inheritanceUtil (obj, param) {
/**
* loops through the parent prototypes and renders a skin on each
+ * if it has got any functions.
* @param skin
*/
function parentPrototype_macro (param) {
var skinname = (param.skin) ? param.skin : "asParentList";
var obj = this.getParentPrototype ();
while (obj!=null) {
- obj.renderSkin (skinname);
+ if (obj.listChildren ().length>0) {
+ obj.renderSkin (skinname);
+ }
obj = obj.getParentPrototype ();
}
}
-
+/**
+ * macro rendering a skin depending on wheter this prototype has got
+ * type-properties or not.
+ * @param skin
+ */
function typeProperties_macro (param) {
var props = this.getTypeProperties ();
- if (props!=null) {
- res.encode(props.getContent ());
+ if (props!=null && props.getContent ()!="" ) {
+ var tmp = new Object ();
+ tmp.content = props.getContent ();
+ var skinname = (param.skinname) ? param.skinname : "typeproperties";
+ this.renderSkin (skinname, tmp);
}
}
-
diff --git a/DocPrototype/main.skin b/DocPrototype/main.skin
index ec24d999..318ffaed 100644
--- a/DocPrototype/main.skin
+++ b/DocPrototype/main.skin
@@ -14,6 +14,7 @@
TEMPLATES |
TYPE.PROPERTIES
+
@@ -36,44 +37,43 @@
filter="actions"
skin="asLargeListItem"
prefix="Actions |
"
+ suffix=" |
%>
<% this.methods separator="![]() |
"
filter="functions"
skin="asLargeListItem"
prefix="Functions |
"
+ suffix=" |
%>
<% this.methods separator="![]() |
"
filter="macros"
skin="asLargeListItem"
prefix="Macros |
"
+ suffix=" |
%>
<% this.methods separator="![]() |
"
filter="skins"
skin="asLargeListItemSkin"
prefix="Skins |
"
+ suffix=" |
%>
<% this.methods separator="![]() |
"
filter="templates"
skin="asLargeListItem"
prefix="Templates |
"
+ suffix=" |
%>
<% this.parentPrototype skin="asParentList" %>
-
- type.properties |
-
-
- <% this.typeProperties prefix="" suffix=" " %> |
-
-
-
-
+
+
+<% this.typeProperties %>
diff --git a/DocPrototype/typeproperties.skin b/DocPrototype/typeproperties.skin
new file mode 100644
index 00000000..4eead93f
--- /dev/null
+++ b/DocPrototype/typeproperties.skin
@@ -0,0 +1,9 @@
+
+
+ type.properties |
+
+
+ <% param.content encoding="html" %> |
+
+
+
diff --git a/Global/functions.js b/Global/functions.js
index 5e678c23..b95b947a 100644
--- a/Global/functions.js
+++ b/Global/functions.js
@@ -75,9 +75,9 @@ function appStat () {
* utility function to sort object-arrays by name
*/
function sortByName(a,b) {
- if ( a.name>b.name)
+ if ( a.getName () > b.getName ())
return 1;
- else if ( a.name==b.name )
+ else if (a.getName () == b.getName ())
return 0;
else
return -1;
diff --git a/Global/navig.skin b/Global/navig.skin
index 441b2e22..f19ff3df 100644
--- a/Global/navig.skin
+++ b/Global/navig.skin
@@ -1,22 +1,26 @@
">
" title="helma" border="0" width="174" height="35" align="baseline" style="border-width:3px;border-color:white;">
- helma.org
- docs
- mailinglist
<% root.appList filter="active" %>
-
and <% root.appCount filter="disabled" %> disabled apps:
<% root.appList filter="disabled" skin="navig_disabled" %>
+
+
+ Information on helma.org:
+
reference
+ mailinglist
+ cvs
+ download
+
diff --git a/Global/renderFunctions.js b/Global/renderFunctions.js
index c8c17ea7..84731b8b 100644
--- a/Global/renderFunctions.js
+++ b/Global/renderFunctions.js
@@ -7,7 +7,7 @@ function renderLink (docEl, param) {
} else if (docEl.getType () == docEl.SKIN) {
text = docEl.getName () + ".skin";
} else if (docEl.getType () == docEl.MACRO) {
- if (docEl.getParentElement () && docEl.getParentElement().getName()!="global") {
+ if (param.handler!="false" && docEl.getParentElement () && docEl.getParentElement().getName()!="global") {
text = docEl.getParentElement ().getName () + ".";
}
var str = docEl.getName ();