Added prevent default to markAllSeen click.
This commit is contained in:
parent
02f5cf76df
commit
716e428f07
1 changed files with 5 additions and 1 deletions
|
@ -56,7 +56,7 @@ class App.OnlineNotificationWidget extends App.Controller
|
||||||
@stop()
|
@stop()
|
||||||
|
|
||||||
# show popover
|
# show popover
|
||||||
items = App.OnlineNotification.search(sortBy: 'created_at', order: 'DESC' )
|
items = App.OnlineNotification.search( sortBy: 'created_at', order: 'DESC' )
|
||||||
counter = 0
|
counter = 0
|
||||||
for item in items
|
for item in items
|
||||||
if !item.seen
|
if !item.seen
|
||||||
|
@ -77,11 +77,15 @@ class App.OnlineNotificationWidget extends App.Controller
|
||||||
# insert data
|
# insert data
|
||||||
$( App.view('widget/online_notification')(items: items))
|
$( App.view('widget/online_notification')(items: items))
|
||||||
).on('shown.bs.popover', =>
|
).on('shown.bs.popover', =>
|
||||||
|
|
||||||
# show frontend times
|
# show frontend times
|
||||||
$('#markAllAsSeen').bind('click', (e) =>
|
$('#markAllAsSeen').bind('click', (e) =>
|
||||||
|
e.preventDefault()
|
||||||
@markAllAsSeen(items)
|
@markAllAsSeen(items)
|
||||||
);
|
);
|
||||||
@frontendTimeUpdate()
|
@frontendTimeUpdate()
|
||||||
|
).on('hide.bs.popover', =>
|
||||||
|
$('#markAllAsSeen').unbind('click')
|
||||||
)
|
)
|
||||||
|
|
||||||
fetch: =>
|
fetch: =>
|
||||||
|
|
Loading…
Reference in a new issue