Merge pull request #5676 from jupyter/title-by-label

Title new buttons with label if action undefined
pull/5678/head
Kevin Bates 6 years ago committed by GitHub
commit cd9d0c9fe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -92,10 +92,14 @@ define(['jquery','base/js/i18n'], function($, i18n) {
action = that.actions.get(el.action);
action_name = el.action
}
var title = el.label;
if(action && action.help) {
title = i18n.msg._(action.help) || el.label;
}
var button = $('<button/>')
.addClass('btn btn-default')
.attr("aria-label", el.label)
.attr("title", i18n.msg._(action.help)||el.label)
.attr("title", title)
.append(
$("<i/>").addClass(el.icon||(action||{icon:'fa-exclamation-triangle'}).icon).addClass('fa')
);

Loading…
Cancel
Save