I'm using Umbraco 7.5.13 and I've come across an issue when creating a media picker in a custom section.
I've got multiple media picker links on a single page, and when I click each of these links it looks as though the media pickers are stacking on top of one another, rather than just opening a single one at a time. It's difficult to explain so I'll show some screenshots below and paste my code.
Select the first media picker link and it opens fine:
Then I select the second link:
As you can see on the left side of the panel it looks as if it's overlayed
Not sure if you can spot the mistake but I was calling a single global instance of "overlay". Since I'm looping through an ng-repeat, every time I pressed the Add button it would call all the vm.overlay's.
This had other knock-on effects such as providing the upload dialogue multiple times within the media dialogue.
Anyway I fixed this by attaching the overlay to the subCategory so its scope is unique to that object, rather than the global scope.
MediaDialogue Opening Multiples Times
Hi All
I'm using Umbraco 7.5.13 and I've come across an issue when creating a media picker in a custom section.
I've got multiple media picker links on a single page, and when I click each of these links it looks as though the media pickers are stacking on top of one another, rather than just opening a single one at a time. It's difficult to explain so I'll show some screenshots below and paste my code.
Select the first media picker link and it opens fine:
Then I select the second link:
As you can see on the left side of the panel it looks as if it's overlayed
Finally here's the code:
Any help would be appreciated!
I've been an idiot. I probably should have pasted more code in here to expand on what I was trying to explain.
Here's my view to expand on what my problem was:
Not sure if you can spot the mistake but I was calling a single global instance of "overlay". Since I'm looping through an ng-repeat, every time I pressed the Add button it would call all the vm.overlay's.
This had other knock-on effects such as providing the upload dialogue multiple times within the media dialogue.
Anyway I fixed this by attaching the overlay to the subCategory so its scope is unique to that object, rather than the global scope.
Modified HTML:
JS:
I've posted this just in-case someone else makes a rookie mistake like me.
is working on a reply...