Add icon for buttons in the empty trash modal

pull/1/head
yflory 5 years ago
parent dfd50d103d
commit 84e32d73a3

@ -99,9 +99,12 @@
cursor: pointer;
border-radius: 0;
.fa {
.fa, .cptools {
margin-right: 0.2em;
}
.cptools {
vertical-align: middle;
}
color: @alertify-btn-fg;
border: 1px solid @alertify-btn-fg;

@ -395,7 +395,10 @@ define([
var navs = [];
buttons.forEach(function (b) {
if (!b.name || !b.onClick) { return; }
var button = h('button', { tabindex: '1', 'class': b.className || '' }, b.name);
var button = h('button', { tabindex: '1', 'class': b.className || '' }, [
b.iconClass ? h('i' + b.iconClass) : undefined,
b.name
]);
button.classList.add('btn');
var todo = function () {
var noClose = b.onClick();

@ -2410,7 +2410,8 @@ define([
}];
if (hasOwned) {
buttons.push({
className: 'secondary',
className: 'danger',
iconClass: '.cptools.cptools-destroy',
name: Messages.fc_delete_owned,
onClick: function () {
manager.emptyTrash(true, refresh);
@ -2421,6 +2422,7 @@ define([
buttons.push({
className: 'primary',
// We may want to use a new key here
iconClass: '.fa.fa-trash',
name: hasOwned ? Messages.fc_remove : Messages.okButton,
onClick: function () {
manager.emptyTrash(false, refresh);

Loading…
Cancel
Save