[Phpmyadmin-devel] Problems in Sprites implementation

Tyron Madlener tyronx at gmail.com
Fri Sep 30 16:50:17 CEST 2011


On Tue, Sep 27, 2011 at 7:35 PM, Rouslan Placella <rouslan at placella.com> wrote:
> Hi there,
>
> I find that there are a number of problems with the current
> implementation of the CSS sprites in phpMyAdmin. So I took the time fix
> them and I'd appreciate some feedback on this.
>
> First of all, adding/removing icons to/from the sprites, as described in
> the Wiki[1] is a cumbersome manual process. So I've created a shell
> script, "scripts/generate-sprites", that completely automates this
> process (requires ImageMagick). This script is also called from
> "create-release.sh" for good measure.
>
> Another issue is that PMA is not aware of the presence of the sprites.
> This means that all themes for older versions of PMA won't display any
> icons, since PMA will just blindly apply the new sprites classes (which
> don't exists in these older themes) to icons. Also, developers are
> required to pass an extra argument to "PMA_getIcon()" to indicate that a
> particular icon is not available as a sprite. This IMO should be
> avoided. To fix these issues I created two new function, both are called
> "PMA_getImage()". One is for PHP and another is for JavaScript. These
> functions read data that is generated by the "generate-sprites" script
> and make PMA aware of which icons are available as sprites and which
> ones aren't for every theme.
>
> The code is available for scrutiny in the "sprites" branch of my public
> repo [2].
>
> So, if there are no objections, I will merge with master in a few days
> time and update the relevant Wiki page to reflect this change.
>
> Rouslan
>
> [1]:
> http://wiki.phpmyadmin.net/pma/Icons/Sprites_Usage#How_to_add_new_Icons.3F
> [2]:
> http://repo.or.cz/w/phpmyadmin/roccivic.git/shortlog/refs/heads/sprites
>
>

That is some nice ideas, I wouldn't know why not to put this into the
main branch.

>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> _______________________________________________
> Phpmyadmin-devel mailing list
> Phpmyadmin-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
>




More information about the Developers mailing list