[Phpmyadmin-devel] Grid editing : saving mode

Aris Feryanto aris_feryanto at yahoo.com
Fri Jul 29 17:11:56 CEST 2011


----- Original Message -----

> From: Marc Delisle <marc at infomarc.info>
> 
> Aris Feryanto a écrit :
>>  ----- Original Message -----
>> 
>>>  From: Marc Delisle <marc at 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?

This is one way to implement OO-like structure in javascript. In makegrid.js, I implement grid-related functions in that way.

> 
> Other remarks:
> 
> 1. After saving all at once, there is an empty div with class notice 
> about the displayed UPDATE statement.

Fixed.

> 
> 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)?

Is "next to the other actions link" means somewhere near "Edit" or "Delete" button?

> 
> 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!

I hope so. Any objections?

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

IMO, this is not a problem, since user can see the updated value rather than the value disappear directly to other page.

> 
> 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.


Two problems above were fixed.

I just pushed my code to my git repo and the demo is already available in [0]. Any comment or suggestion is really appreciated.

[0] http://demo.phpmyadmin.net/gsoc-aris


--
Aris Feryanto




More information about the Developers mailing list