Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-1253

Initialize flash-based uploader depending on usage context (modal window or main page)

    XMLWordPrintable

    Details

    • 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:

      Patches must be submitted through Phabricator.

      Description

      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:

      1. track place, from where uploader was registered (main page or page, loaded via AJAX request) in UploadsManager.AddUploader call
      2. from $(document).ready event only initialize uploaders, that exist on main page
      3. make FormManager trigger FormManager.WindowManager.Ready event (new) once page form AJAX request is completely loaded
      4. from FormManager.WindowManager.Ready event only initialize uploaders, that exist on page, loaded via AJAX request

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
                Developer:
                Alex
                Reviewer:
                Dmitry Andrejev [Intechnic]
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: