This commit was generated by cvs2svn to compensate for changes in r2155,

which included commits to RCS files with non-trunk default branches.
This commit is contained in:
stefanp 2002-03-11 13:49:50 +00:00
parent 72d15e11ab
commit 4a7616d5a0
51 changed files with 1885 additions and 0 deletions

20
DocFunction/functions.js Normal file
View file

@ -0,0 +1,20 @@
/**
* overrides the internal href-function, as
* helma.framework.core.Application.getNodeHref(Object,String)
* isn't able to compute correct urls for non-node objects.
* @arg action of prototype
*/
function href(action) {
var url = getProperty("baseURI");
url = (url==null || url=="null") ? "" : url;
url += this.getParentElement().getParentElement().getName() + "/api/" + this.getParentElement().getName() + "/" + this.getTypeName().toLowerCase()+"_"+this.name + "/" + ( (action!=null && action!="") ? action : "main" );
return url;
}
function getApplication() {
return this.getParentElement().getParentElement();
}

View file

@ -0,0 +1,5 @@
<tr>
<td width="200" class="list_property"><b><a href="<% this.prototypehref %>#<% this.name %>"><% this.name %></a></b></td>
<td class="list_property"><% this.typename %> in <% this.prototypename %>
<td class="list_property"><small>(<a href="<% this.href action="main" %>"><% this.prototypename %>/<% this.location %></a>)</small></td>
</tr>

View file

@ -0,0 +1,3 @@
<tr>
<td class="list_separator" colspan="3"><b>&nbsp;<% param.letter %></b></td>
</tr>

View file

@ -0,0 +1,7 @@
<tr>
<td class="list_property" align="right" valign="top" width="70" height="40"><font size=-1><a name="<% this.name %>"><!----></a>
<code>&nbsp;<% param.group %></code></font></td>
<td class="list_property" valign="top"><DL><DT><CODE><B>
<a href="<% this.href action="main" %>"><% this.name %></a></B></CODE><DT><DL><% this.comment %><br><small><% this.tags %></small></DT></DL></TD>
</tr>

View file

@ -0,0 +1,7 @@
<tr>
<td class="list_property" align="right" valign="top" width="70" height="40"><font size=-1><a name="<% this.name %>"><!----></a>
<code>&nbsp;<% param.group %></code></font></td>
<td class="list_property" valign="top"><DL><DT><CODE><B>
<a href="<% this.href action="main" %>"><% this.name %>(<% this.args %>)</a></B></CODE><small><i> in <% docprototype.name %>/<% this.location %></i></small><DT><DL><% this.comment %><br><small><% this.tags %></small></DT></DL></TD>
</tr>

View file

@ -0,0 +1,9 @@
<tr>
<td class="list_property" align="right" valign="top" width="70" height="40"><font size=-1><a name="<% this.name %>"><!----></a>
<code>&nbsp;<% param.group %></code></font></td>
<td class="list_property" valign="top"><dl><dt><code><b>
<a href="<% this.href action="main" %>"><% docprototype.name %>.<% this.name %></a></B></code>
<small><i> in <% docprototype.name %>/<% this.location %></i></small>
<dt><dl><% this.comment %><br><small><% this.tags %></small></dt></dl></td>
</tr>

View file

@ -0,0 +1,7 @@
<tr>
<td class="list_property" align="right" valign="top" width="70" height="40"><font size=-1><a name="<% this.name %>"><!----></a>
<code>&nbsp;<% param.group %></code></font></td>
<td class="list_property" valign="top"><dl><dt><code><b>
<a href="<% this.href action="main" %>"><% docprototype.name %>.<% this.name %></a></B></CODE><DT><DL><% this.comment %><br><small><% this.tags %></small></dt></dl></td>
</tr>

View file

@ -0,0 +1,7 @@
<tr>
<td class="list_property" align="right" valign="top" width="70" height="40"><font size=-1><a name="<% this.name %>"><!----></a>
<code>&nbsp;<% param.group %></code></font></td>
<td class="list_property" valign="top"><DL><DT><CODE><B>
<a href="<% this.href action="main" %>"><% this.name %>()</a></B></CODE><DT><DL><% this.comment %><br><small><% this.tags %></small></DT></DL></TD>
</tr>

