Ok, I'll try to explain it better:
Normal Wordpress behavior (twenty eleven theme installed for instance):
- add new post > Title: 'Sample Post'
- add new image within post with the normal 'Add a new image' button > you get the media pop-up and can upload new images
> these images will appear in the Wordpress media-library (wp-admin/upload.php) and are connected to post 'Sample Post'
Shoutbox add featured Media behavior:
- add new post > title: 'Sample Post2'
- click on 'upload' button in 'Add featured media' box > I get the media pop-up and can upload new images BUT this is the media library of a post that was created for the 'avia_logo', not the new post I am creating!
The results are:
1/ I can upload an image and when I click 'Use image as featured Image' the theme will create SOME custom link in the database (I guess) between the post and the selected image
2/ the post will show the correct image or images on front-end (via this custom link)
3/ BUT Wordpress will have these images in the normal media library all linked to the post called 'avia_logo' and not the the post 'Sample Post 2'
I don't know if this is expected behavior or a bug or an issue only on my site...
The simple solution should be to make the 'upload' button open the pop-up for the currently edited or created post. That would be in line 31, but I don't speak javascript so I'm in the dark here.
Thank you for looking into this.