Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix #953

  • Loading branch information...
commit be5aec39ad47f4f81a8a734a2b5c9f07366ed94c 1 parent 7a8be71
@kblomqvist authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 cms/static/cms/js/plugins/cms.toolbar.js
View
5 cms/static/cms/js/plugins/cms.toolbar.js
@@ -293,13 +293,14 @@ jQuery(document).ready(function ($) {
// lets loop through the items
$(obj.items).each(function (index, value) {
// add icon if available
- var icon = value.icon ? 'cms_toolbar_icon cms_toolbar_icon-enabled ' : '';
+ var icon_value = value.icon ? value.icon : '';
+ var icon_class = value.icon ? 'cms_toolbar_icon cms_toolbar_icon-enabled ' : '';
// replace attributes
tmp += list.replace('[list_title]', value.title)
.replace('[list_url]', value.url)
.replace('[list_method]', value.method)
.replace('[list_class]', value.cls)
- .replace('<span>', '<span class="'+icon+'" style="background-image:url('+value.icon+');">');
+ .replace('<span>', '<span class="'+icon_class+'" style="background-image:url('+icon_value+');">');
});
// add items
template.find('.cms_toolbar-item_list').html($(tmp));

1 comment on commit be5aec3

@fivethreeo
    var style = value.icon ? ' style="background-image:url('+value.icon+');"' : '';
Please sign in to comment.
Something went wrong with that request. Please try again.