diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/fixmystreet/fixmystreet.js | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index 7c0a752d2..21701ce5f 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -246,15 +246,16 @@ $(function(){ } }); - if (typeof fixmystreet !== 'undefined') { - $.each(fixmystreet.uploaded_files || [], function(i, f) { - var mockFile = { name: f, server_id: f }; - photodrop.emit("addedfile", mockFile); - photodrop.createThumbnailFromUrl(mockFile, '/photo/' + f + '.temp.jpeg'); - photodrop.emit("complete", mockFile); - photodrop.options.maxFiles -= 1; - }); - } + $.each($('input[name=upload_fileid]').val().split(','), function(i, f) { + if (!f) { + return; + } + var mockFile = { name: f, server_id: f }; + photodrop.emit("addedfile", mockFile); + photodrop.createThumbnailFromUrl(mockFile, '/photo/' + f + '.temp.jpeg'); + photodrop.emit("complete", mockFile); + photodrop.options.maxFiles -= 1; + }); } /* |