forked from External/greenlight
Merge pull request #62 from zach-chai/caching_fix
destroy recordings table before caching page
This commit is contained in:
commit
41c9e7798f
|
@ -102,6 +102,9 @@ class @Recordings
|
|||
};
|
||||
$('#recordings').tooltip(options)
|
||||
|
||||
$(document).on "turbolinks:before-cache", =>
|
||||
@getTable().api().clear().draw().destroy()
|
||||
|
||||
# enable popovers
|
||||
options = {
|
||||
selector: '.has-popover',
|
||||
|
@ -150,7 +153,7 @@ class @Recordings
|
|||
# setup click handlers for the action buttons
|
||||
setupActionHandlers: ->
|
||||
table_api = this.table.api()
|
||||
this.table.on 'click', '.recording-update', (event) ->
|
||||
@getTable().on 'click', '.recording-update', (event) ->
|
||||
btn = $(this)
|
||||
row = table_api.row($(this).closest('tr')).data()
|
||||
url = $('.meeting-url').val()
|
||||
|
@ -182,6 +185,9 @@ class @Recordings
|
|||
btn.prop('disabled', false)
|
||||
)
|
||||
|
||||
getTable: ->
|
||||
@table
|
||||
|
||||
isOwner: ->
|
||||
@owner
|
||||
|
||||
|
|
Loading…
Reference in New Issue