[Phpmyadmin-devel] Column reordering
Aris Feryanto
aris_feryanto at yahoo.com
Thu Jun 9 11:04:55 CEST 2011
Hi Marc,
----- Original Message -----
> From: Marc Delisle <marc at infomarc.info>
>
> Aris Feryanto a écrit :
>> Hi all,
>>
>> I pushed my work to git repo in [0]. My recent commits add functionality to
> remember the column order, so that when we press next, prev, or anything that
> refresh the table, we will get same column order. The commits also fix some bugs
> and implement some previous suggestions. If you have some time, you may test the
> demo at [1]. Any comment or suggestion is really appreciated. :)
>>
>> Here is the list of what I did:
>>
>> - Remember column order in session or phpMyAdmin configuration storage, if
> configured.
>
> Aris,
> I had a little time to test today. I had a look at how you store the
> column order in pma_table_uiprefs. You are using column numbers. This
> gave me an idea for a possible bug which I tested and proved indeed a bug.
>
> If a structure change occurs in the table (let's say I add a column,
> either after an existing column or at the end), display problems happen.
>
> I also see
> Notice in ./libraries/display_tbl.lib.php#461
> Undefined index: cf7e1a12c9f636989429f8e2d369eaa5
>
> on a table on which I added a column.
Fixed. To solve the problem caused by changing table structure, I add some checking of table creation time, so everytime a table is modified, the column order will be reset (any better way?). Please check it in my git repo or test in the demo server [0].
In my last commit, I also fix a bug for "Remember table sorting". I add checking whether the remembered sorted-column still exist in the table.
[0] http://demo.phpmyadmin.net/gsoc-aris
>
>> - Add "Restore table" button to restore table order.
>
> We'll have to find a better name for this button... but it works well.
> Also I'm not sure about showing it greyed when columns are in original
> order.
>
How about "Restore column" ?
At first, I only set property "disabled" for the button and expect it will be rendered differently from other buttons. But, it just rendered similar with other buttons. So, I greyed the button manually.
--
Aris Feryanto
More information about the Developers
mailing list