Re: [webmin-devel] MySQL module - multi line editor field sizes
Andreas Kilgus <[email protected]> Wed, 27 Aug 2008 10:23:25 +0200
| Newsgroups | gmane.comp.web.webmin.devel |
|---|---|
| Message-ID | <[email protected]> |
Jamie Cameron schrieb:
> On 25/Aug/2008 16:33 Andreas Kilgus wrote ..
>>
>> IMHO the way the multi line editor decides which kind of html form
>> element to use for specific fields is problematic. A field of type "text"
>> is represented by the means of a textarea while "varchar(4000)" gets a
>> one line input field (though the maximal size of 4000 chars is an
>> indicator that multi line text might be expected as value).
>>
>> Is there any reason I don't take into consideration at the moment not to
>> change "libexec/webmin/mysql/view_table.cgi" starting at line 300 into
>> something like
>>
>> elsif ($str[$j]->{'type'} =~ /\((\d+)\)/) {
>> # Show as known-size text
>> if ($1 < 256) {
>> local $nw = $1 > 70 ? 70 : $1;
>> $et .= &ui_textbox($nm, $d[$j], $nw);
>> } else {
>> $et .= &ui_textarea($nm, $d[$j], 3, 70);
>> }
>> }
>>
>> ?
>
> That's a good suggestion - I will include this in the next Webmin release.
That makes a good reading - as therefore I am not going to have to manually
maintain this miniature of a patch (actually I don't use webmin myself,
someone who uses it asked me for help). :-)
One could think of an algorithm to dynamically determine the number of rows
depending on the actual field size, but I suppose you don't want to
complicate the code.
> The only reason for the current code is that when I wrote it, large
> varchars weren't supported in MySQL.
There wasn't any offense intended, so there's no need for defence. ;-)
And it says something for your code that it was absolutely easy to find and
understand the relevant (for the "problem" mentioned here) part of it.
Andi
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
-
Forwarded by the Webmin development list at [email protected]
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel