- redirect to layout since there is no skinset anymore
- use res.handlers.context (which either contains root or a site object)
This commit is contained in:
parent
f9985ef9ce
commit
dd7e9a722f
1 changed files with 6 additions and 6 deletions
|
@ -3,20 +3,20 @@
|
||||||
*/
|
*/
|
||||||
function delete_action() {
|
function delete_action() {
|
||||||
if (req.data.cancel)
|
if (req.data.cancel)
|
||||||
res.redirect(path.skinset.href("skins"));
|
res.redirect(this.layout.skins.href());
|
||||||
else if (req.data.remove) {
|
else if (req.data.remove) {
|
||||||
try {
|
try {
|
||||||
res.message = path.skinset.deleteSkin(this);
|
res.message = this.layout.skins.deleteSkin(this);
|
||||||
res.redirect(path.skinset.href("skins"));
|
res.redirect(this.layout.skins.href() + "#" + this.proto + this.name);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
res.message = err.toString();
|
res.message = err.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
res.data.action = this.href(req.action);
|
res.data.action = this.href(req.action);
|
||||||
res.data.title = path.skinset.getParent().title;
|
res.data.title = res.handlers.context.getTitle();
|
||||||
var sp = new Object();
|
var sp = new Object();
|
||||||
sp.what = "the skin "" + this.name + "" (created by " + this.creator.name + ")";
|
sp.what = "the skin "" + this.name + "" (created by " + this.creator.name + ")";
|
||||||
res.data.body = this.renderSkinAsString("delete", sp);
|
res.data.body = this.renderSkinAsString("delete", sp);
|
||||||
path.skinmgr._parent.renderSkin("page");
|
res.handlers.context.renderSkin("page");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue