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:
parent
72d15e11ab
commit
4a7616d5a0
51 changed files with 1885 additions and 0 deletions
10
DocPrototype/appList.skin
Normal file
10
DocPrototype/appList.skin
Normal file
|
@ -0,0 +1,10 @@
|
|||
<tr>
|
||||
|
||||
<td class="list_property" align="right" valign="top" width="1%"><font size="-1"><a name="<% this.name %>"><!-- --></a><code> Prototype</code></font>
|
||||
<br></td>
|
||||
<td class="list_property" valign="top"><code><b><a href="<% this.href action="main" %>"><% this.name %></a></b></code><br />
|
||||
<% this.comment %>
|
||||
<br />
|
||||
</td>
|
||||
|
||||
</tr>
|
14
DocPrototype/functions.js
Normal file
14
DocPrototype/functions.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
|
||||
/**
|
||||
* 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().getName() + "/api/" + this.name + "/" + ( (action!=null && action!="") ? action : "main" );
|
||||
return url;
|
||||
}
|
||||
|
3
DocPrototype/listFooter.skin
Normal file
3
DocPrototype/listFooter.skin
Normal file
|
@ -0,0 +1,3 @@
|
|||
</table>
|
||||
<br />
|
||||
|
7
DocPrototype/listHeader.skin
Normal file
7
DocPrototype/listHeader.skin
Normal file
|
@ -0,0 +1,7 @@
|
|||
<a name="<% param.desc %>"><!-- --></a>
|
||||
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="3">
|
||||
<tr>
|
||||
<td class="list_separator" colspan="3"><% param.desc %></td>
|
||||
</tr>
|
90
DocPrototype/macros.js
Normal file
90
DocPrototype/macros.js
Normal file
|
@ -0,0 +1,90 @@
|
|||
/**
|
||||
* 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 the comment for this prototype
|
||||
*/
|
||||
function comment_macro(par) {
|
||||
return this.getComment();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* macro formatting list of actions of this prototype
|
||||
*/
|
||||
function actions_macro(par) {
|
||||
this.printMethods( Packages.helma.doc.DocElement.ACTION, "listElementAction","Actions" );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* macro formatting list of templates of this prototype
|
||||
*/
|
||||
function templates_macro(par) {
|
||||
this.printMethods( Packages.helma.doc.DocElement.TEMPLATE, "listElementTemplate","Templates" );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* macro formatting list of functions of this prototype
|
||||
*/
|
||||
function functions_macro(par) {
|
||||
this.printMethods( Packages.helma.doc.DocElement.FUNCTION, "listElementFunction","Functions" );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* macro formatting list of skins of this prototype
|
||||
*/
|
||||
function skins_macro(par) {
|
||||
this.printMethods( Packages.helma.doc.DocElement.SKIN, "listElementSkin","Skins" );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* macro formatting list of macros of this prototype
|
||||
*/
|
||||
function macros_macro(par) {
|
||||
this.printMethods( Packages.helma.doc.DocElement.MACRO, "listElementMacro","Macros" );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* macro-utility: renders a list of methods of this prototype
|
||||
* usage of docprototype.listHeader/listFooter skin is hardcoded
|
||||
* @arg type integer - which type of methods are listed
|
||||
* @arg skin skin to be called on method
|
||||
* @arg desc string describing the type of method (ie "Skins", "Actions")
|
||||
*/
|
||||
function printMethods(type,skin,desc) {
|
||||
var arr = this.listFunctions(type);
|
||||
if ( arr.length > 0 ) {
|
||||
var obj = new Object();
|
||||
obj.desc = desc;
|
||||
this.renderSkin("listHeader",obj);
|
||||
for ( var i in arr ) {
|
||||
arr[i].renderSkin(skin,obj);
|
||||
}
|
||||
this.renderSkin("listFooter",obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
8
DocPrototype/main.hac
Normal file
8
DocPrototype/main.hac
Normal 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;
|
||||
|
||||
|
9
DocPrototype/main.skin
Normal file
9
DocPrototype/main.skin
Normal file
|
@ -0,0 +1,9 @@
|
|||
|
||||
<h2>Prototype <% this.name %></h2>
|
||||
|
||||
<% this.actions %>
|
||||
<% this.skins %>
|
||||
<% this.macros %>
|
||||
<% this.functions %>
|
||||
<% this.templates %>
|
||||
|
2
DocPrototype/navig.skin
Normal file
2
DocPrototype/navig.skin
Normal file
|
@ -0,0 +1,2 @@
|
|||
|
||||
<a href="<% this.href action="main" %>"><% this.name %></a><br>
|
Loading…
Add table
Add a link
Reference in a new issue