ref
This commit is contained in:
@@ -50,21 +50,15 @@ class NoteStreamView extends View {
|
||||
*/
|
||||
messageData = null
|
||||
|
||||
/**
|
||||
* @protected
|
||||
*/
|
||||
/** @protected */
|
||||
isEditable = false
|
||||
|
||||
/**
|
||||
* @protected
|
||||
*/
|
||||
/** @protected */
|
||||
isRemovable = false
|
||||
|
||||
/**
|
||||
* @protected
|
||||
*/
|
||||
/** @protected */
|
||||
isSystemAvatar = false
|
||||
|
||||
rowActionsView = 'views/stream/record/row-actions/default'
|
||||
|
||||
data() {
|
||||
return {
|
||||
isUserStream: this.isUserStream,
|
||||
@@ -115,7 +109,7 @@ class NoteStreamView extends View {
|
||||
};
|
||||
|
||||
if (!this.options.noEdit && (this.isEditable || this.isRemovable)) {
|
||||
this.createView('right', 'views/stream/row-actions/default', {
|
||||
this.createView('right', this.rowActionsView, {
|
||||
selector: '.right-container',
|
||||
acl: this.options.acl,
|
||||
model: this.model,
|
||||
|
||||
+27
-26
@@ -26,34 +26,35 @@
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
define('views/stream/row-actions/default', ['views/record/row-actions/edit-and-remove'], function (Dep) {
|
||||
import DefaultRowActionsView from 'views/record/row-actions/default';
|
||||
|
||||
return Dep.extend({
|
||||
class StreamDefaultNoteRowActionsView extends DefaultRowActionsView {
|
||||
|
||||
getActionList: function () {
|
||||
var list = [];
|
||||
getActionList() {
|
||||
const list = [];
|
||||
|
||||
if (this.options.acl.edit && this.options.isEditable) {
|
||||
list.push({
|
||||
action: 'quickEdit',
|
||||
label: 'Edit',
|
||||
data: {
|
||||
id: this.model.id,
|
||||
},
|
||||
});
|
||||
}
|
||||
if (this.options.acl.edit && this.options.isEditable) {
|
||||
list.push({
|
||||
action: 'quickEdit',
|
||||
label: 'Edit',
|
||||
data: {
|
||||
id: this.model.id,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (this.options.acl.edit && this.options.isRemovable) {
|
||||
list.push({
|
||||
action: 'quickRemove',
|
||||
label: 'Remove',
|
||||
data: {
|
||||
id: this.model.id,
|
||||
},
|
||||
});
|
||||
}
|
||||
if (this.options.acl.edit && this.options.isRemovable) {
|
||||
list.push({
|
||||
action: 'quickRemove',
|
||||
label: 'Remove',
|
||||
data: {
|
||||
id: this.model.id,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return list;
|
||||
},
|
||||
});
|
||||
});
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
export default StreamDefaultNoteRowActionsView;
|
||||
Reference in New Issue
Block a user