remove action fix
This commit is contained in:
@@ -2962,8 +2962,26 @@ class DetailRecordView extends BaseRecordView {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.isRendered()) {
|
||||
this.$el.find('.detail-button-container .action[data-action="'+name+'"]').remove();
|
||||
if (!this.isRendered()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const $container = this.$el.find('.detail-button-container');
|
||||
|
||||
const $action = $container.find(`ul > li > a.action[data-action="${name}"]`);
|
||||
|
||||
if ($action.length) {
|
||||
$action.parent().remove();
|
||||
|
||||
$container.find(`ul > .divider:last-child`).remove();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const $button = $container.find(`button.action[data-action="${name}"]`);
|
||||
|
||||
if ($button.length) {
|
||||
$button.remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,11 +59,15 @@ class CreateNoteStreamView extends NoteStreamView {
|
||||
this.assignedUserName = data.assignedUserName || data.assignedUserId || null;
|
||||
|
||||
this.messageData['assignee'] =
|
||||
$('<a>')
|
||||
.attr('href', `#User/view/${this.assignedUserId}`)
|
||||
.text(this.assignedUserName)
|
||||
.attr('data-scope', 'User')
|
||||
.attr('data-id', this.assignedUserId);
|
||||
$('<span>')
|
||||
.append(
|
||||
this.getHelper().getAvatarHtml(data.assignedUserId, 'small', 16, 'avatar-link'),
|
||||
$('<a>')
|
||||
.attr('href', `#User/view/${this.assignedUserId}`)
|
||||
.text(this.assignedUserName)
|
||||
.attr('data-scope', 'User')
|
||||
.attr('data-id', this.assignedUserId)
|
||||
);
|
||||
|
||||
let isYou = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user