If you look at the toolbar helper and the way that we implement the icon selection for a custom toolbar item and the way we determine an id for the button you will see that it is based on an image name eg
\JToolbarHelper::custom('searches.reset', 'refresh.png', 'refresh_f2.png', 'JSEARCH_RESET', false);
IIRC this was for backwards compatibility with J2.5. As we dont have those images in core the code needs to be refactored to just use an icon and id name AND we need to be able to have an id that is not based on the icon so that we can avoid duplicate id on the page just because we have the same icon used more than once
Labels |
Added:
?
|
I guess that we will be waiting until hell freezes over then ;)
Category | ⇒ | Code style |
Status | New | ⇒ | Discussion |
Have they started?
You do make me laugh, @brianteeman
@brianteeman still on hold till we finalise the specs
I have some idea very similar to #18501 on only php part and still 100% B/C
$toolbar = $container->get('toolbar');
// First button
$toolbar->addNew('JTOOLBAR_NEW')
->addClass('hasTooltip btn-success')
->setIcon('ok')
->setTask('article.new')
->setDisabled(!$canDo->core_create);
// Second button
$toolbar->addPublished('JTOOLBAR_PUBLISHED')
-> //...
// B/C
$toolbar->addButton('Custom', ...);
closed as in progress elsewhere
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-03-23 23:08:55 |
Closed_By | ⇒ | brianteeman |
I've already started refactoring the toolbar with basic aims:
Check the code: https://github.com/joomla/joomla-cms/compare/4.0-dev...dgt41:ยง4.0-dev-toolbar-cleanup?expand=1
NOTE: That branch is effectively frozen for some time now awaiting UX devisions