moved replacelink_macro() to Image
This commit is contained in:
parent
7e98da73b2
commit
2de21beba1
1 changed files with 0 additions and 27 deletions
|
@ -56,30 +56,3 @@ function topicchooser_macro(param) {
|
||||||
Html.dropDown({name: "addToTopic"}, options, selected, param.firstOption);
|
Html.dropDown({name: "addToTopic"}, options, selected, param.firstOption);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* render a link to delete action
|
|
||||||
* calls image.deletelink_macro, but only
|
|
||||||
* if the layout in path is the one this image
|
|
||||||
* belongs to
|
|
||||||
*/
|
|
||||||
function replacelink_macro(param) {
|
|
||||||
if (this.layout && path.Layout != this.layout) {
|
|
||||||
if (session.user) {
|
|
||||||
try {
|
|
||||||
path.Layout.images.checkAdd(session.user, req.data.memberlevel);
|
|
||||||
} catch (deny) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Html.openLink({href: path.Layout.images.href("create") + "?alias=" + this.alias});
|
|
||||||
if (param.image && this.site.images.get(param.image))
|
|
||||||
this.site.renderImage(this.site.images.get(param.image), param);
|
|
||||||
else
|
|
||||||
res.write(param.text ? param.text : getMessage("generic.replace"));
|
|
||||||
Html.closeLink();
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue