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
14
DocApplication/functions.js
Normal file
14
DocApplication/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 application
|
||||
*/
|
||||
function href(action) {
|
||||
var url = getProperty("baseURI");
|
||||
url = (url==null || url=="null") ? "" : url;
|
||||
url += this.name + "/api/" + ( (action!=null && action!="") ? action : "main" );
|
||||
return url;
|
||||
}
|
||||
|
||||
|
8
DocApplication/head.skin
Normal file
8
DocApplication/head.skin
Normal file
|
@ -0,0 +1,8 @@
|
|||
<p><big>AppDoc <% this.name %></big>
|
||||
<br/>
|
||||
->
|
||||
<a href="<% this.parentlink %>">AppManager</a> |
|
||||
<a href="<% this.parentlink action="redirectpublic" %>">public</a>
|
||||
</p>
|
||||
|
||||
|
11
DocApplication/index.skin
Normal file
11
DocApplication/index.skin
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
<h2>AppDoc <% this.name %></h2>
|
||||
<a name="Index"><!-- --></a>
|
||||
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="3">
|
||||
<% this.index skin="indexList" %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
74
DocApplication/macros.js
Normal file
74
DocApplication/macros.js
Normal file
|
@ -0,0 +1,74 @@
|
|||
/**
|
||||
* 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" );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* link to the "real" application object (ie not the DocApplication)
|
||||
*/
|
||||
function parentlink_macro(par) {
|
||||
var url = getProperty("baseURI");
|
||||
url = (url==null || url=="null") ? "" : url;
|
||||
url += this.name + "/";
|
||||
url += (par&&par.action)?par.action:"main";
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* list all prototypes of this application
|
||||
* @param skin name of skin to render on prototype
|
||||
*/
|
||||
function prototypes_macro(par) {
|
||||
var skin = (par && par.skin&&par.skin!="")?par.skin:"appList";
|
||||
var arr = this.listPrototypes();
|
||||
for ( var i=0; i<arr.length; i++ ) {
|
||||
arr[i].renderSkin(skin);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* list all methods of all prototypes, sort and separate them alphabetically
|
||||
* @param skin name of skin to render on method
|
||||
* @param skinSeparator name of skin to render separator between start-letters
|
||||
*/
|
||||
function index_macro(par) {
|
||||
var skin = (par && par.skin && par.skin!="") ? par.skin : "indexList";
|
||||
var skinSeparator = (par && par.skinSeparator && par.skinSeparator!="") ? par.skinSeparator : "indexListSeparator";
|
||||
var arr = this.listFunctions();
|
||||
var lastLetter = '';
|
||||
for ( var i=0; i<arr.length; i++ ) {
|
||||
if ( arr[i].name.substring(0,1)!=lastLetter ) {
|
||||
lastLetter = arr[i].name.substring(0,1);
|
||||
var obj = new Object();
|
||||
obj.letter = lastLetter.toUpperCase();
|
||||
arr[i].renderSkin(skinSeparator,obj);
|
||||
}
|
||||
arr[i].renderSkin(skin);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* macro escaping the request-path, used for handing over redirect urls
|
||||
*/
|
||||
function requestpath_macro(par) {
|
||||
res.write( escape(req.path) );
|
||||
}
|
||||
|
23
DocApplication/main.hac
Normal file
23
DocApplication/main.hac
Normal file
|
@ -0,0 +1,23 @@
|
|||
if ( checkAddress()==false ) return;
|
||||
if ( checkAuth(this)==false ) return;
|
||||
|
||||
if ( req.data.action=="reload" ) {
|
||||
var appObj = root.getChildElement(this.name);
|
||||
appObj.docApp = new Packages.helma.doc.DocApplication( this.name, this.location );
|
||||
if ( req.data.redirect != null && req.data.redirect != "" )
|
||||
res.redirect ( getProperty("baseURI") + req.data.redirect );
|
||||
else
|
||||
res.redirect ( this.href("main") );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( req.data.action=="index" ) {
|
||||
res.body = this.renderSkinAsString("index");
|
||||
} else {
|
||||
res.body = this.renderSkinAsString("main");
|
||||
}
|
||||
|
||||
res.skin = "api";
|
||||
res.title = "Application " + this.name;
|
||||
|
||||
|
11
DocApplication/main.skin
Normal file
11
DocApplication/main.skin
Normal file
|
@ -0,0 +1,11 @@
|
|||
<% this.skin name="head" %>
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="3">
|
||||
<tr>
|
||||
<td class="list_separator" colspan="3">Prototypes</td>
|
||||
</tr>
|
||||
<% this.prototypes skin="appList" %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
14
DocApplication/navig.skin
Normal file
14
DocApplication/navig.skin
Normal file
|
@ -0,0 +1,14 @@
|
|||
<font size="+1"><b><% this.name %></b></font>
|
||||
|
||||
<div class="list_apps">
|
||||
<li><b><a href="<% this.href action="main" %>?action=reload&redirect=<% this.requestpath %>">reload AppDoc</a>
|
||||
<li><b><a href="<% this.href action="main" %>">Application</a></b>
|
||||
<li><b><a href="<% this.href action="main" %>?action=index">Index</a>
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
<p>
|
||||
<i>Prototypes:</i><br />
|
||||
<% this.prototypes skin="navig" %>
|
||||
</p>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue