weblog/objectFunctions.js -> modifytime is set to current Date at creation time story/objectFunctions.js -> modifytime is set to current Date at creation time comment/objectFunctions.js -> modifytime is set to current Date at creation time; isonline is set to 1 at creation time; added function isOnline() weblog/type.properties -> two additional subnode-containers: allstories, allcomments weblog/macros.js -> implemented history_macro which renders List of recently modified Objects story/historyview.skin -> will be rendered by the weblog-history macro comment/historyview.skin -> will be rendered by the weblog-history macro weblog/main.skin -> included history.skin story/main.skin -> included history.skin weblog/style.skin -> included "history", "historyStory" and"historyComment" classes weblog/history.skin -> newly created story/macors.js -> title_macro can be rendered as a link; comments_macro renders an invisible anchor-tag before each comment comment/macors.js -> title_macro can be rendered as a link; replies_macro renders an invisible anchor-tag before each comment eliminated renderPrefix() and renderSuffix() documentation.htm -> updated
42 lines
1.2 KiB
JavaScript
42 lines
1.2 KiB
JavaScript
/**
|
|
* macro renders filebased-skins as list
|
|
*/
|
|
|
|
function skins_macro(param) {
|
|
res.write(param.prefix)
|
|
for (var i in app.skinfiles) {
|
|
res.write("<b>" + i + "</b>");
|
|
for (var j in app.skinfiles[i]) {
|
|
res.write("<li>");
|
|
res.write("<a href=\"" + this.href() + "?proto=" + i + "&name=" + j + "\">");
|
|
res.write(j);
|
|
res.write("</a></li>");
|
|
}
|
|
res.write("<br>");
|
|
}
|
|
res.write(param.suffix);
|
|
}
|
|
|
|
|
|
/**
|
|
* macro calls a form-skin for editing a skin-source
|
|
*/
|
|
|
|
function skineditor_macro(param) {
|
|
res.write(param.prefix)
|
|
if (req.data.proto && req.data.name) {
|
|
// user wants to edit a skin, so we try to get it:
|
|
var currProto = this.__parent__.skinmanager.get(req.data.proto);
|
|
if (currProto && currProto.get(req.data.name)) {
|
|
var currSkin = currProto.get(req.data.name);
|
|
currSkin.renderSkin("edit");
|
|
} else {
|
|
var newSkin = new skin();
|
|
// since this is a new skin, we give it the source of the skinfile as default
|
|
newSkin.skin = app.skinfiles[req.data.proto][req.data.name];
|
|
newSkin.renderSkin("edit");
|
|
}
|
|
}
|
|
res.write(param.suffix);
|
|
}
|
|
|