mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Add icon for buttons in the empty trash modal
This commit is contained in:
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…
Reference in New Issue
Block a user