[Phpmyadmin-devel] Show/hide column feature

Aris Feryanto aris_feryanto at yahoo.com
Mon Jul 11 03:59:36 CEST 2011


----- Original Message -----
> From: Piotr Przybylski <piotr.prz at gmail.com>
> 
> 2011/7/10 Aris Feryanto <aris_feryanto at yahoo.com>:
>>  Hi Piotr,
>>> 
>>>  2. Clickable area with column name may not span correctly in available
>>>  space if columns have short names [1]. It may not look too bad in
>>>  English, but in Polish "Show all" translates to much longer
>>>  "Pokaż
>>>  wszystkie". Maybe checkboxes should be inside <label>s with
>>>  display:block instead of using table for layout? Or styled <dl>, 
> but
>>>  this would require much more CSS to make it look right.
>>> 
>>>  [1] http://img829.imageshack.us/img829/1531/hidecolumns.png
>>> 
>> 
>>  Fixed in my git [1]. For the fix, I use nested div, instead of table for 
> layout.
>> 
> 
> One more thing.
> 
> +                $(listElmt).html('<input type="checkbox" ' 
> +
> (g.colVisib[i] ? 'checked="checked" ' : '') + 
> '/>' +
> +                           $(currHeader).text());
> 
> You use raw text - $(currHeader).text() - as HTML code. If a column is
> named "buggy<!--" then it isn't displayed properly in column 
> list. Use
> $element.text('here goes any text') to set element's text. In this
> version you just lose part of the column, but before this commit the
> entire list after such column was broken.
> 
> You can use this SQL to create test table:
> create table escape_test (`buggy<!--` int, second int);
> insert into escape_test values(1,1);


Hi Piotr,

That's right. I didn't know that we can use some special characters in column's name.
I fixed it in my git. Thank you for your feedback.


--
Aris Feryanto





More information about the Developers mailing list