BUG Fix insert media form inserting images from other UploadFields (fixes #8051)

The insert media form would pick up unwanted images from other
UploadFields. Limiting where it is looking to only the closest form
fixes this.
This commit is contained in:
Loz Calver 2012-12-12 15:55:33 +00:00
parent 441bb5f74c
commit 639cc0222c

View File

@ -874,7 +874,7 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
//get the uploaded file ID when this event triggers, signaling the upload has compeleted successfully
editFieldIDs.push($(this).data('id'));
});
var uploadedFiles = $('.ss-uploadfield-files').children('.ss-uploadfield-item');
var uploadedFiles = form.find('.ss-uploadfield-files').children('.ss-uploadfield-item');
uploadedFiles.each(function(){
var uploadedID = $(this).data('fileid');
if ($.inArray(uploadedID, editFieldIDs) == -1) {