row actions kanban
This commit is contained in:
@@ -94,6 +94,9 @@ class KanbanRecordItem extends View {
|
||||
model: this.model,
|
||||
acl: acl,
|
||||
statusFieldIsEditable: this.options.statusFieldIsEditable,
|
||||
rowActionHandlers: this.options.rowActionHandlers || {},
|
||||
additionalActionList: this.options.additionalRowActionList,
|
||||
scope: this.options.scope,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,6 +283,8 @@ class KanbanRecordView extends ListRecordView {
|
||||
this.seedCollection.orderBy = this.collection.defaultOrderBy;
|
||||
this.seedCollection.order = this.collection.defaultOrder;
|
||||
|
||||
this.setupRowActionDefs();
|
||||
|
||||
this.listenTo(this.collection, 'sync', () => {
|
||||
if (this.hasView('modal') && this.getView('modal').isRendered()) {
|
||||
return;
|
||||
@@ -835,8 +837,11 @@ class KanbanRecordView extends ListRecordView {
|
||||
itemLayout: this.listLayout,
|
||||
rowActionsDisabled: this.rowActionsDisabled,
|
||||
rowActionsView: this.rowActionsView,
|
||||
rowActionHandlers: this._rowActionHandlers || {},
|
||||
setViewBeforeCallback: this.options.skipBuildRows && !this.isRendered(),
|
||||
statusFieldIsEditable: this.statusFieldIsEditable,
|
||||
additionalRowActionList: this._additionalRowActionList,
|
||||
scope: this.scope,
|
||||
}, callback);
|
||||
}
|
||||
|
||||
|
||||
@@ -1984,8 +1984,6 @@ class ListRecordView extends View {
|
||||
this.layoutName += 'Portal';
|
||||
}
|
||||
|
||||
this._rowActionHandlers = {};
|
||||
|
||||
this.setupRowActionDefs();
|
||||
|
||||
this.wait(
|
||||
@@ -3289,6 +3287,8 @@ class ListRecordView extends View {
|
||||
}
|
||||
|
||||
setupRowActionDefs() {
|
||||
this._rowActionHandlers = {};
|
||||
|
||||
const list = this.options.additionalRowActionList;
|
||||
|
||||
if (!list) {
|
||||
|
||||
@@ -37,7 +37,7 @@ class DefaultRowActionsView extends View {
|
||||
|
||||
setup() {
|
||||
this.options.acl = this.options.acl || {};
|
||||
this.scope = this.options.scope;
|
||||
this.scope = this.options.scope || this.model.entityType;
|
||||
|
||||
/** @type {Object.<string, {isAvailable: function(module:model, string)}>} */
|
||||
this.handlers = this.options.rowActionHandlers || {};
|
||||
|
||||
Reference in New Issue
Block a user