imagelist is now rendered in renderImagelist()-function, macro is left for backwards-compatibility
This commit is contained in:
parent
2832b15e66
commit
7c5441b54e
1 changed files with 4 additions and 13 deletions
|
@ -1,22 +1,13 @@
|
||||||
/**
|
/**
|
||||||
* macro renders imagepool as list
|
* macro renders res.data.imagelist to response-object
|
||||||
|
* left for backwards-compatibility only
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function images_macro(param) {
|
function images_macro(param) {
|
||||||
res.write(param.prefix)
|
res.write(param.prefix)
|
||||||
var size = this.size();
|
res.write(res.data.imagelist);
|
||||||
var start = parseInt (req.data.start);
|
|
||||||
if (isNaN (start)|| start >= size-1)
|
|
||||||
start = 0;
|
|
||||||
var end = Math.min (start+20, size);
|
|
||||||
if (start > 0)
|
|
||||||
res.write ("... <a href='"+this.href()+"?start="+Math.max(0, start-20)+"'>newer images</a><br>");
|
|
||||||
for (var i=start; i<end; i++) {
|
|
||||||
this.get(i).renderSkin("preview");
|
|
||||||
}
|
|
||||||
if (end < size)
|
|
||||||
res.write ("<br><a href='"+this.href()+"?start="+end+"'>older images</a> ...");
|
|
||||||
res.write(param.suffix);
|
res.write(param.suffix);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue