-
Type: Bug Report
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.2.1-B2
-
Component/s: File Uploader
-
Labels:None
-
Change Log Group:Fixed
-
Change Log Message:The flash-based uploader wasn't working at all, when used inside a modal window.
-
Story Points:1
-
Copy Issue Key:
-
Patch Instructions:
Flash Uploader consists of 2 JavaScript classes:
- UploadsManager - handles operations, that affects multiple uploaders (e.g. when to start initialization)
- Uploader - represents single uploader control on a form
Right now UploadsManager class thinks, that if $(document).ready event of jQuery has fired, then it's time to initialize uploaders. This is correct only in case if AJAX-requests aren't involved. Inside AJAX request jQuery considers parent page already loaded (and that is correct) and fires any call to $(document).ready event at same time as it sees it. Because of it an attempt to initialize uploaders is made even before they are created.
One of possible solutions would be to:
- track place, from where uploader was registered (main page or page, loaded via AJAX request) in UploadsManager.AddUploader call
- from $(document).ready event only initialize uploaders, that exist on main page
- make FormManager trigger FormManager.WindowManager.Ready event (new) once page form AJAX request is completely loaded
- from FormManager.WindowManager.Ready event only initialize uploaders, that exist on page, loaded via AJAX request