This is a migrated thread and some comments may be shown as answers.

Add an "OK" Button to Client Template of Notification

2 Answers 131 Views
Notification
This is a migrated thread and some comments may be shown as answers.
Steven
Top achievements
Rank 1
Steven asked on 04 May 2016, 08:35 PM
I am attempting to add an "OK" button to the client template of each Notification that will close the focused notification when the user clicks it.  I have reviewed the documentation and I can find how to close ALL notifications but not one's individually via a button within the client template.  Any would greatly appreciate any assistance on how to perform this action.  Thank you!

2 Answers, 1 is accepted

Sort by
0
Steven
Top achievements
Rank 1
answered on 05 May 2016, 06:24 PM

I think I just needed to walk away from it for a moment or two because I found a really easy step to perform the task I was looking to do.  I am just using a quick jQuery function to close each Notification with an "OK" button: 

1.$('.okay-btn').click(function () {
2.    $(this).closest('.k-notification').fadeOut(200, function () {
3.        $.getJSON('@Url.Action("Snooze", "Notifications")', { id: notifyId, _: $.now() }, function (data) {
4.            // noop
5.        });
6.    });
7.});

0
Dimitar
Telerik team
answered on 06 May 2016, 01:15 PM
Hi Steven,

I am glad to know that you have managed to find a solution for this case. Thank you for sharing it with the community.

Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Notification
Asked by
Steven
Top achievements
Rank 1
Answers by
Steven
Top achievements
Rank 1
Dimitar
Telerik team
Share this question
or