this is a small patch that will allow the
"select-based" light menu provide a subtree grouping of
databases using the optgroup tag in HTML 4.
it adds two configuration options (near the
LeftFrameTableSeparator option) and a 20 line block of
code in queryframe.php (if statement)
patch based off of 2.6.3-pl1
path for update footer.inc.php updates the select menu table count
Logged In: YES
user_id=210714
Accepted. I had to modify libraries/config_import.lib.php
and common.lib.php to add the new directives to old config
files.
And I also modified Documentation.html.
Logged In: YES
user_id=838923
The second problem is that if I have databases foo and
foo_bak, then the optgroup foo contains only foo_bak, and
the database foo appears on its own before the optgroup. I
would want the database foo to instead occur inside the
foo optgroup.
I found it too difficult to make this change with the code
the way it was written, so I ended up reorganizing it a
bit. I hope this is ok.
In the process of making this change, I discovered a third
problem: if the last database is part of an optgroup, then
the optgroup is never closed. (See this, for example, by
creating a database called z_z and looking at the source.)
My rewrite corrects this problem as well.
This patch incorporates pma-escape-optgroup-label.patch...
http://www.ryandesign.com/pma-optgroup-rewrite.patch
Logged In: YES
user_id=210714
Ryan,
thanks, your latest patch has been merged.
Logged In: YES
user_id=838923
You know, we have a lot of databases with underscores in
the name but which are not part of a group of databases.
That is, we have "foo_bar" but there are no other
databases named starting with "foo_". Currently this gives
us lots of optgroups with only one item each. This makes
the menu very long -- one of our servers has 127 databases
-- so I'd like to keep the height increase to a minimum.
I'd prefer it if optgroups were only created if there are
at least 2 items in the group. If you agree, here's the
patch (it actually simplifies the code to do this):
http://www.ryandesign.com/pma-optgroup-min-2-items.patch
Logged In: YES
user_id=210714
Very good point. min-2-items patch merged.
Logged In: YES
user_id=8488
This patch makes the entries in the subtree not have the
parent part, to shorten the width of the select list.
patch to shorten display of subtree items
Logged In: YES
user_id=210714
Good idea urkle, but I would prefer letting the leading
underscore in place just for completeness, like this:
foo
_bar1
_bar2
This way, we could have
foo
foo
_bar1
_bar2
in case the plain "foo" db exists. Opinions?
Logged In: YES
user_id=8488
that sounds resonable.. I knew there was something missing
to make it look better.
Logged In: YES
user_id=838923
So if I had hypothetical databases live_foo and stage_foo
then only "_foo" would be shown in either case after I
select it. Even though the full database name is still
shown in other places on the screen, I'm worried that it
might cause confusion...
Logged In: YES
user_id=8488
well, the database name is displayed directly below that in
the frame that shows the tables and it is shown on the right
frame in the breadtrail at the top. Also adding the prefixed
'_' in the tree would let the user know that it is
abbreviated as opposed to my patch where the _ is not shown
so there is some abiguity.
Logged In: YES
user_id=210714
I think the confusion would be minor, because as urkle said,
the full db name is displayed just under the selector.
Anyway, the left part tends to be a username or a project
name, so it's less important to see it in the selector, IMO.
Logged In: YES
user_id=838923
Ok, I think you've convinced me. :-)
Logged In: YES
user_id=210714
I'll proceed with the patch plus underscore.
Ryan, are you getting my emails sent via the sf.net
interface? If not, write to me directly.