Aris Feryanto a écrit :
----- Original Message -----
From: Marc Delisle marc@infomarc.info
Aris Feryanto a écrit :
I just pushed code to my git repo. I added ability to save all edited cells at once (configurable via Settings -> Main frame -> Browse mode -> Save all edited cells at once). But there are still some problems that I'm currently trying to solve: - the links for
"relation" cells
are gone after we save the edited cells - all TEXT data type is considered as edited, even when we do not do any editing Other than these, I think the user interface and way of editing are ready to be tested.
Aris, I tested your tree (0d422a3a12d1734115c7a0e4b410dfc35d453aa2). In the default setting of saving at once (with the "Save edited data" button)
my simple test of sakila.actor worked fine.
With the opposite setting, when trying to save my change to last_name, I get: $this_field is not defined in makegrid.js line 970.
Thank you for noticing this. I just fixed it and pushed the changes to my repo.
I confirm the fix.
Please check the new code and let me know what do you think about it.
I am not familiar with this kind of syntax: postEditedCell: function() {
Could you explain why this was needed?
Other remarks:
1. After saving all at once, there is an empty div with class notice about the displayed UPDATE statement.
2. I wonder about the best place to display the "Save edited data" button. Maybe on the data row (next to the other actions link)?
3. I hope that we'll get the OK from other developers to remove the row inline edit feature, because with the current code,
3.1 we have two features to do almost the same thing 3.2 currently, clicking on inline edit then on a cell activates the grid editing!
4. With this feature, we have the same problems as with inline edit, such as:
4.1 (minor) If there is a sort over one column then this column is edited for one row, the sorting order is no longer respected
4.2 (major) For tables with a unique key, if this key is edited, the Edit, Copy and Delete links no longer contain a valid where_clause parameter and the multi-rows actions at the bottom (with selected) no longer work.
4.3 (major) For tables without a unique key, if any column is edited, the Edit, Copy and Delete links no longer contain a valid where_clause parameter and the multi-rows actions at the bottom (with selected) no longer work.
Currently, I only add the configuration in the Settings page.
It will be needed also in /setup.
I have added the /setup in my commit before.
Great.