ElkArte Community

Elk Development => Feature Discussion => Topic started by: emanuele on January 07, 2015, 12:46:08 pm

Title: Admin menu icon
Post by: emanuele on January 07, 2015, 12:46:08 pm
Code: [Select]
'icon' => 'transparent.png',
Is in... almost all the entries of the menu.

Is it really necessary?
Can't we just drop it and use... I guess the css?
Title: Re: Admin menu icon
Post by: Spuds on January 07, 2015, 09:17:10 pm
I'd guess yes ... may have been some ie8 needed?
Title: Re: Admin menu icon
Post by: emanuele on January 08, 2015, 06:13:42 am
Dunno...
But anyway, if the transparent icon is needed everywhere, we can just add it to the template instead of having it in the menu array I think... no?
Title: Re: Admin menu icon
Post by: Spuds on January 08, 2015, 10:45:45 am
Code: [Select]
						if (isset($area['icon']))
$menu_context['sections'][$section_id]['areas'][$area_id]['icon'] = '<img ' . (isset($area['class']) ? 'class="' . $area['class'] . '" ' : 'style="background: none"') . ' src="' . $context['menu_image_path'] . '/' . $area['icon'] . '" alt="" />  ';
Right now the code allows you to pass an icon name and use that as the image or use the class name on the transparent image.  So its easy for addons to use a non-sprite image in the menu with icon.

I think you can remove it and just change that code around a bit, maybe isset($area['class']) do a sprite else isset($area['icon']) do an icon?  Could probably update the css as well, use a pseudo instead of the image tag for the class call.