I am using Backbone.Notifier for showing alerts. How could I display custom backbone view inside it?
Any suggestion?
I am using Backbone.Notifier for showing alerts. How could I display custom backbone view
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Don’t think it’s suited to adding your own custom view. Customization of the notifications view comes through CSS.
For customising buttons you can use the css property :
For customising the base notification window use the ‘notifier’ CSS class.
You can change this with the ‘baseCls’ property on the notifier.
Unfortunately I don’t think there’s a way of assigning a Backbone view to the notifier but if it’s just customization of the aesthetics you want then hopefully the CSS is enough.
If you really wanted to go for a hacky approach you could use the NotificationView which is a standard Backbone View (part of the Notifier class – Backbone.Notifier.NotificationView). You could try overriding this to your implementation but it’s definitely a hack so wouldn’t recommend it. It’s worth taking a look at the notifer.js source code.