- using new res.handlers.context object for rendering page.skin (res.handlers.context either contains root or a site object)
This commit is contained in:
parent
9eecb1fdec
commit
469e936af6
1 changed files with 7 additions and 7 deletions
|
@ -1,12 +1,12 @@
|
|||
/**
|
||||
* display all images of a site
|
||||
* display all images of a site or layout
|
||||
*/
|
||||
function main_action() {
|
||||
res.data.imagelist = renderList(this, "preview", 10, req.data.page);
|
||||
res.data.pagenavigation = renderPageNavigation(this, this.href(), 10, req.data.page);
|
||||
res.data.title = "Images of " + res.handlers.context.title;
|
||||
res.data.title = "Images of " + this._parent.title;
|
||||
res.data.body = this.renderSkinAsString("main");
|
||||
this._parent.renderSkin("page");
|
||||
res.handlers.context.renderSkin("page");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -16,9 +16,9 @@ function myimages_action() {
|
|||
var ms = this._parent.members.get(session.user.name);
|
||||
res.data.imagelist = renderList(ms.images, "preview", 10, req.data.page);
|
||||
res.data.pagenavigation = renderPageNavigation(ms.images, this.href(req.action), 10, req.data.page);
|
||||
res.data.title = "Images of " + res.handlers.context.title;
|
||||
res.data.title = "My images of " + this._parent.title;
|
||||
res.data.body = this.renderSkinAsString("main");
|
||||
this._parent.renderSkin("page");
|
||||
res.handlers.context.renderSkin("page");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -44,5 +44,5 @@ function create_action() {
|
|||
res.data.action = this.href(req.action);
|
||||
res.data.title = "Add an image to " + this._parent.title;
|
||||
res.data.body = this.renderSkinAsString("new");
|
||||
this._parent.renderSkin("page");
|
||||
res.handlers.context.renderSkin("page");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue