mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix error message on removing bulk actions from search, closes #3027
This commit is contained in:
parent
6c43b92bf1
commit
c727a2bc1b
@ -6,27 +6,27 @@ import server from "../../services/server.js";
|
|||||||
import toastService from "../../services/toast.js";
|
import toastService from "../../services/toast.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = `
|
||||||
<div class="bulk-assign-attributes-dialog modal mx-auto" tabindex="-1" role="dialog">
|
<div class="bulk-actions-dialog modal mx-auto" tabindex="-1" role="dialog">
|
||||||
<style>
|
<style>
|
||||||
.bulk-assign-attributes-dialog .modal-body h4:not(:first-child) {
|
.bulk-actions-dialog .modal-body h4:not(:first-child) {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bulk-assign-attributes-dialog .bulk-available-action-list button {
|
.bulk-actions-dialog .bulk-available-action-list button {
|
||||||
padding: 2px 7px;
|
padding: 2px 7px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bulk-assign-attributes-dialog .bulk-existing-action-list {
|
.bulk-actions-dialog .bulk-existing-action-list {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bulk-assign-attributes-dialog .bulk-existing-action-list td {
|
.bulk-actions-dialog .bulk-existing-action-list td {
|
||||||
padding: 7px;
|
padding: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bulk-assign-attributes-dialog .bulk-existing-action-list .button-column {
|
.bulk-actions-dialog .bulk-existing-action-list .button-column {
|
||||||
/* minimal width so that table remains static sized and most space remains for middle column with settings */
|
/* minimal width so that table remains static sized and most space remains for middle column with settings */
|
||||||
width: 50px;
|
width: 50px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@ -147,8 +147,16 @@ export default class BulkActionsDialog extends BasicWidget {
|
|||||||
|
|
||||||
entitiesReloadedEvent({loadResults}) {
|
entitiesReloadedEvent({loadResults}) {
|
||||||
// only refreshing deleted attrs, otherwise components update themselves
|
// only refreshing deleted attrs, otherwise components update themselves
|
||||||
if (loadResults.getAttributes().find(attr => attr.type === 'label' && attr.name === 'action' && attr.isDeleted)) {
|
if (loadResults.getAttributes().find(attr =>
|
||||||
this.refresh();
|
attr.type === 'label'
|
||||||
|
&& attr.name === 'action'
|
||||||
|
&& attr.noteId === 'bulkaction'
|
||||||
|
&& attr.isDeleted)) {
|
||||||
|
|
||||||
|
// this may be triggered from e.g. sync without open widget, then no need to refresh the widget
|
||||||
|
if (this.selectedOrActiveNoteIds && this.$widget.is(":visible")) {
|
||||||
|
this.refresh();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ export default class MermaidWidget extends NoteContextAwareWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
download(filename, text) {
|
download(filename, text) {
|
||||||
var element = document.createElement('a');
|
const element = document.createElement('a');
|
||||||
element.setAttribute('href', 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(text));
|
element.setAttribute('href', 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(text));
|
||||||
element.setAttribute('download', filename);
|
element.setAttribute('download', filename);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user