* Added aspect for Layout.image_macro() fixing the macro parameter
* Fixed order of arguments in link_filter() call from within Story.content_macro()
This commit is contained in:
parent
7ba80fb9b9
commit
ce42c8a2aa
2 changed files with 12 additions and 1 deletions
|
@ -139,6 +139,17 @@ Image.prototype.onCodeUpdate = function() {
|
||||||
return helma.aspects.addBefore(this, "update", aspects.setTopics);
|
return helma.aspects.addBefore(this, "update", aspects.setTopics);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Layout.prototype.onCodeUpdate = function() {
|
||||||
|
return helma.aspects.addAround(this, "image_macro", function(args, func, obj) {
|
||||||
|
args = aspects.fixMacroParams(args);
|
||||||
|
var url = args[3];
|
||||||
|
url && res.push();
|
||||||
|
func.apply(obj, args);
|
||||||
|
url && link_filter(res.pop(), {}, url);
|
||||||
|
return;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
Site.prototype.onCodeUpdate = function() {
|
Site.prototype.onCodeUpdate = function() {
|
||||||
helma.aspects.addBefore(this, "main_action", function(args, func, site) {
|
helma.aspects.addBefore(this, "main_action", function(args, func, site) {
|
||||||
res.handlers.day = site.archive;
|
res.handlers.day = site.archive;
|
||||||
|
|
|
@ -76,7 +76,7 @@ Story.prototype.content_macro = function(param) {
|
||||||
param.clipping, param.delimiter);
|
param.clipping, param.delimiter);
|
||||||
}
|
}
|
||||||
if (param.as === "link") {
|
if (param.as === "link") {
|
||||||
res.write(this.link_filter(param, part));
|
res.write(this.link_filter(part, param));
|
||||||
} else {
|
} else {
|
||||||
res.write(part);
|
res.write(part);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue