helma/DocApplication/actions.js

70 lines
1.7 KiB
JavaScript
Raw Normal View History

function read_action () {
this.readApplication ();
res.redirect (this.href("main"));
}
function main_action () {
2002-11-22 11:55:42 +00:00
if (checkAddress()==false)
return;
if (checkAuth(this.getParentElement ())==false)
return;
this.renderSkin ("frameset");
}
function prototypes_action () {
2002-11-22 11:55:42 +00:00
if (checkAddress()==false)
return;
if (checkAuth(this.getParentElement ())==false)
return;
res.data.body = this.renderSkinAsString ("prototypes");
renderSkin ("api");
}
function summary_action () {
2002-11-22 11:55:42 +00:00
if (checkAddress()==false)
return;
if (checkAuth(this.getParentElement ())==false)
return;
res.data.body = this.renderSkinAsString ("summary");
renderSkin ("api");
}
function functionindex_action () {
2002-11-22 11:55:42 +00:00
if (checkAddress()==false)
return;
if (checkAuth(this.getParentElement ())==false)
return;
res.data.body = this.renderSkinAsString ("functionindex");
renderSkin ("api");
}
function render_action () {
2002-11-22 11:55:42 +00:00
if (checkAddress()==false)
return;
if (checkAuth(this.getParentElement ())==false)
return;
res.writeln("<html><head><title>render</title></head><body>rendering API ... ");
var prefix = this.href ("");
this.storePage (this, "main", "", "index.html");
this.storePage (this, "prototypes");
this.storePage (this, "summary");
this.storePage (this, "functionindex");
var ct = 4;
var arr = this.listChildren ();
for (var i=0; i<arr.length; i++) {
this.storePage (arr[i], "list", "../");
this.storePage (arr[i], "main", "../");
ct += 2;
var subarr = arr[i].listChildren ();
for (var j=0; j<subarr.length; j++) {
this.storePage (subarr[j], "main", "../", subarr[j].getElementName () + ".html");
ct += 1;
}
}
res.writeln (" ... wrote " + ct + " files");
}