33654[FEATURE] Introduce AJAX functionality for list module
Commit message
Review
-
Code review CR +2
- Helmut Hummel +2
- Benni Mack +1
-
Verified V +2
- Helmut Hummel +2
- Benni Mack +1
Issues 1
Files 6
- typo3/sysext/backend/Classes/Controller/SimpleDataHandlerController.php6+38 −0
- typo3/sysext/backend/Classes/RecordList/AbstractRecordList.php+1 −1
- typo3/sysext/backend/Resources/Public/JavaScript/AjaxDataHandler.js2new+108 −0
- typo3/sysext/core/Configuration/DefaultConfiguration.php+4 −0
- typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php4+10 −9
- typo3/sysext/recordlist/Classes/RecordList.php2+1 −0
Review log 51
Show 26 earlier messages
-
Frank Nägler uploaded patch set 1 10/31/14, 00:55
-
Frank Nägler voted on patch set 1 CR -2 10/31/14, 00:56
-
Frank Nägler voted on patch set 1 V -1 10/31/14, 00:56
-
Frank Nägler uploaded patch set 2 10/31/14, 23:39
-
Markus Klein commented on patch set 2 11/01/14, 00:07
-
Frank Nägler uploaded patch set 3 11/01/14, 00:35
-
Frank Nägler commented on patch set 2 11/01/14, 00:36
ActionIconAjaxController.php:73ReplyDone -
Frank Nägler commented on patch set 3 11/01/14, 00:37
now pageTree refresh if page table changed per ajax -
Helmut Hummel commented on patch set 3 CR -1 11/01/14, 10:45
ActionIconAjaxController.php:34do we need this *at all*? There is tce_db.php which can be called with POST arguments to achieve any DataHandler action. can't we just call this script via Ajax? If not, we should add an Ajax wrapper for DataHandler actions. I would like to have DataHandler entry points as low as possible, as every entry point needs separate CSRF protection. Adding this controller, makes all actions handled by this controller susceptible against CSRF. -
Helmut Hummel commented on patch set 3 11/01/14, 10:48
ActionIconAjaxController.php:34Replyah, sorry I fixed the Ajax CSRF issue already ;) So no CSRF issue here, but anyway I'd like to propose to use a general DataHandler entry point -
Frank Nägler commented on patch set 3 11/01/14, 20:31
ActionIconAjaxController.php:34ReplyI am not sure how this wrapper should work, imo DataHandler is a kind of wrapper for record manipulation. But let us discuss this the next days on slack. -
Frank Nägler uploaded patch set 4 12/05/14, 17:54
-
Frank Nägler uploaded patch set 5 12/06/14, 20:52
-
Frank Nägler uploaded patch set 6 12/06/14, 20:53
-
Frank Nägler uploaded patch set 7 12/06/14, 20:57
-
Frank Nägler commented on patch set 7 CR 0 12/06/14, 20:59
thx @Helmut for the discussion yesterday, I think I found a good solution to prevent a new controller. If this patch goes into master we can add easy more AJAX calls e.g. for delete records. -
Frank Nägler uploaded patch set 8 12/06/14, 21:09
-
Georg Ringer voted on patch set 8 CR +1 V +1 12/06/14, 21:11
-
Stefan Neufeind commented on patch set 8 12/06/14, 21:21
I'm not exactly sure about the naming - "ActionIconAjaxController" and inside "WebList" etc. -
Stefan Neufeind commented on patch set 8 12/06/14, 21:23
Do we maybe need a spinner (instead of the icon) while waiting for the AJAX-call to return? "On -> spinner -> off"Maybe skip the exact filename. You're adding some more :-) I'd maybe just go for the functionality added instead.adds -
Frank Nägler commented on patch set 8 12/06/14, 21:50
@Stefan: Spinner is a nice idea, I would take care of this in a follow-up -
Markus Klein commented on patch set 8 CR -1 12/06/14, 23:34
DatabaseRecordList.php:1282hsc() missing, $param has '&' insideActionIconAjaxController.js:16This is the doc block for the WebList variable. please move it thereActionIconAjaxController.js:18move that somewhere else. eg into the comment aboveActionIconAjaxController.js:38a is a jquery object => $a as nameActionIconAjaxController.js:39a is already a jquery object, why running jQuery again on it?ActionIconAjaxController.js:44there should be a method named toggleClass() which takes the class and a state as params. That frees us of the variables above.ActionIconAjaxController.js:48don't calculate the same DOM elements over and over again.ActionIconAjaxController.js:66do this only once and not everytime.ActionIconAjaxController.js:72event.preventDefault()!!!ext_tables.php:22first param on new line as wellext_tables.php:23closing ); on new linetce_db.php:44I'd prefer a normal array, which is for sure faster than manipulating a class dynamically all the time -
Stefan Neufeind voted on patch set 8 V +1 12/06/14, 23:38
-
Helmut Hummel commented on patch set 8 CR -1 12/06/14, 23:45
Very nice Frank! This is going into a very good direction! There are still some things to clean up resolve. See my and Marcus' inline comments. Looking forward to get this in :)RecordList.php:238should be registered as requirejs moduleDatabaseRecordList.php:1278it is not necessary to create the token for each row since it is identical for all rows and actionsActionIconAjaxController.js:20in general, this should be an AMD module and registered with requirejsext_tables.php:23This controller does not exist any more :) -
Benni Mack commented on patch set 8 CR -1 12/07/14, 08:46
ActionIconAjaxController.js:20Replycorrect, also, this has nothing to do with web-list in my opinion. We need the same stuff in page module, so it should be hooked into there as well!ActionIconAjaxController.js:65use delegates, please! -
Benni Mack commented on patch set 8 12/07/14, 08:49
Actually, I would like to see a ajaxID which is a wrapper for tce_db. Then you can deal with format stuff properly. I can do this in a followup though.ext_tables.php:23ReplyLOL. Exactly. Please drop this change in this file.
-
Frank Nägler commented on patch set 8 CR -2 12/07/14, 10:46
thx for all your feedback, will take care of it today. -
Frank Nägler commented on patch set 8 12/07/14, 12:48
Reply
DoneReply
DoneRecordList.php:238ReplyDoneDatabaseRecordList.php:1278ReplyDoneDatabaseRecordList.php:1282Replythere is no '&' inside, hsc is addedActionIconAjaxController.js:16ReplyDoneActionIconAjaxController.js:18ReplyDoneActionIconAjaxController.js:20ReplyDoneActionIconAjaxController.js:20ReplyDoneActionIconAjaxController.js:38ReplyDoneActionIconAjaxController.js:39ReplyDoneActionIconAjaxController.js:65ReplyDoneActionIconAjaxController.js:72ReplyDoneext_tables.php:22ReplyDoneext_tables.php:23ReplyDoneext_tables.php:23ReplyDoneext_tables.php:23ReplyDonetce_db.php:44ReplyDone -
Frank Nägler uploaded patch set 9 12/07/14, 12:48
-
Frank Nägler commented on patch set 9 CR 0 12/07/14, 12:49
So take care of the most comments. @Markus don't understand all your hints, but I think the current patchset is much better. -
Stefan Neufeind commented on patch set 9 CR +1 12/07/14, 13:05
ext_tables.php:32So actually this file remains unchanged / could be excluded from the patchset :-) -
Markus Klein commented on patch set 9 12/08/14, 00:13
ActionIconAjaxController.js:56do this only once and save it to a variable, use it below -
Benni Mack uploaded patch set 10 12/08/14, 19:42
-
Benni Mack uploaded patch set 11 12/08/14, 20:03
-
Benni Mack uploaded patch set 12 12/08/14, 20:28
-
Benni Mack commented on patch set 12 12/08/14, 20:28
OK. Now I think this is a first version that should go in. One last question. With using AjaxIDs, do we need the formToken at all anymore? -
Helmut Hummel commented on patch set 12 12/09/14, 10:01
Wow, cool stuff Benni! Thanks for the further cleanup! Looks great now: To your question: no, with this (cleaner) approach we don't need the form token any more. It is checked in tce_db.php which is not used any more and the Ajax call is already CSRF protected automatically. The whole form token handling can thus be removed here -
Benni Mack uploaded patch set 13 12/09/14, 10:24
-
Frank Nägler commented on patch set 12 12/09/14, 10:24
+1. very cool patchset! Many thx! -
Benni Mack uploaded patch set 14 12/09/14, 10:31
-
Benni Mack commented on patch set 14 CR +1 V +1 12/09/14, 10:31
Now I like it :) -
Wouter Wolters commented on patch set 14 12/09/14, 10:40
SimpleDataHandlerController.php:250Processes all AJAX calls and returns a JSON formatted stringSimpleDataHandlerController.php:264initliailize hasErrors to FALSE hereSimpleDataHandlerController.php:275space after foreachAjaxDataHandler.js:32state === 'visible' is done 4 times now, maybe put that in a variable? -
Helmut Hummel uploaded patch set 15 12/09/14, 11:07
-
Helmut Hummel commented on patch set 14 12/09/14, 11:08
SimpleDataHandlerController.php:250ReplyDoneSimpleDataHandlerController.php:264ReplyDoneSimpleDataHandlerController.php:275ReplyDoneAjaxDataHandler.js:32ReplyDone -
Helmut Hummel voted on patch set 15 CR +2 V +2 12/09/14, 11:08
-
Benni Mack voted on patch set 15 CR +2 V +2 12/09/14, 11:11
-
Benni Mack updated the commit message in patch set 16 12/09/14, 11:13
-
Benni Mack voted on patch set 16 CR +1 V +1 12/09/14, 11:13
-
Helmut Hummel commented on patch set 16 CR +2 V +2 12/09/14, 11:19
Cool stuff! Great work! -
Helmut Hummel merged patch set 16 12/09/14, 11:19
-
Felix Kopp commented on patch set 17 12/10/14, 00:36
HAMMER!! Thank you all
ActionIconAjaxController.php:73