From ae3785731db49e77995674ff926ef418e9d7dab9 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 9 Aug 2012 06:29:29 +0400 Subject: [PATCH] fixed JSON indexing of images... Signed-off-by: Alex A. Naanou --- ui/gallery-prototype.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/gallery-prototype.js b/ui/gallery-prototype.js index bbc7d31b..664ef92c 100755 --- a/ui/gallery-prototype.js +++ b/ui/gallery-prototype.js @@ -290,11 +290,12 @@ function buildJSON(){ res.ribbons[res.ribbons.length] = ribbon for(var j=0; j < images.length; j++){ var image = $(images[j]) - ribbon[ribbon.length] = { + var id = image.attr('id') + ribbon[id] = { // unwrap the url... // XXX would be nice to make this a relative path... url: /url\((.*)\)/.exec(image.css('background-image'))[1], - id: image.attr('id'), + id: id, } } }