I am opening BugComment dialog in Bug module. Module opens but it adds extra buttons of undo, localisation, clone and delete which is unnecessary. Extra button is coming when I open it into another module, it work fine with same module. I have tried to find that button using class and tried to remove them but when I remove/hide/disable button on edit in another module it effect the edit dialog.
And may I know how to add dialogue title
I used to find class ui-dialog-title and added text to this class. Is there any another way to add dialog title
See here https://github.com/volkanceylan/Serenity/issues/1286
and search for getToolbarButtons in samples.
Also see https://github.com/volkanceylan/Serenity/issues/1889 for title
I have followed #1286 but still facing the same issue. Actually, I have dialog over another dialog.
Code snippet I have added is super.updateInterface();. For more you can check below code
protected afterLoadEntity() {
super.afterLoadEntity();
super.updateInterface();
}
Use
protected getToolbarButtons(): Serenity.ToolButton[] {
var b = super.getToolbarButtons();
b.splice(Q.indexOf(b, x => x.cssClass == "delete-button"), 1);
b.splice(Q.indexOf(b, x => x.cssClass == "undo-delete-button"), 1);
b.splice(Q.indexOf(b, x => x.cssClass == "localization-button"), 1);
b.splice(Q.indexOf(b, x => x.cssClass == "clone-button"), 1);
return b;
}
buttons.push({
title: Q.text('Comments'),
cssClass: 'comment-button',
icon: 'icon-speech text-blue',
onClick: () => {
var dlg = new CommentUserDialog();
this.initDialog(dlg);
dlg.loadEntityAndOpenDialog(<CommentUserRow>{
UserID: 1, // your value
secondField: value
});
}
});
The way I had implemented opendialog was incorrect. When I have followed the above code I am seeing the actual dialog.
Thanks
You can close the ticket.
Hi @Itsathere
you can Close the ticket yourself :-)
With Kind regards,
John
Most helpful comment
I have followed #1286 but still facing the same issue. Actually, I have dialog over another dialog.
Code snippet I have added is super.updateInterface();. For more you can check below code
protected afterLoadEntity() { super.afterLoadEntity(); super.updateInterface(); }