Review main Merged

35203[FEATURE] Add AJAX logic for delete records in ListModule

Frank Nägler CR +2 V +2 Normal +132 −19 updated 01/04/15, 20:20

Commit message

This patch introduce an AJAX call for delete records
in ListModule. The confirm message is build with a
bootstrap modal. instead of JavaScript confirm function.

Review

  • Code review CR +2
    • Benni Mack +2
    • Benjamin Kott +1
  • Verified V +2
    • Benni Mack +2
    • Stefan Froemken +1
    • Benjamin Kott +1

Issues 1

Files 6

Review log 36

Show 11 earlier messages
  1. Frank Nägler uploaded patch set 1 12/09/14, 19:46

  2. Frank Nägler commented on patch set 1 CR -1 12/09/14, 20:08

    on it
  3. Wouter Wolters commented on patch set 1 CR -1 12/09/14, 20:11

    AjaxDataHandler.js:55

    the removeClass call here is already done on line 40 isn;t it?

    AjaxDataHandler.js:87

    space missing before {

    AjaxDataHandler.js:88

    ; missing at the end of the line?

    AjaxDataHandler.js:111

    put displaying flahmessages in a private method here

    AjaxDataHandler.js:116

    $iconElement.addClass(elementClass); Can be done outside the if and else

    AjaxDataHandler.js:122

    maybe put refreshing also in a private method?

    DatabaseRecordList.php:1318

    $params) .'" < space missing here
  4. Frank Nägler commented on patch set 1 12/09/14, 20:17

    AjaxDataHandler.js:87 Reply

    Done

    AjaxDataHandler.js:88 Reply

    Done

    AjaxDataHandler.js:111 Reply

    Done

    AjaxDataHandler.js:116 Reply

    Done

    AjaxDataHandler.js:122 Reply

    Done

    DatabaseRecordList.php:1318 Reply

    Done
  5. Frank Nägler uploaded patch set 2 12/09/14, 22:24

  6. Mathias Brodala commented on patch set 2 12/10/14, 08:17

    Just for the record: it'd be awesome if there was no confirmation at all. Instead the record is deleted immediately and a notification message shown which contains a link to undo the delete. But maybe that's something for a following change.
  7. Frank Nägler commented on patch set 2 12/10/14, 08:51

    nice idea, but please let us discuss this first and implement it in a second patch.
  8. Andreas Kienast commented on patch set 2 CR -1 12/10/14, 09:04

    AjaxDataHandler.js:79

    Please store this in a variable (var $me = $(this)), there's no need to interate the dom multiple times.

    AjaxDataHandler.js:80

    same here

    AjaxDataHandler.js:92

    .modal-footer is imo superfluous, an ID must be unique.
  9. Frank Nägler commented on patch set 2 12/10/14, 17:00

    AjaxDataHandler.js:79 Reply

    Done

    AjaxDataHandler.js:80 Reply

    Done

    AjaxDataHandler.js:92 Reply

    Done
  10. Frank Nägler uploaded patch set 3 12/10/14, 17:01

  11. Frank Nägler uploaded patch set 4 12/10/14, 17:02

  1. Frank Nägler commented on patch set 4 CR -1 12/10/14, 17:05

    on it
  2. Frank Nägler uploaded patch set 5 12/10/14, 17:30

  3. Frank Nägler commented on patch set 5 CR -1 12/10/14, 17:31

    -1 until the layout for the modal is verified by UX Team
  4. Felix Kopp commented on patch set 5 12/12/14, 12:12

    Hi Guys, just that I am not the blocker here quick summary from my side. I see the immense need to add a central Modal JS API to the core that delivers modals not only in one module but via BackenController. Please also see https://forge.typo3.org/issues/62334 and idea to add the modal DIV to BackendController as in https://github.com/7elix/TYPO3.CMS.Flat/blob/master/Classes/Controller/BackendController.php. The scope of the Modal API should be display Confirm box with call-back/return and load iFrame / AJAX content. In the long run I personally would like to bring the user settings into this modal and also edit view (BK disagreed currently) - in order to pop these views out of the normal workflow within backend modules. Frank, would you like to create a BluePrint for an early version of this Modal API and collect best practise examples? THANKS!
  5. Frank Nägler commented on patch set 5 12/12/14, 12:18

    Hey Felix, many thanks for your feedback! As I remember from the code sprint in Hamburg, the modals should be used rarely, but I agree, backend JS API for modals could be very nice. I will contact "BK" ;) And will follow up this issue.
  6. Frank Nägler uploaded patch set 6 12/23/14, 21:38

  7. Stefan Neufeind commented on patch set 6 V -1 CR +1 12/23/14, 21:51

    Looks nice, but there are some minor things: * deleting an element does not decrease the count on top of the list * trying to delete a page from listview which has sub-pages (and recursive delete off) fails. But don't we want to display some error then?
  8. Stefan Neufeind commented on patch set 6 12/23/14, 21:53

    Should we maybe have "Delete" be the default-action? I somehow feel that pressing enter to confirm or esc to abort is a common usecase. Since Cancel is the default, pressing enter currently cancels.
  9. Frank Nägler commented on patch set 6 12/23/14, 21:58

    imo no, delete should not be the default button to prevent accidentally deleting of records.
  10. Frank Nägler uploaded patch set 7 01/04/15, 17:14

  11. Frank Nägler commented on patch set 7 01/04/15, 17:15

    - fixed delete on pages which has subpages and show message. - change count of items in table header
  12. Frank Nägler uploaded patch set 8 01/04/15, 17:39

  13. Benjamin Kott voted on patch set 8 CR +1 V +1 01/04/15, 17:48

  14. Benni Mack uploaded patch set 9 01/04/15, 18:08

  15. Frank Nägler commented on patch set 9 V -1 01/04/15, 18:12

    on it again
  16. Frank Nägler uploaded patch set 10 01/04/15, 18:31

  17. Frank Nägler commented on patch set 10 01/04/15, 18:32

    Added: - remove panel after last row was removed - use JS translate function for button text instead of adding HTML data attribute in each row.
  18. Stefan Froemken commented on patch set 10 01/04/15, 19:38

    This Feature does not work in FF.
  19. Frank Nägler commented on patch set 10 01/04/15, 19:53

    it is developed in FF and tested in chrome, safari and FF. can you provide more information? maybe your browser cache?
  20. Benni Mack voted on patch set 10 CR +1 01/04/15, 19:57

  21. Stefan Froemken commented on patch set 10 V +1 01/04/15, 20:10

    Sorry. Shift+Cmd+r seems not to be enough. After opening dev-Tools it works.
  22. Benni Mack voted on patch set 10 V +2 01/04/15, 20:14

  23. Benjamin Kott voted on patch set 10 CR +1 V +1 01/04/15, 20:15

  24. Benni Mack voted on patch set 10 CR +2 01/04/15, 20:20

  25. Benni Mack merged patch set 10 01/04/15, 20:20