Merge remote-tracking branch 'origin/stable'

This commit is contained in:
zadam
2020-04-29 22:27:46 +02:00
7 changed files with 9 additions and 8 deletions

View File

@@ -34,7 +34,8 @@ export default class CollapsibleWidget extends TabAwareWidget {
this.$bodyWrapper = this.$widget.find('.body-wrapper');
this.$bodyWrapper.attr('id', this.componentId); // for toggle to work we need id
this.widgetName = this.constructor.name;
// not using constructor name because of webpack mangling class names ...
this.widgetName = this.widgetTitle.replace(/[^[a-zA-Z0-9]/g, "_");
if (!options.is(this.widgetName + 'Collapsed')) {
this.$bodyWrapper.collapse("show");

View File

@@ -15,7 +15,7 @@ import Mutex from "../services/mutex.js";
*/
export default class Component {
constructor() {
this.componentId = `comp-${this.constructor.name}-` + utils.randomString(6);
this.componentId = `comp-` + utils.randomString(8);
/** @type Component[] */
this.children = [];
this.initialized = Promise.resolve();

View File

@@ -177,7 +177,7 @@ export default class NoteTreeWidget extends TabAwareWidget {
// This function MUST be defined to enable dropping of items on the tree.
// data.hitMode is 'before', 'after', or 'over'.
const selectedBranchIds = this.getSelectedNodes().map(node => node.data.branchId);
const selectedBranchIds = this.getSelectedOrActiveNodes().map(node => node.data.branchId);
if (data.hitMode === "before") {
branchService.moveBeforeBranch(selectedBranchIds, node.data.branchId);