node-red-dashboard icon indicating copy to clipboard operation
node-red-dashboard copied to clipboard

Notification node (ui_toast) - Layout Dialog - Class not applied

Open panandreas opened this issue 3 years ago • 2 comments

What are the steps to reproduce?

I am inserting a notification node (ui_toast). In Properties is select a layout "OK/Cancel Dialog" or "OK/Cancel Dialog with Input". Then I add a Class to the node.

What happens?

The class is not applied on the notification node.

What do you expect to happen?

I except my custom class to be applied to the notification node, so I can target it with CSS

Please tell us about your environment:

  • [X] Node-RED-Dashboard version: 3.2.0
  • [X] Node-RED version: 3.0.2
  • [X] node.js version: 16.13.2
  • [X] npm version: 8.1.2
  • [X] Platform/OS: Windows 10 / Ubuntu 22.04
  • [X] Browser: Independent

Solution:

The problem is solved by changing line 630 in "main.js": from confirm._options.template = '<md-dialog md-theme="{{ dialog.theme || dialog.defaultTheme }}" aria-label="{{ dialog.ariaLabel }}" >' +"

to confirm._options.template = '<md-dialog md-theme="{{ dialog.theme || dialog.defaultTheme }}" aria-label="{{ dialog.ariaLabel }}" class="' + msg.toastClass + ' >' +"

panandreas avatar Oct 05 '22 08:10 panandreas

Thanks - will patch and test.

dceejay avatar Oct 05 '22 16:10 dceejay

pushed to master - not yet on npm

dceejay avatar Oct 05 '22 17:10 dceejay

Now published

dceejay avatar Nov 24 '22 19:11 dceejay