Review main Merged

28976[TASK] Trigger events in DragUploader

Stephan Schuler CR +2 V +2 Easy +9 −2 updated 06/12/14, 12:26

Commit message

The DragUploader implementation prevents most of its JavaScript
API to be interacted with from outside the module. Especially
there is no public event allowing interaction based on ajax
responses such as "uploadComplete" or "uploadError".

This patch adds a couple of events being triggered on the $trigger
property of the DragUploader module. That's meant to be the "add"
button in DragUploader context, so it's a mandatory DOM node.

The introduced events are:
* uploadStart
* uploadError
* updateProgress
* uploadComplete

Review

  • Code review CR +2
    • Xavier Perseguers +2
    • Stefan Neufeind +1
    • Wouter Wolters +1
    • Frans Saris +1
    • Helmut Hummel +1
  • Verified V +2
    • Xavier Perseguers +2
    • Stefan Neufeind +1
    • Frans Saris +1

Issues 1

Files 1

Review log 17

  1. Georg Ringer updated the commit message in patch set 1 03/31/14, 13:09

  2. Mr. Jenkins commented on patch set 1 03/31/14, 13:19

  3. Mr. Jenkins commented on patch set 2 03/31/14, 13:23

  4. Marc Bastian Heinrichs updated the commit message in patch set 2 03/31/14, 13:33

  5. Mr. Jenkins commented on patch set 3 03/31/14, 13:46

  6. Nicole Hummel commented on patch set 3 04/04/14, 08:54

    @steffen: i love the idea. could you say your opinion about that, then i would test the functions
  7. Stefan Neufeind voted on patch set 3 CR +1 04/04/14, 15:15

  8. Frans Saris voted on patch set 3 CR +1 04/10/14, 19:22

  9. Helmut Hummel voted on patch set 3 CR +1 04/15/14, 22:05

  10. Stefan Neufeind commented on patch set 3 V +1 04/16/14, 03:18

    Tried with the code from forge-issue. It actually does trigger and adds some button (without judging about the button itself or so). So the trigger seems to work fine.
  11. Xavier Perseguers voted on patch set 3 CR +1 04/22/14, 07:28

  12. Wouter Wolters voted on patch set 3 CR +1 04/22/14, 20:03

  13. Frans Saris commented on patch set 3 V +1 CR -1 06/05/14, 21:16

    Tested the new triggered events and this works. But I'm wondering why the extra $trigger parameter is added, why not trigger is on the .dragUploader itself?

    DragUploader.js:212

    Why the extra $trigger parameter?
  14. Xavier Perseguers commented on patch set 3 06/12/14, 12:09

    DragUploader.js:212 Reply

    This extra parameter relates to this definition in DragUploader class: me.$trigger = $(me.$element.data('dropzone-trigger'));
  15. Frans Saris commented on patch set 3 CR +1 06/12/14, 12:22

    DragUploader.js:212 Reply

    You are right! My own work :D
  16. Xavier Perseguers voted on patch set 3 V +2 CR +2 06/12/14, 12:26

  17. Xavier Perseguers merged patch set 4 06/12/14, 12:26