[Phpmyadmin-devel] PMA Icon Spritify
tyronx at gmail.com
Sat Jul 23 08:39:44 CEST 2011
On Fri, Jul 22, 2011 at 2:48 PM, Tyron Madlener <tyronx at gmail.com> wrote:
> On Fri, Jul 22, 2011 at 11:33 AM, Michal Čihař <michal at cihar.com> wrote:
>> Dne Thu, 21 Jul 2011 18:33:09 +0300
>> Tyron Madlener <tyronx at gmail.com> napsal(a):
>>> Here you go: http://wiki.phpmyadmin.net/pma/Icons/Sprites_Usage
>>> I've added it to the Developer documentation.
>> Thanks I guess it will need some changes due to problems reported on
>> mailing list.
> I'm currently working on fixing these issues, but I keep stumbling
> over really odd code. Like PMA_linkOrButton(). If the url length of
> the link is too long, it creates a form instead of a text link. So far
> so good.
> But what it does is, it creates a submit button with type="image" (i
> didnt even know that exists), on the supplied icon, then adds a the
> link text after and in function.js some code attaches an onclick event
> to the text link so that you can submit the form with it too.
> I'm going to replace this stuff with a normal text link and attach a
> onclick event that submits the form, if that's ok. Then I can also
> replace all PMA_linkOrButton() images with css sprites.
Ok, commit ace73f25bbec0da26c97ef4e97583c3655c83c42 should fix all
mentioned issues. I have also partly rewritten PMA_linkOrButton()
This patch has one "limitation":
- If the URL Length for PMA_linkOrButton() is to long for a get
request and thus a post request is required, the code now relies on
have a table that has no index and a filled BLOB/TEXT column and you
want to delete/edit that row.
disabled, the text part of the button/link was not clickable either
(in above mentioned case).
But in return we gain following advantages:
- No type='image'-button oddities. In PMA_buttonOrImage() there's
actually a comment saying: "Opera has trouble with <input
type="image">" and is not being used, except for IE.
- CSS Sprites for Images in PMA_linkOrButton()
- I've found a bug where PMA_linkOrButton() generates a form and you
you pressed ok you will be asked to confirm a second time on the
server side. This bug is currently reproducible in QA_3_4 when you try
to delete row idx=4 in the table test.test on the demo server. If its
not there just generate above mentioned case.
- The code altogether is now more simple.
I've also removed js 1.1 support from functions.js in the process.
JS1.2 is available since 1997. I think we can safely remove that ;-)
>> Michal Čihař | http://cihar.com | http://blog.cihar.com
More information about the Developers