136
DocFunction/macros.js Normal file
View file

@ -0,0 +1,136 @@
/**
* macro rendering a skin
* @param name name of skin
*/
function skin_macro(par) {
if ( par && par.name ) {
this.renderSkin(par.name);
}
}
/**
* macro-wrapper for href-function
* @param action name of action to call on this prototype, default main
*/
function href_macro(par) {
return this.href( (par&&par.action)?par.action:"main" );
}
/**
* macro returning name of file this method resides in
*/
function location_macro(par) {
var f = new File ( this.getLocation() );
return f.getName();
}
/**
* macro returning the type of this method (Action, Template, Skin, Macro, Function)
*/
function typename_macro(par) {
return this.getTypeName();
}
/**
* macro returning a link to the prototype page
* @param action name of action to call on this prototype, default main
*/
function prototypehref_macro(par) {
return this.getDocPrototype().href( (par&&par.action)?par.action:"main" )
}
/**
* macro returning the name of the prototype this method belongs to
*/
function prototypename_macro(par) {
return this.getDocPrototype().getName();
}
/**
* macro returning the comment text of this method
* (excluding the tags!)
* @param size (optional) text is cutoff after a number of chars
*/
function comment_macro(par) {
var str = this.getComment();
if ( par && par.length && str.length > par.size ) {
return ( str.substring(0,par.size) );
} else {
return ( str );
}
}
/**
* macro rendering the list of tags
*/
function tags_macro() {
var arr = this.listTags();
var argCt = 0;
for ( var i in arr ) {
if ( arr[i].getKind()==Packages.helma.doc.DocTag.ARG )
argCt++;
res.write( arr[i].render(argCt,this) );
}
}
/**
* macro rendering sequence of arg1, arg2 etc
* according to number of arguments in doctags.
*/
function args_macro() {
var ct = this.countTags(Packages.helma.doc.DocTag.ARG);
for ( var i=0; i<ct; i++) {
res.write ( " arg" + (i+1) );
if ( i<(ct-1) ) res.write (",");
else res.write (" ");
}
}
/**
* macro returning nicely formatted sourcecode of this method.
* code is encoded, &gt% %&lt;-tags are colorcoded, line numbers are added
*/
function source_macro(par) {
var str = this.getSource();
var arr = str.split("<%");
var str2 = "";
for ( var i=0; i<arr.length; i++ ) {
str2 += encode(arr[i]);
if ( i<arr.length-1 )
str2 += '<font color="#aa3300">&lt;%';
}
var arr = str2.split("%&gt;");
var str3 = "";
for ( var i=0; i<arr.length; i++ ) {
str3 += arr[i];
if ( i<arr.length-1 )
str3 += '%&gt;</font>';
}
var arr = str3.split("<br>");
var str4 = "";
for ( var i=0; i<arr.length; i++ ) {
str4 += '<font color="#aaaaaa">' + (i+1) + ':</font> '
if ( i<100 ) str4+=' ';
str4 += arr[i] + "<br>";
}
return ( str4 );
}
/**
* macro returning the fullname of this method
*/
function fullname_macro(par) {
return this.getFullName();
}

8
DocFunction/main.hac Normal file
View file

@ -0,0 +1,8 @@
if ( checkAddress()==false ) return;
if ( checkAuth(this)==false ) return;
res.body = this.renderSkinAsString("main");
res.skin = "api";
res.title = "Application " + this.name;

14
DocFunction/main.skin Normal file
View file

@ -0,0 +1,14 @@
<h2>
<a href="<% docprototype.href action="main" %>">Prototype <% docprototype.name %></a><br>
<% this.fullname %>
</h2>
<div class="list_property">
<small> <i>in <% docprototype.name%>/<% this.location %>:</i></small>
</div>
<pre><% this.source %></pre>